[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9565] property: inherit locations at order from proj
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [9565] property: inherit locations at order from projekt |
Date: |
Tue, 12 Jun 2012 18:49:43 +0000 |
Revision: 9565
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9565
Author: sigurdne
Date: 2012-06-12 18:49:43 +0000 (Tue, 12 Jun 2012)
Log Message:
-----------
property: inherit locations at order from projekt
Modified Paths:
--------------
trunk/property/inc/class.soproject.inc.php
trunk/property/inc/class.uiproject.inc.php
trunk/property/inc/class.uiworkorder.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.soproject.inc.php
===================================================================
--- trunk/property/inc/class.soproject.inc.php 2012-06-12 12:40:33 UTC (rev
9564)
+++ trunk/property/inc/class.soproject.inc.php 2012-06-12 18:49:43 UTC (rev
9565)
@@ -808,6 +808,7 @@
'ecodimb'
=> $this->db->f('ecodimb'),
'b_account_id'
=> $this->db->f('account_group'),
'contact_id'
=> $this->db->f('contact_id'),
+ 'inherit_location'
=> $this->db->f('inherit_location')
);
if ( isset($values['attributes']) &&
is_array($values['attributes']) )
@@ -993,13 +994,14 @@
$this->account,
$project['ecodimb'],
$project['b_account_id'],
- $project['contact_id']
+ $project['contact_id'],
+ $project['inherit_location']
);
$values = $this->bocommon->validate_db_insert($values);
$this->db->query("INSERT INTO fm_project
(id,project_group,name,access,category,entry_date,start_date,end_date,coordinator,status,"
- .
"descr,budget,reserve,location_code,address,key_deliver,key_fetch,other_branch,key_responsible,user_id,ecodimb,account_group,contact_id
$cols) "
+ .
"descr,budget,reserve,location_code,address,key_deliver,key_fetch,other_branch,key_responsible,user_id,ecodimb,account_group,contact_id,inherit_location
$cols) "
. "VALUES ($values $vals )",__LINE__,__FILE__);
if($project['budget'])
@@ -1166,7 +1168,8 @@
'address' => $address,
'ecodimb' =>
$project['ecodimb'],
'account_group' =>
$project['b_account_id'],
- 'contact_id' =>
$project['contact_id']
+ 'contact_id' =>
$project['contact_id'],
+ 'inherit_location' =>
$project['inherit_location']
);
$data_attribute =
$this->custom->prepare_for_db('fm_project', $values_attribute, $project['id']);
Modified: trunk/property/inc/class.uiproject.inc.php
===================================================================
--- trunk/property/inc/class.uiproject.inc.php 2012-06-12 12:40:33 UTC (rev
9564)
+++ trunk/property/inc/class.uiproject.inc.php 2012-06-12 18:49:43 UTC (rev
9565)
@@ -1865,6 +1865,7 @@
$data = array
(
+ 'inherit_location'
=> $id ? $values['inherit_location'] : 1,
'mode'
=> $mode,
'suppressmeter'
=> isset($config->config_data['project_suppressmeter']) &&
$config->config_data['project_suppressmeter'] ? 1 : '',
'suppresscoordination'
=> $suppresscoordination,
Modified: trunk/property/inc/class.uiworkorder.inc.php
===================================================================
--- trunk/property/inc/class.uiworkorder.inc.php 2012-06-12 12:40:33 UTC
(rev 9564)
+++ trunk/property/inc/class.uiworkorder.inc.php 2012-06-12 18:49:43 UTC
(rev 9565)
@@ -1373,7 +1373,7 @@
$location_types =
$admin_location->select_location_type();
$max_level = count($location_types);
- $location_level =
isset($project['location_data']['location_code']) ?
count(explode('-',$project['location_data']['location_code'])) : 0 ;
+ $location_level =
isset($project['location_data']['location_code']) &&
$project['inherit_location'] ?
count(explode('-',$project['location_data']['location_code'])) : 0 ;
$location_template_type = 'form';
$_location_data = array();
@@ -1396,7 +1396,7 @@
}
else
{
- if(isset($project['location_data']) &&
$project['location_data'])
+ if(isset($project['location_data']) &&
$project['location_data'] && $project['inherit_location'])
{
$_location_data =
$project['location_data'];
}
Modified: trunk/property/setup/phpgw_no.lang
===================================================================
--- trunk/property/setup/phpgw_no.lang 2012-06-12 12:40:33 UTC (rev 9564)
+++ trunk/property/setup/phpgw_no.lang 2012-06-12 18:49:43 UTC (rev 9565)
@@ -34,7 +34,7 @@
actual cost - paid so far property no Faktisk betalt - pr dd
add a apartment property no Legg til leilighet
add a attrib property no Legg til en attibutt
-add a budget account property no Legg til en budsjettkonto
+add a budget account property no Legg til en kostnadsart
add a budget query property no Legg til en budsjettspørring
add a building property no legg til bygning
add a category property no Legg til en kategori
@@ -80,7 +80,7 @@
add attribute property no legg til attribute
add a workorder property no legg til bestilling
add a workorder to this project property no legg til en
bestilling til dette prosjektet
-add budget account property no Legg til budsjettkonto
+add budget account property no Legg til kostnadsart
add building property no legg til bygning
add category property no Legg til kategori
add common property no Legg til felles
@@ -207,7 +207,7 @@
a unique code for this activity property no En unik kode fo
denne aktiviteten
authorities demands property no Myndighetskrav
auto tax property no Auto MVA
-b_account property no Budsjett konto
+b_account property no Kostnadsart
back to admin property no Tilbake til Admin
back to calculation property no Tilbake til kalkulasjon
back to entity property no Returner til entitet
@@ -231,11 +231,11 @@
b - responsible property no Anviser
bruks nr property no bruks nr
budget property no Budsjett
-budget account property no Budsjett konto
-budget account group property no Konto gruppe
-budget account is missing: property no Budsjett konto mangler
+budget account property no Kostnadsart
+budget account group property no Kontogruppe
+budget account is missing: property no Kostnadsart mangler
budget changed property no Budsjett er endret
-budget code is missing from sub invoice in : property no
Budsjett konto mangler fra underbilag i :
+budget code is missing from sub invoice in : property no
Kostnadsart mangler fra underbilag i :
budget cost property no Budsjett-beløp
budget_cost property no Budsjett-beløp
budget responsible property no Anviser
@@ -316,7 +316,7 @@
click this link to enter the list of sub-invoices property no
klikk her for å entre liste over underbilag
click this link to select property no Klikk her for å velge
click this link to select apartment property no klikk her for å
velge leilighet
-click this link to select budget account property no klikk
her for å velge budsjett konto
+click this link to select budget account property no klikk
her for å velge kostnadsart
click this link to select building property no klikk her for å
velge bygning
click this link to select customer property no Klikk her for å
velge kunde
click this link to select entrance property no klikk her for å
velge inngang
@@ -427,7 +427,7 @@
delete apartment property no seltt leilighjet
delete a single entry by passing the id. property no slett
en enkelt post ved å sende id
delete async method property no Slett async metode
-delete budget account property no Slett budsjettkonto
+delete budget account property no Slett kostnadsart
delete building property no slett bygning
delete claim property no Slett krav
delete column property no Slett kolonne
@@ -456,7 +456,7 @@
delete the agreement property no Slett avtale
delete the apartment property no slett leilighet
delete the attrib property no slett attributt
-delete the budget account property no Slett budsjettkonto
+delete the budget account property no Slett kostnadsart
delete the building property no slett bygning
delete the category property no Slett kategori
delete the claim property no Slett krav
@@ -560,7 +560,7 @@
edit agreement group property no Rette avtale gruppe
edit apartment property no rette leilighet
edit attribute property no endre attributt
-edit budget account property no Rette budsjettkonto
+edit budget account property no Rette kostnadsart
edit building property no rette bygning
edit categories property no Endre kategorier
edit category property no Rette kategori
@@ -598,7 +598,7 @@
edit the alarm property no Rette alarm
edit the apartment property no rette leilighet
edit the attrib property no rette attributt
-edit the budget account property no Rette budsjettkonto
+edit the budget account property no Rette kostnadsart
edit the building property no rette bygning
edit the category property no Rette kategorien
edit the claim property no Rette kravet
@@ -652,7 +652,7 @@
enter a description of the standard property no gi en
beskrivelse av standarden
enter a description of the status property no Angi en
beskrivelse av statusen
enter a description the attribute property no gi en
beskrivelse av attributten
-enter a description the budget account property no Angi en
beskrivelse av budsjettkontoen
+enter a description the budget account property no Angi en
beskrivelse av kostnadsarten
enter a description the category property no Angi en
beskrivelse av kategorien
enter a description the method property no Angi en beskrivelse av
metoden
enter a description the standard property no gi en
beskrivelse av standarden
@@ -698,7 +698,7 @@
enter the attribute value for this entity property no angi
attributt verdi for denne posten
enter the billable hour for the task property no Angi egne timer
for oppgaven
enter the budget property no Angi budsjett
-enter the budget account property no Angi budsjettkonto
+enter the budget account property no Angi kostnadsart
enter the category id property no Angi kategori ID
enter the cost per unit property no angi kostnad pr enhet
enter the date for this reading property no Angi dato for
denne avlesningen
@@ -955,7 +955,7 @@
list attribute property no List attributter
listbox property no ListBox
list budget property no Oversikt budsjett
-list budget account property no list budsjett konto
+list budget account property no list kostnadsart
list building property no list bygning
list claim property no Oversikt klage
list config property no List konfigurasjon
@@ -1223,7 +1223,7 @@
please enter scale as integer ! property no Angi heltall
for skalering
please give som details ! property no Angi detaljer
please select a branch ! property no Velg fag
-please select a budget account ! property no Velg en
budsjettkonto
+please select a budget account ! property no Velg en
kostnadsart
please select a budget reponsible! property no Velg en anviser
please select a building id ! property no Velg bygnings ID
please select a category ! property no velg kategori
@@ -1576,7 +1576,7 @@
select the vendor the s_agreement belongs to. property no Velg
leverandør
select the workorder hour category property no Velg
post-kategori
select the year the selection belongs to property no Velg år
utvelgelsen gjelder
-select this budget account property no velg budsjettkonto
+select this budget account property no velg kostnadsart
select this contact property no Velg denne kontakten
select this dates property no Velg dato
select this ns3420 - code property no velg NS-kode
@@ -1834,7 +1834,7 @@
view tender property no Vis beskrivelse
view the apartment property no vis leilighet
view the attrib property no vis attributt
-view the budget account property no Vis budsjettkonto
+view the budget account property no Vis kostnadsart
view the building property no vis bygning
view the category property no Vis kategorien
view the claim property no Vis kravet
@@ -1918,6 +1918,7 @@
tenant common no Leietaker
internal common no Intern
in progress date property no Påbegynt dato
+inherit location property no Arve lokalisering til bestilling
delivered date property no Utført dato
checklist property no Sjekkliste
closed date property no Avsluttet dato
Modified: trunk/property/setup/setup.inc.php
===================================================================
--- trunk/property/setup/setup.inc.php 2012-06-12 12:40:33 UTC (rev 9564)
+++ trunk/property/setup/setup.inc.php 2012-06-12 18:49:43 UTC (rev 9565)
@@ -12,7 +12,7 @@
*/
$setup_info['property']['name'] = 'property';
- $setup_info['property']['version'] = '0.9.17.645';
+ $setup_info['property']['version'] = '0.9.17.646';
$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 2012-06-12 12:40:33 UTC (rev
9564)
+++ trunk/property/setup/tables_current.inc.php 2012-06-12 18:49:43 UTC (rev
9565)
@@ -1419,6 +1419,7 @@
'ecodimb' => array('type' => 'int','precision'
=> 4,'nullable' => True),
'contact_id' => array('type' =>
'int','precision' => 4,'nullable' => True),
'account_group' => array('type' =>
'int','precision' => 4,'nullable' => True),
+ 'inherit_location' => array('type' =>
'int','precision' => 2,'nullable' => True,'default' => 1),
),
'pk' => array('id'),
'fk' => array(),
Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php 2012-06-12 12:40:33 UTC (rev
9564)
+++ trunk/property/setup/tables_update.inc.php 2012-06-12 18:49:43 UTC (rev
9565)
@@ -6386,8 +6386,6 @@
$GLOBALS['phpgw_setup']->oProc->query("UPDATE
fm_workorder SET actual_cost = '{$order['actual_cost']}' WHERE id =
'{$order['order_id']}'",__LINE__,__FILE__);
}
- $GLOBALS['phpgw_setup']->oProc->query($sql,__LINE__,__FILE__);
-
if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
{
$GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.645';
@@ -6395,3 +6393,30 @@
}
}
+ /**
+ * Update property version from 0.9.17.643 to 0.9.17.644
+ * Add optional inheritance of location from project to order
+ */
+ $test[] = '0.9.17.645';
+ function property_upgrade0_9_17_645()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+ $GLOBALS['phpgw_setup']->oProc->query("DELETE FROM fm_cache");
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_project','inherit_location',array(
+ 'type' => 'int',
+ 'precision' => 2,
+ 'nullable' => true,
+ 'default' => 1
+ )
+ );
+
+ $GLOBALS['phpgw_setup']->oProc->query("UPDATE fm_project SET
inherit_location = 1",__LINE__,__FILE__);
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.646';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+ }
+
Modified: trunk/property/templates/base/project.xsl
===================================================================
--- trunk/property/templates/base/project.xsl 2012-06-12 12:40:33 UTC (rev
9564)
+++ trunk/property/templates/base/project.xsl 2012-06-12 18:49:43 UTC (rev
9565)
@@ -286,6 +286,22 @@
<table cellpadding="2"
cellspacing="2" width="80%" align="center">
<xsl:choose>
<xsl:when
test="mode='edit'">
+
+ <tr>
+
<td valign="top">
+
<xsl:value-of select="php:function('lang', 'inherit location')"/>
+
</td>
+
<td>
+
<input type="checkbox" name="values[inherit_location]" value="1">
+
<xsl:if test="inherit_location = 1">
+
<xsl:attribute name="checked" value="checked"/>
+
</xsl:if>
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'inherit
location')"/>
+
</xsl:attribute>
+
</input>
+
</td>
+ </tr>
<xsl:call-template name="location_form"/>
</xsl:when>
<xsl:otherwise>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9565] property: inherit locations at order from projekt,
Sigurd Nes <=