[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.uiworkorder.inc.php, 1.7 class.sot
From: |
sigurdne |
Subject: |
[Phpgroupware-cvs] property/inc class.uiworkorder.inc.php, 1.7 class.sotenant_claim.inc.php, 1.3 class.uitenant_claim.inc.php, 1.3 class.soinvoice.inc.php, 1.12 |
Date: |
Fri, 15 Apr 2005 10:30:00 +0200 |
Update of property/inc
Modified Files:
Branch: MAIN
class.uiworkorder.inc.php lines: +4 -2
class.sotenant_claim.inc.php lines: +3 -2
class.uitenant_claim.inc.php lines: +204 -8
class.soinvoice.inc.php lines: +2 -3
Log Message:
no message
====================================================
Index: property/inc/class.uiworkorder.inc.php
diff -u property/inc/class.uiworkorder.inc.php:1.6
property/inc/class.uiworkorder.inc.php:1.7
--- property/inc/class.uiworkorder.inc.php:1.6 Thu Apr 14 14:48:39 2005
+++ property/inc/class.uiworkorder.inc.php Fri Apr 15 08:30:41 2005
@@ -610,10 +610,12 @@
{
$values['key_deliver']=$project['key_deliver'];
}
- if( $project['charge_tenant'] &&
!$values['workorder_id'])
+
+/* if( $project['charge_tenant'] &&
!$values['workorder_id'])
{
$values['charge_tenant']=$project['charge_tenant'];
}
+*/
if( $project['start_date'] &&
!$values['start_date'])
{
$values['start_date']=$project['start_date'];
====================================================
Index: property/inc/class.sotenant_claim.inc.php
diff -u property/inc/class.sotenant_claim.inc.php:1.2
property/inc/class.sotenant_claim.inc.php:1.3
--- property/inc/class.sotenant_claim.inc.php:1.2 Thu Apr 14 14:48:39 2005
+++ property/inc/class.sotenant_claim.inc.php Fri Apr 15 08:30:41 2005
@@ -143,7 +143,8 @@
'tenant_id' =>
$this->db->f('tenant_id'),
'remark' =>
stripslashes($this->db->f('remark')),
'entry_date' =>
$this->db->f('entry_date'),
- 'category' =>
$this->db->f('category')
+ 'category' =>
$this->db->f('category'),
+ 'status' =>
$this->db->f('status')
);
}
return $claims;
====================================================
Index: property/inc/class.uitenant_claim.inc.php
diff -u property/inc/class.uitenant_claim.inc.php:1.2
property/inc/class.uitenant_claim.inc.php:1.3
--- property/inc/class.uitenant_claim.inc.php:1.2 Thu Apr 14 14:48:39 2005
+++ property/inc/class.uitenant_claim.inc.php Fri Apr 15 08:30:41 2005
@@ -125,6 +125,7 @@
(
'claim_id'
=> $claim['claim_id'],
'project_id'
=> $claim['project_id'],
+ 'status'
=> lang($claim['status']),
'name'
=> $name,
'entry_date'
=> $claim['entry_date'],
'category'
=> $claim['category'],
@@ -146,6 +147,7 @@
(
'lang_project' => lang('Project'),
'lang_name' => lang('name'),
+ 'lang_status' => lang('Status'),
'lang_time_created' => lang('time created'),
'lang_view' => lang('view'),
'lang_edit' => lang('edit'),
@@ -258,7 +260,7 @@
'allrows'
=> $this->allrows,
'start_record'
=> $this->start,
'record_limit'
=> $record_limit,
- 'num_records'
=> count($claims_list),
+ 'num_records'
=> count($claim_list),
'all_records'
=> $this->bo->total_records,
'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi','default'),
@@ -304,6 +306,8 @@
{
$receipt['message'][] = array('msg'=>lang('%1
claim is already registered for this project',$total_records));
$GLOBALS['phpgw']->session->appsession('session_data','tenant_claim_receipt',$receipt);
+ $this->bo->status = 'all';
+ $this->status = 'all';
$this->index($project_id);
}
else
@@ -316,6 +320,11 @@
function edit($project_id='')
{
+ if(!$this->acl_add && !$this->acl_edit)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=2&acl_location='
. $this->acl2_location);
+ }
+
$claim_id =
get_var('claim_id',array('POST','GET'));
$values = get_var('values',array('POST'));
@@ -591,6 +600,13 @@
function delete()
{
+
+ if(!$this->acl_delete)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=8&acl_location='
. $this->acl2_location);
+ }
+
+
$claim_id =
get_var('claim_id',array('POST','GET'));
$delete = get_var('delete',array('POST'));
$confirm = get_var('confirm',array('POST'));
@@ -629,20 +645,194 @@
}
-
function view()
{
- $claim_id = get_var('claim_id',array('GET'));
- $action = get_var('action',array('GET'));
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=1&acl_location='
. $this->acl2_location);
+ }
+
+ $claim_id =
get_var('claim_id',array('POST','GET'));
+
+ $this->boproject=
CreateObject($this->currentapp.'.boproject');
+
$GLOBALS['phpgw']->xslttpl->add_file(array('tenant_claim'));
+
+ $values = $this->bo->read_single($claim_id);
+
+ $project_values =
$this->boproject->read_single($values['project_id']);
+
+ $table_header_workorder[] = array
+ (
+ 'lang_workorder_id' =>
lang('Workorder'),
+ 'lang_budget' =>
lang('Budget'),
+ 'lang_calculation' =>
lang('Calculation'),
+ 'lang_vendor' =>
lang('Vendor'),
+ 'lang_charge_tenant' => lang('Charge
tenant'),
+ 'lang_select' =>
lang('Select')
+ );
- $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('Tenant claim') . ': ' . lang('view claim');
+ $bolocation =
CreateObject($this->currentapp.'.bolocation');
- $GLOBALS['phpgw']->xslttpl->add_file('tenant_claim');
+ $location_data=$bolocation->initiate_ui_location(array(
+ 'values' =>
$project_values['location_data'],
+ 'type_id' =>
count(explode('-',$project_values['location_data']['location_code'])),
+ 'no_link' =>
False, // disable lookup links for location type less than type_id
+ 'tenant' =>
$project_values['location_data']['tenant_id'],
+ 'lookup_type' => 'view',
+ 'lookup_entity' =>
$this->bocommon->get_lookup_entity('project'),
+ 'entity_data' =>
$project_values['p']
+ ));
- $claim = $this->bo->read_single($claim_id);
+ if($project_values['contact_phone'])
+ {
+ for
($i=0;$i<count($location_data['location']);$i++)
+ {
+
if($location_data['location'][$i]['input_name'] == 'contact_phone')
+ {
+
unset($location_data['location'][$i]['value']);
+ }
+ }
+ }
+
+
+ if($project_values['location_data']['tenant_id'] &&
!$values['tenant_id']):
+ {
+ $values['tenant_id'] =
$project_values['location_data']['tenant_id'];
+ $values['last_name'] =
$project_values['location_data']['last_name'];
+ $values['first_name'] =
$project_values['location_data']['first_name'];
+ }
+ elseif($values['tenant_id']):
+ {
+ $tenant=
$this->bocommon->read_single_tenant($values['tenant_id']);
+ $values['last_name'] =
$tenant['last_name'];
+ $values['first_name'] =
$tenant['first_name'];
+ }
+ endif;
+
+
+ if($values['workorder'] &&
$project_values['workorder_budget'])
+ {
+ foreach ($values['workorder'] as $workorder_id)
+ {
+ for
($i=0;$i<count($project_values['workorder_budget']);$i++)
+ {
+
if($project_values['workorder_budget'][$i]['workorder_id'] == $workorder_id)
+ {
+
$project_values['workorder_budget'][$i]['selected'] = True;
+ }
+ }
+ }
+ }
+
+
+ for
($i=0;$i<count($project_values['workorder_budget']);$i++)
+ {
+ $claimed=
$this->bo->check_claim_workorder($project_values['workorder_budget'][$i]['workorder_id']);
+
+ if($claimed)
+ {
+
$project_values['workorder_budget'][$i]['claimed'] = $claimed;
+ }
+ }
+
+
+
+
$b_account_data=$this->bocommon->initiate_ui_budget_account_lookup(array(
+ 'b_account_id' =>
$values['b_account_id'],
+ 'b_account_name' =>
$values['b_account_name'],
+ 'type' => 'view'));
+
+
+ $msgbox_data = $this->bocommon->msgbox_data($receipt);
$data = array
(
+ 'table_header_workorder' =>
$table_header_workorder,
+ 'lang_no_workorders' =>
lang('No workorder bugdet'),
+ 'workorder_link'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiworkorder.view'),
+ 'lang_start_date'
=> lang('Project start date'),
+ 'value_start_date'
=> $project_values['start_date'],
+
+ 'lang_end_date'
=> lang('Project end date'),
+ 'value_end_date'
=> $project_values['end_date'],
+
+ 'lang_charge_tenant' =>
lang('Charge tenant'),
+ 'charge_tenant'
=> $project_values['charge_tenant'],
+
+ 'lang_power_meter'
=> lang('Power meter'),
+ 'value_power_meter'
=> $project_values['power_meter'],
+
+ 'lang_budget'
=> lang('Budget'),
+ 'value_budget'
=> $project_values['budget'],
+
+ 'lang_reserve'
=> lang('reserve'),
+ 'value_reserve'
=> $project_values['reserve'],
+ 'lang_reserve_statustext' =>
lang('Enter the reserve'),
+
+ 'lang_reserve_remainder' =>
lang('reserve remainder'),
+ 'value_reserve_remainder' =>
$reserve_remainder,
+ 'value_reserve_remainder_percent'=>
$remainder_percent,
+
+ 'location_data'
=> $location_data,
+ 'location_type'
=> 'view',
+
+ 'lang_project_id'
=> lang('Project ID'),
+ 'value_project_id'
=> $project_values['project_id'],
+ 'lang_name'
=> lang('Name'),
+ 'value_name'
=> $project_values['name'],
+
+ 'lang_descr'
=> lang('Description'),
+
+ 'sum_workorder_budget' =>
$project_values['sum_workorder_budget'],
+ 'sum_workorder_calculation' =>
$project_values['sum_workorder_calculation'],
+ 'workorder_budget'
=> $project_values['workorder_budget'],
+ 'sum_workorder_actual_cost' =>
$project_values['sum_workorder_actual_cost'],
+ 'lang_actual_cost'
=> lang('Actual cost'),
+ 'lang_coordinator'
=> lang('Coordinator'),
+ 'lang_sum'
=> lang('Sum'),
+ 'select_user_name'
=> 'project_values[coordinator]',
+ 'lang_no_user'
=> lang('Select coordinator'),
+ 'user_list'
=>
$this->bocommon->get_user_list('select',$project_values['coordinator'],$extra=False,$default=False,$start=-1,$sort='ASC',$order='account_lastname',$query='',$offset=-1),
+
+ 'status_list'
=> $this->boproject->select_status_list('select',$project_values['status']),
+ 'lang_no_status'
=> lang('Select status'),
+ 'lang_status'
=> lang('Status'),
+
+ 'currency'
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['currency'],
+
+ 'lang_contact_phone' =>
lang('Contact phone'),
+ 'contact_phone'
=> $project_values['contact_phone'],
+
+ 'b_account_data'
=> $b_account_data,
+
+ 'cat_list_project'
=>
$this->boproject->select_category_project_list('select',$project_values['cat_id']),
+
+//------------------
+
+ 'lang_status'
=> lang('Status'),
+ 'status_list'
=> $this->bo->get_status_list(array('format' => 'select', 'selected' =>
$values['status'],'default' => 'open')),
+
+ 'lang_amount'
=> lang('amount'),
+ 'value_amount'
=> $values['amount'],
+
+ 'lang_tenant'
=> lang('tenant'),
+ 'value_tenant_id'
=> $values['tenant_id'],
+ 'value_last_name'
=> $values['last_name'],
+ 'value_first_name'
=> $values['first_name'],
+ 'size_last_name'
=> strlen($values['last_name']),
+ 'size_first_name'
=> strlen($values['first_name']),
+
+ 'lang_claim_id'
=> lang('ID'),
+ 'value_claim_id'
=> $claim_id,
+ 'lang_remark'
=> lang('remark'),
+ 'lang_category'
=> lang('category'),
+ 'lang_save'
=> lang('save'),
+ 'lang_cancel'
=> lang('cancel'),
+ 'lang_apply'
=> lang('apply'),
+ 'value_remark'
=> $values['remark'],
+ 'value_cat'
=> $values['cat'],
+ 'cat_list'
=> $this->bo->select_category_list('select',$values['cat_id']),
+
'done_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uitenant_claim.index'),
'lang_name' => lang('name'),
'lang_category' => lang('category'),
@@ -651,10 +841,16 @@
'value_name' =>
$tenant_claim['name'],
'value_cat' =>
$this->bo->read_category_name($tenant_claim['cat_id']),
'value_date' =>
$GLOBALS['phpgw']->common->show_date($tenant_claim['entry_date'])
+
);
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('Tenant claim') . ': ' . ($claim_id?lang('edit claim'):lang('add claim'));
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('view' => $data));
$GLOBALS['phpgw']->xslttpl->pp();
}
+
+
+
+
}
?>
====================================================
Index: property/inc/class.soinvoice.inc.php
diff -u property/inc/class.soinvoice.inc.php:1.11
property/inc/class.soinvoice.inc.php:1.12
--- property/inc/class.soinvoice.inc.php:1.11 Thu Apr 14 14:48:39 2005
+++ property/inc/class.soinvoice.inc.php Fri Apr 15 08:30:41 2005
@@ -356,9 +356,8 @@
$filtermethod = " WHERE ( bilagsnr=
'$voucher_id')";
}
- $sql = "SELECT
$table.*,fm_workorder.status,fm_workorder.charge_tenant,org_name,fm_project.claim_issued
FROM $table "
+ $sql = "SELECT
$table.*,fm_workorder.status,fm_workorder.charge_tenant,org_name,fm_workorder.claim_issued
FROM $table "
. " $this->left_join fm_workorder on fm_workorder.id =
$table.pmwrkord_code "
- . " $this->join fm_project on fm_project.id =
fm_workorder.project_id"
. " $this->join fm_vendor on $table.spvend_code =
fm_vendor.id $filtermethod ";
$this->db2->query($sql,__LINE__,__FILE__);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc class.uiworkorder.inc.php, 1.7 class.sotenant_claim.inc.php, 1.3 class.uitenant_claim.inc.php, 1.3 class.soinvoice.inc.php, 1.12,
sigurdne <=
- Prev by Date:
[Phpgroupware-cvs] property/templates/base tenant_claim.xsl,1.2
- Next by Date:
[Phpgroupware-cvs] skel/inc hook_add_def_pref.inc.php, 1.3 class.skel.inc.php, 1.3 hook_admin.inc.php, 1.7 hook_preferences.inc.php, 1.7 hook_manual.inc.php, 1.3 functions.inc.php, 1.2 header.inc.php, 1.3 hook_skel_about.inc.php, 1.2
- Previous by thread:
[Phpgroupware-cvs] property/templates/base tenant_claim.xsl,1.2
- Next by thread:
[Phpgroupware-cvs] skel/inc hook_add_def_pref.inc.php, 1.3 class.skel.inc.php, 1.3 hook_admin.inc.php, 1.7 hook_preferences.inc.php, 1.7 hook_manual.inc.php, 1.3 functions.inc.php, 1.2 header.inc.php, 1.3 hook_skel_about.inc.php, 1.2
- Index(es):