[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16978] Stable: Merge 16973:16977 from trunk
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16978] Stable: Merge 16973:16977 from trunk |
Date: |
Mon, 14 Aug 2017 10:47:44 -0400 (EDT) |
Revision: 16978
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16978
Author: sigurdne
Date: 2017-08-14 10:47:44 -0400 (Mon, 14 Aug 2017)
Log Message:
-----------
Stable: Merge 16973:16977 from trunk
Modified Paths:
--------------
branches/Version-2_0-branch/controller/inc/class.uicalendar.inc.php
branches/Version-2_0-branch/controller/js/controller/ajax.js
branches/Version-2_0-branch/controller/setup/phpgw_no.lang
branches/Version-2_0-branch/controller/templates/base/calendar/view_calendar_month_for_locations.xsl
branches/Version-2_0-branch/controller/templates/base/calendar/view_calendar_year_for_locations.xsl
branches/Version-2_0-branch/phpgwapi/inc/class.bocommon.inc.php
branches/Version-2_0-branch/phpgwapi/inc/functions.inc.php
branches/Version-2_0-branch/property/inc/class.boinvoice.inc.php
branches/Version-2_0-branch/property/inc/class.sobudget.inc.php
branches/Version-2_0-branch/property/inc/class.uiinvoice.inc.php
branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php
branches/Version-2_0-branch/rental/inc/class.boapplication.inc.php
branches/Version-2_0-branch/rental/inc/class.uiapplication.inc.php
branches/Version-2_0-branch/rental/inc/model/class.application.inc.php
branches/Version-2_0-branch/rental/js/rental/application.edit.js
branches/Version-2_0-branch/rental/setup/phpgw_no.lang
branches/Version-2_0-branch/rental/templates/base/application.xsl
branches/Version-2_0-branch/setup/templates/base/config.tpl
Property Changed:
----------------
branches/Version-2_0-branch/
Index: branches/Version-2_0-branch
===================================================================
--- branches/Version-2_0-branch 2017-08-14 14:45:53 UTC (rev 16977)
+++ branches/Version-2_0-branch 2017-08-14 14:47:44 UTC (rev 16978)
Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,4 ##
/branches/dev-syncromind:13653
/branches/dev-syncromind-2:14933-16846
/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,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305,16307-16314,16316-16318,16320-16322,16324,16326-16330,16332,16334,16336,16338-16339,16341-16342,16344,16346,16348,16350,16352-16353,16355-16358,16360,16362,16364-16369,16371,16373,16375-16378,16380,16382-16383,16385,16387,16389,16391,16393-16395,16397,16399-16402,16404,16406,16408,16410-16415,16417,16419-16420,16422-16425,16427,16429-16440,16442,16444,16446,16448-16449,16451,16453,16455-16463,16465-16472,16474-16475,16477-16484,16486,16488,16490-16497,16499,16501-16503,16505-16512,16514-16517,16519,16521,16523,16525,16527-16532,16534,16536-16541,16543,16545-16554,16556,16558-16565,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16600-16601,16603-16608,16610-16614,16616-16618,16620-16621,16623-16624,16626,16628,16630,16632-16638,16640,16642,16644,16646-16651,16653-16663,16665,16667,16669,16671,16673,16675,16677,16679-16680,16682,16684,16686,16688-16692,16694-16695,16697-16699,16701,16703,16705-16706,16708,16710,16712,16714,16716-16718,16720-16728,16730-16732,16734-16739,16741,16743-16746,16748-16750,16752-16755,16757,16759-16761,16763,16765,16767,16769-16774,16776,16778-16783,16785-16788,16790,16792,16794,16796-16802,16804-16807,16809,16811-16817,16819,16821-16825,16827-16831,16833,16835-16836,16838,16840-16844,16846-16847,16849,16851,16853-16854,16856-16859,16861,16863-16865,16867,16869-16871,16873,16875-16876,16878,16880-16881,16883,16885,16887-16888,16890,16892,16894-16900,16902,16904,16906,16908-16909,16911-16916,16918-16919,16921,16923,16925,16927,16929-16930,16932,16934,16936-16937,16939-16942,16944,16946,16948,16950,16952-16953,16955-16959,16961,16963,16965-16970,16972
\ No newline at end of property
+/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,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305,16307-16314,16316-16318,16320-16322,16324,16326-16330,16332,16334,16336,16338-16339,16341-16342,16344,16346,16348,16350,16352-16353,16355-16358,16360,16362,16364-16369,16371,16373,16375-16378,16380,16382-16383,16385,16387,16389,16391,16393-16395,16397,16399-16402,16404,16406,16408,16410-16415,16417,16419-16420,16422-16425,16427,16429-16440,16442,16444,16446,16448-16449,16451,16453,16455-16463,16465-16472,16474-16475,16477-16484,16486,16488,16490-16497,16499,16501-16503,16505-16512,16514-16517,16519,16521,16523,16525,16527-16532,16534,16536-16541,16543,16545-16554,16556,16558-16565,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16600-16601,16603-16608,16610-16614,16616-16618,16620-16621,16623-16624,16626,16628,16630,16632-16638,16640,16642,16644,16646-16651,16653-16663,16665,16667,16669,16671,16673,16675,16677,16679-16680,16682,16684,16686,16688-16692,16694-16695,16697-16699,16701,16703,16705-16706,16708,16710,16712,16714,16716-16718,16720-16728,16730-16732,16734-16739,16741,16743-16746,16748-16750,16752-16755,16757,16759-16761,16763,16765,16767,16769-16774,16776,16778-16783,16785-16788,16790,16792,16794,16796-16802,16804-16807,16809,16811-16817,16819,16821-16825,16827-16831,16833,16835-16836,16838,16840-16844,16846-16847,16849,16851,16853-16854,16856-16859,16861,16863-16865,16867,16869-16871,16873,16875-16876,16878,16880-16881,16883,16885,16887-16888,16890,16892,16894-16900,16902,16904,16906,16908-16909,16911-16916,16918-16919,16921,16923,16925,16927,16929-16930,16932,16934,16936-16937,16939-16942,16944,16946,16948,16950,16952-16953,16955-16959,16961,16963,16965-16970,16972,16974-16977
\ No newline at end of property
Modified: branches/Version-2_0-branch/controller/inc/class.uicalendar.inc.php
===================================================================
--- branches/Version-2_0-branch/controller/inc/class.uicalendar.inc.php
2017-08-14 14:45:53 UTC (rev 16977)
+++ branches/Version-2_0-branch/controller/inc/class.uicalendar.inc.php
2017-08-14 14:47:44 UTC (rev 16978)
@@ -480,7 +480,9 @@
$bookmark_locations = array_keys($bookmarks);
}
- if ($location_code = phpgw::get_var('location_code'))
+ $location_code = phpgw::get_var('location_code',
'string');
+
+ if ($location_code && $location_code != 'all')
{
$bookmark_locations[] = $location_code;
}
@@ -496,7 +498,7 @@
$locations_list[] = array
(
'id' =>
$location['location_code'],
- 'name' => $location['loc_name'],
+ 'name' =>
"{$location['location_code']} - {$location['loc_name']}",
'selected' => $location_code ==
$location['location_code'] ? 1 : 0
);
}
@@ -515,6 +517,12 @@
$locations_location_code[$key] =
$row['location_code'];
}
array_multisort($locations_location_code,
SORT_ASC, $locations_list);
+
+ array_unshift($locations_list, array(
+ 'id' => 'all',
+ 'name' => lang('all'),
+ 'selected' => $location_code ==
'all' ? 1 : 0
+ ));
}
@@ -538,9 +546,12 @@
{
$curr_location_code =
$location['location_code'];
- if (!$bookmark_locations ||
!in_array($curr_location_code, $bookmark_locations))
+ if($location_code != 'all')
{
- continue;
+ if (!$bookmark_locations ||
!in_array($curr_location_code, $bookmark_locations))
+ {
+ continue;
+ }
}
$cl_criteria = new
controller_check_list();
@@ -603,7 +614,7 @@
// Loops through controls in
controls_for_location_array and populates aggregate open cases pr month array.
$agg_open_cases_pr_month_array =
$this->build_agg_open_cases_pr_month_array($cl_criteria, $year, $from_month,
$to_month);
- $year_calendar_agg = new
year_calendar_agg($control, $year, $location_code,
"VIEW_LOCATIONS_FOR_CONTROL");
+ $year_calendar_agg = new
year_calendar_agg($control, $year, $curr_location_code,
"VIEW_LOCATIONS_FOR_CONTROL");
$calendar_array =
$year_calendar_agg->build_calendar($agg_open_cases_pr_month_array);
$components_with_calendar_array[] =
array("component" => $component->toArray(),
"calendar_array" =>
$calendar_array);
@@ -616,9 +627,12 @@
{
$curr_location_code =
$location['location_code'];
- if (!$bookmark_locations ||
!in_array($curr_location_code, $bookmark_locations))
+ if($location_code != 'all')
{
- continue;
+ if (!$bookmark_locations ||
!in_array($curr_location_code, $bookmark_locations))
+ {
+ continue;
+ }
}
$repeat_type =
$control->get_repeat_type();
@@ -756,7 +770,9 @@
$bookmark_locations = array_keys($bookmarks);
}
- if ($location_code = phpgw::get_var('location_code'))
+ $location_code = phpgw::get_var('location_code',
'string');
+
+ if ($location_code && $location_code != 'all')
{
$bookmark_locations[] = $location_code;
}
@@ -771,7 +787,7 @@
$locations_list[] = array
(
'id' =>
$location['location_code'],
- 'name' => $location['loc_name'],
+ 'name' =>
"{$location['location_code']} - {$location['loc_name']}",
'selected' => $location_code ==
$location['location_code'] ? 1 : 0
);
}
@@ -789,6 +805,12 @@
$locations_location_code[$key] =
$row['location_code'];
}
array_multisort($locations_location_code,
SORT_ASC, $locations_list);
+
+ array_unshift($locations_list, array(
+ 'id' => 'all',
+ 'name' => lang('all'),
+ 'selected' => $location_code ==
'all' ? 1 : 0
+ ));
}
// Validates year. If year is not set, current year is
chosen
@@ -809,9 +831,12 @@
{
$curr_location_code =
$location['location_code'];
- if (!$bookmark_locations ||
!in_array($curr_location_code, $bookmark_locations))
+ if($location_code != 'all')
{
- continue;
+ if (!$bookmark_locations ||
!in_array($curr_location_code, $bookmark_locations))
+ {
+ continue;
+ }
}
$repeat_type = $control->get_repeat_type();
@@ -1043,7 +1068,7 @@
foreach ($my_locations as $location)
{
- if ($location['location_code'] !=
$current_location_code)
+ if ($location['location_code'] !=
$current_location_code && $current_location_code != 'all')
{
$my_washed_locations[] = $location;
}
Modified: branches/Version-2_0-branch/controller/js/controller/ajax.js
===================================================================
--- branches/Version-2_0-branch/controller/js/controller/ajax.js
2017-08-14 14:45:53 UTC (rev 16977)
+++ branches/Version-2_0-branch/controller/js/controller/ajax.js
2017-08-14 14:47:44 UTC (rev 16978)
@@ -691,7 +691,7 @@
var control_id =
$(thisForm).find("input[name='control_id']").val();
var oArgs = {menuaction:
'controller.uicalendar.view_calendar_month_for_locations'};
var baseUrl = phpGWLink('index.php', oArgs, false);
- var requestUrl = baseUrl + "&location_code=" +
location_code + "&year=" + year + "&control_id=" + control_id;
+ var requestUrl = baseUrl + "&location_code=" +
location_code + "&year=" + year + "&month=" + month + "&control_id=" +
control_id;
window.location.href = requestUrl;
}
Modified: branches/Version-2_0-branch/controller/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/controller/setup/phpgw_no.lang 2017-08-14
14:45:53 UTC (rev 16977)
+++ branches/Version-2_0-branch/controller/setup/phpgw_no.lang 2017-08-14
14:47:44 UTC (rev 16978)
@@ -394,4 +394,5 @@
Control types controller no Kontrolltyper
location controller no Lokasjon
document types controller no Dokumenttyper
-Do not edit archived version controller no Du kan ikke endre
arkiverte versjoner
\ No newline at end of file
+Do not edit archived version controller no Du kan ikke endre
arkiverte versjoner
+choose a location controller no Velg en lokasjon
\ No newline at end of file
Modified:
branches/Version-2_0-branch/controller/templates/base/calendar/view_calendar_month_for_locations.xsl
===================================================================
---
branches/Version-2_0-branch/controller/templates/base/calendar/view_calendar_month_for_locations.xsl
2017-08-14 14:45:53 UTC (rev 16977)
+++
branches/Version-2_0-branch/controller/templates/base/calendar/view_calendar_month_for_locations.xsl
2017-08-14 14:47:44 UTC (rev 16978)
@@ -12,7 +12,9 @@
<h1>Kontrollplan for <xsl:value-of
select="control/title"/></h1>
<h3>Oversikt for <span class="month"><xsl:value-of
select="php:function('lang', $month_str)" /></span><span
class="year"><xsl:value-of select="current_year"/></span></h3>
<div id="choose-my-location" class="select-box">
- <label>Velg en lokasjon</label>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'choose a location')" />
+ </label>
<form action="#">
<input type="hidden"
name="period_type" value="view_month_for_locations" />
<input type="hidden"
name="year">
@@ -20,6 +22,7 @@
<xsl:value-of
select="current_year"/>
</xsl:attribute>
</input>
+ <input type="hidden"
name="month" value="{current_month_nr}"/>
<input type="hidden"
name="control_id">
<xsl:attribute name="value">
<xsl:value-of
select="//control/id"/>
@@ -28,15 +31,10 @@
<select id="choose-my-location"
class="select-location">
<option>Velg bygg</option>
<xsl:for-each
select="locations_list">
- <option>
+ <option value="{id}">
<xsl:if
test="selected = 1">
<xsl:attribute
name="selected">selected</xsl:attribute>
</xsl:if>
- <xsl:attribute
name="value">
- <xsl:value-of
select="id"/>
- </xsl:attribute>
- <xsl:value-of
select="id"/>
- <xsl:text> -
</xsl:text>
<xsl:value-of
disable-output-escaping="yes" select="name"/>
</option>
</xsl:for-each>
Modified:
branches/Version-2_0-branch/controller/templates/base/calendar/view_calendar_year_for_locations.xsl
===================================================================
---
branches/Version-2_0-branch/controller/templates/base/calendar/view_calendar_year_for_locations.xsl
2017-08-14 14:45:53 UTC (rev 16977)
+++
branches/Version-2_0-branch/controller/templates/base/calendar/view_calendar_year_for_locations.xsl
2017-08-14 14:47:44 UTC (rev 16978)
@@ -14,7 +14,9 @@
<h3>Periode: <xsl:value-of select="current_year"/></h3>
<div id="choose-my-location" class="select-box">
- <label>Velg en lokasjon</label>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'choose a location')" />
+ </label>
<form action="#">
<input type="hidden"
name="period_type" value="view_year_for_locations" />
<input type="hidden"
name="year">
@@ -32,19 +34,13 @@
<xsl:value-of
select="$serie_id"/>
</xsl:attribute>
</input>
-
<select id="choose-my-location"
class="select-location">
<option>Velg bygg</option>
<xsl:for-each
select="locations_list">
- <option>
+ <option value="{id}">
<xsl:if
test="selected = 1">
<xsl:attribute
name="selected">selected</xsl:attribute>
</xsl:if>
- <xsl:attribute
name="value">
- <xsl:value-of
select="id"/>
- </xsl:attribute>
- <xsl:value-of
select="id"/>
- <xsl:text> -
</xsl:text>
<xsl:value-of
disable-output-escaping="yes" select="name"/>
</option>
</xsl:for-each>
Modified: branches/Version-2_0-branch/phpgwapi/inc/class.bocommon.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.bocommon.inc.php
2017-08-14 14:45:53 UTC (rev 16977)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.bocommon.inc.php
2017-08-14 14:47:44 UTC (rev 16978)
@@ -125,8 +125,9 @@
*/
public function store_pre_commit( &$object )
{
+ $appname =
$GLOBALS['phpgw_info']['flags']['currentapp'];
$criteria = array(
- 'appname' => 'eventplanner',
+ 'appname' => $appname,
'location' => $this->acl_location,
'pre_commit' => true,
'allrows' => true
@@ -142,7 +143,7 @@
continue;
}
- $file = PHPGW_SERVER_ROOT .
"/eventplanner/inc/custom/{$GLOBALS['phpgw_info']['user']['domain']}/{$entry['file_name']}";
+ $file = PHPGW_SERVER_ROOT .
"/{$appname}/inc/custom/{$GLOBALS['phpgw_info']['user']['domain']}/{$entry['file_name']}";
if ($entry['active'] && is_file($file) &&
!$entry['client_side'] && $entry['pre_commit'])
{
require $file;
@@ -156,8 +157,9 @@
*/
public function store_post_commit( &$object )
{
+ $appname =
$GLOBALS['phpgw_info']['flags']['currentapp'];
$criteria = array(
- 'appname' => 'eventplanner',
+ 'appname' => $appname,
'location' => $this->acl_location,
'allrows' => true
);
@@ -173,7 +175,7 @@
continue;
}
- $file = PHPGW_SERVER_ROOT .
"/eventplanner/inc/custom/{$GLOBALS['phpgw_info']['user']['domain']}/{$entry['file_name']}";
+ $file = PHPGW_SERVER_ROOT .
"/{$appname}/inc/custom/{$GLOBALS['phpgw_info']['user']['domain']}/{$entry['file_name']}";
if ($entry['active'] && is_file($file) &&
!$entry['client_side'] && !$entry['pre_commit'])
{
require $file;
Modified: branches/Version-2_0-branch/phpgwapi/inc/functions.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/functions.inc.php 2017-08-14
14:45:53 UTC (rev 16977)
+++ branches/Version-2_0-branch/phpgwapi/inc/functions.inc.php 2017-08-14
14:47:44 UTC (rev 16978)
@@ -737,9 +737,12 @@
}
}
- if(isset($GLOBALS['phpgw_info']['server']['enforce_ssl']) &&
!(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) )
+ $request_scheme = empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] ==
'off' ? 'http' : 'https';
+
+ if(isset($GLOBALS['phpgw_info']['server']['enforce_ssl']) &&
$request_scheme != 'https' )
{
- Header('Location: https://' .
$GLOBALS['phpgw_info']['server']['hostname'] .
$GLOBALS['phpgw_info']['server']['webserver_url'] . $_SERVER['REQUEST_URI']);
+// Header('Location: https://' .
$GLOBALS['phpgw_info']['server']['hostname'] .
$GLOBALS['phpgw_info']['server']['webserver_url'] . $_SERVER['REQUEST_URI']);
+ Header("Location:
https://{$GLOBALS['phpgw_info']['server']['hostname']}{$_SERVER['REQUEST_URI']}");
exit;
}
Modified: branches/Version-2_0-branch/property/inc/class.boinvoice.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.boinvoice.inc.php
2017-08-14 14:45:53 UTC (rev 16977)
+++ branches/Version-2_0-branch/property/inc/class.boinvoice.inc.php
2017-08-14 14:47:44 UTC (rev 16978)
@@ -40,6 +40,7 @@
public $results = 0;
public $allrows = false;
public $debug = false;
+ public $b_account;
/**
*
@@ -276,12 +277,22 @@
$start_date =
$this->bocommon->date_to_timestamp($start_date);
$end_date =
$this->bocommon->date_to_timestamp($end_date);
- $invoice = $this->so->read_consume(array('start' =>
$this->start, 'query' => $this->query,
- 'sort' => $this->sort, 'order' => $this->order,
- 'user_lid' => $this->user_lid, 'cat_id' =>
$this->cat_id,
- 'start_date' => $start_date, 'end_date' =>
$end_date, 'vendor_id' => $vendor_id,
- 'loc1' => $loc1, 'workorder_id' =>
$workorder_id, 'b_account_class' => $b_account_class,
- 'district_id' => $district_id, 'b_account' =>
$this->b_account, 'ecodimb' => $ecodimb));
+ $invoice = $this->so->read_consume(array(
+ 'start' => $this->start,
+ 'query' => $this->query,
+ 'sort' => $this->sort,
+ 'order' => $this->order,
+ 'user_lid' => $this->user_lid,
+ 'cat_id' => $this->cat_id,
+ 'start_date' => $start_date,
+ 'end_date' => $end_date,
+ 'vendor_id' => $vendor_id,
+ 'loc1' => $loc1,
+ 'workorder_id' => $workorder_id,
+ 'b_account_class' => $b_account_class,
+ 'district_id' => $district_id,
+ 'b_account' => $this->b_account,
+ 'ecodimb' => $ecodimb));
$this->total_records = $this->so->total_records;
Modified: branches/Version-2_0-branch/property/inc/class.sobudget.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.sobudget.inc.php
2017-08-14 14:45:53 UTC (rev 16977)
+++ branches/Version-2_0-branch/property/inc/class.sobudget.inc.php
2017-08-14 14:47:44 UTC (rev 16978)
@@ -644,7 +644,7 @@
$_taxcode[$this->db->f('id')] =
$this->db->f('percent');
}
- $sql = "SELECT DISTINCT fm_workorder.id AS id,
fm_location1.mva,project_id,"
+ $sql = "SELECT DISTINCT fm_workorder.id AS id,
fm_location1.mva,fm_workorder.project_id,"
. " fm_b_account.{$b_account_field} AS
b_account, district_id, fm_project.ecodimb"
. " FROM fm_workorder"
. " {$this->join} fm_workorder_status ON
fm_workorder.status = fm_workorder_status.id"
@@ -682,6 +682,42 @@
'b_account' =>
$this->db->f('b_account'),
);
}
+
+ //In case of missing budget
+
+ $filtermethod_payment = "WHERE periode >=
$start_periode AND periode <= $end_periode";
+ $sql = "SELECT DISTINCT fm_workorder.id AS id,
fm_location1.mva,fm_workorder.project_id,"
+ . " fm_b_account.{$b_account_field} AS
b_account, district_id, fm_project.ecodimb"
+ . " FROM fm_workorder"
+ . " {$this->join} fm_workorder_status ON
fm_workorder.status = fm_workorder_status.id"
+ . " {$this->join} fm_ecobilagoverf ON
fm_ecobilagoverf.pmwrkord_code = fm_workorder.id"
+ . " {$this->join} fm_b_account ON
fm_workorder.account_id = fm_b_account.id"
+ . " {$this->join} fm_project ON
fm_workorder.project_id = fm_project.id"
+ . " {$_join_district}"
+ . " {$this->join} fm_part_of_town ON
fm_location1.part_of_town_id = fm_part_of_town.id"
+ . " {$filtermethod_payment}{$filtermethod}
{$querymethod} {$where} {$filtermethod_direction}"
+ . " ORDER BY fm_workorder.id ASC";
+
+ $this->db->query($sql, __LINE__, __FILE__);
+ while ($this->db->next_record())
+ {
+ $_id = $this->db->f('id');
+ $district_id = $filter_district_id ?
(int)$this->db->f('district_id') : 0;
+
+ $projects[$this->db->f('project_id')] = 0;
+ $projects2[$_id] = $this->db->f('project_id');
+
+ $_temp_paid_info[$_id] = array
+ (
+ 'actual_cost' => 0,
+ 'mva' => (int)$this->db->f('mva'),
+ 'district_id' => $district_id,
+ 'ecodimb' =>
(int)$this->db->f('ecodimb'),
+ 'b_account' =>
$this->db->f('b_account'),
+ );
+ }
+
+
ksort($projects);
//_debug_array(count($projects2));
//_debug_array($projects2);
@@ -717,7 +753,7 @@
$_actual_cost =
round($budget['actual_cost'] / $_taxfactor);
//for testing
- if($budget['sum_oblications'])
+ if($budget['actual_cost'])
{
$obligation_orders[] =
$order_id;
}
Modified: branches/Version-2_0-branch/property/inc/class.uiinvoice.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uiinvoice.inc.php
2017-08-14 14:45:53 UTC (rev 16977)
+++ branches/Version-2_0-branch/property/inc/class.uiinvoice.inc.php
2017-08-14 14:47:44 UTC (rev 16978)
@@ -160,7 +160,7 @@
$district_id = phpgw::get_var('district_id', 'int');
$b_account_class = phpgw::get_var('b_account_class',
'int');
$b_account = phpgw::get_var('b_account', 'int');
- $b_account_class = $b_account_class ? $b_account_class
: substr($b_account, 0, 2);
+ // $b_account_class = $b_account_class ? $b_account_class
: substr($b_account, 0, 2);
$ecodimb = phpgw::get_var('ecodimb');
$values_combo_box[0] = $this->bo->select_category('',
$this->cat_id);
@@ -2078,7 +2078,7 @@
$district_id = phpgw::get_var('district_id', 'int');
$b_account_class = phpgw::get_var('b_account_class',
'int');
$b_account = phpgw::get_var('b_account', 'int');
- $b_account_class = $b_account_class ? $b_account_class
: substr($b_account, 0, 2);
+// $b_account_class = $b_account_class ? $b_account_class
: substr($b_account, 0, 2);
$ecodimb = phpgw::get_var('ecodimb');
$draw = phpgw::get_var('draw', 'int');
@@ -2356,7 +2356,7 @@
$b_account_class = phpgw::get_var('b_account_class',
'int');
$b_account = phpgw::get_var('b_account', 'int');
- $b_account_class = $b_account_class ? $b_account_class
: substr($b_account, 0, 2);
+ // $b_account_class = $b_account_class ? $b_account_class
: substr($b_account, 0, 2);
$ecodimb = phpgw::get_var('ecodimb');
//-- ubica focus del menu derecho
@@ -2417,6 +2417,7 @@
'district_id' => $district_id,
'ecodimb' => $ecodimb,
'b_account_class' =>
$b_account_class,
+ 'b_account' => $b_account,
'phpgw_return_as' => 'json'
)),
'allrows' => true,
Modified: branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php
2017-08-14 14:45:53 UTC (rev 16977)
+++ branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php
2017-08-14 14:47:44 UTC (rev 16978)
@@ -425,6 +425,7 @@
'start_date' => $start_date,
'end_date' => $end_date,
'b_group' => $this->b_group,
+ 'b_account' => $this->b_account,
'paid' => $this->paid,
'obligation' =>
$this->obligation,
'ecodimb' =>
$this->ecodimb,
@@ -435,6 +436,7 @@
'start_date' => $start_date,
'end_date' => $end_date,
'b_group' => $this->b_group,
+ 'b_account' => $this->b_account,
'paid' => $this->paid,
'obligation' =>
$this->obligation,
'ecodimb' =>
$this->ecodimb,
Modified: branches/Version-2_0-branch/rental/inc/class.boapplication.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/class.boapplication.inc.php
2017-08-14 14:45:53 UTC (rev 16977)
+++ branches/Version-2_0-branch/rental/inc/class.boapplication.inc.php
2017-08-14 14:47:44 UTC (rev 16978)
@@ -26,21 +26,21 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+ phpgw::import_class('phpgwapi.bocommon');
phpgw::import_class('rental.soapplication');
include_class('rental', 'application', 'inc/model/');
- class rental_boapplication
+ class rental_boapplication extends phpgwapi_bocommon
{
protected static
$bo,
$fields;
- public $acl_location = '.application';
-
public function __construct()
{
$this->fields = rental_application::get_fields();
+ $this->acl_location = rental_application::acl_location;
}
/**
@@ -59,47 +59,9 @@
public function store($object)
{
- $criteria = array(
- 'appname' => 'rental',
- 'location' => $this->bo->acl_location,
- 'allrows' => true
- );
-
- $custom_functions =
$GLOBALS['phpgw']->custom_functions->find($criteria);
-
- foreach ($custom_functions as $entry)
- {
- // prevent path traversal
- if (preg_match('/\.\./', $entry['file_name']))
- {
- continue;
- }
-
- $file = PHPGW_SERVER_ROOT .
"/rental/inc/custom/{$GLOBALS['phpgw_info']['user']['domain']}/{$entry['file_name']}";
- if ($entry['active'] && is_file($file) &&
!$entry['client_side'])
- {
- require $file;
- }
- }
-
+ $this->store_pre_commit($object);
$ret =
rental_soapplication::get_instance()->store($object);
-
- reset($custom_functions);
-
- foreach ($custom_functions as $entry)
- {
- // prevent path traversal
- if (preg_match('/\.\./', $entry['file_name']))
- {
- continue;
- }
-
- $file = PHPGW_SERVER_ROOT .
"/rental/inc/custom/{$GLOBALS['phpgw_info']['user']['domain']}/{$entry['file_name']}";
- if ($entry['active'] && is_file($file) &&
!$entry['client_side'] && !$entry['pre_commit'])
- {
- require $file;
- }
- }
+ $this->store_post_commit($object);
return $ret;
}
@@ -124,29 +86,7 @@
public function build_default_read_params()
{
- $fields = $this->fields;
-
- $search = phpgw::get_var('search');
- $order = phpgw::get_var('order');
- $draw = phpgw::get_var('draw', 'int');
- $columns = phpgw::get_var('columns');
-
- $params = array(
- 'start' => phpgw::get_var('start', 'int',
'REQUEST', 0),
- 'results' => phpgw::get_var('length', 'int',
'REQUEST', 0),
- 'query' => $search['value'],
- 'sort' => $columns[$order[0]['column']]['data'],
- 'dir' => $order[0]['dir'],
- 'allrows' => phpgw::get_var('length', 'int') ==
-1,
- );
-
- foreach ($fields as $field => $_params)
- {
- if (!empty($_REQUEST["filter_$field"]))
- {
- $params['filters'][$field] =
phpgw::get_var("filter_$field", $_params['type']);
- }
- }
+ $params = parent::build_default_read_params();
if (phpgw::get_var('composite_id'))
{
$params['filters']['composite_id'] =
phpgw::get_var('composite_id');
Modified: branches/Version-2_0-branch/rental/inc/class.uiapplication.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/class.uiapplication.inc.php
2017-08-14 14:45:53 UTC (rev 16977)
+++ branches/Version-2_0-branch/rental/inc/class.uiapplication.inc.php
2017-08-14 14:47:44 UTC (rev 16978)
@@ -49,25 +49,21 @@
protected
$fields,
$composite_types,
- $payment_methods;
+ $payment_methods,
+ $acl_location;
private $bo;
public function __construct()
{
parent::__construct();
- self::set_active_menu('rental::application');
$GLOBALS['phpgw_info']['flags']['app_header'] .= '::' .
lang('application');
$this->bo = createObject('rental.boapplication');
- $this->acl = & $GLOBALS['phpgw']->acl;
- $this->acl_location = $this->bo->acl_location;
- $this->acl_read =
$this->acl->check($this->acl_location, PHPGW_ACL_READ, 'rental');
- $this->acl_add = $this->acl->check($this->acl_location,
PHPGW_ACL_ADD, 'rental');
- $this->acl_edit =
$this->acl->check($this->acl_location, PHPGW_ACL_EDIT, 'rental');
- $this->acl_delete =
$this->acl->check($this->acl_location, PHPGW_ACL_DELETE, 'rental');
- $this->acl_manage =
$this->acl->check($this->acl_location, PHPGW_ACL_PRIVATE, 'rental'); // manage
+ $this->permissions =
rental_application::get_instance()->get_permission_array();
$this->composite_types =
rental_application::get_composite_types();
$this->payment_methods =
rental_application::get_payment_methods();
$this->fields = rental_application::get_fields();
+ $this->acl_location = rental_application::acl_location;
+ self::set_active_menu('rental::application');
}
private function get_composite_type_options( $selected = 0 )
@@ -254,7 +250,7 @@
{
$active_tab = !empty($values['active_tab']) ?
$values['active_tab'] : phpgw::get_var('active_tab', 'string', 'REQUEST',
'application');
$GLOBALS['phpgw_info']['flags']['app_header'] .= '::' .
lang('edit');
- if (!$this->acl_add)
+ if (empty($this->permissions[PHPGW_ACL_ADD]))
{
phpgw::no_access();
}
@@ -269,7 +265,7 @@
$application =
$this->bo->read_single($application_id);
}
- if (!$this->acl_edit)
+ if (empty($this->permissions[PHPGW_ACL_EDIT]))
{
$step = 1;
}
@@ -610,7 +606,7 @@
public function add()
{
- if (!$this->acl_add)
+ if (empty($this->permissions[PHPGW_ACL_ADD]))
{
phpgw::no_access();
}
@@ -620,7 +616,7 @@
public function save()
{
- if (!$this->acl_add)
+ if (empty($this->permissions[PHPGW_ACL_ADD]))
{
phpgw::no_access();
}
Modified: branches/Version-2_0-branch/rental/inc/model/class.application.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/model/class.application.inc.php
2017-08-14 14:45:53 UTC (rev 16977)
+++ branches/Version-2_0-branch/rental/inc/model/class.application.inc.php
2017-08-14 14:47:44 UTC (rev 16978)
@@ -29,9 +29,9 @@
phpgw::import_class('rental.boapplication');
- include_class('rental', 'model', 'inc/model/');
+ include_class('phpgwapi', 'model', 'inc/model/');
- class rental_application extends rental_model
+ class rental_application extends phpgwapi_model
{
const STATUS_REGISTERED = 1;
@@ -38,6 +38,7 @@
const STATUS_PENDING = 2;
const STATUS_REJECTED = 3;
const STATUS_APPROVED = 4;
+ const acl_location = '.application';
protected
$id,
@@ -80,6 +81,16 @@
parent::__construct((int)$id);
}
+ /**
+ * Implementing classes must return an instance of itself.
+ *
+ * @return the class instance.
+ */
+ public static function get_instance()
+ {
+ return new rental_application();
+ }
+
public static function get_composite_types()
{
return array(1 => 'Hybel', 2 => 'Leilighet');
Modified: branches/Version-2_0-branch/rental/js/rental/application.edit.js
===================================================================
--- branches/Version-2_0-branch/rental/js/rental/application.edit.js
2017-08-14 14:45:53 UTC (rev 16977)
+++ branches/Version-2_0-branch/rental/js/rental/application.edit.js
2017-08-14 14:47:44 UTC (rev 16978)
@@ -3,7 +3,7 @@
var strURL = phpGWLink('index.php', oArgs, true);
JqueryPortico.autocompleteHelper(strURL, 'ecodimb_name', 'ecodimb_id',
'ecodimb_container', 'descr');
-composites = new Array();
+var composites = new Array();
$(document).ready(function ()
{
@@ -25,6 +25,44 @@
errorMessage: lang['Name or company is required'],
errorMessageKey: ''
});
+
+
+ validate_submit = function ()
+ {
+ var active_tab = $("#active_tab").val();
+ conf = {
+ // modules: 'date, security, file',
+ validateOnBlur: false,
+ scrollToTopOnError: true,
+ errorMessagePosition: 'top'
+ // language: validateLanguage
+ };
+
+ var test = $('form').isValid(false, conf);
+ if (!test)
+ {
+ return;
+ }
+ var id = $("#application_id").val();
+
+ if (id > 0)
+ {
+ document.form.submit();
+ return;
+ }
+
+ if (active_tab === 'application')
+ {
+ $('#tab-content').responsiveTabs('activate', 1);
+ $("#save_button_bottom").val(lang['save']);
+ $("#active_tab").val('party');
+ }
+ else
+ {
+ document.form.submit();
+ }
+ };
+
});
function set_tab(tab)
@@ -42,7 +80,7 @@
var composite_id = schedule.rental['data']['id'];
var params = {application_id: application_id, composite_id:
composite_id};
-
+
$.post(url, params, function(m)
{
button.disabled = false;
@@ -56,7 +94,7 @@
{
button.disabled = true;
data = JSON.parse(data);
-
+
var url = data['url'];
var application_id = $('#application_id').val();
var composite_id = composites.rental['data']['id'];
@@ -84,7 +122,7 @@
var r = "";
createTableSchedule(container, composites.datasourceUrl, columns, r,
classTable, '', false, "composites.createToolbar");
-}
+};
composites.createToolbar = function ()
{
@@ -93,7 +131,7 @@
container.setAttribute('id', 'composites_toolbar');
container.classList.add('schedule_toolbar');
var id = "$('.rentalCompositesTable .trselected').data('id')";
-
+
$.each(toolbar, function(i, v)
{
var name = v['name'];
@@ -184,13 +222,13 @@
else if (callFunction)
{
button.addEventListener('click', function(event){
- event.preventDefault()
+ event.preventDefault();
self[callFunction['name']](callFunction['args'], this);
});
}
container.appendChild(button);
- })
+ });
return container;
-}
\ No newline at end of file
+};
Modified: branches/Version-2_0-branch/rental/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/rental/setup/phpgw_no.lang 2017-08-14
14:45:53 UTC (rev 16977)
+++ branches/Version-2_0-branch/rental/setup/phpgw_no.lang 2017-08-14
14:47:44 UTC (rev 16978)
@@ -55,6 +55,7 @@
available_at rental no Ledig på dato
available_composites rental no Ledige leieobjekt
available_composites rental no Tilgjengelige leieobjekter
+composites rental no Leieobjekt
available_from rental no Tilgjengelig fra
available_parties rental no Tilgjengelige kontraktsparter
available_price_items rental no Tilgjengelige priselementer
Modified: branches/Version-2_0-branch/rental/templates/base/application.xsl
===================================================================
--- branches/Version-2_0-branch/rental/templates/base/application.xsl
2017-08-14 14:45:53 UTC (rev 16977)
+++ branches/Version-2_0-branch/rental/templates/base/application.xsl
2017-08-14 14:47:44 UTC (rev 16978)
@@ -28,7 +28,7 @@
</xsl:variable>
<script type="text/javascript">
- var lang = <xsl:value-of
select="php:function('js_lang', 'Name or company is required')"/>;
+ var lang = <xsl:value-of
select="php:function('js_lang', 'Name or company is required', 'next',
'save')"/>;
</script>
<form id="form" name="form" method="post"
action="{$form_action}" class="pure-form pure-form-aligned">
<div id="tab-content">
@@ -538,13 +538,18 @@
</fieldset>
</div>
</xsl:if>
-
</div>
- <div class="proplist-col">
- <input type="submit" class="pure-button
pure-button-primary" name="save">
+ <div id="submit_group_bottom" class="proplist-col">
+ <xsl:variable name="lang_save">
+ <xsl:value-of
select="php:function('lang', 'next')"/>
+ </xsl:variable>
+ <input type="button" class="pure-button
pure-button-primary" name="save" id="save_button_bottom"
onClick="validate_submit();">
<xsl:attribute name="value">
- <xsl:value-of
select="php:function('lang', 'save')"/>
+ <xsl:value-of
select="$lang_save"/>
</xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:value-of
select="$lang_save"/>
+ </xsl:attribute>
</input>
<xsl:variable name="cancel_url">
<xsl:value-of select="cancel_url"/>
Modified: branches/Version-2_0-branch/setup/templates/base/config.tpl
===================================================================
--- branches/Version-2_0-branch/setup/templates/base/config.tpl 2017-08-14
14:45:53 UTC (rev 16977)
+++ branches/Version-2_0-branch/setup/templates/base/config.tpl 2017-08-14
14:47:44 UTC (rev 16978)
@@ -43,7 +43,18 @@
<td><input name="newsettings[hostname]" value="{value_hostname}"></td>
</tr>
- <tr class="row_off">
+
+ <tr class="row_off">
+ <td>{lang_enforce_ssl}:</td>
+ <td>
+ <select name="newsettings[enforce_ssl]">
+ <option value="">{lang_No}</option>
+ <option value="1"{selected_enforce_ssl_1}>{lang_Yes}</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr class="row_on">
<td>{lang_cookie_domain_for_sessions_-_if_unsure_leave_empty}</td>
<td><input name="newsettings[cookie_domain]"
value="{value_cookie_domain}"></td>
<!--
@@ -55,12 +66,12 @@
-->
</tr>
- <tr class="row_on">
+ <tr class="row_off">
<td>{lang_Enter_your_default_FTP_server}:</td>
<td><input name="newsettings[default_ftp_server]"
value="{value_default_ftp_server}"></td>
</tr>
- <tr class="row_off">
+ <tr class="row_on">
<td>{lang_Attempt_to_use_correct_mimetype_for_FTP_instead_of_default_'application/octet-stream'}:</td>
<td>
<select name="newsettings[ftp_use_mime]">
@@ -70,7 +81,7 @@
</td>
</tr>
- <tr class="row_on">
+ <tr class="row_off">
<td>{lang_Datetime_port}.<br>{lang_If_using_port_13,_please_set_firewall_rules_appropriately_before_submitting_this_page}.({lang_Host}:
time-a.nist.gov {lang_Port}: 13)</td>
<td>
<select name="newsettings[daytime_port]">
@@ -81,12 +92,12 @@
</td>
</tr>
- <tr class="row_off">
+ <tr class="row_on">
<td>{lang_Enter_your_HTTP_proxy_server}:</td>
<td><input name="newsettings[httpproxy_server]"
value="{value_httpproxy_server}"></td>
</tr>
- <tr class="row_on">
+ <tr class="row_off">
<td>{lang_Enter_your_HTTP_proxy_server_port}:</td>
<td><input name="newsettings[httpproxy_port]"
value="{value_httpproxy_port}"></td>
</tr>
@@ -101,7 +112,7 @@
<td><input type="password" name="newsettings[site_password]"
value="{value_site_password}"></td>
</tr>
-->
- <tr class="row_off">
+ <tr class="row_on">
<td colspan="2"> </td>
</tr>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16978] Stable: Merge 16973:16977 from trunk,
sigurdne <=