[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11282] property: add history on tenant claim
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11282] property: add history on tenant claim |
Date: |
Mon, 09 Sep 2013 08:42:09 +0000 |
Revision: 11282
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11282
Author: sigurdne
Date: 2013-09-09 08:42:09 +0000 (Mon, 09 Sep 2013)
Log Message:
-----------
property: add history on tenant claim
Modified Paths:
--------------
trunk/property/inc/class.botenant_claim.inc.php
trunk/property/inc/class.uitenant_claim.inc.php
trunk/property/templates/base/tenant_claim.xsl
Modified: trunk/property/inc/class.botenant_claim.inc.php
===================================================================
--- trunk/property/inc/class.botenant_claim.inc.php 2013-09-06 13:22:39 UTC
(rev 11281)
+++ trunk/property/inc/class.botenant_claim.inc.php 2013-09-09 08:42:09 UTC
(rev 11282)
@@ -273,4 +273,52 @@
$this->so->delete($params);
}
}
+
+ function read_record_history($id)
+ {
+ $historylog =
CreateObject('property.historylog','tenant_claim');
+ $history_array =
$historylog->return_array(array('O'),array(),'','',$id);
+
+ $status_text = array();
+
+ $status_text['ready'] = lang('ready for processing
claim');
+ $status_text['open'] = lang('open');
+ $status_text['closed'] = lang('closed');
+
+ $i=0;
+ foreach ($history_array as $value)
+ {
+
+ $record_history[$i]['value_date'] =
$GLOBALS['phpgw']->common->show_date($value['datetime']);
+ $record_history[$i]['value_user'] =
$value['owner'];
+
+ switch ($value['status'])
+ {
+ case 'S': $type = lang('Status
changed'); break;
+ default:
+ }
+
+
if($value['new_value']=='O'){$value['new_value']=lang('Opened');}
+
if($value['new_value']=='X'){$value['new_value']=lang('Closed');}
+
+ $record_history[$i]['value_action'] = $type
? $type:'';
+ unset($type);
+
+ if ($value['status'] == 'S')
+ {
+ $record_history[$i]['value_new_value']
= $status_text[$value['new_value']];
+ $record_history[$i]['value_old_value']
= $status_text[$value['old_value']];
+ }
+ else
+ {
+ $record_history[$i]['value_new_value']
= '';
+ }
+
+ $i++;
+ }
+
+ return $record_history;
+ }
+
+
}
Modified: trunk/property/inc/class.uitenant_claim.inc.php
===================================================================
--- trunk/property/inc/class.uitenant_claim.inc.php 2013-09-06 13:22:39 UTC
(rev 11281)
+++ trunk/property/inc/class.uitenant_claim.inc.php 2013-09-09 08:42:09 UTC
(rev 11282)
@@ -843,6 +843,39 @@
array('key' =>
'selected','label'=>'select', 'sortable'=>false,'resizeable'=>false)))
);
+
+ if($claim_id)
+ {
+ $record_history =
$this->bo->read_record_history($claim_id);
+//_debug_array($content_budget);die();
+ }
+ else
+ {
+ $record_history = array();
+ }
+
+ $datavalues[1] = array
+ (
+ 'name'
=> "1",
+ 'values'
=> json_encode($record_history),
+ 'total_records' =>
count($record_history),
+ 'edit_action' => "''",
+ 'is_paginator' => 0,
+ 'footer'
=> 0
+ );
+
+ $myColumnDefs[1] = array
+ (
+ 'name' => "1",
+ 'values' =>
json_encode(array( array('key' => 'value_date','label' =>
lang('Date'),'sortable'=>true,'resizeable'=>true),
+
array('key' => 'value_user','label' =>
lang('User'),'Action'=>true,'resizeable'=>true),
+
array('key' => 'value_action','label' =>
lang('Action'),'sortable'=>true,'resizeable'=>true),
+
array('key' => 'value_old_value','label' =>
lang('old value'), 'sortable'=>true,'resizeable'=>true),
+
array('key' => 'value_new_value','label' =>
lang('New Value'),'sortable'=>true,'resizeable'=>true)))
+ );
+
+
+
$data = array
(
'table_header_workorder'
=> $table_header_workorder,
Modified: trunk/property/templates/base/tenant_claim.xsl
===================================================================
--- trunk/property/templates/base/tenant_claim.xsl 2013-09-06 13:22:39 UTC
(rev 11281)
+++ trunk/property/templates/base/tenant_claim.xsl 2013-09-09 08:42:09 UTC
(rev 11282)
@@ -354,6 +354,12 @@
</input>
</td>
</tr>
+ <tr>
+ <td colspan="2">
+ <div
id="datatable-container_1"/>
+ </td>
+ </tr>
+
</table>
</form>
<script type="text/javascript">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11282] property: add history on tenant claim,
Sigurd Nes <=