[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9412] property: fixes
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [9412] property: fixes |
Date: |
Sun, 20 May 2012 16:53:46 +0000 |
Revision: 9412
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9412
Author: sigurdne
Date: 2012-05-20 16:53:45 +0000 (Sun, 20 May 2012)
Log Message:
-----------
property: fixes
Modified Paths:
--------------
trunk/property/inc/class.hook_helper.inc.php
trunk/property/inc/class.soXport.inc.php
trunk/property/inc/class.solocation.inc.php
trunk/property/inc/class.uiworkorder.inc.php
Modified: trunk/property/inc/class.hook_helper.inc.php
===================================================================
--- trunk/property/inc/class.hook_helper.inc.php 2012-05-20 07:46:55 UTC
(rev 9411)
+++ trunk/property/inc/class.hook_helper.inc.php 2012-05-20 16:53:45 UTC
(rev 9412)
@@ -70,6 +70,14 @@
$sql = "INSERT INTO fm_location_contact ({$cols})
VALUES ({$values})";
$GLOBALS['phpgw']->db->query($sql,__LINE__,__FILE__);
+ if($data['email'])
+ {
+ $pref = CreateObject('phpgwapi.preferences',
$data['account_id']);
+ $pref->read();
+ $pref->add('property','email',
$data['email'],'user');
+ $pref->save_repository();
+ }
+
$message =lang('user %1 added to
%2',$data['account_lid'],$data['location_code']);
phpgwapi_cache::message_set($message, 'message');
}
Modified: trunk/property/inc/class.soXport.inc.php
===================================================================
--- trunk/property/inc/class.soXport.inc.php 2012-05-20 07:46:55 UTC (rev
9411)
+++ trunk/property/inc/class.soXport.inc.php 2012-05-20 16:53:45 UTC (rev
9412)
@@ -714,6 +714,7 @@
function add_manual_invoice($values, $skip_update_voucher_id =
false)
{
+ $orders_affected = array();
$_dateformat = $this->db->date_format();
$this->db->transaction_begin();
@@ -738,6 +739,7 @@
if($line['order_id'])
{
+ $orders_affected[$line['order_id']] =
true;
//Oppdater beløp på bestilling
if ($line['dimd'] % 2 == 0)
{
@@ -756,6 +758,7 @@
}
$this->delete_voucher_from_fm_ecobilag($values[0]['bilagsnr']);
+
$this->update_actual_cost_from_archive($orders_affected);
return $this->db->transaction_commit();
}
Modified: trunk/property/inc/class.solocation.inc.php
===================================================================
--- trunk/property/inc/class.solocation.inc.php 2012-05-20 07:46:55 UTC (rev
9411)
+++ trunk/property/inc/class.solocation.inc.php 2012-05-20 16:53:45 UTC (rev
9412)
@@ -1789,29 +1789,42 @@
return $this->db->f('id');
}
- function get_children($location_code = '')
+ function get_children($criteria = '')
{
- if(!$location_code)
+ if(is_array($criteria))
{
- $level = 0;
+ $location_code = $criteria['location_code'];
+ $child_level = $criteria['child_level'];
+ $id_field = 'location_code';
+ $field_name =
$criteria['field_name'];
}
else
{
- $level = count(explode('-', $location_code));
+ $location_code = $criteria;
+ if(!$location_code)
+ {
+ $level = 0;
+ }
+ else
+ {
+ $level = count(explode('-',
$location_code));
+ }
+
+ $child_level = $level + 1;
+ $id_field = "loc{$child_level}";
+ $field_name = "loc{$child_level}_name";
}
- $child_level = $level + 1;
-
$location_types =
$this->soadmin_location->select_location_type();
$values = array();
- if( $level >= count($location_types))
+ if( $child_level > count($location_types))
{
return $values;
}
- $this->db->query("SELECT loc{$child_level} AS id,
loc{$child_level}_name AS name FROM fm_location{$child_level} WHERE
location_code {$this->like} '{$location_code}%'",__LINE__,__FILE__);
+ $this->db->query("SELECT $id_field AS id, {$field_name}
AS name FROM fm_location{$child_level} WHERE location_code {$this->like}
'{$location_code}%'",__LINE__,__FILE__);
while ($this->db->next_record())
{
$id = $this->db->f('id');
Modified: trunk/property/inc/class.uiworkorder.inc.php
===================================================================
--- trunk/property/inc/class.uiworkorder.inc.php 2012-05-20 07:46:55 UTC
(rev 9411)
+++ trunk/property/inc/class.uiworkorder.inc.php 2012-05-20 16:53:45 UTC
(rev 9412)
@@ -1067,6 +1067,8 @@
if (! $receipt['error'])
{
$id = $receipt['id'];
+ //temporary
+
execMethod('property.soXport.update_actual_cost_from_archive',array($id =>
true));
$historylog =
CreateObject('property.historylog','workorder');
}
$function_msg = lang('Edit Workorder');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9412] property: fixes,
Sigurd Nes <=