[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16966] property: delivery address
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16966] property: delivery address |
Date: |
Thu, 10 Aug 2017 10:56:54 -0400 (EDT) |
Revision: 16966
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16966
Author: sigurdne
Date: 2017-08-10 10:56:54 -0400 (Thu, 10 Aug 2017)
Log Message:
-----------
property: delivery address
Modified Paths:
--------------
trunk/property/inc/class.sogeneric.inc.php
trunk/property/inc/class.uilocation.inc.php
trunk/property/inc/class.uiproject.inc.php
trunk/property/js/portico/project.edit.js
trunk/property/setup/default_records.inc.php
trunk/property/setup/phpgw_no.lang
trunk/property/setup/setup.inc.php
trunk/property/setup/tables_current.inc.php
trunk/property/setup/tables_update.inc.php
trunk/property/templates/base/project.xsl
Modified: trunk/property/inc/class.sogeneric.inc.php
===================================================================
--- trunk/property/inc/class.sogeneric.inc.php 2017-08-10 09:37:56 UTC (rev
16965)
+++ trunk/property/inc/class.sogeneric.inc.php 2017-08-10 14:56:54 UTC (rev
16966)
@@ -64,10 +64,8 @@
(
'table' => 'fm_part_of_town',
'id' => array('name' => 'id',
'type' => 'int', 'descr' => lang('id')),
- 'fields' => array
- (
- array
- (
+ 'fields' => array(
+ array(
'name' =>
'name',
'descr' =>
lang('name'),
'type' =>
'varchar',
@@ -74,8 +72,12 @@
'nullable' =>
false,
'size' => 20
),
- array
- (
+ array(
+ 'name' =>
'delivery_address',
+ 'descr' =>
lang('delivery address'),
+ 'type' => 'text'
+ ),
+ array(
'name' =>
'district_id',
'descr' =>
lang('district'),
'type' =>
'select',
@@ -574,13 +576,16 @@
(
'table' => 'fm_district',
'id' => array('name' => 'id',
'type' => 'int'),
- 'fields' => array
- (
- array
- (
+ 'fields' => array(
+ array(
'name' =>
'descr',
'descr' =>
lang('descr'),
'type' =>
'varchar'
+ ),
+ array(
+ 'name' =>
'delivery_address',
+ 'descr' =>
lang('delivery address'),
+ 'type' => 'text'
)
),
'edit_msg' => lang('edit'),
Modified: trunk/property/inc/class.uilocation.inc.php
===================================================================
--- trunk/property/inc/class.uilocation.inc.php 2017-08-10 09:37:56 UTC (rev
16965)
+++ trunk/property/inc/class.uilocation.inc.php 2017-08-10 14:56:54 UTC (rev
16966)
@@ -1006,6 +1006,13 @@
parent.JqueryPortico.onPopupClose("close");
+ try
+ {
+ parent.on_loc1_updated();
+ }
+ catch(err)
+ {}
+
});
});
Modified: trunk/property/inc/class.uiproject.inc.php
===================================================================
--- trunk/property/inc/class.uiproject.inc.php 2017-08-10 09:37:56 UTC (rev
16965)
+++ trunk/property/inc/class.uiproject.inc.php 2017-08-10 14:56:54 UTC (rev
16966)
@@ -2139,6 +2139,7 @@
'lang_remark_statustext' => lang('Enter a
remark to add to the history of the project'),
'lang_remark' => lang('remark'),
'value_remark' => isset($values['remark']) ?
$values['remark'] : '',
+ 'value_delivery_address' =>
!empty($values['delivery_address']) ? $values['delivery_address'] : '',
'lang_done_statustext' => lang('Back to the
list'),
'lang_save_statustext' => lang('Save the
project'),
'lang_no_cat' => lang('Select category'),
Modified: trunk/property/js/portico/project.edit.js
===================================================================
--- trunk/property/js/portico/project.edit.js 2017-08-10 09:37:56 UTC (rev
16965)
+++ trunk/property/js/portico/project.edit.js 2017-08-10 14:56:54 UTC (rev
16966)
@@ -132,7 +132,7 @@
validatorFunction: function (value, $el, config, languaje,
$form)
{
var validatet_category = $('#validatet_category').val();
- if(validatet_category ==1)
+ if (validatet_category == 1)
{
return true;
}
@@ -247,7 +247,6 @@
});
}
-
});
function addSubEntry()
@@ -291,11 +290,11 @@
this.validate_form = function ()
{
conf = {
- // modules: 'date, security, file',
+ // modules: 'date, security, file',
validateOnBlur: false,
scrollToTopOnError: true,
errorMessagePosition: 'top'
- // language: validateLanguage
+ // language: validateLanguage
};
return $('form').isValid(false, conf);
@@ -397,3 +396,9 @@
strURL = phpGWLink('index.php', oArgs, true);
JqueryPortico.autocompleteHelper(strURL, 'b_account_name', 'b_account_id',
'b_account_container');
+
+on_loc1_updated = function ()
+{
+ var loc1 = $("#loc1").val();
+
+};
Modified: trunk/property/setup/default_records.inc.php
===================================================================
--- trunk/property/setup/default_records.inc.php 2017-08-10 09:37:56 UTC
(rev 16965)
+++ trunk/property/setup/default_records.inc.php 2017-08-10 14:56:54 UTC
(rev 16966)
@@ -661,9 +661,10 @@
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 15, 'owner_id', 'owner_id', 'owner_id', 'I', NULL, NULL, NULL,
4, NULL, NULL, 'True', NULL)");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 16, 'change_type', 'change_type', 'change_type', 'I', NULL,
NULL, NULL, 4, NULL, NULL, 'True', NULL)");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 17, 'rental_area', 'Rental area', 'Rental area', 'N', NULL, 5,
20, 2, NULL, 'True', 1)");
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 18, 'area_gross', 'Gross area', 'Sum of the areas included
within the outside face of the exterior walls of a building.', 'N', NULL, 5,
20, 2, NULL, 'True', 1)");
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 19, 'area_net', 'Net area', 'The wall-to-wall floor area of a
room.', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 20, 'area_usable', 'Usable area', 'generally measured from paint
to paint inside the permanent walls and to the middle of partitions separating
rooms', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 18, 'area_gross', 'Gross area', 'Sum of the areas included
within the outside face of the exterior walls of a building.', 'N', NULL, 6,
20, 2, NULL, 'True', 1)");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 19, 'area_net', 'Net area', 'The wall-to-wall floor area of a
room.', 'N', NULL, 7, 20, 2, NULL, 'True', 1)");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 20, 'area_usable', 'Usable area', 'generally measured from paint
to paint inside the permanent walls and to the middle of partitions separating
rooms', 'N', NULL, 8, 20, 2, NULL, 'True', 1)");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 21, 'delivery_address', 'Delivery address', 'Delivery address',
'T', NULL, 9, NULL, NULL, NULL, 'True', 1)");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_choice
(location_id, attrib_id, id, value) VALUES ($location_id, 10, 1, 'OK')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_choice
(location_id, attrib_id, id, value) VALUES ($location_id, 10, 2, 'Not OK')");
Modified: trunk/property/setup/phpgw_no.lang
===================================================================
--- trunk/property/setup/phpgw_no.lang 2017-08-10 09:37:56 UTC (rev 16965)
+++ trunk/property/setup/phpgw_no.lang 2017-08-10 14:56:54 UTC (rev 16966)
@@ -2226,4 +2226,5 @@
select parent property no Velg forelder
attribute groups property no Attributtgrupper
sms text property no SMS-tekst
-character left property no Resterende tegn
\ No newline at end of file
+character left property no Resterende tegn
+delivery address property no Leveringsadresse
\ No newline at end of file
Modified: trunk/property/setup/setup.inc.php
===================================================================
--- trunk/property/setup/setup.inc.php 2017-08-10 09:37:56 UTC (rev 16965)
+++ trunk/property/setup/setup.inc.php 2017-08-10 14:56:54 UTC (rev 16966)
@@ -11,7 +11,7 @@
* @version $Id$
*/
$setup_info['property']['name'] = 'property';
- $setup_info['property']['version'] = '0.9.17.713';
+ $setup_info['property']['version'] = '0.9.17.714';
$setup_info['property']['app_order'] = 8;
$setup_info['property']['enable'] = 1;
$setup_info['property']['app_group'] = 'office';
Modified: trunk/property/setup/tables_current.inc.php
===================================================================
--- trunk/property/setup/tables_current.inc.php 2017-08-10 09:37:56 UTC (rev
16965)
+++ trunk/property/setup/tables_current.inc.php 2017-08-10 14:56:54 UTC (rev
16966)
@@ -14,7 +14,8 @@
'fm_district' => array(
'fd' => array(
'id' => array('type' => 'int', 'precision' =>
'2', 'nullable' => False),
- 'descr' => array('type' => 'varchar',
'precision' => '50', 'nullable' => True)
+ 'descr' => array('type' => 'varchar',
'precision' => '50', 'nullable' => True),
+ 'delivery_address' => array('type' => 'text',
'nullable' => True),
),
'pk' => array('id'),
'fk' => array(),
@@ -25,7 +26,8 @@
'fd' => array(
'id' => array('type' => 'auto', 'precision' =>
'2', 'nullable' => False),
'name' => array('type' => 'varchar',
'precision' => '150', 'nullable' => false),
- 'district_id' => array('type' => 'int',
'precision' => '2', 'nullable' => false)
+ 'district_id' => array('type' => 'int',
'precision' => '2', 'nullable' => false),
+ 'delivery_address' => array('type' => 'text',
'nullable' => True),
),
'pk' => array('id'),
'fk' => array('fm_district' => array('district_id' =>
'id')),
@@ -199,6 +201,7 @@
'nullable' => True, 'default' =>
'0.00'),
'area_usable' => array('type' => 'decimal',
'precision' => '20', 'scale' => '2',
'nullable' => True, 'default' =>
'0.00'),
+ 'delivery_address' => array('type' => 'text',
'nullable' => True),
'modified_by' => array('type' => 'int',
'precision' => 4, 'nullable' => true),
'modified_on' => array('type' => 'timestamp',
'nullable' => True, 'default' => 'current_timestamp')
),
@@ -231,6 +234,7 @@
'nullable' => True, 'default' =>
'0.00'),
'area_usable' => array('type' => 'decimal',
'precision' => '20', 'scale' => '2',
'nullable' => True, 'default' =>
'0.00'),
+ 'delivery_address' => array('type' => 'text',
'nullable' => True),
'exp_date' => array('type' => 'timestamp',
'nullable' => True, 'default' => 'current_timestamp'),
'modified_by' => array('type' => 'int',
'precision' => 4, 'nullable' => true),
'modified_on' => array('type' => 'timestamp',
'nullable' => True, 'default' => 'current_timestamp')
@@ -607,6 +611,7 @@
'order_sent' => array('type' => 'int',
'precision' => 8, 'nullable' => True),
'order_received' => array('type' => 'int',
'precision' => 8, 'nullable' => True),
'order_received_amount' => array('type' =>
'decimal', 'precision' => '20', 'scale' => '2', 'nullable' => True, 'default'
=> '0.00'),
+ 'delivery_address' => array('type' => 'text',
'nullable' => True),
),
'pk' => array('id'),
'fk' => array(),
@@ -1173,6 +1178,7 @@
'order_received_amount' => array('type' =>
'decimal', 'precision' => '20', 'scale' => '2', 'nullable' => True, 'default'
=> '0.00'),
'mail_recipients' => array('type' => 'varchar',
'precision' => 255, 'nullable' => True),
'file_attachments' => array('type' =>
'varchar', 'precision' => 255, 'nullable' => True),
+ 'delivery_address' => array('type' => 'text',
'nullable' => True)
),
'pk' => array('id'),
'ix' => array(),
@@ -1768,7 +1774,8 @@
'b_account_id' => array('type' => 'varchar',
'precision' => '20', 'nullable' => True),
'inherit_location' => array('type' => 'int',
'precision' => 2, 'nullable' => True,
'default' => 1),
- 'periodization_id' => array('type' => 'int',
'precision' => 4, 'nullable' => true)
+ 'periodization_id' => array('type' => 'int',
'precision' => 4, 'nullable' => true),
+ 'delivery_address' => array('type' => 'text',
'nullable' => True)
),
'pk' => array('id'),
'fk' => array(),
@@ -2887,4 +2894,4 @@
'ix' => array(),
'uc' => array()
)
- );
+ );
\ No newline at end of file
Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php 2017-08-10 09:37:56 UTC (rev
16965)
+++ trunk/property/setup/tables_update.inc.php 2017-08-10 14:56:54 UTC (rev
16966)
@@ -9564,3 +9564,87 @@
return $GLOBALS['setup_info']['property']['currentver'];
}
}
+ /**
+ * Update property version from 0.9.17.713 to 0.9.17.714
+ *
+ */
+ $test[] = '0.9.17.713';
+
+ function property_upgrade0_9_17_713()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw_setup']->oProc->query('DELETE FROM fm_cache');
+
+ $GLOBALS['phpgw_setup']->oProc->AddColumn('fm_district',
'delivery_address', array(
+ 'type' => 'text', 'nullable' => True));
+
+ $GLOBALS['phpgw_setup']->oProc->AddColumn('fm_part_of_town',
'delivery_address', array(
+ 'type' => 'text', 'nullable' => True));
+
+ $GLOBALS['phpgw_setup']->oProc->AddColumn('fm_location1',
'delivery_address', array(
+ 'type' => 'text', 'nullable' => True));
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_location1_history',
'delivery_address', array(
+ 'type' => 'text', 'nullable' => True));
+
+ $GLOBALS['phpgw_setup']->oProc->AddColumn('fm_project',
'delivery_address', array(
+ 'type' => 'text', 'nullable' => True));
+
+ $GLOBALS['phpgw_setup']->oProc->AddColumn('fm_workorder',
'delivery_address', array(
+ 'type' => 'text', 'nullable' => True));
+
+
+ $GLOBALS['phpgw_setup']->oProc->AddColumn('fm_tts_tickets',
'delivery_address', array(
+ 'type' => 'text', 'nullable' => True));
+
+
+ $cust = array
+ (
+ 'datatype' => 'T',
+ 'precision_' => '',
+ 'scale' => '',
+ 'default_value' => '',
+ 'nullable' => 'True',
+ 'custom' => 1
+ );
+
+ $cust_fields = array();
+
+ $cust_fields[] = array
+ (
+ 'name' => 'delivery_address',
+ 'descr' => 'delivery address',
+ 'statustext' => 'delivery address',
+ 'cust' => $cust
+ );
+
+ $db = & $GLOBALS['phpgw_setup']->oProc->m_odb;
+
+ foreach($cust_fields as & $field)
+ {
+
+ $field['cust']['location_id'] =
$GLOBALS['phpgw']->locations->get_id('property', ".location.1");
+ $db->query("SELECT max(id) as id FROM
phpgw_cust_attribute WHERE location_id = {$field['cust']['location_id']}");
+ $db->next_record();
+ $id = (int)$db->f('id');
+ $db->query("SELECT max(attrib_sort) as attrib_sort FROM
phpgw_cust_attribute WHERE group_id = 0 AND location_id =
{$field['cust']['location_id']}");
+ $db->next_record();
+
+ $field['cust']['id'] = $id + 1;
+ $field['cust']['attrib_sort'] =
(int)$db->f('attrib_sort') + 1;
+ $field['cust']['column_name'] = $field['name'];
+ $field['cust']['input_text'] = $field['descr'];
+ $field['cust']['statustext'] = $field['statustext'];
+
+ $sql = 'INSERT INTO phpgw_cust_attribute(' .
implode(',', array_keys($field['cust'])) . ') '
+ . ' VALUES (' .
$db->validate_insert($field['cust']) . ')';
+ $db->query($sql, __LINE__, __FILE__);
+ }
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.714';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+ }
Modified: trunk/property/templates/base/project.xsl
===================================================================
--- trunk/property/templates/base/project.xsl 2017-08-10 09:37:56 UTC (rev
16965)
+++ trunk/property/templates/base/project.xsl 2017-08-10 14:56:54 UTC (rev
16966)
@@ -350,6 +350,17 @@
</div>
</xsl:when>
</xsl:choose>
+ <div class="pure-control-group">
+ <label for="delivery_address">
+ <xsl:value-of
select="php:function('lang', 'delivery address')"/>
+ </label>
+ <textarea
class="pure-input-1-2" rows="6" id="delivery_address"
name="values[delivery_address]">
+ <xsl:attribute
name="title">
+ <xsl:value-of
select="php:function('lang', 'delivery address')"/>
+ </xsl:attribute>
+ <xsl:value-of
select="value_delivery_address"/>
+ </textarea>
+ </div>
</fieldset>
</div>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16966] property: delivery address,
sigurdne <=