[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6557] Added display of gros- and net-area for units
From: |
Erik Holm-Larsen |
Subject: |
[Fmsystem-commits] [6557] Added display of gros- and net-area for units |
Date: |
Tue, 09 Nov 2010 12:15:05 +0000 |
Revision: 6557
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6557
Author: erikhl
Date: 2010-11-09 12:15:03 +0000 (Tue, 09 Nov 2010)
Log Message:
-----------
Added display of gros- and net-area for units
Modified Paths:
--------------
trunk/rental/inc/class.sounit.inc.php
trunk/rental/templates/base/unit_list_partial.php
Modified: trunk/rental/inc/class.sounit.inc.php
===================================================================
--- trunk/rental/inc/class.sounit.inc.php 2010-11-09 10:57:15 UTC (rev
6556)
+++ trunk/rental/inc/class.sounit.inc.php 2010-11-09 12:15:03 UTC (rev
6557)
@@ -90,6 +90,12 @@
case 'area_net':
$location->set_area_net($attributes['value']);
break;
+ case 'bruttoareal':
+
$location->set_area_gros($attributes['value']);
+ break;
+ case 'nettoareal':
+
$location->set_area_net($attributes['value']);
+ break;
}
}
return new rental_unit($this->unmarshal($this->db->f('id',
true), 'int'), $this->unmarshal($this->db->f('composite_id', true), 'int'),
$location);
Modified: trunk/rental/templates/base/unit_list_partial.php
===================================================================
--- trunk/rental/templates/base/unit_list_partial.php 2010-11-09 10:57:15 UTC
(rev 6556)
+++ trunk/rental/templates/base/unit_list_partial.php 2010-11-09 12:15:03 UTC
(rev 6557)
@@ -9,6 +9,18 @@
window.location = 'index.php?menuaction=rental.uicomposite.edit';
}
);
+
+ var formatArea = function(elCell, oRecord, oColumn, oData) {
+ if (oData != undefined && oData != 0) {
+ elCell.innerHTML = YAHOO.util.Number.format( oData,
+ {
+ suffix: " <?php echo
isset($config->config_data['area_suffix']) &&
$config->config_data['area_suffix'] ? $config->config_data['area_suffix'] :
'kvm'; ?>",
+ thousandsSeparator: "<?php echo
isset($GLOBALS['phpgw_info']['user']['preferences']['rental']['thousands_separator'])
&&
$GLOBALS['phpgw_info']['user']['preferences']['rental']['thousands_separator']
?
$GLOBALS['phpgw_info']['user']['preferences']['rental']['thousands_separator']
: '.'; ?>",
+ decimalSeparator: "<?php echo
isset($GLOBALS['phpgw_info']['user']['preferences']['rental']['decimal_separator'])
&&
$GLOBALS['phpgw_info']['user']['preferences']['rental']['decimal_separator'] ?
$GLOBALS['phpgw_info']['user']['preferences']['rental']['decimal_separator'] :
',';?>",
+ decimalPlaces: <?php echo
isset($GLOBALS['phpgw_info']['user']['preferences']['rental']['area_decimal_places'])
&&
$GLOBALS['phpgw_info']['user']['preferences']['rental']['area_decimal_places']
?
$GLOBALS['phpgw_info']['user']['preferences']['rental']['area_decimal_places']
: 2; ?>
+ });
+ }
+ }
//Columns for added areas datatable
var columnDefs = [{
@@ -49,11 +61,13 @@
{
key: "area_gros",
label: "<?php echo lang('area_gros') ?>",
+ formatter: formatArea,
sortable: false
},
{
key: "area_net",
label: "<?php echo lang('area_net') ?>",
+ formatter: formatArea,
sortable: false
},
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6557] Added display of gros- and net-area for units,
Erik Holm-Larsen <=