[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15803] Stable: Merge 15788:15802 from trunk
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15803] Stable: Merge 15788:15802 from trunk |
Date: |
Fri, 7 Oct 2016 08:17:07 +0000 (UTC) |
Revision: 15803
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15803
Author: sigurdne
Date: 2016-10-07 08:17:07 +0000 (Fri, 07 Oct 2016)
Log Message:
-----------
Stable: Merge 15788:15802 from trunk
Modified Paths:
--------------
branches/Version-2_0-branch/helpdesk/inc/class.sotts.inc.php
branches/Version-2_0-branch/preferences/index.php
branches/Version-2_0-branch/preferences/setup/setup.inc.php
branches/Version-2_0-branch/preferences/setup/tables_update.inc.php
branches/Version-2_0-branch/property/inc/class.soentity.inc.php
branches/Version-2_0-branch/property/inc/class.uitts.inc.php
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
branches/Version-2_0-branch/rental/inc/class.socomposite.inc.php
branches/Version-2_0-branch/rental/inc/class.uicomposite.inc.php
branches/Version-2_0-branch/rental/inc/class.uicontract.inc.php
branches/Version-2_0-branch/rental/inc/model/class.composite.inc.php
branches/Version-2_0-branch/rental/setup/setup.inc.php
branches/Version-2_0-branch/rental/setup/tables_current.inc.php
branches/Version-2_0-branch/rental/setup/tables_update.inc.php
branches/Version-2_0-branch/rental/templates/base/composite.xsl
Property Changed:
----------------
branches/Version-2_0-branch/
Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/dev-syncromind:13653
/branches/dev-syncromind-2:14933-15747
/branches/stavangerkommune:12743-12875,12986
/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787
+ /branches/dev-syncromind:13653
/branches/dev-syncromind-2:14933-15747
/branches/stavangerkommune:12743-12875,12986
/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802
Modified: branches/Version-2_0-branch/helpdesk/inc/class.sotts.inc.php
===================================================================
--- branches/Version-2_0-branch/helpdesk/inc/class.sotts.inc.php
2016-10-07 08:10:34 UTC (rev 15802)
+++ branches/Version-2_0-branch/helpdesk/inc/class.sotts.inc.php
2016-10-07 08:17:07 UTC (rev 15803)
@@ -300,7 +300,7 @@
$where = 'AND';
$membership =
$GLOBALS['phpgw']->accounts->membership($user_id);
- $filtermethod .= ' OR (assignedto IS NULL AND
group_id IN (' . implode(',',array_keys($membership)) . ')))';
+ $filtermethod .= ' OR (assignedto IS NULL AND
phpgw_helpdesk_tickets.group_id IN (' . implode(',',array_keys($membership)) .
')))';
}
if ($owner_id > 0)
Modified: branches/Version-2_0-branch/preferences/index.php
===================================================================
--- branches/Version-2_0-branch/preferences/index.php 2016-10-07 08:10:34 UTC
(rev 15802)
+++ branches/Version-2_0-branch/preferences/index.php 2016-10-07 08:17:07 UTC
(rev 15803)
@@ -158,5 +158,4 @@
}
$GLOBALS['phpgw']->template->pfp('out', 'list');
- $GLOBALS['phpgw']->common->phpgw_footer();
-?>
+ $GLOBALS['phpgw']->common->phpgw_footer();
\ No newline at end of file
Modified: branches/Version-2_0-branch/preferences/setup/setup.inc.php
===================================================================
--- branches/Version-2_0-branch/preferences/setup/setup.inc.php 2016-10-07
08:10:34 UTC (rev 15802)
+++ branches/Version-2_0-branch/preferences/setup/setup.inc.php 2016-10-07
08:17:07 UTC (rev 15803)
@@ -2,7 +2,7 @@
/**
* Preferences - user manual
*
- * @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @copyright Copyright (C) 2000-2016 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package preferences
* @subpackage setup
@@ -11,10 +11,10 @@
$setup_info['preferences']['name'] = 'preferences';
$setup_info['preferences']['title'] = 'Preferences';
- $setup_info['preferences']['version'] = '0.9.17.500';
+ $setup_info['preferences']['version'] = '0.9.17.501';
$setup_info['preferences']['app_order'] = 1;
$setup_info['preferences']['tables'] = '';
- $setup_info['preferences']['enable'] = 2;
+ $setup_info['preferences']['enable'] = 1;
$setup_info['preferences']['app_group'] = 'systools';
// The hooks this app includes, needed for hooks registration
@@ -29,4 +29,3 @@
'appname' => 'phpgwapi',
'versions' => array('0.9.17', '0.9.18')
);
-?>
Modified: branches/Version-2_0-branch/preferences/setup/tables_update.inc.php
===================================================================
--- branches/Version-2_0-branch/preferences/setup/tables_update.inc.php
2016-10-07 08:10:34 UTC (rev 15802)
+++ branches/Version-2_0-branch/preferences/setup/tables_update.inc.php
2016-10-07 08:17:07 UTC (rev 15803)
@@ -1,7 +1,7 @@
<?php
/**
* Setup
- * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @copyright Copyright (C) 2003-2016 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package preferences
* @subpackage setup
@@ -15,4 +15,11 @@
$GLOBALS['setup_info']['preferences']['currentver'] =
'0.9.17.500';
return $GLOBALS['setup_info']['preferences']['currentver'];
}
-?>
+
+ $test[] = '0.9.17.500';
+ function preferences_upgrade0_9_17_500()
+ {
+ $GLOBALS['phpgw_setup']->oProc->query("UPDATE
phpgw_applications SET app_enabled = 1 WHERE app_name = 'preferences'");
+ $GLOBALS['setup_info']['preferences']['currentver'] =
'0.9.17.501';
+ return $GLOBALS['setup_info']['preferences']['currentver'];
+ }
\ No newline at end of file
Modified: branches/Version-2_0-branch/property/inc/class.soentity.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.soentity.inc.php
2016-10-07 08:10:34 UTC (rev 15802)
+++ branches/Version-2_0-branch/property/inc/class.soentity.inc.php
2016-10-07 08:17:07 UTC (rev 15803)
@@ -837,7 +837,7 @@
{
if(!empty($attibute['choice']))
{
- $_querymethod[] =
"CAST( json_representation->>'status' AS integer) < 90";
+ $_querymethod[] =
"(json_representation->>'status' IS NULL OR CAST(
json_representation->>'status' AS integer) < 90)";
$__querymethod =
array(); // remove block
}
}
Modified: branches/Version-2_0-branch/property/inc/class.uitts.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uitts.inc.php
2016-10-07 08:10:34 UTC (rev 15802)
+++ branches/Version-2_0-branch/property/inc/class.uitts.inc.php
2016-10-07 08:17:07 UTC (rev 15803)
@@ -2048,7 +2048,7 @@
$need_approval =
isset($this->bo->config->config_data['workorder_approval']) ?
$this->bo->config->config_data['workorder_approval'] : '';
- $supervisor_email =
$this->get_supervisor_email($supervisor_id, $need_approval);
+ // $supervisor_email =
$this->get_supervisor_email($supervisor_id, $need_approval);
// approval
}
@@ -2940,7 +2940,7 @@
'year_list' => array('options' =>
$this->bocommon->select_list($ticket['actual_cost_year'] ?
$ticket['actual_cost_year'] : date('Y'), $year_list)),
'period_list' => array('options' =>
execMethod('property.boinvoice.period_list', date('Ym'))),
'need_approval' => $need_approval,
- 'value_approval_mail_address' =>
$supervisor_email,
+ // 'value_approval_mail_address' =>
$supervisor_email,
'contact_data' => $contact_data,
'lookup_type' => $lookup_type,
'simple' => $this->simple,
@@ -3065,11 +3065,18 @@
public function check_purchase_right()
{
+ $need_approval =
isset($this->bo->config->config_data['workorder_approval']) ?
$this->bo->config->config_data['workorder_approval'] : '';
+ if(!$need_approval)
+ {
+ return;
+ }
+
$config = CreateObject('admin.soconfig',
$GLOBALS['phpgw']->locations->get_id('property', '.ticket'));
$check_external_register=
!!$config->config_data['external_register']['check_external_register'];
- $id = phpgw::get_var('ecodimb');
- // $id ='013000';
+ $id = sprintf("%06s", phpgw::get_var('ecodimb'));
+ // $id ='013000';
+
$amount =phpgw::get_var('amount', 'int');
if($check_external_register && $id)
@@ -3193,6 +3200,14 @@
'required' => true
);
}
+ else
+ {
+ $supervisor_email[] = array(
+ 'id' => $supervisor_id,
+ 'address' =>
$GLOBALS['phpgw']->accounts->id2name($supervisor_id) . '@bergen.kommune.no',
+ 'required' => true
+ );
+ }
if (isset($prefs['approval_from']) &&
$prefs['approval_from'])
{
Modified:
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
===================================================================
---
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
2016-10-07 08:10:34 UTC (rev 15802)
+++
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
2016-10-07 08:17:07 UTC (rev 15803)
@@ -222,7 +222,7 @@
return $filename;
}
- public function transfer( )
+ public function transfer( $debug )
{
$this->db->transaction_begin();
@@ -244,7 +244,7 @@
$transfer_ok = false;
// if ($this->config->config_data['common']['method'] ==
'ftp' || $this->config->config_data['common']['method'] == 'ssh')
- if (false)//Not yet...
+ if (!$debug)//Not yet...
{
if (!$connection = $this->connection)
{
@@ -292,6 +292,18 @@
// @unlink($filename);
}
}
+ else
+ {
+ $transfer_ok = true;
+
+ $GLOBALS['phpgw_info']['flags']['noheader'] =
true;
+ $GLOBALS['phpgw_info']['flags']['nofooter'] =
true;
+ $GLOBALS['phpgw_info']['flags']['xslt_app'] =
false;
+ $size = strlen($content);
+ $browser = CreateObject('phpgwapi.browser');
+ $browser->content_header(basename($filename),
'', $size);
+ echo $content;
+ }
return $transfer_ok;
}
Modified:
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
===================================================================
---
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
2016-10-07 08:10:34 UTC (rev 15802)
+++
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
2016-10-07 08:17:07 UTC (rev 15803)
@@ -40,6 +40,7 @@
class lag_agresso_ordre_fra_melding
{
+ var $debug = true;
function __construct()
{
@@ -48,7 +49,7 @@
public function transfer( $id )
{
$_ticket = ExecMethod('property.sotts.read_single',
$id);
- if ($_ticket['order_sent'])
+ if (!$this->debug && $_ticket['order_sent'])
{
return 2;
}
@@ -153,9 +154,9 @@
$exporter_ordre = new
BkBygg_exporter_data_til_Agresso(array('order_id' => $_ticket['order_id']));
$exporter_ordre->create_transfer_xml($param);
- $exporter_ordre->output();
- die();
- $export_ok = $exporter_ordre->transfer();
+
+ $export_ok = $exporter_ordre->transfer($this->debug);
+
if ($export_ok)
{
$this->log_transfer( $id );
Modified: branches/Version-2_0-branch/rental/inc/class.socomposite.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/class.socomposite.inc.php
2016-10-07 08:10:34 UTC (rev 15802)
+++ branches/Version-2_0-branch/rental/inc/class.socomposite.inc.php
2016-10-07 08:17:07 UTC (rev 15803)
@@ -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.part_of_town_id,
rental_composite.custom_prize_factor, rental_composite.custom_prize,
rental_composite.prize_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 .= "
@@ -316,6 +316,8 @@
$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'));
}
// Location code
$location_code =
$this->unmarshal($this->db->f('location_code', true), 'string');
@@ -460,7 +462,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() . '\''
+ 'custom_prize_factor = \'' .
$composite->get_custom_prize_factor() . '\'',
+ 'prize_type_id = ' .
$composite->get_prize_type_id(),
+ 'custom_prize = \'' .
$composite->get_custom_prize() . '\''
);
$result = $this->db->query('UPDATE rental_composite SET
' . join(',', $values) . " WHERE id=$id", __LINE__, __FILE__);
@@ -480,7 +484,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');
+ 'standard_id','composite_type_id',
'part_of_town_id', 'custom_prize_factor','prize_type_id', 'custom_prize');
$values = array(
"'" . $composite->get_name() . "'",
"'" . $composite->get_description() . "'",
@@ -496,7 +500,9 @@
$composite->get_standard_id(),
$composite->get_composite_type_id(),
$composite->get_part_of_town_id(),
- $composite->get_custom_prize_factor()
+ "'" . $composite->get_custom_prize_factor() .
"'",
+ $composite->get_prize_type_id(),
+ "'" . $composite->get_custom_prize() . "'"
);
$query = "INSERT INTO rental_composite (" . join(',',
$cols) . ") VALUES (" . join(',', $values) . ")";
Modified: branches/Version-2_0-branch/rental/inc/class.uicomposite.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/class.uicomposite.inc.php
2016-10-07 08:10:34 UTC (rev 15802)
+++ branches/Version-2_0-branch/rental/inc/class.uicomposite.inc.php
2016-10-07 08:17:07 UTC (rev 15803)
@@ -7,6 +7,7 @@
include_class('rental', 'composite', 'inc/model/');
include_class('rental', 'application', 'inc/model/');
include_class('rental', 'property_location', 'inc/model/');
+ include_class('rental', 'price_item', 'inc/model/');
class rental_uicomposite extends rental_uicommon
{
@@ -129,22 +130,17 @@
public function query()
{
- if
($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] > 0)
- {
- $user_rows_per_page =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
- }
- else
- {
- $user_rows_per_page = 10;
- }
+ $length = phpgw::get_var('length', 'int');
+ $user_rows_per_page = $length > 0 ? $length :
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+
$search = phpgw::get_var('search');
$order = phpgw::get_var('order');
$draw = phpgw::get_var('draw', 'int', 'REQUEST', 1);
$columns = phpgw::get_var('columns');
$start_index = phpgw::get_var('start', 'int',
'REQUEST', 0);
- $num_of_objects = (phpgw::get_var('length', 'int') <=
0) ? $user_rows_per_page : phpgw::get_var('length', 'int');
+ $num_of_objects = $length == -1 ? 0 :
$user_rows_per_page;
$sort_field = ($columns[$order[0]['column']]['data']) ?
$columns[$order[0]['column']]['data'] : 'id';
$sort_ascending = ($order[0]['dir'] == 'desc') ? false
: true;
$search_for = (is_array($search)) ? $search['value'] :
$search;
@@ -166,7 +162,7 @@
if ($export)
{
- $num_of_objects = null;
+ $num_of_objects = 0;
}
//Retrieve the type of query and perform type specific
logic
@@ -293,6 +289,16 @@
} */
if ($export)
{
+ /*
+ * reverse of nl2br()
+ */
+ foreach ($rows as &$row)
+ {
+ foreach ($row as $key => &$value)
+ {
+ $value =
preg_replace('#<br\s*?/?>#i', "\n", $value);
+ }
+ }
return $rows;
}
@@ -1010,6 +1016,16 @@
JS;
$GLOBALS['phpgw']->js->add_code('', $code);
+ $current_prize_type_id =
$composite->get_prize_type_id();
+ $prize_type_options = array();
+ $price_item = new rental_price_item();
+ foreach ($price_item->get_price_types() as
$prize_type_id => $prize_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' => $selected);
+ }
+
$data = array
(
'datatable_def' => $datatable_def,
@@ -1021,6 +1037,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_composite_type_name' =>
$composite_type_name,
'list_composite_type' => array('options' =>
$composite_type_options),
'value_furnish_type_name' => $furnish_type_name,
@@ -1094,6 +1112,8 @@
$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'));
if
(rental_socomposite::get_instance()->store($composite))
{
Modified: branches/Version-2_0-branch/rental/inc/class.uicontract.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/class.uicontract.inc.php
2016-10-07 08:10:34 UTC (rev 15802)
+++ branches/Version-2_0-branch/rental/inc/class.uicontract.inc.php
2016-10-07 08:17:07 UTC (rev 15803)
@@ -844,7 +844,7 @@
$columns = phpgw::get_var('columns');
$start_index = phpgw::get_var('start', 'int',
'REQUEST', 0);
- $num_of_objects = $length == -1 ? null :
$user_rows_per_page;
+ $num_of_objects = $length == -1 ? 0 :
$user_rows_per_page;
$sort_field = ($columns[$order[0]['column']]['data']) ?
$columns[$order[0]['column']]['data'] : 'old_contract_id';
$sort_ascending = ($order[0]['dir'] == 'desc') ? false
: true;
Modified: branches/Version-2_0-branch/rental/inc/model/class.composite.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/model/class.composite.inc.php
2016-10-07 08:10:34 UTC (rev 15802)
+++ branches/Version-2_0-branch/rental/inc/model/class.composite.inc.php
2016-10-07 08:17:07 UTC (rev 15803)
@@ -30,6 +30,8 @@
protected $contracts;
protected $part_of_town_id;
protected $custom_prize_factor = '1.00';
+ protected $custom_prize;
+ protected $prize_type_id;
protected static $furnish_types_arr;
/**
@@ -372,6 +374,26 @@
return (int)$this->composite_type_id;
}
+ public function set_custom_prize( $custom_prize )
+ {
+ $this->custom_prize = (float)$custom_prize;
+ }
+
+ public function get_custom_prize()
+ {
+ return (float)$this->custom_prize;
+ }
+
+ public function set_prize_type_id( $prize_type_id )
+ {
+ $this->prize_type_id = (int)$prize_type_id;
+ }
+
+ public function get_prize_type_id()
+ {
+ return (int)$this->prize_type_id;
+ }
+
/**
* Fetch composite standards on the form array(array('id' => 1,
'name' => 'some text', 'selected' => 1|0))
* @return array
@@ -510,6 +532,8 @@
'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(),
);
}
}
\ No newline at end of file
Modified: branches/Version-2_0-branch/rental/setup/setup.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/setup/setup.inc.php 2016-10-07
08:10:34 UTC (rev 15802)
+++ branches/Version-2_0-branch/rental/setup/setup.inc.php 2016-10-07
08:17:07 UTC (rev 15803)
@@ -1,6 +1,6 @@
<?php
$setup_info['rental']['name'] = 'rental'; // Module identifier
- $setup_info['rental']['version'] = '0.1.0.29'; // Current module version
+ $setup_info['rental']['version'] = '0.1.0.30'; // Current module version
$setup_info['rental']['app_order'] = 51; // (?)
$setup_info['rental']['tables'] = array(
'rental_party', // All contract participants, tenants etc.
Modified: branches/Version-2_0-branch/rental/setup/tables_current.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/setup/tables_current.inc.php
2016-10-07 08:10:34 UTC (rev 15802)
+++ branches/Version-2_0-branch/rental/setup/tables_current.inc.php
2016-10-07 08:17:07 UTC (rev 15803)
@@ -32,6 +32,8 @@
'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),
),
'pk' => array('id'),
'fk' => array(),
Modified: branches/Version-2_0-branch/rental/setup/tables_update.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/setup/tables_update.inc.php
2016-10-07 08:10:34 UTC (rev 15802)
+++ branches/Version-2_0-branch/rental/setup/tables_update.inc.php
2016-10-07 08:17:07 UTC (rev 15803)
@@ -695,3 +695,29 @@
}
}
+ $test[] = '0.1.0.29';
+ function rental_upgrade0_1_0_29()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw_setup']->oProc->AddColumn('rental_composite',
'prize_type_id', array(
+ 'type' => 'int',
+ 'precision' => '2',
+ 'nullable' => true,
+ 'default' => 2
+ ));
+ $GLOBALS['phpgw_setup']->oProc->AddColumn('rental_composite',
'custom_prize',array(
+ 'type' => 'decimal',
+ 'precision' => '20',
+ 'scale' => '2',
+ 'nullable' => true,
+ 'default' => '0.00'
+ ));
+
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['rental']['currentver'] =
'0.1.0.30';
+ return $GLOBALS['setup_info']['rental']['currentver'];
+ }
+ }
Modified: branches/Version-2_0-branch/rental/templates/base/composite.xsl
===================================================================
--- branches/Version-2_0-branch/rental/templates/base/composite.xsl
2016-10-07 08:10:34 UTC (rev 15802)
+++ branches/Version-2_0-branch/rental/templates/base/composite.xsl
2016-10-07 08:17:07 UTC (rev 15803)
@@ -78,6 +78,22 @@
</select>
</div>
<xsl:if
test="contract_furnished_status = 1">
+ <div
class="pure-control-group">
+ <label>
+
<xsl:value-of select="php:function('lang', 'custom prize')"/>
+ </label>
+ <input
type="text" name="custom_prize" id="custom_prize" value="{value_custom_prize}"/>
+ </div>
+ <div
class="pure-control-group">
+ <label>
+
<xsl:value-of select="php:function('lang', 'prize 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"/>
+
</select>
+ </xsl:if>
+ </div>
<div
class="pure-control-group">
<label>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15803] Stable: Merge 15788:15802 from trunk,
sigurdne <=