[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8966] property: budget, tax code
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [8966] property: budget, tax code |
Date: |
Tue, 06 Mar 2012 13:02:49 +0000 |
Revision: 8966
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8966
Author: sigurdne
Date: 2012-03-06 13:02:46 +0000 (Tue, 06 Mar 2012)
Log Message:
-----------
property: budget, tax code
Modified Paths:
--------------
trunk/property/inc/class.sobudget.inc.php
trunk/property/inc/class.sogeneric.inc.php
trunk/property/inc/class.uiwo_hour.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
Modified: trunk/property/inc/class.sobudget.inc.php
===================================================================
--- trunk/property/inc/class.sobudget.inc.php 2012-03-06 11:14:39 UTC (rev
8965)
+++ trunk/property/inc/class.sobudget.inc.php 2012-03-06 13:02:46 UTC (rev
8966)
@@ -285,13 +285,12 @@
'budget_id' =>
$this->db->f('id'),
'year' =>
$this->db->f('year'),
'grouping' =>
$this->db->f('b_group'),
- 'district_id' =>
$this->db->f('district_id'),
+ 'district_id' =>
$this->db->f('district_id'),
'revision' =>
$this->db->f('revision'),
- 'budget_cost' =>
$this->db->f('budget_cost'),
- 'entry_date' =>
$this->db->f('entry_date'),
- 'ecodimb'
=> $this->db->f('ecodimb'),
- 'cat_id'
=> $this->db->f('category'),
- // 'user'
=> $GLOBALS['phpgw']->accounts->id2name($this->db->f('user_id'))
+ 'budget_cost' =>
$this->db->f('budget_cost'),
+ 'entry_date' =>
$this->db->f('entry_date'),
+ 'ecodimb' =>
$this->db->f('ecodimb'),
+ 'cat_id' =>
$this->db->f('category'),
);
}
return $budget;
@@ -797,20 +796,29 @@
$start_periode = date('Ym',mktime(2,0,0,1,1,$year));
$end_periode = date('Ym',mktime(2,0,0,12,31,$year));
- $sql = "SELECT fm_b_account.{$b_account_field} as
{$b_account_field}, district_id, sum(godkjentbelop) as actual_cost,dimb FROM
fm_ecobilagoverf"
+ $this->db->query('SELECT id, percent FROM
fm_ecomva',__LINE__,__FILE__);
+ $_taxcode = array(0 => 0);
+ while ($this->db->next_record())
+ {
+ $_taxcode[$this->db->f('id')] =
$this->db->f('percent');
+ }
+
+ $sql = "SELECT fm_b_account.{$b_account_field} as
{$b_account_field}, district_id, sum(godkjentbelop) as actual_cost,dimb,mvakode"
+ . " FROM fm_ecobilagoverf"
. " {$this->join} fm_b_account ON
fm_ecobilagoverf.spbudact_code =fm_b_account.id"
. " {$this->join} fm_location1 ON
fm_ecobilagoverf.loc1 = fm_location1.loc1"
. " {$this->join} fm_part_of_town ON
fm_location1.part_of_town_id = fm_part_of_town.part_of_town_id"
. " {$this->join} fm_workorder ON
fm_ecobilagoverf.pmwrkord_code = fm_workorder.id"
. " {$this->join} fm_project ON
fm_workorder.project_id = fm_project.id"
. " WHERE periode >= $start_periode AND periode
<= $end_periode {$filtermethod}"
- . " GROUP BY fm_b_account.{$b_account_field},
district_id,dimb";
+ . " GROUP BY fm_b_account.{$b_account_field},
district_id, dimb, mvakode";
$this->db->query($sql,__LINE__,__FILE__);
while ($this->db->next_record())
{
- $_actual_cost =
round($this->db->f('actual_cost'));
+ $_taxfactor = 1 +
($_taxcode[(int)$this->db->f('mvakode')]/100);
+ $_actual_cost =
round($this->db->f('actual_cost')/$_taxfactor);
$sum_actual_cost += $_actual_cost;
$actual_cost[$this->db->f($b_account_field)][(int)$this->db->f('district_id')][(int)$this->db->f('dimb')]
+= $_actual_cost;
$accout_info[$this->db->f($b_account_field)] =
true;
@@ -818,10 +826,8 @@
$ecodimb[(int)$this->db->f('dimb')] = true;
}
-
// start service agreements
-
$filtermethod = " fm_s_agreement_budget.year = $year";
$where = 'AND';
Modified: trunk/property/inc/class.sogeneric.inc.php
===================================================================
--- trunk/property/inc/class.sogeneric.inc.php 2012-03-06 11:14:39 UTC (rev
8965)
+++ trunk/property/inc/class.sogeneric.inc.php 2012-03-06 13:02:46 UTC (rev
8966)
@@ -523,6 +523,12 @@
(
array
(
+ 'name' =>
'percent',
+ 'descr' =>
lang('percent'),
+ 'type' => 'int'
+ ),
+ array
+ (
'name' =>
'descr',
'descr' =>
lang('descr'),
'type' =>
'varchar'
Modified: trunk/property/inc/class.uiwo_hour.inc.php
===================================================================
--- trunk/property/inc/class.uiwo_hour.inc.php 2012-03-06 11:14:39 UTC (rev
8965)
+++ trunk/property/inc/class.uiwo_hour.inc.php 2012-03-06 13:02:46 UTC (rev
8966)
@@ -456,7 +456,7 @@
'lang_edit' =>
lang('edit'),
'lang_delete' =>
lang('delete'),
'lang_category' =>
lang('category'),
- 'lang_per_cent' => lang('Per
Cent'),
+ 'lang_per_cent' =>
lang('percent'),
);
$tax = $this->config->config_data['fm_tax'];
@@ -836,7 +836,7 @@
$uicols = array (
'name' =>
array('hour_id','post','code','hours_descr','unit','billperae','quantity','cost','deviation','result','wo_hour_category','cat_per_cent'),
'input_type' =>
array('hidden','text','text','text','text','text','text','text','text','text','text','text'),
- 'descr' =>
array('',lang('Post'),lang('Code'),lang('Descr'),lang('Unit'),lang('Bill per
unit'),lang('Quantity'),lang('Cost'),lang('deviation'),lang('result'),lang('Category'),lang('Per
Cent')),
+ 'descr' =>
array('',lang('Post'),lang('Code'),lang('Descr'),lang('Unit'),lang('Bill per
unit'),lang('Quantity'),lang('Cost'),lang('deviation'),lang('result'),lang('Category'),lang('percent')),
'className' =>
array('','','','','','rightClasss','rightClasss','rightClasss','rightClasss','rightClasss','','rightClasss')
);
@@ -2211,7 +2211,7 @@
'type' =>
array('','','','','','','','','','','','text','',''),
'name' =>
array('activity_id','num','branch','vendor_id','descr','base_descr','unit','w_cost','m_cost','total_cost','this_index','quantity','wo_hour_cat','cat_per_cent'),
'formatter' =>
array('','','','','','','','','','','','','',''),
- 'descr' =>
array('',lang('Activity
Num'),lang('Branch'),lang('Vendor'),lang('Description'),lang('Base'),lang('Unit'),lang('Labour
cost'),lang('Material cost'),lang('Total
Cost'),'',lang('Quantity'),lang('category'),lang('Per Cent')),
+ 'descr' =>
array('',lang('Activity
Num'),lang('Branch'),lang('Vendor'),lang('Description'),lang('Base'),lang('Unit'),lang('Labour
cost'),lang('Material cost'),lang('Total
Cost'),'',lang('Quantity'),lang('category'),lang('percent')),
'className' =>
array('','','','','','','','rightClasss','rightClasss','rightClasss','','','','')
);
@@ -2313,7 +2313,7 @@
$uicols_details = array (
'name' =>
array('hour_id','post','code','hours_descr','unit','billperae','quantity','cost','deviation','result','wo_hour_category','cat_per_cent'),
'input_type' =>
array('hidden','text','text','text','text','text','text','text','text','text','text','text'),
- 'descr' =>
array('',lang('Post'),lang('Code'),lang('Descr'),lang('Unit'),lang('Bill per
unit'),lang('Quantity'),lang('Cost'),lang('deviation'),lang('result'),lang('Category'),lang('Per
Cent')),
+ 'descr' =>
array('',lang('Post'),lang('Code'),lang('Descr'),lang('Unit'),lang('Bill per
unit'),lang('Quantity'),lang('Cost'),lang('deviation'),lang('result'),lang('Category'),lang('percent')),
'className' =>
array('','','','','','rightClasss','rightClasss','rightClasss','rightClasss','rightClasss','','rightClasss')
);
@@ -2834,7 +2834,7 @@
$uicols_details = array (
'name' =>
array('hour_id','post','code','hours_descr','unit','billperae','quantity','cost','deviation','result','wo_hour_category','cat_per_cent'),
'input_type' =>
array('hidden','text','text','text','text','text','text','text','text','text','text','text'),
- 'descr' =>
array('',lang('Post'),lang('Code'),lang('Descr'),lang('Unit'),lang('Bill per
unit'),lang('Quantity'),lang('Cost'),lang('deviation'),lang('result'),lang('Category'),lang('Per
Cent')),
+ 'descr' =>
array('',lang('Post'),lang('Code'),lang('Descr'),lang('Unit'),lang('Bill per
unit'),lang('Quantity'),lang('Cost'),lang('deviation'),lang('result'),lang('Category'),lang('percent')),
'className' =>
array('','','','','','rightClasss','rightClasss','rightClasss','rightClasss','rightClasss','','rightClasss')
);
@@ -3254,7 +3254,7 @@
'wo_hour_cat_list'
=>
$this->bocommon->select_category_list(array('format'=>'select','selected' =>
$values['wo_hour_cat'],'type' =>'wo_hours','order'=>'id')),
'lang_cat_per_cent_statustext' =>
lang('the percentage of the category'),
'value_cat_per_cent'
=> $values['cat_per_cent'],
- 'lang_per_cent'
=> lang('Per Cent')
+ 'lang_per_cent'
=> lang('percent')
);
//_debug_array($data);
$appname = lang('Workorder');
Modified: trunk/property/setup/phpgw_no.lang
===================================================================
--- trunk/property/setup/phpgw_no.lang 2012-03-06 11:14:39 UTC (rev 8965)
+++ trunk/property/setup/phpgw_no.lang 2012-03-06 13:02:46 UTC (rev 8966)
@@ -11,7 +11,7 @@
accounting categories property no Kategorier regnskap
accounting dim b property no Kostnadssted
accounting dim d property no Regnskap dim d
-accounting tax property no Regnskap skatter
+accounting tax property no Regnskap mva-kode
accounting voucher category property no Regnskap kategorier
faktura
accounting voucher type property no Regnskap type faktura
acl_locastion is missing property no ACL-lokalisering mangler
@@ -1161,7 +1161,7 @@
payment date property no Forfallsdato
pdf property no PDF
per agreement property no pr avtale
-per cent property no Prosent
+percent property no Prosent
percentage addition property no prosentvis tillegg
performed property no Utført
period property no Periode
Modified: trunk/property/setup/setup.inc.php
===================================================================
--- trunk/property/setup/setup.inc.php 2012-03-06 11:14:39 UTC (rev 8965)
+++ trunk/property/setup/setup.inc.php 2012-03-06 13:02:46 UTC (rev 8966)
@@ -12,7 +12,7 @@
*/
$setup_info['property']['name'] = 'property';
- $setup_info['property']['version'] = '0.9.17.635';
+ $setup_info['property']['version'] = '0.9.17.636';
$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-03-06 11:14:39 UTC (rev
8965)
+++ trunk/property/setup/tables_current.inc.php 2012-03-06 13:02:46 UTC (rev
8966)
@@ -1183,6 +1183,7 @@
'fm_ecomva' => array(
'fd' => array(
'id' => array('type' => 'int','precision' =>
'4','nullable' => False),
+ 'percent' => array('type' => 'int','precision'
=> '4','nullable' => True),
'descr' => array('type' =>
'varchar','precision' => '25','nullable' => False)
),
'pk' => array('id'),
Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php 2012-03-06 11:14:39 UTC (rev
8965)
+++ trunk/property/setup/tables_update.inc.php 2012-03-06 13:02:46 UTC (rev
8966)
@@ -6004,6 +6004,26 @@
}
/**
+ * Update property version from 0.9.17.635 to 0.9.17.636
+ * Add percent value to tax-code
+ *
+ */
+ $test[] = '0.9.17.635';
+ function property_upgrade0_9_17_635()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_ecomva','percent',array('type' =>
'int','precision' => 4,'nullable' => True));
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.636';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+ }
+
+
+ /**
* Update property version from 0.9.17.607 to 0.9.17.608
* Add more room for address at tickets
*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8966] property: budget, tax code,
Sigurd Nes <=