fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [11665] property: periodization


From: Sigurd Nes
Subject: [Fmsystem-commits] [11665] property: periodization
Date: Mon, 10 Feb 2014 09:57:56 +0000

Revision: 11665
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11665
Author:   sigurdne
Date:     2014-02-10 09:57:55 +0000 (Mon, 10 Feb 2014)
Log Message:
-----------
property: periodization

Modified Paths:
--------------
    trunk/property/inc/class.soinvoice.inc.php
    trunk/property/inc/class.soworkorder.inc.php
    trunk/property/inc/class.uiworkorder.inc.php

Modified: trunk/property/inc/class.soinvoice.inc.php
===================================================================
--- trunk/property/inc/class.soinvoice.inc.php  2014-02-09 16:12:13 UTC (rev 
11664)
+++ trunk/property/inc/class.soinvoice.inc.php  2014-02-10 09:57:55 UTC (rev 
11665)
@@ -584,10 +584,10 @@
                        }
 
                        $groupmethod = "GROUP BY 
pmwrkord_code,bilagsnr,bilagsnr_ut,fakturanr,"
-                               . " 
currency,budsjettansvarligid,org_name,periode";
+                               . " 
currency,budsjettansvarligid,org_name,periode,periodization,periodization_start";
 
                        $sql = "SELECT DISTINCT 
pmwrkord_code,bilagsnr,bilagsnr_ut,fakturanr,sum(belop) as belop, 
sum(godkjentbelop) as godkjentbelop,"
-                               . " 
currency,budsjettansvarligid,org_name,periode"
+                               . " 
currency,budsjettansvarligid,org_name,periode,periodization,periodization_start"
                                . " FROM {$table}"
                                . " {$this->join} fm_ecoart ON fm_ecoart.id = 
$table.artid"
                                . " {$this->join} fm_workorder ON 
fm_workorder.id = $table.pmwrkord_code"
@@ -611,6 +611,8 @@
                                        'vendor'                                
=> $this->db->f('org_name',true),
                                        'currency'                              
=> $this->db->f('currency'),
                                        'period'                                
=> $this->db->f('periode'),
+                                       'periodization'                 => 
$this->db->f('periodization'),
+                                       'periodization_start'   => 
$this->db->f('periodization_start'),
                                        'budget_responsible'    => 
$this->db->f('budsjettansvarligid')
                                );
                        }

Modified: trunk/property/inc/class.soworkorder.inc.php
===================================================================
--- trunk/property/inc/class.soworkorder.inc.php        2014-02-09 16:12:13 UTC 
(rev 11664)
+++ trunk/property/inc/class.soworkorder.inc.php        2014-02-10 09:57:55 UTC 
(rev 11665)
@@ -1918,10 +1918,10 @@
                                }
                        }
 
-                       $sql = "SELECT order_id, periode, amount AS 
actual_cost, periodization, periodization_start"
+                       $sql = "SELECT periode, amount AS actual_cost, 
periodization, periodization_start"
                        . " FROM fm_workorder {$this->join} 
fm_orders_paid_or_pending_view ON fm_workorder.id = 
fm_orders_paid_or_pending_view.order_id"
                        . " WHERE order_id = '{$order_id}' ORDER BY periode 
ASC";
-//_debug_array($sql);
+//_debug_array($sql);die();
                        $this->db->query($sql,__LINE__,__FILE__);
                        $orders_paid_or_pending = array();
                        $orders_paid_or_pending_temp = array();
@@ -1974,11 +1974,11 @@
                                        {
                                                if ($outline['dividend'] && 
$outline['divisor'])
                                                {
-                                                       $partial_actual_cost = 
$budget * $outline['dividend'] / $outline['divisor'];
+                                                       $partial_actual_cost = 
$entry['actual_cost'] * $outline['dividend'] / $outline['divisor'];
                                                }
                                                else
                                                {
-                                                       $partial_actual_cost = 
$budget * $outline['value'] / 100;
+                                                       $partial_actual_cost = 
$entry['actual_cost'] * $outline['value'] / 100;
                                                }
 
                                                $_future_year_count = 
floor(($outline['month']-1) / 12);

Modified: trunk/property/inc/class.uiworkorder.inc.php
===================================================================
--- trunk/property/inc/class.uiworkorder.inc.php        2014-02-09 16:12:13 UTC 
(rev 11664)
+++ trunk/property/inc/class.uiworkorder.inc.php        2014-02-10 09:57:55 UTC 
(rev 11665)
@@ -1775,6 +1775,8 @@
                                        'voucher_out_id'                => 
$entry['voucher_out_id'],
                                        'status'                                
=> $entry['status'],
                                        'period'                                
=> $entry['period'],
+                                       'periodization'                 => 
$entry['periodization'],
+                                       'periodization_start'   => 
$entry['periodization_start'],
                                        'invoice_id'                    => 
$entry['invoice_id'],
                                        'budget_account'                => 
$entry['budget_account'],
                                        'dima'                                  
=> $entry['dima'],
@@ -1821,6 +1823,8 @@
                                                                                
                                array('key' => 
'amount','label'=>lang('amount'),'sortable'=>false,'resizeable'=>true,'formatter'=>'FormatterRight'),
                                                                                
                                array('key' => 
'approved_amount','label'=>lang('approved 
amount'),'sortable'=>false,'resizeable'=>true,'formatter'=>'FormatterRight'),
                                                                                
                                array('key' => 
'period','label'=>lang('period'),'sortable'=>false,'resizeable'=>true),
+                                                                               
                                array('key' => 
'periodization','label'=>lang('periodization'),'sortable'=>false,'resizeable'=>true),
+                                                                               
                                array('key' => 
'periodization_start','label'=>lang('periodization 
start'),'sortable'=>false,'resizeable'=>true),
                                                                                
                                array('key' => 
'currency','label'=>lang('currency'),'sortable'=>false,'resizeable'=>true),
                                                                                
                                array('key' => 
'type','label'=>lang('type'),'sortable'=>false,'resizeable'=>true),
                                                                                
                                array('key' => 
'budget_responsible','label'=>lang('budget 
responsible'),'sortable'=>false,'resizeable'=>true),




reply via email to

[Prev in Thread] Current Thread [Next in Thread]