[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property list_workorder.php,1.5,1.6 add_workorde
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property list_workorder.php,1.5,1.6 add_workorder.php,1.4,1.5 edit_workorder.php,1.4,1.5 list_ticket.php,1.3,1.4 view_workorder.php,1.3,1.4 |
Date: |
Wed, 18 Sep 2002 15:54:17 -0400 |
Update of /cvsroot/phpgroupware/property
In directory subversions:/tmp/cvs-serv10860
Modified Files:
list_workorder.php add_workorder.php edit_workorder.php
list_ticket.php view_workorder.php
Log Message:
no message
Index: list_workorder.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_workorder.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** list_workorder.php 4 Sep 2002 17:56:09 -0000 1.5
--- list_workorder.php 18 Sep 2002 19:54:15 -0000 1.6
***************
*** 75,79 ****
$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
---------------------------
--- 75,79 ----
$status='active';
}
! $pro =
$fm_wrkorder->read_wrkorders($start,True,$query_location,$filter,$sort,$order,$status,$cat_id,$coordinator_id,$query_vendor,$query_location,$project_id);
//---------------------- nextmatch variable template-declarations
---------------------------
Index: add_workorder.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/add_workorder.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** add_workorder.php 4 Sep 2002 17:56:09 -0000 1.4
--- add_workorder.php 18 Sep 2002 19:54:15 -0000 1.5
***************
*** 54,58 ****
if ($submit)
{
! if ($choose || $copy_order)
{
$num = create_wrkorderid($year);
--- 54,59 ----
if ($submit)
{
!
! /* if ($choose || $copy_order)
{
$num = create_wrkorderid($year);
***************
*** 62,68 ****
--- 63,76 ----
$num = addslashes($num);
}
+ */
$errorcount = 0;
+ if ($saved && !$copy_order)
+ {
+ $error[$errorcount++] = lang('Copy order not choosen!');
+ }
+ $num = create_wrkorderid($year);
+
if ($need_approval)
{
***************
*** 248,266 ****
if($bygg_id)
{
! $location_code.= "-".$bygg_id;
}
if($seksjons_id)
{
! $location_code.= "-".$seksjons_id;
! $el_meter_table="boei_seksjon";
! $el_meter_condition= "objekt_id= ". "'$objekt_id'" . "
and " . "bygg_id= " . "'$bygg_id'" . " and " . "seksjons_id= " .
"'$seksjons_id'";
}
if($leie_id)
{
! $location_code.= "-".$leie_id;
! $el_meter_table="boei_leieobjekt";
! $el_meter_condition= "objekt_id= ". "'$objekt_id'" . "
and " . "leie_id= " . "'$leie_id'";
}
$GLOBALS['phpgw']->db->lock(array('fm_wo_wrkorders','boei_leietaker','fm_wo_wrkorderactivities','fm_wo_wrkorderbranch'));
--- 256,282 ----
if($bygg_id)
{
! $location_code.= "-".$bygg_id;
}
if($seksjons_id)
{
! $location_code.= "-".$seksjons_id;
! $el_meter_table="boei_seksjon";
! $el_meter_condition= "objekt_id= ".
"'$objekt_id'" . " and " . "bygg_id= " . "'$bygg_id'" . " and " . "seksjons_id=
" . "'$seksjons_id'";
}
if($leie_id)
{
! $location_code.= "-".$leie_id;
! $el_meter_table="boei_leieobjekt";
! $el_meter_condition= "objekt_id= ".
"'$objekt_id'" . " and " . "leie_id= " . "'$leie_id'";
}
+ if ($project_id)
+ {
+ $project_id_value="'$project_id'";
+ }
+ else
+ {
+ $project_id_value='NULL';
+ }
$GLOBALS['phpgw']->db->lock(array('fm_wo_wrkorders','boei_leietaker','fm_wo_wrkorderactivities','fm_wo_wrkorderbranch'));
***************
*** 276,283 ****
else
{
! $GLOBALS['phpgw']->db->query("insert into
fm_wo_wrkorders
(id,owner,access,category,entry_date,start_date,end_date,coordinator,vendor,status,"
.
"descr,title,num,location_code,objekt_id,property_name,bygg_id,building_name,seksjons_id,etasje,leie_id,"
.
"street,account_id,rig_addition,addition,key_deliver,key_fetch,other_branch,key_responsible,tenant_id,tenant_name,contact_phone,integration,charge_tenant,budget)
"
! . "values
('$num','$owner','$access','$cat_id','" . time() ."','$sdate','$edate',"
.
"'$coordinator','$abid','$status','$descr','$title','$num','$location_code','$objekt_id','$property_name',"
.
"'$bygg_id','$building_name','$seksjons_id','$etasje','$leie_id','$street','$account_id','$rig_addition','$addition','$key_deliver_location',"
--- 292,299 ----
else
{
! $GLOBALS['phpgw']->db->query("insert into
fm_wo_wrkorders
(id,project_id,owner,access,category,entry_date,start_date,end_date,coordinator,vendor,status,"
.
"descr,title,num,location_code,objekt_id,property_name,bygg_id,building_name,seksjons_id,etasje,leie_id,"
.
"street,account_id,rig_addition,addition,key_deliver,key_fetch,other_branch,key_responsible,tenant_id,tenant_name,contact_phone,integration,charge_tenant,budget)
"
! . "values
('$num',$project_id_value,'$owner','$access','$cat_id','" . time()
."','$sdate','$edate',"
.
"'$coordinator','$abid','$status','$descr','$title','$num','$location_code','$objekt_id','$property_name',"
.
"'$bygg_id','$building_name','$seksjons_id','$etasje','$leie_id','$street','$account_id','$rig_addition','$addition','$key_deliver_location',"
***************
*** 291,294 ****
--- 307,311 ----
}
+ $saved=True;
}
***************
*** 447,450 ****
--- 464,468 ----
. '<input type="hidden" name="start" value="' .
$start . '">' . "\n"
. '<input type="hidden" name="filter" value="'
. $filter . '">' . "\n"
+ . '<input type="hidden" name="saved" value="' .
$saved . '">' . "\n"
. '<input type="hidden" name="cat_id" value="'
. $cat_id . '">' . "\n";
***************
*** 473,489 ****
//---------------- end budgetting accounts
! if (! $submit)
{
! $t->set_var('lang_choose',lang('Generate Workorder ID ?'));
! $t->set_var('choose','<input type="checkbox" name="choose"
value="True" checked>');
! $t->set_var('lang_copy_order','');
! $t->set_var('copy_order','');
}
else
{
! $t->set_var('lang_copy_order',lang('Copy Workorder ?'));
! $t->set_var('copy_order','<input type="checkbox"
name="copy_order" value="True" >');
! $t->set_var('lang_choose','');
! $t->set_var('choose','');
}
--- 491,507 ----
//---------------- end budgetting accounts
! if ($submit && $saved )
{
! $t->set_var('lang_copy_order',lang('Copy Workorder ?'));
! $t->set_var('copy_order','<input type="checkbox"
name="copy_order" value="True" >');
! // $t->set_var('lang_choose','');
! // $t->set_var('choose','');
}
else
{
! // $t->set_var('lang_choose',lang('Generate Workorder ID ?'));
! // $t->set_var('choose','<input type="checkbox" name="choose"
value="True" checked>');
! $t->set_var('lang_copy_order','');
! $t->set_var('copy_order','');
}
***************
*** 597,607 ****
$t->set_var('coordinator_list',$coordinator_list);
!
! $start_dateout =
$GLOBALS['phpgw']->common->show_date($sdate,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
$t->set_var('start_date',$start_dateout);
! $end_dateout =
$GLOBALS['phpgw']->common->show_date($edate,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
$t->set_var('end_date',$end_dateout);
$t->set_var('lang_select',lang('Select per button !'));
$t->set_var('lang_vendor',lang('Vendor'));
--- 615,639 ----
$t->set_var('coordinator_list',$coordinator_list);
! if ($start_date_p)
! {
! $start_dateout=$start_date_p;
! }
! else
! {
! $start_dateout =
$GLOBALS['phpgw']->common->show_date($sdate,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
! }
$t->set_var('start_date',$start_dateout);
! if ($end_date_p)
! {
! $end_dateout=$end_date_p;
! }
! else
! {
! $end_dateout =
$GLOBALS['phpgw']->common->show_date($edate,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
! }
$t->set_var('end_date',$end_dateout);
+
$t->set_var('lang_select',lang('Select per button !'));
$t->set_var('lang_vendor',lang('Vendor'));
***************
*** 643,646 ****
--- 675,680 ----
$t->set_var('lang_budget',lang('Budget'));
$t->set_var('lang_total',lang('Total'));
+ $t->set_var('lang_project_id',lang('Project ID'));
+ $t->set_var('project_id',$project_id);
***************
*** 652,677 ****
else
*/
- if ($submit && !$name)
- {
- $d = CreateObject('phpgwapi.contacts');
- $cols = array('n_given' => 'n_given',
- 'n_family' => 'n_family',
- 'org_name' => 'org_name');
-
- $customer = $d->read_single_entry($abid,$cols);
-
- if ($customer[0]['org_name'] == '')
- {
- $t->set_var('name',$customer[0]['n_given'] . ' ' .
$customer[0]['n_family']);
- }
- else
- {
- $t->set_var('name',$customer[0]['org_name'] . ' [ ' .
$customer[0]['n_given'] . ' ' . $customer[0]['n_family'] . ' ]');
- }
- }
- else
- {
$t->set_var('name',$name);
- }
$t->set_var('lang_bookable_activities',lang('Bookable activities'));
$t->set_var('lang_billable_activities',lang('Billable activities'));
--- 686,690 ----
***************
*** 709,725 ****
$t->set_var('lang_key_deliver_location',lang('Where to deliver the
key'));
!
$t->set_var('key_fetch_list',$fm_wrkorder->select_key_location_list($p_id,key_fetch));
!
!
$t->set_var('key_deliver_list',$fm_wrkorder->select_key_location_list($p_id,key_deliver));
// -------------- Key responsible ----------------------
$t->set_var('lang_key_responsible',lang('Key responsible'));
!
$t->set_var('key_responsible_list',$fm_wrkorder->select_key_responsible_list($p_id));
!
// -------------- Status ----------------------
! $t->set_var('status_list',$fm_wrkorder->select_status_list($p_id));
// $t->set_var('status_list',$status_list);
--- 722,736 ----
$t->set_var('lang_key_deliver_location',lang('Where to deliver the
key'));
+
$t->set_var('key_fetch_list',$fm_wrkorder->select_key_location_list($key_fetch_location));
!
$t->set_var('key_deliver_list',$fm_wrkorder->select_key_location_list($key_deliver_location));
// -------------- Key responsible ----------------------
$t->set_var('lang_key_responsible',lang('Key responsible'));
!
$t->set_var('key_responsible_list',$fm_wrkorder->select_key_responsible_list($key_responsible));
// -------------- Status ----------------------
! $t->set_var('status_list',$fm_wrkorder->select_status_list($status));
// $t->set_var('status_list',$status_list);
Index: edit_workorder.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/edit_workorder.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** edit_workorder.php 4 Sep 2002 17:56:09 -0000 1.4
--- edit_workorder.php 18 Sep 2002 19:54:15 -0000 1.5
***************
*** 219,222 ****
--- 219,230 ----
}
+ if ($project_id)
+ {
+ $project_id_value="'$project_id'";
+ }
+ else
+ {
+ $project_id_value='NULL';
+ }
if (! $error && !$copy_order)
***************
*** 236,240 ****
$GLOBALS['phpgw']->db->lock(array('fm_wo_wrkorders','boei_leietaker','fm_wo_wrkorderactivities','fm_wo_wrkorderbranch'));
! $GLOBALS['phpgw']->db->query("update fm_wo_wrkorders
set access='$access', category='$cat_id', entry_date='" . time() . "',
start_date='"
. "$sdate',
end_date='$edate', coordinator='$coordinator', vendor='$abid',
status='$status', descr='$descr', title='$title', "
. "budget='$budget',
num='$num',location_code='$location_code',objekt_id='$objekt_id',property_name='$property_name',bygg_id='$bygg_id',building_name='$building_name',
"
--- 244,248 ----
$GLOBALS['phpgw']->db->lock(array('fm_wo_wrkorders','boei_leietaker','fm_wo_wrkorderactivities','fm_wo_wrkorderbranch'));
! $GLOBALS['phpgw']->db->query("update fm_wo_wrkorders
set project_id=$project_id_value, access='$access', category='$cat_id',
entry_date='" . time() . "', start_date='"
. "$sdate',
end_date='$edate', coordinator='$coordinator', vendor='$abid',
status='$status', descr='$descr', title='$title', "
. "budget='$budget',
num='$num',location_code='$location_code',objekt_id='$objekt_id',property_name='$property_name',bygg_id='$bygg_id',building_name='$building_name',
"
***************
*** 646,649 ****
--- 654,663 ----
$budget = $GLOBALS['phpgw']->db->f('budget');
+ $project_id = $GLOBALS['phpgw']->db->f('project_id');
+ $t->set_var('project_id',$project_id);
+
+ $key_fetch_location = $GLOBALS['phpgw']->db->f('key_fetch');
+ $key_deliver_location = $GLOBALS['phpgw']->db->f('key_deliver');
+ $key_responsible = $GLOBALS['phpgw']->db->f('key_responsible');
if
($fm_wrkorder->check_perms($grants[$GLOBALS['phpgw']->db->f('coordinator')],PHPGW_ACL_DELETE)
|| $GLOBALS['phpgw']->db->f('coordinator') ==
$GLOBALS['phpgw_info']['user']['account_id'])
***************
*** 684,688 ****
$t->set_var('lang_popup_calendar',lang('Popup Calendar'));
$t->set_var('lang_total',lang('Total'));
!
$t->set_var('lang_status',lang('Status'));
--- 698,702 ----
$t->set_var('lang_popup_calendar',lang('Popup Calendar'));
$t->set_var('lang_total',lang('Total'));
! $t->set_var('lang_project_id',lang('Project ID'));
$t->set_var('lang_status',lang('Status'));
***************
*** 818,829 ****
$t->set_var('abid',$abid);
- // --------------- activites bookable --------------------------
-
- //
$t->set_var('ba_activities_list',$fm_wrkorder->select_activities_list($id,False));
-
- // ------------------------ activities billable -----------------------
-
- //
$t->set_var('bill_activities_list',$fm_wrkorder->select_activities_list($id,True));
-
// -------------- branches ----------------------
$t->set_var('branches_list',$fm_wrkorder->select_branches_list($id,True));
--- 832,835 ----
***************
*** 837,855 ****
!
$t->set_var('key_fetch_list',$fm_wrkorder->select_key_location_list($id,key_fetch));
!
$t->set_var('key_deliver_list',$fm_wrkorder->select_key_location_list($id,key_deliver));
// -------------- Key responsible ----------------------
$t->set_var('lang_key_responsible',lang('Key responsible'));
!
$t->set_var('key_responsible_list',$fm_wrkorder->select_key_responsible_list($id));
// -------------- Status ----------------------
! $t->set_var('status_list',$fm_wrkorder->select_status_list($id));
!
!
!
--- 843,858 ----
!
$t->set_var('key_fetch_list',$fm_wrkorder->select_key_location_list($key_fetch_location));
!
$t->set_var('key_deliver_list',$fm_wrkorder->select_key_location_list($key_deliver_location));
// -------------- Key responsible ----------------------
$t->set_var('lang_key_responsible',lang('Key responsible'));
!
$t->set_var('key_responsible_list',$fm_wrkorder->select_key_responsible_list($key_responsible));
// -------------- Status ----------------------
! $t->set_var('status_list',$fm_wrkorder->select_status_list($status));
Index: list_ticket.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_ticket.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** list_ticket.php 5 Sep 2002 16:48:15 -0000 1.3
--- list_ticket.php 18 Sep 2002 19:54:15 -0000 1.4
***************
*** 82,86 ****
$filter = 'search';
}
! echo 'view: '.$view .'<BR>';
if (!$filter)
--- 82,86 ----
$filter = 'search';
}
! // echo 'view: '.$view .'<BR>';
if (!$filter)
Index: view_workorder.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/view_workorder.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** view_workorder.php 16 Sep 2002 16:05:44 -0000 1.3
--- view_workorder.php 18 Sep 2002 19:54:15 -0000 1.4
***************
*** 227,230 ****
--- 227,232 ----
$t->set_var('contact_phone',$contact_phone);
+ $project_id = $GLOBALS['phpgw']->db->f('project_id');
+
if ($contact_phone)
{
***************
*** 269,272 ****
--- 271,285 ----
$edate = $GLOBALS['phpgw']->db->f('end_date');
+ $owner = $GLOBALS['phpgw']->db->f('owner');
+ if (!($owner==$GLOBALS['phpgw_info']['user']['account_id']))
+ {
+ $owner=$GLOBALS['phpgw']->accounts->id2name($owner);
+ $t->set_var('owner',$owner);
+ }
+ else
+ {
+ $t->set_var('owner','');
+ }
+
if ($sdate != 0)
{
***************
*** 360,364 ****
// ------------------ Branch list ----------------------------------
! $db2->query("SELECT b.descr as branch from fm_wo_branch as b $join
fm_wo_wrkorderbranch as p on p.branch_id = b.id where p.wrkorder_id='$id' order
by branch asc ",__LINE__,__FILE__);
while ($db2->next_record())
{
--- 373,377 ----
// ------------------ Branch list ----------------------------------
! $db2->query("SELECT b.descr as branch from fm_wo_branch as b $join
fm_wo_projectbranch as p on p.branch_id = b.id where p.project_id='$project_id'
order by branch asc ",__LINE__,__FILE__);
while ($db2->next_record())
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property list_workorder.php,1.5,1.6 add_workorder.php,1.4,1.5 edit_workorder.php,1.4,1.5 list_ticket.php,1.3,1.4 view_workorder.php,1.3,1.4,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: property/setup tables_current.inc.php,1.10,1.11 setup.inc.php,1.8,1.9 tables_update.inc.php,1.8,1.9
- Next by Date:
[Phpgroupware-cvs] CVS: property/templates/default form_project.tpl,NONE,1.1 list_project.tpl,NONE,1.1
- Previous by thread:
[Phpgroupware-cvs] CVS: property/setup tables_current.inc.php,1.10,1.11 setup.inc.php,1.8,1.9 tables_update.inc.php,1.8,1.9
- Next by thread:
[Phpgroupware-cvs] CVS: property/templates/default form_project.tpl,NONE,1.1 list_project.tpl,NONE,1.1
- Index(es):