[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11845] bkbooking: stavanger update
From: |
Kjell Arne Espedal |
Subject: |
[Fmsystem-commits] [11845] bkbooking: stavanger update |
Date: |
Wed, 19 Mar 2014 14:27:49 +0000 |
Revision: 11845
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11845
Author: kjell
Date: 2014-03-19 14:27:47 +0000 (Wed, 19 Mar 2014)
Log Message:
-----------
bkbooking: stavanger update
Modified Paths:
--------------
branches/stavangerkommune/booking/templates/base/settings.xsl
branches/stavangerkommune/phpgwapi/templates/stavanger/head.tpl
branches/stavangerkommune/property/inc/class.sodimb_role_user.inc.php
branches/stavangerkommune/property/inc/class.soworkorder.inc.php
branches/stavangerkommune/property/inc/class.uiproject.inc.php
branches/stavangerkommune/property/inc/class.uiworkorder.inc.php
branches/stavangerkommune/property/setup/phpgw_no.lang
branches/stavangerkommune/property/setup/setup.inc.php
branches/stavangerkommune/property/setup/tables_current.inc.php
branches/stavangerkommune/property/setup/tables_update.inc.php
branches/stavangerkommune/property/templates/base/project.xsl
branches/stavangerkommune/property/templates/base/workorder.xsl
Modified: branches/stavangerkommune/booking/templates/base/settings.xsl
===================================================================
--- branches/stavangerkommune/booking/templates/base/settings.xsl
2014-03-19 10:05:25 UTC (rev 11844)
+++ branches/stavangerkommune/booking/templates/base/settings.xsl
2014-03-19 14:27:47 UTC (rev 11845)
@@ -62,12 +62,19 @@
</option>
</select>
</dd>
+
<dt><label for="field_extra_schedule_ids"><xsl:value-of
select="php:function('lang', 'Ids that should be included in the
calendar')"/></label></dt>
<dd>
<input id="field_extra_schedule_ids"
type="text" name="config_data[extra_schedule_ids]">
<xsl:attribute
name="value"><xsl:value-of
select="config_data/extra_schedule_ids"/></xsl:attribute>
</input>
</dd>
+ <dt class="heading"><xsl:value-of select="php:function('lang',
'Email warnings')"/></dt>
+ <dt><label for="field_cancelation_email_addresses"><xsl:value-of
select="php:function('lang', 'Cancelation Email Addresses')" /></label></dt>
+ <dd>
+ <textarea id="field_emails" class="full-width"
name="config_data[emails]"><xsl:value-of
select="config_data/emails"/></textarea>
+ </dd>
+
<dt class="heading"><xsl:value-of select="php:function('lang',
'Billing sequence numbers')"/></dt>
<dd>
<xsl:value-of select="php:function('lang', 'Do
not change these values unless you know what they are.')"/>
@@ -78,14 +85,8 @@
<xsl:attribute
name="value"><xsl:value-of select="billing/internal"/></xsl:attribute>
</input>
</dd>
+ </dl>
- <dt><label
for="field_external_billing_sequence_number"><xsl:value-of
select="php:function('lang', 'Current external billing sequence number')"
/></label></dt>
- <dd>
- <input type="number" name="billing[external]">
- <xsl:attribute
name="value"><xsl:value-of select="billing/external"/></xsl:attribute>
- </input>
- </dd>
- </dl>
<div class="form-buttons">
<input type="submit">
<xsl:attribute name="value"><xsl:value-of
select="php:function('lang', 'Save')"/></xsl:attribute>
Modified: branches/stavangerkommune/phpgwapi/templates/stavanger/head.tpl
===================================================================
--- branches/stavangerkommune/phpgwapi/templates/stavanger/head.tpl
2014-03-19 10:05:25 UTC (rev 11844)
+++ branches/stavangerkommune/phpgwapi/templates/stavanger/head.tpl
2014-03-19 14:27:47 UTC (rev 11845)
@@ -33,7 +33,7 @@
<div id="wrapper">
<div id="header">
<div id="login-bar">
- <a href="{manual_url}">{manual_text}</a> <a
href="{help_url}">{help_text}</a> <a href="{login_url}">{login_text}</a> <span
id="change" />
+ <a href="{manual_url}">{manual_text}</a> <a
href="{help_url}">{help_text}</a> <a href="{login_url}">{login_text}</a> <span
id="change"></span>
</div>
<a href="index.php?menuaction=bookingfrontend.uisearch.index"><div
id="logo"></div></a>
<div id="centerimage"></div>
Modified: branches/stavangerkommune/property/inc/class.sodimb_role_user.inc.php
===================================================================
--- branches/stavangerkommune/property/inc/class.sodimb_role_user.inc.php
2014-03-19 10:05:25 UTC (rev 11844)
+++ branches/stavangerkommune/property/inc/class.sodimb_role_user.inc.php
2014-03-19 14:27:47 UTC (rev 11845)
@@ -48,7 +48,9 @@
{
$query_start =
phpgwapi_datetime::date_to_timestamp($data['query_start']);
$query_end =
phpgwapi_datetime::date_to_timestamp($data['query_end']);
+ $get_netto_list = isset($data['get_netto_list']) &&
$data['get_netto_list'] ? true : false;
+
$dimb_id = (int) $data['dimb_id'];
if(isset($data['user_id']) && $data['user_id'])
{
@@ -119,6 +121,10 @@
);
}
+ if($get_netto_list)
+ {
+ return $user_data;
+ }
$sql = "SELECT id, name FROM fm_ecodimb_role
{$filterrole} ORDER BY id ASC ";
$this->db->query($sql,__LINE__,__FILE__);
Modified: branches/stavangerkommune/property/inc/class.soworkorder.inc.php
===================================================================
--- branches/stavangerkommune/property/inc/class.soworkorder.inc.php
2014-03-19 10:05:25 UTC (rev 11844)
+++ branches/stavangerkommune/property/inc/class.soworkorder.inc.php
2014-03-19 14:27:47 UTC (rev 11845)
@@ -886,7 +886,9 @@
'approved'
=> $this->db->f('approved'),
'mail_recipients' =>
explode(',', trim($this->db->f('mail_recipients'), ',')),
'actual_cost' =>
$this->db->f('actual_cost'),
- 'continuous' =>
$this->db->f('continuous')
+ 'continuous' =>
$this->db->f('continuous'),
+ 'fictive_periodization' =>
$this->db->f('fictive_periodization'),
+
);
$sql = "SELECT periodization_id,"
@@ -1173,6 +1175,7 @@
$workorder['contract_sum'],
$workorder['approved'],
$workorder['continuous'],
+ $workorder['fictive_periodization'],
isset($workorder['vendor_email']) &&
is_array($workorder['vendor_email']) ? implode(',', $workorder['vendor_email'])
: ''
);
@@ -1180,7 +1183,7 @@
$this->db->query("INSERT INTO fm_workorder
(id,num,project_id,title,access,entry_date,start_date,end_date,status,"
.
"descr,budget,combined_cost,account_id,rig_addition,addition,key_deliver,key_fetch,vendor_id,charge_tenant,"
- .
"user_id,ecodimb,category,billable_hours,contract_sum,approved,continuous,mail_recipients
$cols) "
+ .
"user_id,ecodimb,category,billable_hours,contract_sum,approved,continuous,fictive_periodization,mail_recipients
$cols) "
. "VALUES ( {$values} {$vals})", __LINE__, __FILE__);
$this->db->query("INSERT INTO fm_orders (id,type)
VALUES ({$id},'workorder')");
@@ -1295,28 +1298,29 @@
$value_set = array
(
- 'title' =>
$workorder['title'],
- 'status' =>
$workorder['status'],
- 'start_date' =>
$workorder['start_date'],
- 'end_date' =>
$workorder['end_date'],
- 'descr' =>
$workorder['descr'],
- 'budget' => (int)
$workorder['budget'],
-// 'combined_cost' => $combined_cost,
- 'key_deliver' =>
$workorder['key_deliver'],
- 'key_fetch' =>
$workorder['key_fetch'],
- 'account_id' =>
$workorder['b_account_id'],
- 'rig_addition' =>
$workorder['addition_rs'],
- 'addition' =>
$workorder['addition_percentage'],
- 'charge_tenant' =>
$workorder['charge_tenant'],
- 'vendor_id' =>
$workorder['vendor_id'],
- 'user_id' =>
$workorder['user_id'],
- 'ecodimb' =>
$workorder['ecodimb'],
- 'category' =>
$workorder['cat_id'],
- 'billable_hours' =>
$workorder['billable_hours'],
-// 'contract_sum' =>
$workorder['contract_sum'],
- 'approved' =>
$workorder['approved'],
- 'continuous' =>
$workorder['continuous'],
- 'mail_recipients' =>
isset($workorder['vendor_email']) && is_array($workorder['vendor_email']) ?
implode(',', $workorder['vendor_email']) : '',
+ 'title' =>
$workorder['title'],
+ 'status' =>
$workorder['status'],
+ 'start_date' =>
$workorder['start_date'],
+ 'end_date' =>
$workorder['end_date'],
+ 'descr' =>
$workorder['descr'],
+ 'budget' =>
(int) $workorder['budget'],
+// 'combined_cost' =>
$combined_cost,
+ 'key_deliver' =>
$workorder['key_deliver'],
+ 'key_fetch' =>
$workorder['key_fetch'],
+ 'account_id' =>
$workorder['b_account_id'],
+ 'rig_addition' =>
$workorder['addition_rs'],
+ 'addition' =>
$workorder['addition_percentage'],
+ 'charge_tenant' =>
$workorder['charge_tenant'],
+ 'vendor_id' =>
$workorder['vendor_id'],
+ 'user_id' =>
$workorder['user_id'],
+ 'ecodimb' =>
$workorder['ecodimb'],
+ 'category' =>
$workorder['cat_id'],
+ 'billable_hours' =>
$workorder['billable_hours'],
+// 'contract_sum' =>
$workorder['contract_sum'],
+ 'approved' =>
$workorder['approved'],
+ 'continuous' =>
$workorder['continuous'],
+ 'fictive_periodization' =>
$workorder['fictive_periodization'],
+ 'mail_recipients' =>
isset($workorder['vendor_email']) && is_array($workorder['vendor_email']) ?
implode(',', $workorder['vendor_email']) : '',
);
@@ -1794,7 +1798,7 @@
$sum_year_combined_cost = array();
$sql = "SELECT continuous, fm_workorder.start_date ,
fm_workorder_budget.budget, fm_workorder_budget.combined_cost,"
- . " project_type_id, year, month, active, closed"
+ . " project_type_id, year, month, active, closed,
fictive_periodization"
. " FROM fm_workorder"
. " {$this->join} fm_project ON fm_workorder.project_id
= fm_project.id"
. " {$this->join} fm_workorder_status ON
fm_workorder.status = fm_workorder_status.id"
@@ -1807,11 +1811,12 @@
$_order_budget = array();
while($this->db->next_record())
{
- $project_type_id = (int)
$this->db->f('project_type_id');
- $year = (int)
$this->db->f('year');
- $month = (int)
$this->db->f('month');
- $continuous =
!!$this->db->f('continuous');
- $period =
sprintf("%s%02d", $year, $month
+ $fictive_periodization =
!!$this->db->f('fictive_periodization');
+ $project_type_id = (int)
$this->db->f('project_type_id');
+ $year = (int)
$this->db->f('year');
+ $month = (int)
$this->db->f('month');
+ $continuous =
!!$this->db->f('continuous');
+ $period =
sprintf("%s%02d", $year, $month
);
$budget =
(int) $this->db->f('budget');
@@ -1854,6 +1859,7 @@
* ellers: Start-periode blir måned for start-dato for
bestilling dersom den ligger frem i tid
* ellers: Dersom start-dato for bestilling er passert
- blir start-periode inneværende måned.
* */
+ $calculate_fictive_periods = $fictive_periodization ?
$calculate_fictive_periods : false;
$fictive_period
= array();
$exclude_from_fictive_period = array();
$exclude_year_from_fictive_period = array();
Modified: branches/stavangerkommune/property/inc/class.uiproject.inc.php
===================================================================
--- branches/stavangerkommune/property/inc/class.uiproject.inc.php
2014-03-19 10:05:25 UTC (rev 11844)
+++ branches/stavangerkommune/property/inc/class.uiproject.inc.php
2014-03-19 14:27:47 UTC (rev 11845)
@@ -1686,13 +1686,30 @@
if(isset($config->config_data['invoice_acl'])
&& $config->config_data['invoice_acl'] == 'dimb')
{
$supervisor_id =
$invoice->get_default_dimb_role_user(2, $values['ecodimb']);
- $prefs =
$this->bocommon->create_preferences('property',$supervisor_id);
- $supervisor_email[] = array
- (
- 'id' => $supervisor_id,
- 'address' => $prefs['email'],
+
+ $sodimb_role_users =
execMethod('property.sodimb_role_user.read', array
+ (
+ 'dimb_id'
=> $values['ecodimb'],
+ 'role_id'
=> 2,
+ 'query_start'
=>
date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']),
+
'get_netto_list' => true
+ )
);
+ if(
isset($sodimb_role_users[$values['ecodimb']][2]) &&
is_array($sodimb_role_users[$values['ecodimb']][2]))
+ {
+
foreach($sodimb_role_users[$values['ecodimb']][2] as $supervisor_id => $entry)
+ {
+ $prefs =
$this->bocommon->create_preferences('property',$supervisor_id);
+ $supervisor_email[] =
array
+ (
+ 'id' =>
$supervisor_id,
+ 'address' =>
$prefs['email'],
+ 'default'
=> $entry['default_user'],
+ );
+ }
+ }
+
$supervisor2_id =
$invoice->get_default_dimb_role_user(3, $values['ecodimb']);
$prefs2 =
$this->bocommon->create_preferences('property', $supervisor2_id);
$supervisor_email[] = array
@@ -1700,7 +1717,7 @@
'id' => $supervisor2_id,
'address' => $prefs2['email'],
);
- $supervisor_email =
array_reverse($supervisor_email);
+// $supervisor_email =
array_reverse($supervisor_email);
unset($prefs);
unset($prefs2);
unset($invoice);
Modified: branches/stavangerkommune/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/stavangerkommune/property/inc/class.uiworkorder.inc.php
2014-03-19 10:05:25 UTC (rev 11844)
+++ branches/stavangerkommune/property/inc/class.uiworkorder.inc.php
2014-03-19 14:27:47 UTC (rev 11845)
@@ -1619,14 +1619,32 @@
$invoice =
CreateObject('property.soinvoice');
if(isset($config->config_data['invoice_acl'])
&& $config->config_data['invoice_acl'] == 'dimb')
{
- $supervisor_id =
$invoice->get_default_dimb_role_user(2, $values['ecodimb']);
- $prefs =
$this->bocommon->create_preferences('property',$supervisor_id);
- $supervisor_email[] = array
- (
- 'id' => $supervisor_id,
- 'address' => $prefs['email'],
+
+ $sodimb_role_users =
execMethod('property.sodimb_role_user.read', array
+ (
+ 'dimb_id'
=> $values['ecodimb'],
+ 'role_id'
=> 2,
+ 'query_start'
=>
date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']),
+
'get_netto_list' => true
+ )
);
+ if(
isset($sodimb_role_users[$values['ecodimb']][2]) &&
is_array($sodimb_role_users[$values['ecodimb']][2]))
+ {
+
foreach($sodimb_role_users[$values['ecodimb']][2] as $supervisor_id => $entry)
+ {
+ $prefs =
$this->bocommon->create_preferences('property',$supervisor_id);
+ $supervisor_email[] =
array
+ (
+ 'id' =>
$supervisor_id,
+ 'address' =>
$prefs['email'],
+ 'default'
=> $entry['default_user'],
+ );
+ }
+ }
+
+// $supervisor_id =
$invoice->get_default_dimb_role_user(2, $values['ecodimb']);
+
$supervisor2_id =
$invoice->get_default_dimb_role_user(3, $values['ecodimb']);
$prefs2 =
$this->bocommon->create_preferences('property', $supervisor2_id);
$supervisor_email[] = array
@@ -2189,6 +2207,7 @@
'value_approved'
=> isset($values['approved']) ? $values['approved'] : '',
'value_continuous'
=> isset($values['continuous']) ? $values['continuous'] : '',
+ 'value_fictive_periodization'
=> isset($values['fictive_periodization']) ? $values['fictive_periodization'] :
'',
'need_approval'
=> $need_approval,
'lang_ask_approval'
=> lang('Ask for approval'),
'lang_ask_approval_statustext'
=> lang('Check this to send a mail to your supervisor for approval'),
Modified: branches/stavangerkommune/property/setup/phpgw_no.lang
===================================================================
--- branches/stavangerkommune/property/setup/phpgw_no.lang 2014-03-19
10:05:25 UTC (rev 11844)
+++ branches/stavangerkommune/property/setup/phpgw_no.lang 2014-03-19
14:27:47 UTC (rev 11845)
@@ -1105,6 +1105,7 @@
muliple radio property no Flervalgs radioknapp
multiple checkbox property no Flervalgs avkrysningsknapp
multiple radio property no Flervalgs radioknapp
+multiplier property no Skaleringsfaktor
my preferences property no Mine innstillinger
my assigned tickets property no Mine tildelte meldinger
my submitted tickets property no Mine innmeldte meldinger
@@ -2021,3 +2022,4 @@
cost investment property no Andel investering i kr.
grant category property no Tilskuddskategori
what property no Hva
+fictive periodization property no Periodiser løpende ut året
\ No newline at end of file
Modified: branches/stavangerkommune/property/setup/setup.inc.php
===================================================================
--- branches/stavangerkommune/property/setup/setup.inc.php 2014-03-19
10:05:25 UTC (rev 11844)
+++ branches/stavangerkommune/property/setup/setup.inc.php 2014-03-19
14:27:47 UTC (rev 11845)
@@ -12,7 +12,7 @@
*/
$setup_info['property']['name'] = 'property';
- $setup_info['property']['version'] = '0.9.17.677';
+ $setup_info['property']['version'] = '0.9.17.678';
$setup_info['property']['app_order'] = 8;
$setup_info['property']['enable'] = 1;
$setup_info['property']['app_group'] = 'office';
Modified: branches/stavangerkommune/property/setup/tables_current.inc.php
===================================================================
--- branches/stavangerkommune/property/setup/tables_current.inc.php
2014-03-19 10:05:25 UTC (rev 11844)
+++ branches/stavangerkommune/property/setup/tables_current.inc.php
2014-03-19 14:27:47 UTC (rev 11845)
@@ -532,6 +532,7 @@
'approved' => array('type' =>
'int','precision' => 2, 'nullable' => True),
'mail_recipients' => array('type' =>
'varchar','precision' => 255, 'nullable' => True),
'continuous' => array('type' =>
'int','precision' => 2, 'nullable' => True),
+ 'fictive_periodization' => array('type' =>
'int','precision' => 2, 'nullable' => True),
),
'pk' => array('id'),
'fk' => array(),
Modified: branches/stavangerkommune/property/setup/tables_update.inc.php
===================================================================
--- branches/stavangerkommune/property/setup/tables_update.inc.php
2014-03-19 10:05:25 UTC (rev 11844)
+++ branches/stavangerkommune/property/setup/tables_update.inc.php
2014-03-19 14:27:47 UTC (rev 11845)
@@ -7877,12 +7877,12 @@
$GLOBALS['phpgw_setup']->oProc->query("DELETE FROM fm_cache");
- $sql = 'CREATE OR REPLACE VIEW fm_orders_paid_or_pending_view
AS
+ $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
GROUP BY fm_ecobilagoverf.pmwrkord_code,
fm_ecobilagoverf.periode, fm_ecobilagoverf.periodization,
fm_ecobilagoverf.periodization_start
- UNION ALL
+ UNION ALL
SELECT fm_ecobilag.pmwrkord_code AS order_id,
fm_ecobilag.periode, sum(fm_ecobilag.godkjentbelop) AS amount,
fm_ecobilag.periodization, fm_ecobilag.periodization_start
FROM fm_ecobilag
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';
@@ -7896,3 +7896,25 @@
}
}
+ /**
+ * Update property version from 0.9.17.677 to 0.9.17.678
+ * Add fields to view
+ */
+
+ $test[] = '0.9.17.677';
+ function property_upgrade0_9_17_677()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_workorder','fictive_periodization',array(
+ 'type' => 'int',
+ 'precision' => 2,
+ 'nullable' => True
+ )
+ );
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.678';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+ }
\ No newline at end of file
Modified: branches/stavangerkommune/property/templates/base/project.xsl
===================================================================
--- branches/stavangerkommune/property/templates/base/project.xsl
2014-03-19 10:05:25 UTC (rev 11844)
+++ branches/stavangerkommune/property/templates/base/project.xsl
2014-03-19 14:27:47 UTC (rev 11845)
@@ -293,7 +293,10 @@
<xsl:value-of
select="//lang_ask_approval_statustext"/>
</xsl:attribute>
</input>
- </td>
+ <xsl:if test="default =
'1'">
+
<xsl:text><=</xsl:text>
+ </xsl:if>
+ </td>
</tr>
</xsl:for-each>
</table>
Modified: branches/stavangerkommune/property/templates/base/workorder.xsl
===================================================================
--- branches/stavangerkommune/property/templates/base/workorder.xsl
2014-03-19 10:05:25 UTC (rev 11844)
+++ branches/stavangerkommune/property/templates/base/workorder.xsl
2014-03-19 14:27:47 UTC (rev 11845)
@@ -420,6 +420,9 @@
<xsl:value-of
select="//lang_ask_approval_statustext"/>
</xsl:attribute>
</input>
+
<xsl:if test="default = '1'">
+
<xsl:text><=</xsl:text>
+
</xsl:if>
</td>
</tr>
</xsl:for-each>
@@ -588,6 +591,31 @@
</input>
</td>
</tr>
+ <tr>
+ <xsl:variable
name="lang_fictive_periodization">
+
<xsl:value-of select="php:function('lang', 'fictive periodization')"/>
+ </xsl:variable>
+ <td
valign="top">
+
<xsl:value-of select="$lang_fictive_periodization"/>
+ </td>
+ <td>
+ <input
type="checkbox" name="values[fictive_periodization]" value="1">
+
<xsl:attribute name="title">
+
<xsl:value-of select="$lang_fictive_periodization"/>
+
</xsl:attribute>
+
<xsl:if test="value_fictive_periodization = '1'">
+
<xsl:attribute name="checked">
+
<xsl:text>checked</xsl:text>
+
</xsl:attribute>
+
</xsl:if>
+
<xsl:if test="mode != 'edit'">
+
<xsl:attribute name="disabled">
+
<xsl:text>disabled</xsl:text>
+
</xsl:attribute>
+
</xsl:if>
+ </input>
+ </td>
+ </tr>
<tr>
<td
valign="top">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11845] bkbooking: stavanger update,
Kjell Arne Espedal <=