fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7069] property: invoice info at project/order


From: Sigurd Nes
Subject: [Fmsystem-commits] [7069] property: invoice info at project/order
Date: Fri, 04 Mar 2011 13:24:13 +0000

Revision: 7069
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7069
Author:   sigurdne
Date:     2011-03-04 13:24:12 +0000 (Fri, 04 Mar 2011)
Log Message:
-----------
property: invoice info at project/order

Modified Paths:
--------------
    trunk/property/inc/class.soinvoice.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/js/yahoo/workorder.edit.js
    trunk/property/setup/phpgw_no.lang
    trunk/property/templates/base/project.xsl
    trunk/property/templates/base/workorder.xsl

Modified: trunk/property/inc/class.soinvoice.inc.php
===================================================================
--- trunk/property/inc/class.soinvoice.inc.php  2011-03-03 13:23:38 UTC (rev 
7068)
+++ trunk/property/inc/class.soinvoice.inc.php  2011-03-04 13:24:12 UTC (rev 
7069)
@@ -140,20 +140,7 @@
                                $filtermethod .= " $where  dima $this->like 
'%$loc1%' ";
                                $where= 'AND';
                        }
-                       if ($workorder_id)
-                       {
-                               $filtermethod .= " $where  pmwrkord_code 
='$workorder_id' ";
-                               $where= 'AND';
-                       }
 
-
-                       if ($voucher_id)
-                       {
-                               $filtermethod .= " $where  bilagsnr = " . 
(int)$voucher_id;
-                               $where= 'AND';
-                       }
-
-
                        if ($paid)
                        {
                                $table = 'fm_ecobilagoverf';
@@ -165,12 +152,13 @@
                                        $join_tables .= " $this->join 
fm_b_account ON fm_ecobilagoverf.spbudact_code = fm_b_account.id";
                                }
 
-                               if (!$workorder_id && !$voucher_id  && 
$start_date)
+                               if (!$workorder_id && !$voucher_id)
                                {
                                        $start_periode = date('Ym',$start_date);
                                        $end_periode = date('Ym',$end_date);
 
                                        $filtermethod .= " $where (periode 
>='$start_periode' AND periode <= '$end_periode')";
+                                       $where= 'AND';
                                }
                        }
                        else
@@ -178,8 +166,21 @@
                                $table ='fm_ecobilag';
                        }
 
-                       if($query)
+                       $no_q = false;
+                       if ($voucher_id)
                        {
+                               $filtermethod = " WHERE bilagsnr = " . 
(int)$voucher_id;
+                               $no_q = true;
+                       }
+
+                       if ($workorder_id)
+                       {
+                               $filtermethod = " WHERE pmwrkord_code 
='$workorder_id' ";
+                               $no_q = true;
+                       }
+
+                       if($query && !$no_q)
+                       {
                                $query = (int) $query;
                                $querymethod = " $where ( spvend_code = 
{$query} OR bilagsnr = {$query})";
                        }
@@ -329,15 +330,14 @@
 
                function read_invoice_sub($data)
                {
-                       if(is_array($data))
-                       {
-                               $start          = isset($data['start']) && 
$data['start'] ? (int)$data['start'] : 0;
-                               $filter         = isset($data['filter']) ? 
$data['filter'] : 'none';
-                               $sort           = isset($data['sort']) ? 
$data['sort'] : 'DESC';
-                               $order          = isset($data['order']) ? 
$data['order'] : '';
-                               $voucher_id     = isset($data['voucher_id']) && 
$data['voucher_id'] ? (int)$data['voucher_id'] : 0;
-                               $paid           = isset($data['paid']) ? 
$data['paid'] : '';
-                       }
+                       $start          = isset($data['start']) && 
$data['start'] ? (int)$data['start'] : 0;
+                       $filter         = isset($data['filter']) ? 
$data['filter'] : 'none';
+                       $sort           = isset($data['sort']) ? $data['sort'] 
: 'DESC';
+                       $order          = isset($data['order']) ? 
$data['order'] : '';
+                       $voucher_id     = isset($data['voucher_id']) && 
$data['voucher_id'] ? (int)$data['voucher_id'] : 0;
+                       $paid           = isset($data['paid']) ? $data['paid'] 
: '';
+                       $project_id     = isset($data['project_id']) && 
$data['project_id'] ? (int)$data['project_id'] : 0;
+                       $order_id       = isset($data['order_id']) && 
$data['order_id'] ? $data['order_id'] : 0 ;//might be bigint
 
                        if ($paid)
                        {
@@ -358,15 +358,31 @@
                                $ordermethod = ' order by id DESC';
                        }
 
+                       $filtermethod = '';
+                       $where = 'WHERE';
+
                        if ($voucher_id)
                        {
-                               $filtermethod = " WHERE ( bilagsnr= 
'$voucher_id')";
+                               $filtermethod .= " {$where} bilagsnr= 
'$voucher_id'";
+                               $where = 'AND';
                        }
 
+                       if ($order_id)
+                       {
+                               $filtermethod .= " {$where} pmwrkord_code= 
'{$order_id}'";
+                               $where = 'AND';
+                       }
+
+                       if ($project_id)
+                       {
+                               $filtermethod .= " {$where} fm_project.id = 
'{$project_id}'";
+                               $where = 'AND';
+                       }
+
                        $sql = "SELECT 
$table.*,fm_workorder.status,fm_workorder.charge_tenant,org_name,"
                                . "fm_workorder.claim_issued, 
fm_workorder.paid_percent 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->left_join fm_project ON 
fm_workorder.project_id = fm_project.id"
                                . " $this->join fm_vendor ON $table.spvend_code 
= fm_vendor.id $filtermethod";
 
                        $this->db->query($sql . $ordermethod,__LINE__,__FILE__);
@@ -386,7 +402,7 @@
                                                'workorder_id'                  
=> $this->db->f('pmwrkord_code'),
                                                'status'                        
        => $this->db->f('status'),
                                                'closed'                        
        => $this->db->f('status') == $closed,
-                                               'voucher_id'                    
=> $voucher_id,
+                                               'voucher_id'                    
=> $this->db->f('bilagsnr'),
                                                'id'                            
        => $this->db->f('id'),
                                                'invoice_id'                    
=> $this->db->f('fakturanr'),
                                                'budget_account'                
=> $this->db->f('spbudact_code'),
@@ -401,7 +417,10 @@
                                                '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')
+                                               'currency'                      
        => $this->db->f('currency'),
+                                               'budget_responsible'    => 
$this->db->f('budsjettansvarligid'),
+                                               'budsjettsigndato'              
=> $this->db->f('budsjettsigndato'),
+                                               'transfer_time'                 
=> $this->db->f('overftid'),
                                        );
 
                                $i++;
@@ -420,12 +439,12 @@
                                $query                  = 
isset($data['query'])?$data['query']:'';
                                $sort                   = 
isset($data['sort'])?$data['sort']:'DESC';
                                $order                  = 
isset($data['order'])?$data['order']:'';
-                               $cat_id                 = 
isset($data['cat_id']) && $data['cat_id'] ? $data['cat_id']:0;
+                               $cat_id                 = 
isset($data['cat_id']) && $data['cat_id'] ? (int)$data['cat_id']:0;
                                $start_date     = isset($data['start_date']) && 
$data['start_date'] ? $data['start_date'] : 0;
                                $end_date               = 
isset($data['end_date']) && $data['end_date'] ? $data['end_date'] : time();
-                               $vendor_id              = 
isset($data['vendor_id'])?$data['vendor_id']:'';
+                               $vendor_id              = 
isset($data['vendor_id'])?(int)$data['vendor_id']:0;
                                $loc1                   = 
isset($data['loc1'])?$data['loc1']:'';
-                               $district_id    = 
isset($data['district_id'])?$data['district_id']:'';
+                               $district_id    = 
isset($data['district_id'])?(int)$data['district_id']:0;
                                $workorder_id   = isset($data['workorder_id']) 
&& $data['workorder_id'] ? $data['workorder_id']:0;
                                $b_account_class = 
isset($data['b_account_class'])?$data['b_account_class']:'';
                                $b_account              = 
isset($data['b_account']) ? $data['b_account'] : '';
@@ -475,7 +494,7 @@
 
                        if ($workorder_id)
                        {
-                               $filtermethod.= " $where pmwrkord_code = 
$workorder_id";
+                               $filtermethod.= " $where pmwrkord_code = 
'{$workorder_id}'";
                                $where= 'AND';
                        }
 

Modified: trunk/property/inc/class.uiinvoice.inc.php
===================================================================
--- trunk/property/inc/class.uiinvoice.inc.php  2011-03-03 13:23:38 UTC (rev 
7068)
+++ trunk/property/inc/class.uiinvoice.inc.php  2011-03-04 13:24:12 UTC (rev 
7069)
@@ -232,7 +232,7 @@
                        if( phpgw::get_var('phpgw_return_as') == 'json' && 
is_array($values) && isset($values))
                        {
                                $values["save"]="Save";
-                               //                              
_debug_array($values);
+//                             _debug_array($values);
                                $receipt = $this->bo->update_invoice($values);
 
                        }
@@ -279,6 +279,7 @@
                                        ."paid:'{$paid}',"
                                        ."vendor_id:'{$vendor_id}',"
                                        ."workorder_id:'{$workorder_id}',"
+                                       ."voucher_id:'{$voucher_id}',"
                                        ."start_date:'{$start_date}',"
                                        ."end_date:'{$end_date}',"
                                        ."filter:'{$this->filter}',"

Modified: trunk/property/inc/class.uiproject.inc.php
===================================================================
--- trunk/property/inc/class.uiproject.inc.php  2011-03-03 13:23:38 UTC (rev 
7068)
+++ trunk/property/inc/class.uiproject.inc.php  2011-03-04 13:24:12 UTC (rev 
7069)
@@ -1583,6 +1583,65 @@
                                                                                
                                array('key' => 
'value_new_value','label'=>lang('new 
value'),'sortable'=>true,'resizeable'=>true)))
                                );
 
+               
+               
+                       $invoices = array();
+                       if ($id)
+                       {
+                               $active_invoices = 
execMethod('property.soinvoice.read_invoice_sub', array('project_id' => $id));
+                               $historical_invoices = 
execMethod('property.soinvoice.read_invoice_sub', array('project_id' => $id, 
'paid' => true));
+                               $invoices = 
array_merge($active_invoices,$historical_invoices);
+                       }
+
+                       $content_invoice = array();
+                       foreach($invoices as $entry)
+                       {
+                               $content_invoice[] = array
+                               (
+                                       'voucher_id'                    => 
$entry['transfer_time'] ? -1*$entry['voucher_id'] : $entry['voucher_id'],
+                                       'workorder_id'                  => 
$entry['workorder_id'],
+                                       'status'                                
=> $entry['status'],
+                                       'invoice_id'                    => 
$entry['invoice_id'],                                        
+                                       'budget_account'                => 
$entry['budget_account'],
+                                       'dima'                                  
=> $entry['dima'],
+                                       'dimb'                                  
=> $entry['dimb'],
+                                       'dimd'                                  
=> $entry['dimd'],
+                                       'amount'                                
=> $entry['amount'],
+                                       'vendor'                                
=> $entry['vendor'],
+                                       'paid_percent'                  => 
$entry['paid_percent'],
+                                       'project_group'                 => 
$entry['project_id'],
+                                       'currency'                              
=> $entry['currency'],
+                                       'budget_responsible'    => 
$entry['budget_responsible'],
+                                       'budsjettsigndato'              => 
$entry['budsjettsigndato'] ? 
$GLOBALS['phpgw']->common->show_date(strtotime($entry['budsjettsigndato']),$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'])
 : '',
+                                       'transfer_time'                 => 
$entry['transfer_time'] ? 
$GLOBALS['phpgw']->common->show_date(strtotime($entry['transfer_time']),$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'])
 : '',
+                               );      
+                       }
+
+                       $datavalues[2] = array
+                               (
+                                       'name'                                  
=> "2",
+                                       'values'                                
=> json_encode($content_invoice),
+                                       'total_records'                 => 
count($content_invoice),
+                                       'edit_action'                   => 
json_encode($GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiinvoice.index'))),
+                                       'is_paginator'                  => 1,
+                                       'footer'                                
=> 0
+                               );
+
+
+                       $myColumnDefs[2] = array
+                               (
+                                       'name'          => "2",
+                                       'values'        =>      
json_encode(array(      array('key' => 
'workorder_id','label'=>lang('Workorder'),'sortable'=>true,'resizeable'=>true),
+                                                                               
                                array('key' => 
'voucher_id','label'=>lang('bilagsnr'),'sortable'=>false,'resizeable'=>true,'formatter'=>'YAHOO.widget.DataTable.formatLink_voucher'),
+                                                                               
                                array('key' => 
'invoice_id','label'=>lang('invoice 
number'),'sortable'=>false,'resizeable'=>true),
+                                                                               
                                array('key' => 
'vendor','label'=>lang('vendor'),'sortable'=>false,'resizeable'=>true),
+                                                                               
                                array('key' => 
'amount','label'=>lang('amount'),'sortable'=>false,'resizeable'=>true),
+                                                                               
                                array('key' => 
'budget_responsible','label'=>lang('budget 
responsible'),'sortable'=>false,'resizeable'=>true),
+                                                                               
                                array('key' => 
'budsjettsigndato','label'=>lang('budsjettsigndato'),'sortable'=>false,'resizeable'=>true),
+                                                                               
                                array('key' => 
'transfer_time','label'=>lang('transfer 
time'),'sortable'=>false,'resizeable'=>true),
+                                                                               
                                ))
+                               );
+
                        
//----------------------------------------------datatable settings--------
 
 

Modified: trunk/property/inc/class.uiworkorder.inc.php
===================================================================
--- trunk/property/inc/class.uiworkorder.inc.php        2011-03-03 13:23:38 UTC 
(rev 7068)
+++ trunk/property/inc/class.uiworkorder.inc.php        2011-03-04 13:24:12 UTC 
(rev 7069)
@@ -1435,11 +1435,68 @@
                        $myColumnDefs[1] = array
                                (
                                        'name'          => "1",
-                                       'values'        =>      
json_encode(array(      array(key => 
file_name,label=>lang('Filename'),sortable=>false,resizeable=>true),
-                                       array(key => 
delete_file,label=>lang('Delete file'),sortable=>false,resizeable=>true)))
+                                       'values'        =>      
json_encode(array(      array('key' => 
'file_name','label'=>lang('Filename'),'sortable'=>false,'resizeable'=>true),
+                                       array('key' => 
'delete_file','label'=>lang('Delete 
file'),'sortable'=>false,'resizeable'=>true)))
                                );
 
+                       $invoices = array();
+                       if ($id)
+                       {
+                               $active_invoices = 
execMethod('property.soinvoice.read_invoice_sub', array('order_id' => $id));
+                               $historical_invoices = 
execMethod('property.soinvoice.read_invoice_sub', array('order_id' => $id, 
'paid' => true));
+                               $invoices = 
array_merge($active_invoices,$historical_invoices);
+                       }
 
+                       $content_invoice = array();
+                       foreach($invoices as $entry)
+                       {
+                               $content_invoice[] = array
+                               (
+                                       'voucher_id'                    => 
$entry['transfer_time'] ? -1*$entry['voucher_id'] : $entry['voucher_id'],
+                                       'status'                                
=> $entry['status'],
+                                       'invoice_id'                    => 
$entry['invoice_id'],                                        
+                                       'budget_account'                => 
$entry['budget_account'],
+                                       'dima'                                  
=> $entry['dima'],
+                                       'dimb'                                  
=> $entry['dimb'],
+                                       'dimd'                                  
=> $entry['dimd'],
+                                       'amount'                                
=> $entry['amount'],
+                                       'vendor'                                
=> $entry['vendor'],
+                                       'paid_percent'                  => 
$entry['paid_percent'],
+                                       'project_group'                 => 
$entry['project_id'],
+                                       'currency'                              
=> $entry['currency'],
+                                       'budget_responsible'    => 
$entry['budget_responsible'],
+                                       'budsjettsigndato'              => 
$entry['budsjettsigndato'] ? 
$GLOBALS['phpgw']->common->show_date(strtotime($entry['budsjettsigndato']),$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'])
 : '',
+                                       'transfer_time'                 => 
$entry['transfer_time'] ? 
$GLOBALS['phpgw']->common->show_date(strtotime($entry['transfer_time']),$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'])
 : '',
+                               );      
+                       }
+
+                       $datavalues[2] = array
+                               (
+                                       'name'                                  
=> "2",
+                                       'values'                                
=> json_encode($content_invoice),
+                                       'total_records'                 => 
count($content_invoice),
+                                       'edit_action'                   => 
json_encode($GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiinvoice.index'))),
+                                       'is_paginator'                  => 1,
+                                       'footer'                                
=> 0
+                               );
+
+
+                       $myColumnDefs[2] = array
+                               (
+                                       'name'          => "2",
+                                       'values'        =>      
json_encode(array(      array('key' => 
'voucher_id','label'=>lang('bilagsnr'),'sortable'=>false,'resizeable'=>true,'formatter'=>'YAHOO.widget.DataTable.formatLink'),
+                                                                               
                                array('key' => 
'invoice_id','label'=>lang('invoice 
number'),'sortable'=>false,'resizeable'=>true),
+                                                                               
                                array('key' => 
'vendor','label'=>lang('vendor'),'sortable'=>false,'resizeable'=>true),
+                                                                               
                                array('key' => 
'amount','label'=>lang('amount'),'sortable'=>false,'resizeable'=>true),
+                                                                               
                                array('key' => 
'budget_responsible','label'=>lang('budget 
responsible'),'sortable'=>false,'resizeable'=>true),
+                                                                               
                                array('key' => 
'budsjettsigndato','label'=>lang('budsjettsigndato'),'sortable'=>false,'resizeable'=>true),
+                                                                               
                                array('key' => 
'transfer_time','label'=>lang('transfer 
time'),'sortable'=>false,'resizeable'=>true),
+                                                                               
                                ))
+                               );
+
+
+
+
                        $link_claim = '';
                        
if(isset($values['charge_tenant'])?$values['charge_tenant']:'')
                        {

Modified: trunk/property/js/yahoo/project.edit.js
===================================================================
--- trunk/property/js/yahoo/project.edit.js     2011-03-03 13:23:38 UTC (rev 
7068)
+++ trunk/property/js/yahoo/project.edit.js     2011-03-04 13:24:12 UTC (rev 
7069)
@@ -1,11 +1,28 @@
 var  myPaginator_0, myDataTable_0
 var  myPaginator_1, myDataTable_1;
+var  myPaginator_2, myDataTable_2;
 
 
/********************************************************************************/
        YAHOO.widget.DataTable.formatLink = function(elCell, oRecord, oColumn, 
oData)
        {
                elCell.innerHTML = "<a 
href="+datatable[0][0]["edit_action"]+"&id="+oData+">" + oData + "</a>";
        };
+
+
+       YAHOO.widget.DataTable.formatLink_voucher = function(elCell, oRecord, 
oColumn, oData)
+       {
+               if(oData > 0)
+               {
+                       elCell.innerHTML = "<a 
href="+datatable[2][0]["edit_action"]+"&query="+oData+"&voucher_id="+oData+"&user_lid=all>"
 + oData + "</a>";
+               }
+               else
+               {
+                       oData = -1*oData;
+                       elCell.innerHTML = "<a 
href="+datatable[2][0]["edit_action"]+"&voucher_id="+oData+"&user_lid=all&paid=true>"
 + oData + "</a>";          
+               }
+       };
+
+
 
/********************************************************************************/
     
        var FormatterRight = function(elCell, oRecord, oColumn, oData)
        {

Modified: trunk/property/js/yahoo/workorder.edit.js
===================================================================
--- trunk/property/js/yahoo/workorder.edit.js   2011-03-03 13:23:38 UTC (rev 
7068)
+++ trunk/property/js/yahoo/workorder.edit.js   2011-03-04 13:24:12 UTC (rev 
7069)
@@ -1,8 +1,60 @@
 var  myPaginator_0, myDataTable_0
 var  myPaginator_1, myDataTable_1;
+var  myPaginator_2, myDataTable_2;
 
+       YAHOO.widget.DataTable.formatLink = function(elCell, oRecord, oColumn, 
oData)
+       {
+               if(oData > 0)
+               {
+                       elCell.innerHTML = "<a 
href="+datatable[2][0]["edit_action"]+"&query="+oData+"&voucher_id="+oData+"&user_lid=all>"
 + oData + "</a>";
+               }
+               else
+               {
+                       oData = -1*oData;
+                       elCell.innerHTML = "<a 
href="+datatable[2][0]["edit_action"]+"&voucher_id="+oData+"&user_lid=all&paid=true>"
 + oData + "</a>";          
+               }
+       };
+
 
/********************************************************************************/
 
+       this.myParticularRenderEvent = function()
+       {
+               this.addFooterDatatable(myPaginator_2,myDataTable_2);
+       }
+
+/********************************************************************************/
+       this.addFooterDatatable = function(paginator,datatable)
+       {
+               //call getSumPerPage(name of column) in property.js
+               tmp_sum1 = getSumPerPage('amount',2,paginator,datatable);
+
+               if(typeof(tableYUI)=='undefined')
+               {
+                       tableYUI = 
YAHOO.util.Dom.getElementsByClassName("yui-dt-data","tbody")[0].parentNode;
+                       tableYUI.setAttribute("id","tableYUI");
+               }
+               else
+               {
+                       tableYUI.deleteTFoot();
+               }
+
+               //Create ROW
+               newTR = document.createElement('tr');
+
+               td_sum('Sum');
+               td_empty(2);
+               td_sum(tmp_sum1);
+               td_empty(3);
+
+               myfoot = tableYUI.createTFoot();
+               myfoot.setAttribute("id","myfoot");
+               myfoot.appendChild(newTR);
+       }
+
+ 
/********************************************************************************/
+
+
+
 YAHOO.util.Event.addListener(window, "load", function()
 {
        loader = new YAHOO.util.YUILoader();

Modified: trunk/property/setup/phpgw_no.lang
===================================================================
--- trunk/property/setup/phpgw_no.lang  2011-03-03 13:23:38 UTC (rev 7068)
+++ trunk/property/setup/phpgw_no.lang  2011-03-04 13:24:12 UTC (rev 7069)
@@ -233,6 +233,7 @@
 budget cost    property        no      Budsjett-beløp
 budget_cost    property        no      Budsjett-beløp
 budget responsible     property        no      Anviser
+budsjettsigndato       property        no      Anvist dato
 building       property        no      Bygning
 building common        property        no      Bygnings felles
 building has been edited       property        no      Bygning er endret
@@ -1702,6 +1703,7 @@
 total sum      property        no      Total sum
 tracking helpdesk      property        no      Sporing helpdesk hovedliste
 transfer       property        no      Overfør
+transfer time  property        no      Overført
 true   property        no      True
 tts    property        no      melding
 type   property        no      type

Modified: trunk/property/templates/base/project.xsl
===================================================================
--- trunk/property/templates/base/project.xsl   2011-03-03 13:23:38 UTC (rev 
7068)
+++ trunk/property/templates/base/project.xsl   2011-03-04 13:24:12 UTC (rev 
7069)
@@ -109,7 +109,7 @@
 
 <!-- add / edit -->
 
-       <xsl:template match="edit">
+       <xsl:template match="edit" xmlns:php="http://php.net/xsl";>
                <script type="text/javascript">
                        self.name="first_Window";
                        <xsl:value-of select="lookup_functions"/>
@@ -540,27 +540,31 @@
                                                <!-- DataTable -->
                                                <div id="paging_0"> </div>
                                                <div 
id="datatable-container_0"></div>
-
-                                               <!-- table width="100%" 
cellpadding="2" cellspacing="2" align="center">
-                                               <xsl:apply-templates 
select="table_header_workorder_budget"/>
-                                               <xsl:apply-templates 
select="workorder_budget"/>
-                                               <tr class="th">
-                                                       <td class="th_text" 
width="5%" align="right">
-                                                               <xsl:value-of 
select="lang_sum"/>
-                                                       </td>
-                                                       <td class="th_text" 
width="5%" align="right">
-                                                               <xsl:value-of 
select="sum_workorder_budget"/>
-                                                       </td>
-                                                       <td class="th_text" 
width="5%" align="right">
-                                                               <xsl:value-of 
select="sum_workorder_calculation"/>
-                                                       </td>
-                                                       <td>
-                                                       </td>
-                                                       <td>
-                                                       </td>
-                                               </tr>
-                                       </table> -->
-
+                                       </td>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </tr>
+                       <tr>
+                               <td valign = "top" class="th_text">
+                                       <xsl:value-of 
select="php:function('lang', 'invoice')" />
+                               </td>
+                               <td >
+                                       <div id="paging_2"> </div>
+                                       <div id="datatable-container_2"></div>
+                               </td>
+                       </tr>
+<!--
+       <tr>
+               <td valign="top">
+                       <xsl:value-of select="php:function('lang', 'actual 
cost')" />
+               </td>
+               <td>
+                       <xsl:value-of select="sum_workorder_actual_cost"/>
+                       <xsl:text> </xsl:text> [ <xsl:value-of 
select="currency"/> ]
+               </td>
+       </tr>
+-->
+</table>
                                        <!--  DATATABLE DEFINITIONS-->
                                        <script type="text/javascript">
                                                var property_js = <xsl:value-of 
select="property_js" />;
@@ -584,20 +588,6 @@
                                                </xsl:for-each>
                                        </script>
 
-                               </td>
-                       </xsl:otherwise>
-               </xsl:choose>
-       </tr>
-       <tr>
-               <td valign="top">
-                       <xsl:value-of select="lang_actual_cost"/>
-               </td>
-               <td>
-                       <xsl:value-of select="sum_workorder_actual_cost"/>
-                       <xsl:text> </xsl:text> [ <xsl:value-of 
select="currency"/> ]
-               </td>
-       </tr>
-</table>
 </div>
 
 <xsl:choose>

Modified: trunk/property/templates/base/workorder.xsl
===================================================================
--- trunk/property/templates/base/workorder.xsl 2011-03-03 13:23:38 UTC (rev 
7068)
+++ trunk/property/templates/base/workorder.xsl 2011-03-04 13:24:12 UTC (rev 
7069)
@@ -528,10 +528,8 @@
                                                                        <input 
type="hidden" name="values[origin_id]" value="{value_origin_id}"></input>
 
                                                                        <input 
type="text" name="values[title]" value="{value_title}" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
+                                                                               
<xsl:attribute name="title">
                                                                                
        <xsl:value-of select="lang_title_statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
                                                                                
</xsl:attribute>
                                                                        </input>
                                                                </td>
@@ -542,10 +540,8 @@
                                                                </td>
                                                                <td>
                                                                        
<textarea cols="60" rows="6" name="values[descr]" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
+                                                                               
<xsl:attribute name="title">
                                                                                
        <xsl:value-of select="lang_descr_statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
                                                                                
</xsl:attribute>
                                                                                
<xsl:value-of select="value_descr"/>
                                                                        
</textarea>
@@ -567,10 +563,8 @@
                                                                                
</td>
                                                                                
<td>
                                                                                
        <input type="checkbox" name="values[confirm_status]" value="True"  
onMouseout="window.status='';return true;">
-                                                                               
                <xsl:attribute name="onMouseover">
-                                                                               
                        <xsl:text>window.status='</xsl:text>
+                                                                               
                <xsl:attribute name="title">
                                                                                
                        <xsl:value-of select="lang_confirm_statustext"/>
-                                                                               
                        <xsl:text>'; return true;</xsl:text>
                                                                                
                </xsl:attribute>
                                                                                
        </input>
                                                                                
</td>
@@ -615,10 +609,8 @@
                                                                </td>
                                                                <td>
                                                                        
<textarea cols="60" rows="6" name="values[remark]" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
+                                                                               
<xsl:attribute name="title">
                                                                                
        <xsl:value-of select="lang_remark_statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
                                                                                
</xsl:attribute>
                                                                                
<xsl:value-of select="value_remark"/>
                                                                        
</textarea>
@@ -637,10 +629,8 @@
                                                                </td>
                                                                <td>
                                                                        <input 
type="text" id="values_start_date" name="values[start_date]" size="10" 
value="{value_start_date}" readonly="readonly" 
onMouseout="window.status='';return true;" >
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
+                                                                               
<xsl:attribute name="title">
                                                                                
        <xsl:value-of select="lang_start_date_statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
                                                                                
</xsl:attribute>
                                                                        </input>
 
@@ -653,10 +643,8 @@
                                                                </td>
                                                                <td>
                                                                        <input 
type="text" id="values_end_date" name="values[end_date]" size="10" 
value="{value_end_date}" readonly="readonly" 
onMouseout="window.status='';return true;" >
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
+                                                                               
<xsl:attribute name="title">
                                                                                
        <xsl:value-of select="lang_end_date_statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
                                                                                
</xsl:attribute>
                                                                        </input>
                                                                        <img 
id="values_end_date-trigger" src="{img_cal}" alt="{lang_datetitle}" 
title="{lang_datetitle}" style="cursor:pointer; cursor:hand;" />
@@ -719,10 +707,8 @@
                                </td>
                                <td>
                                        <input type="text" 
name="values[budget]" value="{value_budget}" 
onMouseout="window.status='';return true;">
-                                               <xsl:attribute 
name="onMouseover">
-                                                       
<xsl:text>window.status='</xsl:text>
+                                               <xsl:attribute name="title">
                                                        <xsl:value-of 
select="lang_budget_statustext"/>
-                                                       <xsl:text>'; return 
true;</xsl:text>
                                                </xsl:attribute>
                                        </input>
                                        <xsl:text> </xsl:text> [ <xsl:value-of 
select="currency"/> ]
@@ -734,10 +720,8 @@
                                </td>
                                <td>
                                        <input type="text" 
name="values[addition_rs]" value="{value_addition_rs}" 
onMouseout="window.status='';return true;">
-                                               <xsl:attribute 
name="onMouseover">
-                                                       
<xsl:text>window.status='</xsl:text>
+                                               <xsl:attribute name="title">
                                                        <xsl:value-of 
select="lang_addition_rs_statustext"/>
-                                                       <xsl:text>'; return 
true;</xsl:text>
                                                </xsl:attribute>
                                        </input>
                                        <xsl:text> </xsl:text> [ <xsl:value-of 
select="currency"/> ]
@@ -749,10 +733,8 @@
                                </td>
                                <td>
                                        <input type="text" 
name="values[addition_percentage]" value="{value_addition_percentage}" 
onMouseout="window.status='';return true;">
-                                               <xsl:attribute 
name="onMouseover">
-                                                       
<xsl:text>window.status='</xsl:text>
+                                               <xsl:attribute name="title">
                                                        <xsl:value-of 
select="lang_addition_percentage_statustext"/>
-                                                       <xsl:text>'; return 
true;</xsl:text>
                                                </xsl:attribute>
                                        </input>
                                        <xsl:text> </xsl:text> [ % ]
@@ -823,7 +805,14 @@
                                        </input>
                                </td>
                        </tr>
+                       <tr>
+                               <td colspan='2'>
+                                       <div id="paging_2"> </div>
+                                       <div id="datatable-container_2"></div>
+                               </td>
+                       </tr>
                </table>
+
        </div>
 
        <xsl:choose>
@@ -897,29 +886,6 @@
        </div>
        <div id="history">
 
-               <!--  
-               <hr noshade="noshade" width="100%" align="center" size="1"/>
-               <table cellpadding="2" cellspacing="2" width="80%" 
align="center">
-                       <xsl:choose>
-                               <xsl:when test="record_history=''">
-                                       <tr>
-                                               <td class="th_text" 
align="center">
-                                                       <xsl:value-of 
select="lang_no_history"/>
-                                               </td>
-                                       </tr>
-                               </xsl:when>
-                               <xsl:otherwise>
-                                       <tr>
-                                               <td class="th_text" 
align="left">
-                                                       <xsl:value-of 
select="lang_history"/>
-                                               </td>
-                                       </tr>
-                                       <xsl:apply-templates 
select="table_header_history"/>
-                                       <xsl:apply-templates 
select="record_history"/>
-                               </xsl:otherwise>
-                       </xsl:choose>
-               </table>
-               -->
                <div id="paging_0"> </div>
                <div id="datatable-container_0"></div>  
 
@@ -931,11 +897,11 @@
                        <xsl:for-each select="datatable">
                                datatable[<xsl:value-of select="name"/>] = [
                                {
-                               values                  :       <xsl:value-of 
select="values"/>,
-                               total_records   :       <xsl:value-of 
select="total_records"/>,
-                               edit_action             :       <xsl:value-of 
select="edit_action"/>,
-                               is_paginator    :       <xsl:value-of 
select="is_paginator"/>,
-                               footer                  :       <xsl:value-of 
select="footer"/>
+                                       values                  :       
<xsl:value-of select="values"/>,
+                                       total_records   :       <xsl:value-of 
select="total_records"/>,
+                                       edit_action             :       
<xsl:value-of select="edit_action"/>,
+                                       is_paginator    :       <xsl:value-of 
select="is_paginator"/>,
+                                       footer                  :       
<xsl:value-of select="footer"/>
                                }
                                ]
                        </xsl:for-each>
@@ -953,10 +919,8 @@
                <td>
                        <xsl:variable name="lang_save"><xsl:value-of 
select="lang_save"/></xsl:variable>
                        <input type="submit" name="values[save]" 
value="{$lang_save}" onMouseout="window.status='';return true;">
-                               <xsl:attribute name="onMouseover">
-                                       <xsl:text>window.status='</xsl:text>
+                               <xsl:attribute name="title">
                                        <xsl:value-of 
select="lang_save_statustext"/>
-                                       <xsl:text>'; return true;</xsl:text>
                                </xsl:attribute>
                        </input>
                </td>
@@ -970,10 +934,8 @@
                                        <xsl:variable 
name="lang_done"><xsl:value-of select="lang_done"/></xsl:variable>
                                        <form method="post" 
action="{$done_action}">
                                                <input type="submit" 
name="done" value="{$lang_done}" onMouseout="window.status='';return true;">
-                                                       <xsl:attribute 
name="onMouseover">
-                                                               
<xsl:text>window.status='</xsl:text>
+                                                       <xsl:attribute 
name="title">
                                                                <xsl:value-of 
select="lang_done_statustext"/>
-                                                               <xsl:text>'; 
return true;</xsl:text>
                                                        </xsl:attribute>
                                                </input>
                                        </form>




reply via email to

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