[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15262] Stable: Merge 15259:15261 from trunk
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15262] Stable: Merge 15259:15261 from trunk |
Date: |
Tue, 7 Jun 2016 09:41:20 +0000 (UTC) |
Revision: 15262
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15262
Author: sigurdne
Date: 2016-06-07 09:41:19 +0000 (Tue, 07 Jun 2016)
Log Message:
-----------
Stable: Merge 15259:15261 from trunk
Modified Paths:
--------------
branches/Version-2_0-branch/property/inc/class.uitts.inc.php
branches/Version-2_0-branch/property/setup/default_records.inc.php
branches/Version-2_0-branch/property/templates/base/tts.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:14937-15027,15165-15215,15223-15228,15230-15243,15245-15250,15254-15257
/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
+ /branches/dev-syncromind:13653
/branches/dev-syncromind-2:14937-15027,15165-15215,15223-15228,15230-15243,15245-15250,15254-15257
/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
Modified: branches/Version-2_0-branch/property/inc/class.uitts.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uitts.inc.php
2016-06-07 09:39:08 UTC (rev 15261)
+++ branches/Version-2_0-branch/property/inc/class.uitts.inc.php
2016-06-07 09:41:19 UTC (rev 15262)
@@ -2736,8 +2736,9 @@
$active_tab = 'general';
$unspsc_code = $ticket['unspsc_code'] ?
$ticket['unspsc_code'] :
$GLOBALS['phpgw_info']['user']['preferences']['property']['unspsc_code'];
- $data = array
- (
+ $enable_order_service_id =
isset($config->config_data['enable_order_service_id']) &&
$config->config_data['enable_order_service_id'] ? true : false;
+ $enable_unspsc =
isset($config->config_data['enable_unspsc']) &&
$config->config_data['enable_unspsc'] ? true : false;
+ $data = array(
'datatable_def' => $datatable_def,
'my_groups' => json_encode($my_groups),
'custom_attributes' => array('attributes' =>
$ticket['attributes']),
@@ -2746,6 +2747,8 @@
'value_sms_phone' => $ticket['contact_phone'],
'access_order' => $access_order,
'currency' =>
$GLOBALS['phpgw_info']['user']['preferences']['common']['currency'],
+ 'enable_unspsc' => $enable_unspsc,
+ 'enable_order_service_id' =>
$enable_order_service_id,
'value_order_id' => $ticket['order_id'],
'value_order_descr' => $ticket['order_descr'],
'vendor_data' => $vendor_data,
Modified: branches/Version-2_0-branch/property/setup/default_records.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/default_records.inc.php
2016-06-07 09:39:08 UTC (rev 15261)
+++ branches/Version-2_0-branch/property/setup/default_records.inc.php
2016-06-07 09:41:19 UTC (rev 15262)
@@ -1,15 +1,15 @@
<?php
/**
- * phpGroupWare - property: a Facilities Management System.
- *
- * @author Sigurd Nes <address@hidden>
- * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc.
http://www.fsf.org/
- * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
- * @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
- * @package property
- * @subpackage setup
+ * phpGroupWare - property: a Facilities Management System.
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
+ * @package property
+ * @subpackage setup
* @version $Id$
- */
+ */
/**
* Description
* @package property
@@ -73,19 +73,18 @@
$GLOBALS['phpgw']->locations->add('.scheduled_events', 'Scheduled
events', 'property');
$GLOBALS['phpgw']->locations->add('.project.condition_survey',
'Condition Survey', 'property', true, 'fm_condition_survey', true);
- $locations = array
- (
- 'property.ticket' => '.ticket',
- 'property.project' => '.project',
- 'property.document' => '.document',
- 'fm_vendor' => '.vendor',
- 'fm_tenant' => '.tenant',
- 'fm_owner' => '.owner'
+ $locations = array(
+ 'property.ticket' => '.ticket',
+ 'property.project' => '.project',
+ 'property.document' => '.document',
+ 'fm_vendor' => '.vendor',
+ 'fm_tenant' => '.tenant',
+ 'fm_owner' => '.owner'
);
- foreach($locations as $dummy => $location)
+ foreach ($locations as $dummy => $location)
{
- $GLOBALS['phpgw']->locations->add("{$location}.category", 'Categories',
'property');
+ $GLOBALS['phpgw']->locations->add("{$location}.category",
'Categories', 'property');
}
@@ -233,34 +232,31 @@
$GLOBALS['phpgw']->hooks = CreateObject('phpgwapi.hooks',
$GLOBALS['phpgw_setup']->oProc->m_odb);
$cats = CreateObject('phpgwapi.categories', -1, 'property',
'.document');
- $cats->add(array
- (
- 'name' => 'Picture',
- 'descr' => 'Picture',
+ $cats->add(array(
+ 'name' => 'Picture',
+ 'descr' => 'Picture',
'parent' => 'none',
'old_parent' => 0,
'access' => 'public'
- )
+ )
);
- $cats->add(array
- (
- 'name' => 'Report',
- 'descr' => 'Report',
+ $cats->add(array(
+ 'name' => 'Report',
+ 'descr' => 'Report',
'parent' => 'none',
'old_parent' => 0,
'access' => 'public'
- )
+ )
);
- $cats->add(array
- (
- 'name' => 'Instruction',
- 'descr' => 'Instruction',
+ $cats->add(array(
+ 'name' => 'Instruction',
+ 'descr' => 'Instruction',
'parent' => 'none',
'old_parent' => 0,
'access' => 'public'
- )
+ )
);
@@ -534,7 +530,7 @@
$location_naming[4]['name'] = 'Apartment';
$location_naming[4]['descr'] = 'Apartment';
- for($location_type = 1; $location_type < 5; $location_type++)
+ for ($location_type = 1; $location_type < 5; $location_type++)
{
$default_attrib['id'][] = 1;
$default_attrib['column_name'][] = 'location_code';
@@ -592,7 +588,7 @@
$default_attrib['input_text'][] = 'modified_on';
$default_attrib['statustext'][] = 'modified_on';
- for($i = 1; $i < $location_type + 1; $i++)
+ for ($i = 1; $i < $location_type + 1; $i++)
{
$pk[$i - 1] = 'loc' . $i;
@@ -603,52 +599,52 @@
$default_attrib['nullable'][] = 'False';
$default_attrib['input_text'][] = 'loc' . $i;
$default_attrib['statustext'][] = 'loc' . $i;
- }
+ }
/*
- if($location_type>1)
- {
- $fk_table='fm_location'. ($location_type-1);
+ if($location_type>1)
+ {
+ $fk_table='fm_location'. ($location_type-1);
- for ($i=1; $i<$standard['id']; $i++)
- {
- $fk['loc' . $i] = $fk_table . '.loc' . $i;
- }
- }
+ for ($i=1; $i<$standard['id']; $i++)
+ {
+ $fk['loc' . $i] = $fk_table . '.loc' . $i;
+ }
+ }
*/
- $ix = array('location_code');
+ $ix = array('location_code');
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_location_type
(id,name,descr,pk,ix) "
- . "VALUES ($location_type,'"
- . $location_naming[$location_type]['name'] . "','"
- . $location_naming[$location_type]['descr'] . "','"
- . implode(',', $pk) . "','"
- . implode(',', $ix) . "')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
fm_location_type (id,name,descr,pk,ix) "
+ . "VALUES ($location_type,'"
+ . $location_naming[$location_type]['name'] . "','"
+ . $location_naming[$location_type]['descr'] . "','"
+ . implode(',', $pk) . "','"
+ . implode(',', $ix) . "')");
$GLOBALS['phpgw_setup']->oProc->query("UPDATE fm_location_type
set list_info = '" . 'a:1:{i:1;s:1:"1";}' . "' WHERE id = '1'");
$GLOBALS['phpgw_setup']->oProc->query("UPDATE fm_location_type
set list_info = '" . 'a:2:{i:1;s:1:"1";i:2;s:1:"2";}' . "' WHERE id = '2'");
$GLOBALS['phpgw_setup']->oProc->query("UPDATE fm_location_type
set list_info = '" . 'a:3:{i:1;s:1:"1";i:2;s:1:"2";i:3;s:1:"3";}' . "' WHERE id
= '3'");
$GLOBALS['phpgw_setup']->oProc->query("UPDATE fm_location_type
set list_info = '" . 'a:1:{i:1;s:1:"1";}' . "' WHERE id = '4'");
- $location_id = $GLOBALS['phpgw']->locations->get_id('property',
".location.{$location_type}");
+ $location_id = $GLOBALS['phpgw']->locations->get_id('property',
".location.{$location_type}");
- for($i = 0; $i < count($default_attrib['id']); $i++)
- {
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_cust_attribute (location_id,
id,column_name,datatype,precision_,input_text,statustext,nullable,custom)"
- . " VALUES ("
- . $location_id . ','
- . $default_attrib['id'][$i] . ",'"
- . $default_attrib['column_name'][$i] . "','"
- . $default_attrib['type'][$i] . "',"
- . $default_attrib['precision'][$i] . ",'"
- . $default_attrib['input_text'][$i] . "','"
- . $default_attrib['statustext'][$i] . "','"
- . $default_attrib['nullable'][$i] . "',NULL)");
- }
+ for ($i = 0; $i < count($default_attrib['id']); $i++)
+ {
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_cust_attribute (location_id,
id,column_name,datatype,precision_,input_text,statustext,nullable,custom)"
+ . " VALUES ("
+ . $location_id . ','
+ . $default_attrib['id'][$i] . ",'"
+ . $default_attrib['column_name'][$i] . "','"
+ . $default_attrib['type'][$i] . "',"
+ . $default_attrib['precision'][$i] . ",'"
+ . $default_attrib['input_text'][$i] . "','"
+ . $default_attrib['statustext'][$i] . "','"
+ . $default_attrib['nullable'][$i] . "',NULL)");
+ }
- unset($pk);
- unset($ix);
- unset($default_attrib);
+ unset($pk);
+ unset($ix);
+ unset($default_attrib);
}
#
@@ -717,12 +713,12 @@
$GLOBALS['phpgw']->acl->enable_inheritance = true;
$aclobj = & $GLOBALS['phpgw']->acl;
$admin_group = $GLOBALS['phpgw']->accounts->name2id('admin');
- if($admin_group) // check if admin has been defined yet
+ if ($admin_group) // check if admin has been defined yet
{
- $aclobj->set_account_id($admin_group, true);
- $aclobj->add('property', '.', 31);
- $aclobj->add('property', 'run', 1);
- $aclobj->save_repository();
+ $aclobj->set_account_id($admin_group, true);
+ $aclobj->add('property', '.', 31);
+ $aclobj->add('property', 'run', 1);
+ $aclobj->save_repository();
}
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_jasper_input_type
(name, descr) VALUES ('integer', 'Integer')");
@@ -745,178 +741,162 @@
$custom_config = CreateObject('admin.soconfig',
$GLOBALS['phpgw']->locations->get_id('property', '.invoice'));
- // common
- $receipt_section_common = $custom_config->add_section(array
- (
- 'name' => 'common',
- 'descr' => 'common invoice config'
- )
- );
+ // common
+ $receipt_section_common = $custom_config->add_section(array
+ (
+ 'name' => 'common',
+ 'descr' => 'common invoice config'
+ )
+ );
- $receipt = $custom_config->add_attrib(array
- (
- 'section_id' =>
$receipt_section_common['section_id'],
- 'input_type' => 'text',
- 'name' => 'host',
- 'descr' => 'Host',
- )
- );
- $receipt = $custom_config->add_attrib(array
- (
- 'section_id' =>
$receipt_section_common['section_id'],
- 'input_type' => 'text',
- 'name' => 'user',
- 'descr' => 'User',
- )
- );
- $receipt = $custom_config->add_attrib(array
- (
- 'section_id' =>
$receipt_section_common['section_id'],
- 'input_type' => 'password',
- 'name' => 'password',
- 'descr' => 'Password',
- )
- );
- $receipt = $custom_config->add_attrib(array
- (
- 'section_id' =>
$receipt_section_common['section_id'],
- 'input_type' => 'listbox',
- 'name' => 'method',
- 'descr' => 'Export / import
method',
+ $receipt = $custom_config->add_attrib(array(
+ 'section_id' => $receipt_section_common['section_id'],
+ 'input_type' => 'text',
+ 'name' => 'host',
+ 'descr' => 'Host',
+ )
+ );
+ $receipt = $custom_config->add_attrib(array(
+ 'section_id' => $receipt_section_common['section_id'],
+ 'input_type' => 'text',
+ 'name' => 'user',
+ 'descr' => 'User',
+ )
+ );
+ $receipt = $custom_config->add_attrib(array(
+ 'section_id' => $receipt_section_common['section_id'],
+ 'input_type' => 'password',
+ 'name' => 'password',
+ 'descr' => 'Password',
+ )
+ );
+ $receipt = $custom_config->add_attrib(array(
+ 'section_id' => $receipt_section_common['section_id'],
+ 'input_type' => 'listbox',
+ 'name' => 'method',
+ 'descr' => 'Export / import method',
'choice' => array('local', 'ftp', 'ssh'),
- )
- );
+ )
+ );
- $receipt = $custom_config->add_attrib(array
- (
- 'section_id' =>
$receipt_section_common['section_id'],
- 'attrib_id' =>
$receipt['attrib_id'],
- 'input_type' => 'listbox',
- 'name' => 'invoice_approval',
- 'descr' => 'Number of persons
required to approve for payment',
+ $receipt = $custom_config->add_attrib(array(
+ 'section_id' => $receipt_section_common['section_id'],
+ 'attrib_id' => $receipt['attrib_id'],
+ 'input_type' => 'listbox',
+ 'name' => 'invoice_approval',
+ 'descr' => 'Number of persons required to approve for payment',
'choice' => array(1, 2),
- )
- );
+ )
+ );
- $receipt = $custom_config->add_attrib(array
- (
- 'section_id' =>
$receipt_section_common['section_id'],
- 'input_type' => 'text',
- 'name' => 'baseurl_invoice',
- 'descr' => 'baseurl on remote
server for image of invoice',
- )
- );
+ $receipt = $custom_config->add_attrib(array(
+ 'section_id' => $receipt_section_common['section_id'],
+ 'input_type' => 'text',
+ 'name' => 'baseurl_invoice',
+ 'descr' => 'baseurl on remote server for image of invoice',
+ )
+ );
- // import:
- $receipt_section_import = $custom_config->add_section(array
- (
- 'name' => 'import',
- 'descr' => 'import invoice config'
- )
- );
+ // import:
+ $receipt_section_import = $custom_config->add_section(array(
+ 'name' => 'import',
+ 'descr' => 'import invoice config'
+ )
+ );
- $receipt = $custom_config->add_attrib(array
- (
- 'section_id' =>
$receipt_section_import['section_id'],
- 'input_type' => 'text',
- 'name' => 'local_path',
- 'descr' => 'path on local sever
to store imported files',
- )
- );
+ $receipt = $custom_config->add_attrib(array(
+ 'section_id' => $receipt_section_import['section_id'],
+ 'input_type' => 'text',
+ 'name' => 'local_path',
+ 'descr' => 'path on local sever to store imported files',
+ )
+ );
- $receipt = $custom_config->add_attrib(array
- (
- 'section_id' =>
$receipt_section_import['section_id'],
- 'input_type' => 'text',
- 'name' => 'budget_responsible',
- 'descr' => 'default initials if
responsible can not be found',
- )
- );
+ $receipt = $custom_config->add_attrib(array(
+ 'section_id' => $receipt_section_import['section_id'],
+ 'input_type' => 'text',
+ 'name' => 'budget_responsible',
+ 'descr' => 'default initials if responsible can not be found',
+ )
+ );
- $receipt = $custom_config->add_attrib(array
- (
- 'section_id' =>
$receipt_section_import['section_id'],
- 'input_type' => 'text',
- 'name' => 'remote_basedir',
- 'descr' => 'basedir on remote
server',
- )
- );
+ $receipt = $custom_config->add_attrib(array(
+ 'section_id' => $receipt_section_import['section_id'],
+ 'input_type' => 'text',
+ 'name' => 'remote_basedir',
+ 'descr' => 'basedir on remote server',
+ )
+ );
- //export
- $receipt_section_export = $custom_config->add_section(array
- (
- 'name' => 'export',
- 'descr' => 'Invoice export'
- )
- );
- $receipt = $custom_config->add_attrib(array
- (
- 'section_id' =>
$receipt_section_export['section_id'],
- 'input_type' => 'text',
- 'name' => 'cleanup_old',
- 'descr' => 'Overføre manuelt
registrerte fakturaer rett til historikk'
- )
- );
- $receipt = $custom_config->add_attrib(array
- (
- 'section_id' =>
$receipt_section_export['section_id'],
- 'input_type' => 'date',
- 'name' =>
'dato_aarsavslutning',
- 'descr' => "Dato for
årsavslutning: overført pr. desember foregående år"
- )
- );
- $receipt = $custom_config->add_attrib(array
- (
- 'section_id' =>
$receipt_section_export['section_id'],
- 'input_type' => 'text',
- 'name' => 'path',
- 'descr' => 'path on local sever
to store exported files',
- )
- );
+ //export
+ $receipt_section_export = $custom_config->add_section(array(
+ 'name' => 'export',
+ 'descr' => 'Invoice export'
+ )
+ );
+ $receipt = $custom_config->add_attrib(array(
+ 'section_id' => $receipt_section_export['section_id'],
+ 'input_type' => 'text',
+ 'name' => 'cleanup_old',
+ 'descr' => 'Overføre manuelt registrerte fakturaer rett til
historikk'
+ )
+ );
+ $receipt = $custom_config->add_attrib(array(
+ 'section_id' => $receipt_section_export['section_id'],
+ 'input_type' => 'date',
+ 'name' => 'dato_aarsavslutning',
+ 'descr' => "Dato for årsavslutning: overført pr. desember
foregående år"
+ )
+ );
+ $receipt = $custom_config->add_attrib(array(
+ 'section_id' => $receipt_section_export['section_id'],
+ 'input_type' => 'text',
+ 'name' => 'path',
+ 'descr' => 'path on local sever to store exported files',
+ )
+ );
- $receipt = $custom_config->add_attrib(array
- (
- 'section_id' =>
$receipt_section_export['section_id'],
- 'input_type' => 'text',
- 'name' => 'pre_path',
- 'descr' => 'path on local sever
to store exported files for pre approved vouchers',
- )
- );
+ $receipt = $custom_config->add_attrib(array(
+ 'section_id' => $receipt_section_export['section_id'],
+ 'input_type' => 'text',
+ 'name' => 'pre_path',
+ 'descr' => 'path on local sever to store exported files for pre
approved vouchers',
+ )
+ );
- $receipt = $custom_config->add_attrib(array
- (
- 'section_id' =>
$receipt_section_export['section_id'],
- 'input_type' => 'text',
- 'name' => 'remote_basedir',
- 'descr' => 'basedir on remote
server to receive files',
- )
- );
+ $receipt = $custom_config->add_attrib(array(
+ 'section_id' => $receipt_section_export['section_id'],
+ 'input_type' => 'text',
+ 'name' => 'remote_basedir',
+ 'descr' => 'basedir on remote server to receive files',
+ )
+ );
- $sql = 'CREATE OR REPLACE VIEW fm_open_workorder_view AS'
- . ' SELECT fm_workorder.id, fm_workorder.project_id,
fm_workorder_status.descr FROM fm_workorder'
- . ' JOIN fm_workorder_status ON fm_workorder.status =
fm_workorder_status.id WHERE fm_workorder_status.delivered IS NULL AND
fm_workorder_status.closed IS NULL';
+ $sql = 'CREATE OR REPLACE VIEW fm_open_workorder_view AS'
+ . ' SELECT fm_workorder.id, fm_workorder.project_id,
fm_workorder_status.descr FROM fm_workorder'
+ . ' JOIN fm_workorder_status ON fm_workorder.status =
fm_workorder_status.id WHERE fm_workorder_status.delivered IS NULL AND
fm_workorder_status.closed IS NULL';
$GLOBALS['phpgw_setup']->oProc->query($sql, __LINE__, __FILE__);
- $sql = 'CREATE OR REPLACE VIEW fm_ecobilag_sum_view AS'
- . ' SELECT DISTINCT bilagsnr, sum(godkjentbelop) AS
approved_amount, sum(belop) AS amount FROM fm_ecobilag GROUP BY bilagsnr ORDER
BY bilagsnr ASC';
+ $sql = 'CREATE OR REPLACE VIEW fm_ecobilag_sum_view AS'
+ . ' SELECT DISTINCT bilagsnr, sum(godkjentbelop) AS
approved_amount, sum(belop) AS amount FROM fm_ecobilag GROUP BY bilagsnr ORDER
BY bilagsnr ASC';
$GLOBALS['phpgw_setup']->oProc->query($sql, __LINE__, __FILE__);
- $sql = 'CREATE OR REPLACE VIEW fm_orders_pending_cost_view AS'
- . ' SELECT fm_ecobilag.pmwrkord_code AS order_id,
sum(fm_ecobilag.godkjentbelop) AS pending_cost FROM fm_ecobilag GROUP BY
fm_ecobilag.pmwrkord_code';
+ $sql = 'CREATE OR REPLACE VIEW fm_orders_pending_cost_view AS'
+ . ' SELECT fm_ecobilag.pmwrkord_code AS order_id,
sum(fm_ecobilag.godkjentbelop) AS pending_cost FROM fm_ecobilag GROUP BY
fm_ecobilag.pmwrkord_code';
$GLOBALS['phpgw_setup']->oProc->query($sql, __LINE__, __FILE__);
- $sql = 'CREATE OR REPLACE VIEW fm_orders_actual_cost_view AS'
- . ' SELECT fm_ecobilagoverf.pmwrkord_code AS order_id,
sum(fm_ecobilagoverf.godkjentbelop) AS actual_cost FROM fm_ecobilagoverf GROUP
BY fm_ecobilagoverf.pmwrkord_code';
+ $sql = 'CREATE OR REPLACE VIEW fm_orders_actual_cost_view AS'
+ . ' SELECT fm_ecobilagoverf.pmwrkord_code AS order_id,
sum(fm_ecobilagoverf.godkjentbelop) AS actual_cost FROM fm_ecobilagoverf GROUP
BY fm_ecobilagoverf.pmwrkord_code';
$GLOBALS['phpgw_setup']->oProc->query($sql, __LINE__, __FILE__);
- switch($GLOBALS['phpgw_info']['server']['db_type'])
- {
- case 'postgres':
- $sql = 'CREATE OR REPLACE VIEW
fm_orders_paid_or_pending_view AS
+ switch ($GLOBALS['phpgw_info']['server']['db_type'])
+ {
+ case 'postgres':
+ $sql = 'CREATE OR REPLACE VIEW
fm_orders_paid_or_pending_view AS
SELECT orders_paid_or_pending.order_id,
orders_paid_or_pending.periode,orders_paid_or_pending.amount,orders_paid_or_pending.periodization,
orders_paid_or_pending.periodization_start
FROM ( SELECT fm_ecobilagoverf.pmwrkord_code
AS order_id, fm_ecobilagoverf.periode, sum(fm_ecobilagoverf.godkjentbelop) AS
amount, fm_ecobilagoverf.periodization, fm_ecobilagoverf.periodization_start
FROM fm_ecobilagoverf
@@ -927,24 +907,24 @@
GROUP BY
fm_ecobilag.pmwrkord_code, fm_ecobilag.periode, fm_ecobilag.periodization,
fm_ecobilag.periodization_start) orders_paid_or_pending ORDER BY
orders_paid_or_pending.periode, orders_paid_or_pending.order_id';
$GLOBALS['phpgw_setup']->oProc->query($sql, __LINE__,
__FILE__);
- break;
- default:
- //do nothing for now
- }
+ break;
+ default:
+ //do nothing for now
+ }
- $sql = 'CREATE OR REPLACE VIEW
fm_project_budget_year_from_order_view AS'
- . ' SELECT DISTINCT fm_workorder.project_id,
fm_workorder_budget.year'
- . ' FROM fm_workorder_budget'
- . ' JOIN fm_workorder ON fm_workorder.id =
fm_workorder_budget.order_id'
- . ' ORDER BY fm_workorder.project_id';
+ $sql = 'CREATE OR REPLACE VIEW fm_project_budget_year_from_order_view
AS'
+ . ' SELECT DISTINCT fm_workorder.project_id,
fm_workorder_budget.year'
+ . ' FROM fm_workorder_budget'
+ . ' JOIN fm_workorder ON fm_workorder.id =
fm_workorder_budget.order_id'
+ . ' ORDER BY fm_workorder.project_id';
$GLOBALS['phpgw_setup']->oProc->query($sql, __LINE__, __FILE__);
- $sql = 'CREATE OR REPLACE VIEW fm_project_budget_year_view AS'
- . ' SELECT DISTINCT fm_project_budget.project_id,
fm_project_budget.year'
- . ' FROM fm_project_budget'
- . ' ORDER BY fm_project_budget.project_id';
+ $sql = 'CREATE OR REPLACE VIEW fm_project_budget_year_view AS'
+ . ' SELECT DISTINCT fm_project_budget.project_id,
fm_project_budget.year'
+ . ' FROM fm_project_budget'
+ . ' ORDER BY fm_project_budget.project_id';
$GLOBALS['phpgw_setup']->oProc->query($sql, __LINE__, __FILE__);
@@ -953,7 +933,6 @@
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_ecodimb_role (id,
name) VALUES (2, 'Attestant')", __LINE__, __FILE__);
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_ecodimb_role (id,
name) VALUES (3, 'Anviser')", __LINE__, __FILE__);
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
fm_tts_priority (id, name) VALUES (1, '1 - Highest')");
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
fm_tts_priority (id, name) VALUES (2, '2')");
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
fm_tts_priority (id, name) VALUES (3, '3 - Lowest')");
-
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_tts_priority (id,
name) VALUES (1, '1 - Highest')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_tts_priority (id,
name) VALUES (2, '2')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_tts_priority (id,
name) VALUES (3, '3 - Lowest')");
Modified: branches/Version-2_0-branch/property/templates/base/tts.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/tts.xsl 2016-06-07
09:39:08 UTC (rev 15261)
+++ branches/Version-2_0-branch/property/templates/base/tts.xsl 2016-06-07
09:41:19 UTC (rev 15262)
@@ -669,25 +669,27 @@
<xsl:apply-templates select="contract_list/options"/>
</select>
</div>
- <div
class="pure-control-group">
-
<xsl:variable name="lang_service">
-
<xsl:value-of select="php:function('lang', 'service')"/>
-
</xsl:variable>
-
<label>
-
<xsl:value-of select="$lang_service"/>
-
</label>
-
<input type="hidden" id="service_id" name="values[service_id]"
value="{value_service_id}"/>
-
<input type="text" id="service_name" name="values[service_name]"
value="{value_service_name}">
-
<xsl:attribute name="data-validation">
-
<xsl:text>required</xsl:text>
-
</xsl:attribute>
-
<xsl:attribute name="data-validation-error-msg">
+ <xsl:if
test="enable_order_service_id = 1">
+
<div class="pure-control-group">
+
<xsl:variable name="lang_service">
+
<xsl:value-of select="php:function('lang', 'service')"/>
+
</xsl:variable>
+
<label>
<xsl:value-of select="$lang_service"/>
-
</xsl:attribute>
-
</input>
+
</label>
+
<input type="hidden" id="service_id" name="values[service_id]"
value="{value_service_id}"/>
+
<input type="text" id="service_name" name="values[service_name]"
value="{value_service_name}">
+
<xsl:attribute name="data-validation">
+
<xsl:text>required</xsl:text>
+
</xsl:attribute>
+
<xsl:attribute name="data-validation-error-msg">
+
<xsl:value-of select="$lang_service"/>
+
</xsl:attribute>
+
</input>
-
<div id="service_container"/>
- </div>
+
<div id="service_container"/>
+
</div>
+
</xsl:if>
<div
class="pure-control-group">
<xsl:variable name="lang_dimb">
<xsl:value-of select="php:function('lang', 'dimb')"/>
@@ -724,24 +726,26 @@
</input>
<div id="b_account_container"/>
</div>
- <div
class="pure-control-group">
-
<xsl:variable name="lang_unspsc_code">
-
<xsl:value-of select="php:function('lang', 'unspsc code')"/>
-
</xsl:variable>
-
<label>
-
<xsl:value-of select="$lang_unspsc_code"/>
-
</label>
-
<input type="hidden" id="unspsc_code" name="values[unspsc_code]"
value="{value_unspsc_code}"/>
-
<input type="text" id="unspsc_code_name" name="values[unspsc_code_name]"
value="{value_unspsc_code} {value_unspsc_code_name}">
-
<xsl:attribute name="data-validation">
-
<xsl:text>required</xsl:text>
-
</xsl:attribute>
-
<xsl:attribute name="data-validation-error-msg">
+ <xsl:if
test="enable_unspsc = 1">
+
<div class="pure-control-group">
+
<xsl:variable name="lang_unspsc_code">
+
<xsl:value-of select="php:function('lang', 'unspsc code')"/>
+
</xsl:variable>
+
<label>
<xsl:value-of select="$lang_unspsc_code"/>
-
</xsl:attribute>
-
</input>
-
<div id="unspsc_code_container"/>
- </div>
+
</label>
+
<input type="hidden" id="unspsc_code" name="values[unspsc_code]"
value="{value_unspsc_code}"/>
+
<input type="text" id="unspsc_code_name"
name="values[unspsc_code_name]" value="{value_unspsc_code}
{value_unspsc_code_name}">
+
<xsl:attribute name="data-validation">
+
<xsl:text>required</xsl:text>
+
</xsl:attribute>
+
<xsl:attribute name="data-validation-error-msg">
+
<xsl:value-of select="$lang_unspsc_code"/>
+
</xsl:attribute>
+
</input>
+
<div id="unspsc_code_container"/>
+
</div>
+
</xsl:if>
<div
class="pure-control-group">
<xsl:variable name="lang_building_part">
@@ -808,26 +812,28 @@
<xsl:apply-templates select="order_dim1_list/options"/>
</select>
</div>
- <div
class="pure-control-group">
-
<xsl:variable name="lang_tax_code">
-
<xsl:value-of select="php:function('lang', 'tax code')"/>
-
</xsl:variable>
-
<label>
-
<xsl:value-of select="$lang_tax_code"/>
-
</label>
-
<select name="values[tax_code]">
-
<xsl:attribute name="title">
+ <xsl:if
test="enable_unspsc = 1">
+
<div class="pure-control-group">
+
<xsl:variable name="lang_tax_code">
+
<xsl:value-of select="php:function('lang', 'tax code')"/>
+
</xsl:variable>
+
<label>
<xsl:value-of select="$lang_tax_code"/>
-
</xsl:attribute>
-
<xsl:attribute name="data-validation">
-
<xsl:text>required</xsl:text>
-
</xsl:attribute>
-
<xsl:attribute name="data-validation-error-msg">
-
<xsl:value-of select="$lang_tax_code"/>
-
</xsl:attribute>
-
<xsl:apply-templates select="tax_code_list/options"/>
-
</select>
- </div>
+
</label>
+
<select name="values[tax_code]">
+
<xsl:attribute name="title">
+
<xsl:value-of select="$lang_tax_code"/>
+
</xsl:attribute>
+
<xsl:attribute name="data-validation">
+
<xsl:text>required</xsl:text>
+
</xsl:attribute>
+
<xsl:attribute name="data-validation-error-msg">
+
<xsl:value-of select="$lang_tax_code"/>
+
</xsl:attribute>
+
<xsl:apply-templates select="tax_code_list/options"/>
+
</select>
+
</div>
+
</xsl:if>
<div
class="pure-control-group">
<label>
<a href="javascript:template_lookup()">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15262] Stable: Merge 15259:15261 from trunk,
sigurdne <=