[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15821] rental: rename prize to price
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15821] rental: rename prize to price |
Date: |
Thu, 13 Oct 2016 10:40:00 +0000 (UTC) |
Revision: 15821
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15821
Author: sigurdne
Date: 2016-10-13 10:40:00 +0000 (Thu, 13 Oct 2016)
Log Message:
-----------
rental: rename prize to price
Modified Paths:
--------------
trunk/rental/inc/class.socomposite.inc.php
trunk/rental/inc/class.socontract_price_item.inc.php
trunk/rental/inc/class.soprice_item.inc.php
trunk/rental/inc/class.uicomposite.inc.php
trunk/rental/inc/class.uicontract.inc.php
trunk/rental/inc/model/class.composite.inc.php
trunk/rental/setup/phpgw_no.lang
trunk/rental/setup/setup.inc.php
trunk/rental/setup/tables_current.inc.php
trunk/rental/setup/tables_update.inc.php
trunk/rental/templates/base/composite.xsl
Modified: trunk/rental/inc/class.socomposite.inc.php
===================================================================
--- trunk/rental/inc/class.socomposite.inc.php 2016-10-13 10:39:14 UTC (rev
15820)
+++ trunk/rental/inc/class.socomposite.inc.php 2016-10-13 10:40:00 UTC (rev
15821)
@@ -237,7 +237,7 @@
rental_composite.address_2,
rental_composite.postcode, rental_composite.place,
rental_composite.is_active,
rental_composite.area, rental_composite.description,
rental_composite.furnish_type_id,
rental_composite.standard_id,rental_composite.composite_type_id,
- rental_composite.part_of_town_id,
rental_composite.custom_prize_factor, rental_composite.custom_prize,
rental_composite.prize_type_id,";
+ rental_composite.part_of_town_id,
rental_composite.custom_price_factor, rental_composite.custom_price,
rental_composite.price_type_id,";
$cols .= "rental_contract.id AS contract_id,
rental_contract.date_start, rental_contract.date_end,
rental_contract.old_contract_id, ";
$cols .= "rental_application.id AS
application_id, rental_application.date_start AS application_date_start,
rental_application.date_end AS application_date_end, ";
$cols .= "
@@ -315,9 +315,9 @@
$composite->set_standard_id($this->unmarshal($this->db->f('standard_id'),
'int'));
$composite->set_composite_type_id($this->unmarshal($this->db->f('composite_type_id'),
'int'));
$composite->set_part_of_town_id($this->unmarshal($this->db->f('part_of_town_id'),
'int'));
-
$composite->set_custom_prize_factor($this->unmarshal($this->db->f('custom_prize_factor',
true), 'float'));
-
$composite->set_prize_type_id($this->unmarshal($this->db->f('prize_type_id'),
'int'));
-
$composite->set_custom_prize($this->unmarshal($this->db->f('custom_prize'),
'float'));
+
$composite->set_custom_price_factor($this->unmarshal($this->db->f('custom_price_factor',
true), 'float'));
+
$composite->set_price_type_id($this->unmarshal($this->db->f('price_type_id'),
'int'));
+
$composite->set_custom_price($this->unmarshal($this->db->f('custom_price'),
'float'));
}
// Location code
$location_code =
$this->unmarshal($this->db->f('location_code', true), 'string');
@@ -464,9 +464,9 @@
'standard_id = ' .
$composite->get_standard_id(),
'composite_type_id = ' .
$composite->get_composite_type_id(),
'part_of_town_id = ' .
$composite->get_part_of_town_id(),
- 'custom_prize_factor = \'' .
$composite->get_custom_prize_factor() . '\'',
- 'prize_type_id = ' .
$composite->get_prize_type_id(),
- 'custom_prize = \'' .
$composite->get_custom_prize() . '\''
+ 'custom_price_factor = \'' .
$composite->get_custom_price_factor() . '\'',
+ 'price_type_id = ' .
$composite->get_price_type_id(),
+ 'custom_price = \'' .
$composite->get_custom_price() . '\''
);
$result = $this->db->query('UPDATE rental_composite SET
' . join(',', $values) . " WHERE id=$id", __LINE__, __FILE__);
@@ -486,7 +486,7 @@
// Build a db-friendly array of the composite object
$cols = array('name', 'description',
'has_custom_address', 'address_1', 'address_2',
'house_number', 'postcode', 'place',
'object_type_id', 'area', 'furnish_type_id',
- 'standard_id','composite_type_id',
'part_of_town_id', 'custom_prize_factor','prize_type_id', 'custom_prize');
+ 'standard_id','composite_type_id',
'part_of_town_id', 'custom_price_factor','price_type_id', 'custom_price');
$values = array(
"'" . $composite->get_name() . "'",
"'" . $composite->get_description() . "'",
@@ -502,9 +502,9 @@
$composite->get_standard_id(),
$composite->get_composite_type_id(),
$composite->get_part_of_town_id(),
- "'" . $composite->get_custom_prize_factor() .
"'",
- $composite->get_prize_type_id(),
- "'" . $composite->get_custom_prize() . "'"
+ "'" . $composite->get_custom_price_factor() .
"'",
+ $composite->get_price_type_id(),
+ "'" . $composite->get_custom_price() . "'"
);
$query = "INSERT INTO rental_composite (" . join(',',
$cols) . ") VALUES (" . join(',', $values) . ")";
@@ -586,13 +586,13 @@
$uicols['sortable'][] = true;
$uicols['input_type'][] = 'text';
- $uicols['name'][] = 'custom_prize';
- $uicols['descr'][] = lang('custom prize');
+ $uicols['name'][] = 'custom_price';
+ $uicols['descr'][] = lang('custom price');
$uicols['sortable'][] = true;
$uicols['input_type'][] = 'text';
- $uicols['name'][] = 'prize_type';
- $uicols['descr'][] = lang('prize type');
+ $uicols['name'][] = 'price_type';
+ $uicols['descr'][] = lang('price type');
$uicols['sortable'][] = false;
$uicols['input_type'][] = 'text';
Modified: trunk/rental/inc/class.socontract_price_item.inc.php
===================================================================
--- trunk/rental/inc/class.socontract_price_item.inc.php 2016-10-13
10:39:14 UTC (rev 15820)
+++ trunk/rental/inc/class.socontract_price_item.inc.php 2016-10-13
10:40:00 UTC (rev 15821)
@@ -302,7 +302,7 @@
break;
}
- $custom_factor =
$composite_obj->get_custom_prize_factor();
+ $custom_factor =
$composite_obj->get_custom_price_factor();
$custom_factor = $custom_factor ? (float)$custom_factor
: 1;
$location_info = ExecMethod('rental.bogeneric.read',
array(
Modified: trunk/rental/inc/class.soprice_item.inc.php
===================================================================
--- trunk/rental/inc/class.soprice_item.inc.php 2016-10-13 10:39:14 UTC (rev
15820)
+++ trunk/rental/inc/class.soprice_item.inc.php 2016-10-13 10:40:00 UTC (rev
15821)
@@ -387,7 +387,7 @@
}
else
{
- $custom_factor =
$composite_obj->get_custom_prize_factor();
+ $custom_factor =
$composite_obj->get_custom_price_factor();
$custom_factor = $custom_factor ?
(float)$custom_factor : 1;
$location_info =
ExecMethod('rental.bogeneric.read', array(
'location_info'=> array('type' =>
'location_factor'),
Modified: trunk/rental/inc/class.uicomposite.inc.php
===================================================================
--- trunk/rental/inc/class.uicomposite.inc.php 2016-10-13 10:39:14 UTC (rev
15820)
+++ trunk/rental/inc/class.uicomposite.inc.php 2016-10-13 10:40:00 UTC (rev
15821)
@@ -240,7 +240,7 @@
$result->set_status('Ikke i
drift');
}
$row = $result->serialize();
- $row['prize_type'] =
$price_types[$row['prize_type_id']];
+ $row['price_type'] =
$price_types[$row['price_type_id']];
$rows[] = $row;
}
}
@@ -1026,13 +1026,13 @@
JS;
$GLOBALS['phpgw']->js->add_code('', $code);
- $current_prize_type_id =
$composite->get_prize_type_id();
- $prize_type_options = array();
+ $current_price_type_id =
$composite->get_price_type_id();
+ $price_type_options = array();
$price_item = new rental_price_item();
- foreach ($price_item->get_price_types() as
$prize_type_id => $prize_type_title)
+ foreach ($price_item->get_price_types() as
$price_type_id => $price_type_title)
{
- $selected = ($current_prize_type_id ==
$prize_type_id) ? 1 : 0;
- $prize_type_options[] = array('id' =>
$prize_type_id, 'name' => lang($prize_type_title),
+ $selected = ($current_price_type_id ==
$price_type_id) ? 1 : 0;
+ $price_type_options[] = array('id' =>
$price_type_id, 'name' => lang($price_type_title),
'selected' => $selected);
}
@@ -1047,8 +1047,8 @@
'value_name' => $composite->get_name(),
'value_composite_standard_name' =>
$composite_standard_name,
'list_composite_standard' => array('options' =>
$composite_standard_options),
- 'value_custom_prize' =>
$composite->get_custom_prize(),
- 'list_prize_type' => array('options' =>
$prize_type_options),
+ 'value_custom_price' =>
$composite->get_custom_price(),
+ 'list_price_type' => array('options' =>
$price_type_options),
'value_composite_type_name' =>
$composite_type_name,
'list_composite_type' => array('options' =>
$composite_type_options),
'value_furnish_type_name' => $furnish_type_name,
@@ -1057,7 +1057,7 @@
'value_part_of_town_id'=>$composite->get_part_of_town_id(),
'list_part_of_town' => array('options' =>
execMethod('property.bogeneric.get_list', array(
'type' => 'part_of_town',
'selected' => $composite->get_part_of_town_id(), 'add_empty' => true))),
- 'value_custom_prize_factor' =>
$composite->get_custom_prize_factor(),
+ 'value_custom_price_factor' =>
$composite->get_custom_price_factor(),
'value_unit_count' =>
rental_sounit::get_instance()->get_count('', 'all', array('composite_id' =>
$composite_id)),
'value_address_1' => $address_1,
'has_custom_address' =>
($composite->has_custom_address()) ? 1 : 0,
@@ -1121,9 +1121,9 @@
$composite->set_standard_id(phpgw::get_var('composite_standard_id', 'int'));
$composite->set_composite_type_id(phpgw::get_var('composite_type_id', 'int'));
$composite->set_part_of_town_id(phpgw::get_var('part_of_town_id', 'int'));
-
$composite->set_custom_prize_factor(phpgw::get_var('custom_prize_factor',
'float'));
-
$composite->set_custom_prize(phpgw::get_var('custom_prize', 'float'));
-
$composite->set_prize_type_id(phpgw::get_var('prize_type_id', 'int'));
+
$composite->set_custom_price_factor(phpgw::get_var('custom_price_factor',
'float'));
+
$composite->set_custom_price(phpgw::get_var('custom_price', 'float'));
+
$composite->set_price_type_id(phpgw::get_var('price_type_id', 'int'));
if
(rental_socomposite::get_instance()->store($composite))
{
Modified: trunk/rental/inc/class.uicontract.inc.php
===================================================================
--- trunk/rental/inc/class.uicontract.inc.php 2016-10-13 10:39:14 UTC (rev
15820)
+++ trunk/rental/inc/class.uicontract.inc.php 2016-10-13 10:40:00 UTC (rev
15821)
@@ -489,7 +489,7 @@
'hidden' => false),
array('key' => 'standard_factor',
'label' => lang('standard'), 'className' => '', 'sortable' => true,
'hidden' => false),
- array('key' => 'custom_factor', 'label'
=> lang('custom prize factor'), 'className' => '', 'sortable' => true,
+ array('key' => 'custom_factor', 'label'
=> lang('custom price factor'), 'className' => '', 'sortable' => true,
'hidden' => false),
array("key" => "area", "label" =>
lang('area'), "formatter" => "formatterArea",
'className' => 'right'),
Modified: trunk/rental/inc/model/class.composite.inc.php
===================================================================
--- trunk/rental/inc/model/class.composite.inc.php 2016-10-13 10:39:14 UTC
(rev 15820)
+++ trunk/rental/inc/model/class.composite.inc.php 2016-10-13 10:40:00 UTC
(rev 15821)
@@ -29,9 +29,9 @@
protected $units;
protected $contracts;
protected $part_of_town_id;
- protected $custom_prize_factor = '1.00';
- protected $custom_prize;
- protected $prize_type_id;
+ protected $custom_price_factor = '1.00';
+ protected $custom_price;
+ protected $price_type_id;
protected static $furnish_types_arr;
/**
@@ -324,14 +324,14 @@
return $this->part_of_town_id;
}
- public function set_custom_prize_factor( float
$custom_prize_factor )
+ public function set_custom_price_factor( float
$custom_price_factor )
{
- $this->custom_prize_factor = $custom_prize_factor;
+ $this->custom_price_factor = $custom_price_factor;
}
- public function get_custom_prize_factor()
+ public function get_custom_price_factor()
{
- return (float)$this->custom_prize_factor;
+ return (float)$this->custom_price_factor;
}
public function get_furnish_type()
@@ -374,24 +374,24 @@
return (int)$this->composite_type_id;
}
- public function set_custom_prize( $custom_prize )
+ public function set_custom_price( $custom_price )
{
- $this->custom_prize = (float)$custom_prize;
+ $this->custom_price = (float)$custom_price;
}
- public function get_custom_prize()
+ public function get_custom_price()
{
- return (float)$this->custom_prize;
+ return (float)$this->custom_price;
}
- public function set_prize_type_id( $prize_type_id )
+ public function set_price_type_id( $price_type_id )
{
- $this->prize_type_id = (int)$prize_type_id;
+ $this->price_type_id = (int)$price_type_id;
}
- public function get_prize_type_id()
+ public function get_price_type_id()
{
- return (int)$this->prize_type_id;
+ return (int)$this->price_type_id;
}
/**
@@ -531,9 +531,9 @@
'standard_id' => $this->get_standard_id(),
'composite_type_id' =>
$this->get_composite_type_id(),
'part_of_town_id' =>
$this->get_part_of_town_id(),
- 'custom_prize_factor' =>
$this->get_custom_prize_factor(),
- 'custom_prize' => $this->get_custom_prize(),
- 'prize_type_id' => $this->get_prize_type_id(),
+ 'custom_price_factor' =>
$this->get_custom_price_factor(),
+ 'custom_price' => $this->get_custom_price(),
+ 'price_type_id' => $this->get_price_type_id(),
);
}
}
\ No newline at end of file
Modified: trunk/rental/setup/phpgw_no.lang
===================================================================
--- trunk/rental/setup/phpgw_no.lang 2016-10-13 10:39:14 UTC (rev 15820)
+++ trunk/rental/setup/phpgw_no.lang 2016-10-13 10:40:00 UTC (rev 15821)
@@ -634,9 +634,9 @@
rejected rental no Avvist
approved rental no Godkjent
location rental no Lokalisering
-custom prize factor rental no Prisfaktor
+custom price factor rental no Prisfaktor
standard rental no Standard
composite type rental no Leieobjekt type
type rental no Type
-custom prize rental no Taksering
-prize type rental no Pristype
\ No newline at end of file
+custom price rental no Taksering
+price type rental no Pristype
\ No newline at end of file
Modified: trunk/rental/setup/setup.inc.php
===================================================================
--- trunk/rental/setup/setup.inc.php 2016-10-13 10:39:14 UTC (rev 15820)
+++ trunk/rental/setup/setup.inc.php 2016-10-13 10:40:00 UTC (rev 15821)
@@ -1,6 +1,6 @@
<?php
$setup_info['rental']['name'] = 'rental'; // Module identifier
- $setup_info['rental']['version'] = '0.1.0.30'; // Current module version
+ $setup_info['rental']['version'] = '0.1.0.31'; // Current module version
$setup_info['rental']['app_order'] = 51; // (?)
$setup_info['rental']['tables'] = array(
'rental_party', // All contract participants, tenants etc.
Modified: trunk/rental/setup/tables_current.inc.php
===================================================================
--- trunk/rental/setup/tables_current.inc.php 2016-10-13 10:39:14 UTC (rev
15820)
+++ trunk/rental/setup/tables_current.inc.php 2016-10-13 10:40:00 UTC (rev
15821)
@@ -31,9 +31,9 @@
'furnish_type_id' => array('type' => 'int',
'precision' => 4, 'nullable' => true),
'standard_id' => array('type' => 'int',
'precision' => 4, 'nullable' => true),
'part_of_town_id' => array('type' => 'int',
'precision' => 4, 'nullable' => true),
- 'custom_prize_factor' => array('type' =>
'decimal', 'precision' => '20', 'scale' => '2', 'nullable' => true, 'default'
=> '1.00'),
- 'custom_prize' => array('type' => 'decimal',
'precision' => '20', 'scale' => '2', 'nullable' => true, 'default' => '1.00'),
- 'prize_type_id' => array('type' => 'int',
'precision' => 2, 'nullable' => true,'default' => 1),
+ 'custom_price_factor' => array('type' =>
'decimal', 'precision' => '20', 'scale' => '2', 'nullable' => true, 'default'
=> '1.00'),
+ 'custom_price' => array('type' => 'decimal',
'precision' => '20', 'scale' => '2', 'nullable' => true, 'default' => '1.00'),
+ 'price_type_id' => array('type' => 'int',
'precision' => 2, 'nullable' => true,'default' => 1),
),
'pk' => array('id'),
'fk' => array(),
Modified: trunk/rental/setup/tables_update.inc.php
===================================================================
--- trunk/rental/setup/tables_update.inc.php 2016-10-13 10:39:14 UTC (rev
15820)
+++ trunk/rental/setup/tables_update.inc.php 2016-10-13 10:40:00 UTC (rev
15821)
@@ -721,3 +721,21 @@
return $GLOBALS['setup_info']['rental']['currentver'];
}
}
+
+
+ $test[] = '0.1.0.30';
+ function rental_upgrade0_1_0_30()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
$GLOBALS['phpgw_setup']->oProc->RenameColumn('rental_composite',
'custom_prize_factor', 'custom_price_factor');
+
$GLOBALS['phpgw_setup']->oProc->RenameColumn('rental_composite',
'custom_prize', 'custom_price');
+
$GLOBALS['phpgw_setup']->oProc->RenameColumn('rental_composite',
'prize_type_id', 'price_type_id');
+
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['rental']['currentver'] =
'0.1.0.31';
+ return $GLOBALS['setup_info']['rental']['currentver'];
+ }
+ }
Modified: trunk/rental/templates/base/composite.xsl
===================================================================
--- trunk/rental/templates/base/composite.xsl 2016-10-13 10:39:14 UTC (rev
15820)
+++ trunk/rental/templates/base/composite.xsl 2016-10-13 10:40:00 UTC (rev
15821)
@@ -80,26 +80,26 @@
<xsl:if
test="contract_furnished_status = 1">
<div
class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'custom prize')"/>
+
<xsl:value-of select="php:function('lang', 'custom price')"/>
</label>
- <input
type="text" name="custom_prize" id="custom_prize" value="{value_custom_prize}"/>
+ <input
type="text" name="custom_price" id="custom_price" value="{value_custom_price}"/>
</div>
<div
class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'prize type')"/>
+
<xsl:value-of select="php:function('lang', 'price type')"/>
</label>
- <xsl:if
test="count(//list_prize_type/options) > 0">
- <select
id="prize_type_id" name="prize_type_id">
-
<xsl:apply-templates select="list_prize_type/options"/>
+ <xsl:if
test="count(//list_price_type/options) > 0">
+ <select
id="price_type_id" name="price_type_id">
+
<xsl:apply-templates select="list_price_type/options"/>
</select>
</xsl:if>
</div>
<div
class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'custom prize factor')"/>
+
<xsl:value-of select="php:function('lang', 'custom price factor')"/>
</label>
- <input
type="text" name="custom_prize_factor" id="custom_prize_factor"
value="{value_custom_prize_factor}"/>
+ <input
type="text" name="custom_price_factor" id="custom_price_factor"
value="{value_custom_price_factor}"/>
</div>
<div
class="pure-control-group">
<label>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15821] rental: rename prize to price,
sigurdne <=