[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.bolocation.inc.php, 1.26, 1.
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.bolocation.inc.php, 1.26, 1.27 class.boproject.inc.php, 1.14, 1.15 class.boworkorder.inc.php, 1.14, 1.15 class.soproject.inc.php, 1.36, 1.37 class.sowo_hour.inc.php, 1.13, 1.14 class.soworkorder.inc.php, 1.24, 1.25 class.soXport.inc.php, 1.33, 1.34 class.uiproject.inc.php, 1.43, 1.44 class.uiwo_hour.inc.php, 1.35, 1.36 class.uiworkorder.inc.php, 1.38, 1.39 |
Date: |
Thu, 11 Sep 2003 09:59:50 -0400 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv18643/inc
Modified Files:
class.bolocation.inc.php class.boproject.inc.php
class.boworkorder.inc.php class.soproject.inc.php
class.sowo_hour.inc.php class.soworkorder.inc.php
class.soXport.inc.php class.uiproject.inc.php
class.uiwo_hour.inc.php class.uiworkorder.inc.php
Log Message:
no message
Index: class.bolocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bolocation.inc.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** class.bolocation.inc.php 3 Sep 2003 18:04:35 -0000 1.26
--- class.bolocation.inc.php 11 Sep 2003 13:59:47 -0000 1.27
***************
*** 541,545 ****
$tenant_data=$this->bocommon->read_single_tenant($extra['tenant_id']);
$location_data['tenant_id'] =
$extra['tenant_id'];
! $location_data['contact_phone']=
$tenant_data['contact_phone'];
$location_data['last_name'] =
$tenant_data['last_name'];
$location_data['first_name'] =
$tenant_data['first_name'];
--- 541,545 ----
$tenant_data=$this->bocommon->read_single_tenant($extra['tenant_id']);
$location_data['tenant_id'] =
$extra['tenant_id'];
! $location_data['contact_phone']=
$extra['contact_phone'];
$location_data['last_name'] =
$tenant_data['last_name'];
$location_data['first_name'] =
$tenant_data['first_name'];
Index: class.boproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boproject.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** class.boproject.inc.php 9 Sep 2003 15:24:47 -0000 1.14
--- class.boproject.inc.php 11 Sep 2003 13:59:47 -0000 1.15
***************
*** 315,318 ****
--- 315,322 ----
function read_single($project_id)
{
+ $config =
CreateObject('phpgwapi.config');
+ $config->read_repository();
+ $tax = 1+($config->config_data['fm_tax'])/100;
+
$project
= $this->so->read_single($project_id);
$dateformat
= $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
***************
*** 324,329 ****
--- 328,335 ----
{
$sum_workorder_budget=
$sum_workorder_budget+$workorder_data[$i]['budget'];
+ $sum_workorder_calculation=
$sum_workorder_calculation+$workorder_data[$i]['calculation'];
$project['workorder_budget'][$i]['workorder_id']=$workorder_data[$i]['workorder_id'];
$project['workorder_budget'][$i]['budget']=number_format($workorder_data[$i]['budget'],
2, ',', ' ');
+
$project['workorder_budget'][$i]['calculation']=number_format($workorder_data[$i]['calculation']*$tax,
2, ',', ' ');
$vendor =
$this->contacts->read_single_entry($workorder_data[$i]['vendor_id'],array('org_name'=>'org_name'));
$project['workorder_budget'][$i]['vendor_name']
= $vendor[0]['org_name'];
***************
*** 332,335 ****
--- 338,342 ----
{
$project['sum_workorder_budget']=
number_format($sum_workorder_budget, 2, ',', ' ');
+ $project['sum_workorder_calculation']=
number_format($sum_workorder_calculation*$tax, 2, ',', ' ');
}
Index: class.boworkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boworkorder.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** class.boworkorder.inc.php 10 Sep 2003 14:36:23 -0000 1.14
--- class.boworkorder.inc.php 11 Sep 2003 13:59:47 -0000 1.15
***************
*** 333,336 ****
--- 333,340 ----
$workorder['b_account_name'] =
$this->so->get_b_account_name($workorder['b_account_id']);
+ $config =
CreateObject('phpgwapi.config');
+ $config->read_repository();
+ $tax = 1+($config->config_data['fm_tax'])/100;
+ $workorder['calculation']
=number_format($workorder['calculation']*$tax, 2, ',', ' ');
return $workorder;
}
Index: class.soproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soproject.inc.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -r1.36 -r1.37
*** class.soproject.inc.php 9 Sep 2003 15:24:48 -0000 1.36
--- class.soproject.inc.php 11 Sep 2003 13:59:47 -0000 1.37
***************
*** 346,355 ****
function project_workorder_data($project_id = '')
{
! $this->db->query("select budget, id as workorder_id,
vendor_id from fm_workorder where project_id='$project_id'");
while ($this->db->next_record())
{
$budget[] = array(
'workorder_id' =>
$this->db->f('workorder_id'),
! 'budget' =>
sprintf("%01.2f",$this->db->f('budget')),
'vendor_id' =>
$this->db->f('vendor_id')
);
--- 346,356 ----
function project_workorder_data($project_id = '')
{
! $this->db->query("select budget, id as workorder_id,
vendor_id, calculation,rig_addition,addition from fm_workorder where
project_id='$project_id'");
while ($this->db->next_record())
{
$budget[] = array(
'workorder_id' =>
$this->db->f('workorder_id'),
! 'budget' =>
$this->db->f('budget'),
! 'calculation' =>
($this->db->f('calculation')*(1+$this->db->f('addition')/100))+$this->db->f('rig_addition'),
'vendor_id' =>
$this->db->f('vendor_id')
);
***************
*** 636,640 ****
'other_branch' =>
$project['other_branch'],
'key_responsible' =>
$project['key_responsible'],
- 'tenant_id' =>
$project['tenant_id'],
'charge_tenant' =>
$project['charge_tenant'],
'location_code' =>
$project['location_code'],
--- 637,640 ----
Index: class.sowo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sowo_hour.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** class.sowo_hour.inc.php 4 Sep 2003 17:27:27 -0000 1.13
--- class.sowo_hour.inc.php 11 Sep 2003 13:59:47 -0000 1.14
***************
*** 223,226 ****
--- 223,228 ----
}
+ $this->update_calculation($workorder_id);
+
$receipt['message'][] = array('msg'=>lang('%1 entries
is added!',count($hour)));
***************
*** 287,290 ****
--- 289,294 ----
}
+ $this->update_calculation($workorder_id);
+
$receipt['message'][] = array('msg'=>lang('the number
of %1 hour is added!',$i));
***************
*** 354,357 ****
--- 358,363 ----
+ $this->update_calculation($workorder_id);
+
$receipt['hour_id'] =
$this->db->get_last_insert_id('fm_wo_hours','id');
***************
*** 487,490 ****
--- 493,497 ----
. "' WHERE id= '" . $hour['hour_id']
."'",__LINE__,__FILE__);
+ $this->update_calculation($workorder_id);
$receipt['hour_id'] = $hour['hour_id'];
***************
*** 525,531 ****
--- 532,549 ----
}
+ $this->update_calculation($workorder_id);
+
$receipt['message'][] = array('msg'=>lang('hour %1 has
been deleted',$hour_id));
return $receipt;
+ }
+
+ function update_calculation($workorder_id)
+ {
+ $this->db->query("SELECT sum(cost) as calculation FROM
fm_wo_hours where workorder_id =$workorder_id",__LINE__,__FILE__);
+ $this->db->next_record();
+ $calculation = $this->db->f('calculation');
+
+ $this->db->query("UPDATE fm_workorder set calculation
='$calculation' where id= '$workorder_id'",__LINE__,__FILE__);
}
}
Index: class.soworkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soworkorder.inc.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** class.soworkorder.inc.php 10 Sep 2003 14:36:23 -0000 1.24
--- class.soworkorder.inc.php 11 Sep 2003 13:59:47 -0000 1.25
***************
*** 356,359 ****
--- 356,360 ----
$workorder['status'] =
$this->db->f('status');
$workorder['budget'] =
(int)$this->db->f('budget');
+ $workorder['calculation']
=
($this->db->f('calculation')*(1+$this->db->f('addition')/100))+$this->db->f('rig_addition');
$workorder['b_account_id']
= (int)$this->db->f('account_id');
$workorder['addition_percentage'] =
(int)$this->db->f('addition');
Index: class.soXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soXport.inc.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** class.soXport.inc.php 1 Sep 2003 19:26:54 -0000 1.33
--- class.soXport.inc.php 11 Sep 2003 13:59:47 -0000 1.34
***************
*** 750,771 ****
}
- //Oppdater beløp på arbeidsordre
- /* function update_actual_cost($dimd,$pmwrkord_code,$belop)
- {
- if ($dimd % 2 == 0)
- {
- $sql="update fm_workorder set
act_mtrl_cost=act_mtrl_cost +
substr($belop,0,(strlen($belop)-2)).substr($belop,(strlen($belop)-3),2) where
pmwrkord_code='$pmwrkord_code'";
- }
- else
- {
- $sql="update fm_workorder set
act_vendor_cost=act_vendor_cost +
substr($belop,0,(strlen($belop)-2)).substr($belop,(strlen($belop)-3),2) where
pmwrkord_code='$pmwrkord_code'";
- }
-
- $this->db->query($sql,__LINE__,__FILE__);
-
- }
-
- */
- //korriger ved tilbakerulling
//Oppdater beløp på arbeidsordre operator="-" ved tilbakerulling
function
correct_actual_cost($pmwrkord_code,$Belop,$actual_cost_field,$operator)
--- 750,753 ----
***************
*** 774,778 ****
$sql="update fm_workorder set
$actual_cost_field=$actual_cost_field $operator $Belop where
id='$pmwrkord_code'";
- //echo 'sql :' . $sql . '<BR>';
$this->db->query($sql,__LINE__,__FILE__);
}
--- 756,759 ----
Index: class.uiproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiproject.inc.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -r1.43 -r1.44
*** class.uiproject.inc.php 9 Sep 2003 15:24:49 -0000 1.43
--- class.uiproject.inc.php 11 Sep 2003 13:59:47 -0000 1.44
***************
*** 546,550 ****
(
'lang_workorder_id' => lang('Workorder'),
! 'lang_sum' => lang('Sum'),
'lang_vendor' => lang('Vendor')
);
--- 546,551 ----
(
'lang_workorder_id' => lang('Workorder'),
! 'lang_budget' => lang('Budget'),
! 'lang_calculation' => lang('Calculation'),
'lang_vendor' => lang('Vendor')
);
***************
*** 604,615 ****
$need_approval =
$this->config->config_data['workorder_approval'];
if ($supervisor_id && $need_approval=='yes')
{
- // $prefs =
$GLOBALS['phpgw']->preferences->create_email_preferences($supervisor_id);
$prefs =
$this->bocommon->create_preferences($this->currentapp,$supervisor_id);
- // $supervisor_email = $prefs['email']['address'];
$supervisor_email = $prefs['email'];
}
$msgbox_data = $this->bocommon->msgbox_data($receipt);
--- 605,623 ----
$need_approval =
$this->config->config_data['workorder_approval'];
+ if(!$values['coordinator'])
+ {
+ $values['coordinator']=$this->account;
+ }
+
if ($supervisor_id && $need_approval=='yes')
{
$prefs =
$this->bocommon->create_preferences($this->currentapp,$supervisor_id);
$supervisor_email = $prefs['email'];
}
+ if(!$values['start_date'])
+ {
+ $values['start_date'] =
$GLOBALS['phpgw']->common->show_date(mktime(0,0,0,date("m"),date("d"),date("Y")),$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
+ }
$msgbox_data = $this->bocommon->msgbox_data($receipt);
***************
*** 710,713 ****
--- 718,722 ----
'lang_workorder_id'
=> lang('Workorder ID'),
'sum_workorder_budget' =>
$values['sum_workorder_budget'],
+ 'sum_workorder_calculation' =>
$values['sum_workorder_calculation'],
'workorder_budget'
=> $values['workorder_budget'],
Index: class.uiwo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiwo_hour.inc.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -r1.35 -r1.36
*** class.uiwo_hour.inc.php 7 Sep 2003 19:49:52 -0000 1.35
--- class.uiwo_hour.inc.php 11 Sep 2003 13:59:47 -0000 1.36
***************
*** 175,179 ****
);
-
$tax = $this->config->config_data['fm_tax'];
--- 175,178 ----
***************
*** 419,428 ****
if(!$show_cost)
{
! for ($i=0;$i<count($values_hour);$i++)
{
unset($values_hour[$i]['cost']);
unset($values_hour[$i]['billperae']);
-
unset($common_data['table_sum'][0]['value_total_sum']);
}
}
--- 418,428 ----
if(!$show_cost)
{
! $m = count($values_hour);
! for ($i=0;$i<$m;$i++)
{
unset($values_hour[$i]['cost']);
unset($values_hour[$i]['billperae']);
}
+
unset($common_data['table_sum'][0]['value_total_sum']);
}
Index: class.uiworkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiworkorder.inc.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -r1.38 -r1.39
*** class.uiworkorder.inc.php 10 Sep 2003 14:36:23 -0000 1.38
--- class.uiworkorder.inc.php 11 Sep 2003 13:59:47 -0000 1.39
***************
*** 567,571 ****
if ($supervisor_id && ($need_approval=='yes'))
{
- // $prefs =
$GLOBALS['phpgw']->preferences->create_email_preferences($supervisor_id);
$prefs =
$this->bocommon->create_preferences($this->currentapp,$supervisor_id);
$supervisor_email = $prefs['email'];
--- 567,570 ----
***************
*** 581,584 ****
--- 580,587 ----
'lang_calculate_statustext' =>
lang('Calculate workorder by adding items from vendors prizebook or adding
general hours'),
+ 'send_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.view&from=index'),
+ 'lang_send'
=> lang('Send Workorder'),
+ 'lang_send_statustext' =>
lang('send this workorder to vendor'),
+
'project_link'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiproject.edit'),
'b_account_data'
=> $b_account_data,
***************
*** 629,632 ****
--- 632,639 ----
'value_budget'
=> $values['budget'],
'lang_budget_statustext' =>
lang('Enter the budget'),
+
+ 'lang_incl_tax'
=> lang('incl tax'),
+ 'lang_calculation'
=> lang('Calculation'),
+ 'value_calculation'
=> $values['calculation'],
'vendor_data'
=> $vendor_data,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.bolocation.inc.php, 1.26, 1.27 class.boproject.inc.php, 1.14, 1.15 class.boworkorder.inc.php, 1.14, 1.15 class.soproject.inc.php, 1.36, 1.37 class.sowo_hour.inc.php, 1.13, 1.14 class.soworkorder.inc.php, 1.24, 1.25 class.soXport.inc.php, 1.33, 1.34 class.uiproject.inc.php, 1.43, 1.44 class.uiwo_hour.inc.php, 1.35, 1.36 class.uiworkorder.inc.php, 1.38, 1.39,
Sigurd Nes <address@hidden> <=