fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8911] property: remove dependency to paid_percent


From: Sigurd Nes
Subject: [Fmsystem-commits] [8911] property: remove dependency to paid_percent
Date: Fri, 17 Feb 2012 09:55:17 +0000

Revision: 8911
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8911
Author:   sigurdne
Date:     2012-02-17 09:55:16 +0000 (Fri, 17 Feb 2012)
Log Message:
-----------
property: remove dependency to paid_percent

Modified Paths:
--------------
    trunk/property/inc/class.boproject.inc.php
    trunk/property/inc/class.soinvoice.inc.php
    trunk/property/inc/class.soproject.inc.php
    trunk/property/inc/class.soworkorder.inc.php
    trunk/property/inc/class.uiinvoice.inc.php
    trunk/property/inc/class.uiproject.inc.php
    trunk/property/inc/class.uiworkorder.inc.php
    trunk/property/js/yahoo/project.edit.js
    trunk/property/templates/base/project.xsl

Modified: trunk/property/inc/class.boproject.inc.php
===================================================================
--- trunk/property/inc/class.boproject.inc.php  2012-02-17 09:32:10 UTC (rev 
8910)
+++ trunk/property/inc/class.boproject.inc.php  2012-02-17 09:55:16 UTC (rev 
8911)
@@ -160,6 +160,7 @@
                function get_column_list()
                {
                        $columns = array();
+/*
                        $columns['planned_cost'] = array
                                (
                                        'id'            => 'planned_cost',
@@ -168,6 +169,7 @@
                                        'formatter'     => 'myFormatCount2',
                                        'classname'     => 'rightClasss'
                                );
+*/
                        $columns['ecodimb'] = array
                                (
                                        'id'            => 'ecodimb',
@@ -509,13 +511,13 @@
                                
$values['workorder_budget'][$i]['title']=$workorder_data[$i]['title'];
                                
$values['workorder_budget'][$i]['workorder_id']=$workorder_data[$i]['workorder_id'];
                                
$values['workorder_budget'][$i]['contract_sum']=number_format($workorder_data[$i]['contract_sum'],
 2, ',', '');
-                               
$values['workorder_budget'][$i]['budget']=number_format($workorder_data[$i]['budget'],
 2, ',', '');
+                               $values['workorder_budget'][$i]['budget']= 
$workorder_data[$i]['budget'];
                                
$values['workorder_budget'][$i]['calculation']=number_format($workorder_data[$i]['calculation']*$tax,
 2, ',', '');
                                
$values['workorder_budget'][$i]['charge_tenant'] = 
$workorder_data[$i]['charge_tenant'];
                                $values['workorder_budget'][$i]['status'] = 
$workorder_data[$i]['status'];
                                $values['workorder_budget'][$i]['actual_cost'] 
= $workorder_data[$i]['act_mtrl_cost']+$workorder_data[$i]['act_vendor_cost'];
                                $values['workorder_budget'][$i]['b_account_id'] 
= $workorder_data[$i]['b_account_id'];
-                               $values['workorder_budget'][$i]['paid_percent'] 
= (int)$workorder_data[$i]['paid_percent'];
+//                             $values['workorder_budget'][$i]['paid_percent'] 
= (int)$workorder_data[$i]['paid_percent'];
 
                                if(isset($workorder_data[$i]['vendor_id']) && 
$workorder_data[$i]['vendor_id'])
                                {

Modified: trunk/property/inc/class.soinvoice.inc.php
===================================================================
--- trunk/property/inc/class.soinvoice.inc.php  2012-02-17 09:32:10 UTC (rev 
8910)
+++ trunk/property/inc/class.soinvoice.inc.php  2012-02-17 09:55:16 UTC (rev 
8911)
@@ -395,7 +395,7 @@
                        }
 
                        $sql = "SELECT 
$table.*,fm_workorder.status,fm_workorder.charge_tenant,org_name,"
-                               . "fm_workorder.claim_issued, 
fm_workorder.paid_percent FROM $table"
+                               . "fm_workorder.claim_issued FROM $table"
                                . " {$this->left_join} fm_workorder ON 
fm_workorder.id = $table.pmwrkord_code"
                                . " {$this->left_join} fm_project ON 
fm_workorder.project_id = fm_project.id"
                                . " {$this->join} fm_vendor ON 
$table.spvend_code = fm_vendor.id $filtermethod";
@@ -431,7 +431,7 @@
                                                'approved_amount'               
=> $this->db->f('godkjentbelop'),
                                                'charge_tenant'                 
=> $this->db->f('charge_tenant'),
                                                'vendor'                        
        => $this->db->f('org_name'),
-                                               'paid_percent'                  
=> $this->db->f('paid_percent'),
+                       //                      'paid_percent'                  
=> $this->db->f('paid_percent'),
                                                'project_group'                 
=> $this->db->f('project_id'),
                                                'external_ref'                  
=> $this->db->f('external_ref'),
                                                'currency'                      
        => $this->db->f('currency'),
@@ -789,11 +789,12 @@
                                                
$update_status[$workorder_id]='R';
                                        }
 
+/*
                                        if(isset($values['paid_percent'][$n]) 
&& $values['paid_percent'][$n])
                                        {
                                                
$update_paid_percent[$workorder_id] = $values['paid_percent'][$n];
                                        }
-
+*/
                                        $GLOBALS['phpgw']->db->query("UPDATE 
fm_ecobilag SET $dima_field ,$kostra_field,{$dimd_field}, mvakode = 
{$tax_code},spbudact_code = '{$budget_account}',dimb = $dimb,godkjentbelop = 
$approved_amount WHERE id='$id'");
 
                                        $receipt['message'][] = 
array('msg'=>lang('Voucher is updated '));
@@ -824,6 +825,7 @@
                                }
                        }
 
+/*
                        if (isset($update_paid_percent) AND 
is_array($update_paid_percent))
                        {
                                $workorder = 
CreateObject('property.soworkorder');
@@ -845,7 +847,7 @@
                                        }
                                }
                        }
-
+*/
                        $GLOBALS['phpgw']->db->transaction_commit();
 
                        return $receipt;

Modified: trunk/property/inc/class.soproject.inc.php
===================================================================
--- trunk/property/inc/class.soproject.inc.php  2012-02-17 09:32:10 UTC (rev 
8910)
+++ trunk/property/inc/class.soproject.inc.php  2012-02-17 09:55:16 UTC (rev 
8911)
@@ -266,8 +266,8 @@
                                $uicols['classname'][]          = 'rightClasss';
                                $uicols['sortable'][]           = '';
 
-                               $cols .= ',planned_cost';
-                               $cols_return[] = 'planned_cost';
+//                             $cols .= ',planned_cost';
+//                             $cols_return[] = 'planned_cost';
 /*
                                $uicols['input_type'][]         = 'text';
                                $uicols['name'][]                       = 
'planned_cost';
@@ -619,7 +619,7 @@
                                $project['actual_cost']         = 0;
                                $project['billable_hours']      = 0;
 
-                               $sql_workder  = 'SELECT 
paid_percent,contract_sum, calculation, budget,'
+                               $sql_workder  = 'SELECT contract_sum, 
calculation, budget,'
                                . ' (fm_workorder.act_mtrl_cost + 
fm_workorder.act_vendor_cost) as actual_cost,'
                                . ' billable_hours,closed'
                                . " FROM fm_workorder {$this->join} 
fm_workorder_status ON fm_workorder.status  = fm_workorder_status.id"
@@ -628,8 +628,6 @@
                                $this->db->query($sql_workder);
                                while ($this->db->next_record())
                                {
-                                       $paid_percent = 
(int)$this->db->f('paid_percent');
-
                                        if($this->db->f('closed'))
                                        {
                                                $_sum = 0;
@@ -651,10 +649,9 @@
                                                $_sum = 0;
                                        }
 
-                                       $_sum = $_sum * (100 - 
$paid_percent)/100;
-
-                                       $project['combined_cost']       += 
$_sum;
-                                       $project['actual_cost']         += 
(int)$this->db->f('actual_cost');
+                                       $_actual_cost = 
(int)$this->db->f('actual_cost');
+                                       $project['combined_cost']       += 
($_sum - $_actual_cost);
+                                       $project['actual_cost']         += 
$_actual_cost;
                                        $project['billable_hours']      += 
(int)$this->db->f('billable_hours');
                                }
                        }
@@ -691,7 +688,7 @@
                                                'descr'                         
        => $this->db->f('descr', true),
                                                'status'                        
        => $this->db->f('status'),
                                                'budget'                        
        => (int)$this->db->f('budget'),
-                                               'planned_cost'                  
=> (int)$this->db->f('planned_cost'),
+                       //                      'planned_cost'                  
=> (int)$this->db->f('planned_cost'),
                                                'reserve'                       
        => (int)$this->db->f('reserve'),
                                                'tenant_id'                     
        => $this->db->f('tenant_id'),
                                                'user_id'                       
        => $this->db->f('user_id'),
@@ -746,7 +743,7 @@
                        $project_id = (int) $project_id;
                        $budget = array();
                        $this->db->query("SELECT fm_workorder.title, 
act_mtrl_cost, act_vendor_cost, budget, fm_workorder.id as 
workorder_id,contract_sum,"
-                               ." vendor_id, 
calculation,rig_addition,addition,deviation,charge_tenant,fm_workorder_status.descr
 as status, fm_workorder.account_id as b_account_id,paid_percent"
+                               ." vendor_id, 
calculation,rig_addition,addition,deviation,charge_tenant,fm_workorder_status.descr
 as status, fm_workorder.account_id as b_account_id"
                                ." FROM fm_workorder {$this->join} 
fm_workorder_status ON fm_workorder.status = fm_workorder_status.id WHERE 
project_id={$project_id}");
                        while ($this->db->next_record())
                        {
@@ -762,8 +759,7 @@
                                        'charge_tenant'         => 
$this->db->f('charge_tenant'),
                                        'status'                        => 
$this->db->f('status'),
                                        'b_account_id'          => 
$this->db->f('b_account_id'),
-                                       'contract_sum'          => 
(int)$this->db->f('contract_sum'),
-                                       'paid_percent'          => 
(int)$this->db->f('paid_percent')
+                                       'contract_sum'          => 
(int)$this->db->f('contract_sum')
                                );
                        }
                        return $budget;
@@ -1262,7 +1258,7 @@
                                
$historylog->add('RM',$project['id'],$project['remark']);
                        }
 
-                       execMethod('property.soworkorder.update_planned_cost', 
$project['id']);
+//                     execMethod('property.soworkorder.update_planned_cost', 
$project['id']);
 
                        $receipt['id'] = $project['id'];
                        $receipt['message'][] = array('msg'=>lang('project %1 
has been edited', $project['id']));
@@ -1350,41 +1346,55 @@
                        $config->read();
                        $tax = 1+(($config->config_data['fm_tax'])/100);
 
-                       $sql = "SELECT EXTRACT(YEAR from 
to_timestamp(start_date) ) as year, sum(calculation) as calculation, 
sum(budget) as budget,"
-                       . " sum(contract_sum) as contract_sum ,paid_percent"
+                       $sql = "SELECT fm_workorder.id, EXTRACT(YEAR from 
to_timestamp(start_date) ) as year, calculation, budget, contract_sum"
                        . " FROM fm_workorder"
                        . " {$this->join} fm_workorder_status ON 
fm_workorder.status  = fm_workorder_status.id"
                        . " WHERE project_id = {$project_id} AND 
(fm_workorder_status.closed IS NULL OR fm_workorder_status.closed != 1)"
-                       . " GROUP BY fm_workorder.id, paid_percent, 
fm_workorder.start_date ORDER BY start_date ASC";
+                       . " GROUP BY fm_workorder.id, fm_workorder.start_date 
ORDER BY start_date ASC";
                        $this->db->query($sql,__LINE__,__FILE__);
 
 
+                       $orders = array();
                        while ($this->db->next_record())
                        {
-                               $paid_percent = 
(int)$this->db->f('paid_percent');
                                $year = $this->db->f('year');
 
                                if($this->db->f('contract_sum') > 0)
                                {
-                                       $_sum = $this->db->f('contract_sum');
+                                       $_amount = $this->db->f('contract_sum');
                                }
                                else if($this->db->f('calculation') > 0)
                                {
-                                       $_sum = $this->db->f('calculation') * 
$tax;
+                                       $_amount = $this->db->f('calculation') 
* $tax;
                                }
                                else if($this->db->f('budget') > 0)
                                {
-                                       $_sum = $this->db->f('budget');
+                                       $_amount = $this->db->f('budget');
                                }
                                else
                                {
-                                       $_sum = 0;
+                                       $_amount = 0;
                                }
 
-                               $_sum = $_sum * (100 - $paid_percent)/100;
-                               $cost_info[$year]['sum_orders'] += $_sum;
+                               $orders[] = array
+                               (
+                                       'order_id'      => $this->db->f('id'),
+                                       'year'          => $year,
+                                       'amount'        => $_amount
+                               );
                        }
 
+                       foreach ($orders as $order)
+                       {
+                               $cost_info[$year]['sum_orders'] += 
$order['amount'];
+                               $sql = "SELECT godkjentbelop as amount FROM 
fm_ecobilagoverf WHERE pmwrkord_code = '{$order['order_id']}'";
+                               $this->db->query($sql,__LINE__,__FILE__);
+                               while ($this->db->next_record())
+                               {
+                                       $cost_info[$year]['sum_orders'] -= 
$this->db->f('amount');
+                               }
+                       }
+
                        $sort_year = array();
                        $values = array();
 

Modified: trunk/property/inc/class.soworkorder.inc.php
===================================================================
--- trunk/property/inc/class.soworkorder.inc.php        2012-02-17 09:32:10 UTC 
(rev 8910)
+++ trunk/property/inc/class.soworkorder.inc.php        2012-02-17 09:55:16 UTC 
(rev 8911)
@@ -1150,7 +1150,7 @@
                                $this->db->query("UPDATE fm_project set 
charge_tenant = 1 WHERE id =" . $workorder['project_id']);
                        }
  */
-                       $this->update_planned_cost($workorder['project_id']); 
// at project
+//                     $this->update_planned_cost($workorder['project_id']); 
// at project
 
                        $check_pending_action = false;
                        if ((float)$old_billable_hours != 
(float)$workorder['billable_hours'])
@@ -1309,7 +1309,7 @@
                                                        
$this->db->query("SELECT project_id FROM fm_workorder WHERE 
id='{$id}'",__LINE__,__FILE__);
                                                        
$this->db->next_record();
                                                        $project_id = 
$this->db->f('project_id');
-                                                       
$this->update_planned_cost($project_id);
+                               //                      
$this->update_planned_cost($project_id);
                                                        break;
                                        }
                                }

Modified: trunk/property/inc/class.uiinvoice.inc.php
===================================================================
--- trunk/property/inc/class.uiinvoice.inc.php  2012-02-17 09:32:10 UTC (rev 
8910)
+++ trunk/property/inc/class.uiinvoice.inc.php  2012-02-17 09:55:16 UTC (rev 
8911)
@@ -1665,8 +1665,6 @@
                                array(
                                        'col_name'=>'close_order',      
'label'=>lang('Close order'),   'className'=>'centerClasss', 'sortable'=>false, 
'sort_field'=>'',                               'visible'=>true),
                                array(
-                                       'col_name'=>'paid_percent',     
'label'=>lang('paid percent'),  'className'=>'centerClasss', 'sortable'=>false, 
'sort_field'=>'',                               'visible'=>true),
-                               array(
                                        'col_name'=>'change_tenant',    
'label'=>lang('Charge tenant'), 'className'=>'centerClasss', 'sortable'=>false, 
'sort_field'=>'',                               'visible'=>true),
                                array(
                                        'col_name'=>'invoice_id',               
'label'=>lang('Invoice Id'),    'className'=>'centerClasss', 'sortable'=>false, 
'sort_field'=>'',                               'visible'=>true),
@@ -1756,21 +1754,6 @@
                                                }
                                                else if(($i == 3))
                                                {
-                                                       
if($invoices['workorder_id'] == "")
-                                                       {
-                                                               //nothing
-                                                       }
-                                                       else 
if(!array_key_exists($invoices['workorder_id'], $workorders))
-                                                       {
-                                                               
if(!$invoices['paid_percent'])
-                                                               {
-                                                                       
$invoices['paid_percent'] = 100;
-                                                               }
-                                                               
$json_row[$uicols[$i]['col_name']]  .= " <input 
name='values[paid_percent][".$j."]' id='values[paid_percent][".$j."]'  
class='myValuesForPHP'  type='text' size='3' maxlength='3' 
value='".$invoices['paid_percent']."'/>";
-                                                       }
-                                               }
-                                               else if(($i == 4))
-                                               {
                                                        
if($invoices['charge_tenant'] == 1)
                                                        {
                                                                
if($invoices['claim_issued'] == '')
@@ -1790,12 +1773,12 @@
                                                        }
 
                                                }
-                                               else if(($i == 5))
+                                               else if(($i == 4))
                                                {
                                                        
$json_row[$uicols[$i]['col_name']]  .= $invoices['invoice_id'];
                                                }
 
-                                               else if(($i == 6))
+                                               else if(($i == 5))
                                                {
                                                        if($invoices['paid'] == 
true)
                                                        {
@@ -1807,12 +1790,12 @@
                                                        }
                                                }
 
-                                               else if(($i == 7))
+                                               else if(($i == 6))
                                                {
                                                        
$json_row[$uicols[$i]['col_name']]  .= $invoices['amount'];
                                                }
 
-                                               else if(($i == 8))
+                                               else if(($i == 7))
                                                {
 
                                                        if($invoices['paid'] == 
true)
@@ -1827,12 +1810,12 @@
 
                                                }
 
-                                               else if(($i == 9))
+                                               else if(($i == 8))
                                                {
                                                        
$json_row[$uicols[$i]['col_name']]  .= $invoices['currency'];
                                                }
 
-                                               else if(($i == 10))
+                                               else if(($i == 9))
                                                {
                                                        if($invoices['paid'] == 
true)
                                                        {
@@ -1843,7 +1826,7 @@
                                                                
$json_row[$uicols[$i]['col_name']]  .= " <input name='values[dima][".$j."]' 
id='values[dima][".$j."]'  class='myValuesForPHP'  type='text' size='7' 
value='".$invoices['dima']."'/>";
                                                        }
                                                }
-                                               else if(($i == 11))
+                                               else if(($i == 10))
                                                {
                                                        if($invoices['paid'] == 
true)
                                                        {
@@ -1870,7 +1853,7 @@
 
                                                        }
                                                }
-                                               else if(($i == 12))
+                                               else if(($i == 11))
                                                {
                                                        if($invoices['paid'] == 
true)
                                                        {
@@ -1881,7 +1864,7 @@
                                                                
$json_row[$uicols[$i]['col_name']]  .= " <input name='values[dimd][".$j."]' 
id='values[dimd][".$j."]'  class='myValuesForPHP'  type='text' size='4' 
value='".$invoices['dimd']."'/>";
                                                        }
                                                }
-                                               else if(($i == 13))
+                                               else if(($i == 12))
                                                {
                                                        if($invoices['paid'] == 
true)
                                                        {
@@ -1908,7 +1891,7 @@
 
                                                        }
                                                }
-                                               else if(($i == 14))
+                                               else if(($i == 13))
                                                {
                                                        if($invoices['remark'] 
== true)
                                                        {
@@ -1924,7 +1907,7 @@
                                                                
$json_row[$uicols[$i]['col_name']]  .= "<b>-</b>";
                                                        }
                                                }
-                                               else if(($i == 15))
+                                               else if(($i == 14))
                                                {
                                                        
if(isset($invoices['external_ref']) && $invoices['external_ref'])
                                                        {
@@ -1936,15 +1919,15 @@
                                                                
$json_row[$uicols[$i]['col_name']]  .= "<b>-</b>";
                                                        }
                                                }
-                                               else if($i == 16)
+                                               else if($i == 15)
                                                {
                                                        
$json_row[$uicols[$i]['col_name']]  = $invoices['counter'];
                                                }
-                                               else if($i == 17)
+                                               else if($i == 16)
                                                {
                                                        
$json_row[$uicols[$i]['col_name']]  = $invoices['id'];
                                                }
-                                               else if($i == 18)
+                                               else if($i == 17)
                                                {
                                                        
$json_row[$uicols[$i]['col_name']]  = $invoices['external_ref'];
                                                }

Modified: trunk/property/inc/class.uiproject.inc.php
===================================================================
--- trunk/property/inc/class.uiproject.inc.php  2012-02-17 09:32:10 UTC (rev 
8910)
+++ trunk/property/inc/class.uiproject.inc.php  2012-02-17 09:55:16 UTC (rev 
8911)
@@ -1570,7 +1570,7 @@
                        }
                        $values['sum']  = number_format($values['sum'], 0, ',', 
' ');
                        $value_remainder = number_format($value_remainder, 0, 
',', ' ');
-                       $values['planned_cost']  = 
number_format($values['planned_cost'], 0, ',', ' ');
+//                     $values['planned_cost']  = 
number_format($values['planned_cost'], 0, ',', ' ');
 
                        $jscal = CreateObject('phpgwapi.jscalendar');
                        $jscal->add_listener('values_start_date');
@@ -1626,18 +1626,16 @@
                                        'footer'                                
=> 0
                                );
 
-
                        $myColumnDefs[1] = array
                                (
                                        'name'          => "1",
                                        'values'        =>      
json_encode(array(      array('key' => 
'workorder_id','label'=>lang('Workorder'),'sortable'=>true,'resizeable'=>true,'formatter'=>'YAHOO.widget.DataTable.formatLink'),
                                                                                
                                array('key' => 
'title','label'=>lang('title'),'sortable'=>true,'resizeable'=>true),
                                                                                
                                array('key' => 
'b_account_id','label'=>lang('Budget 
account'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterRight'),
-                                                                               
                                array('key' => 
'contract_sum','label'=>lang('contract 
sum'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterRight'),
-                                                                               
                                array('key' => 
'budget','label'=>lang('Budget'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterRight'),
+                                                                               
                                array('key' => 
'budget','label'=>lang('Budget'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterAmount0'),
                                                                                
                                array('key' => 
'calculation','label'=>lang('Calculation'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterRight'),
-                                                                               
                                array('key' => 
'actual_cost','label'=>lang('actual 
cost'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterRight'),
-                                                                               
                                array('key' => 
'paid_percent','label'=>lang('paid 
percent'),'sortable'=>false,'resizeable'=>true,'formatter'=>'FormatterRight'),
+                                                                               
                                array('key' => 
'contract_sum','label'=>lang('contract 
sum'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterRight'),
+                                                                               
                                array('key' => 
'actual_cost','label'=>lang('actual 
cost'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterAmount2'),
                                                                                
                //              array('key' => 
'charge_tenant','label'=>lang('charge 
tenant'),'sortable'=>true,'resizeable'=>true),
                                                                                
                                array('key' => 
'vendor_name','label'=>lang('Vendor'),'sortable'=>true,'resizeable'=>true),
                                                                                
                                array('key' => 
'status','label'=>lang('Status'),'sortable'=>true,'resizeable'=>true)))
@@ -1669,7 +1667,6 @@
                                        'amount'                                
=> $entry['amount'],
                                        'approved_amount'               => 
$entry['approved_amount'],
                                        'vendor'                                
=> $entry['vendor'],
-                                       'paid_percent'                  => 
$entry['paid_percent'],
                                        'project_group'                 => 
$entry['project_id'],
                                        'currency'                              
=> $entry['currency'],
                                        'budget_responsible'    => 
$entry['budget_responsible'],
@@ -1828,8 +1825,8 @@
                                        'lang_reserve_remainder'                
        => lang('reserve remainder'),
                                        'value_reserve_remainder'               
        => isset($reserve_remainder)?$reserve_remainder:'',
                                        'value_reserve_remainder_percent'       
=> isset($remainder_percent)?$remainder_percent:'',
-                                       'lang_planned_cost'                     
                => lang('planned cost'),
-                                       'value_planned_cost'                    
        => $values['planned_cost'],
+//                                     'lang_planned_cost'                     
                => lang('planned cost'),
+//                                     'value_planned_cost'                    
        => $values['planned_cost'],
                                        'location_data'                         
                => $location_data,
                                        'location_type'                         
                => 'form',
                                        'form_action'                           
                => $GLOBALS['phpgw']->link('/index.php',$link_data),
@@ -2259,7 +2256,6 @@
                                        'amount'                                
=> $entry['amount'],
                                        'approved_amount'               => 
$entry['approved_amount'],
                                        'vendor'                                
=> $entry['vendor'],
-                                       'paid_percent'                  => 
$entry['paid_percent'],
                                        'project_group'                 => 
$entry['project_id'],
                                        'currency'                              
=> $entry['currency'],
                                        'budget_responsible'    => 
$entry['budget_responsible'],
@@ -2323,7 +2319,7 @@
                                'value_sum'                                     
                => isset($values['sum'])?$values['sum']:'',
                                'value_reserve_remainder'                       
=> isset($reserve_remainder)?$reserve_remainder:'',
                                'value_reserve_remainder_percent'       => 
isset($remainder_percent)?$remainder_percent:'',
-                               'value_planned_cost'                            
=> $values['planned_cost'],
+//                             'value_planned_cost'                            
=> $values['planned_cost'],
                                'form_action'                                   
        => $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'done_action'                                   
        => $GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiproject.index')),
                                'project_group_data'                            
=> $project_group_data,

Modified: trunk/property/inc/class.uiworkorder.inc.php
===================================================================
--- trunk/property/inc/class.uiworkorder.inc.php        2012-02-17 09:32:10 UTC 
(rev 8910)
+++ trunk/property/inc/class.uiworkorder.inc.php        2012-02-17 09:55:16 UTC 
(rev 8911)
@@ -1537,7 +1537,7 @@
                                        'amount'                                
=> $entry['amount'],
                                        'approved_amount'               => 
$entry['approved_amount'],
                                        'vendor'                                
=> $entry['vendor'],
-                                       'paid_percent'                  => 
$entry['paid_percent'],
+               //                      'paid_percent'                  => 
$entry['paid_percent'],
                                        'project_group'                 => 
$entry['project_id'],
                                        'currency'                              
=> $entry['currency'],
                                        'budget_responsible'    => 
$entry['budget_responsible'],

Modified: trunk/property/js/yahoo/project.edit.js
===================================================================
--- trunk/property/js/yahoo/project.edit.js     2012-02-17 09:32:10 UTC (rev 
8910)
+++ trunk/property/js/yahoo/project.edit.js     2012-02-17 09:55:16 UTC (rev 
8911)
@@ -102,8 +102,8 @@
                //call getTotalSum(name of column) in property.js
                tmp_sum1 = getTotalSum('budget',0,paginator,datatable);
                tmp_sum2 = getTotalSum('calculation',2,paginator,datatable);
-               tmp_sum3 = getTotalSum('actual_cost',2,paginator,datatable);
-               tmp_sum4 = getTotalSum('contract_sum',2,paginator,datatable);
+               tmp_sum3 = getTotalSum('contract_sum',2,paginator,datatable);
+               tmp_sum4 = getTotalSum('actual_cost',2,paginator,datatable);
 
                if(typeof(tableYUI1)=='undefined')
                {
@@ -120,10 +120,10 @@
 
                td_sum('Sum');
                td_empty(2);
-               td_sum(tmp_sum4);
                td_sum(tmp_sum1);
                td_sum(tmp_sum2);
                td_sum(tmp_sum3);
+               td_sum(tmp_sum4);
                td_empty(5);
 
                myfoot = tableYUI1.createTFoot();

Modified: trunk/property/templates/base/project.xsl
===================================================================
--- trunk/property/templates/base/project.xsl   2012-02-17 09:32:10 UTC (rev 
8910)
+++ trunk/property/templates/base/project.xsl   2012-02-17 09:55:16 UTC (rev 
8911)
@@ -426,6 +426,7 @@
                                                                        
<xsl:text> % )</xsl:text>
                                                                </td>
                                                        </tr>
+<!--
                                                        <tr>
                                                                <td 
valign="top">
                                                                        
<xsl:value-of select="lang_planned_cost"/>
@@ -434,6 +435,7 @@
                                                                        
<xsl:value-of select="value_planned_cost"/><xsl:text> </xsl:text> [ 
<xsl:value-of select="currency"/> ]
                                                                </td>
                                                        </tr>
+-->
                                                        <tr>
                                                                <td 
class="th_text" valign="top">
                                                                        
<xsl:value-of select="lang_workorder_id"/>




reply via email to

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