fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [6712] property: More on invoice handling


From: Sigurd Nes
Subject: [Fmsystem-commits] [6712] property: More on invoice handling
Date: Wed, 29 Dec 2010 13:06:51 +0000

Revision: 6712
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6712
Author:   sigurdne
Date:     2010-12-29 13:06:50 +0000 (Wed, 29 Dec 2010)
Log Message:
-----------
property: More on invoice handling

Modified Paths:
--------------
    trunk/property/inc/class.boinvoice.inc.php
    trunk/property/inc/class.soinvoice.inc.php
    trunk/property/inc/class.uiinvoice.inc.php
    trunk/property/js/yahoo/invoice.list_sub.js
    trunk/property/setup/phpgw_no.lang
    trunk/property/templates/base/invoice.xsl

Modified: trunk/property/inc/class.boinvoice.inc.php
===================================================================
--- trunk/property/inc/class.boinvoice.inc.php  2010-12-28 15:15:42 UTC (rev 
6711)
+++ trunk/property/inc/class.boinvoice.inc.php  2010-12-29 13:06:50 UTC (rev 
6712)
@@ -613,4 +613,10 @@
                        }
                        return $line;
                }
+
+               function check_role()
+               {
+                       return $this->so->check_role();
+               }
+
        }

Modified: trunk/property/inc/class.soinvoice.inc.php
===================================================================
--- trunk/property/inc/class.soinvoice.inc.php  2010-12-28 15:15:42 UTC (rev 
6711)
+++ trunk/property/inc/class.soinvoice.inc.php  2010-12-29 13:06:50 UTC (rev 
6712)
@@ -278,7 +278,6 @@
                                        $invoice[$i]['is_janitor']              
                = $role['is_janitor'];
                                        $invoice[$i]['is_supervisor']           
        = $role['is_supervisor'];
                                        $invoice[$i]['is_budget_responsible']   
= $role['is_budget_responsible'];
-                                       $invoice[$i]['is_janitor']              
                = $role['is_janitor'];
                                        $invoice[$i]['is_transfer']             
                = $role['is_transfer'];
                                        $invoice[$i]['janitor']                 
                = $this->db->f('oppsynsmannid');
                                        $invoice[$i]['supervisor']              
                = $this->db->f('saksbehandlerid');
@@ -711,7 +710,49 @@
                        $table ='fm_ecobilag';
                        $id = (int)$values['id'];
 
-                       $value_set= array
+                       $this->db->transaction_begin();
+
+                       // Approval applies to all lines within voucher
+                       if( $values['approve'] != $values['sign_orig'] )
+                       {
+                               switch ( $values['sign_orig'] )
+                               {
+                                       case 'is_janitor':
+                                               $value_set['oppsynsigndato'] = 
null;
+                                               break;
+                                       case 'is_supervisor':
+                                               $value_set['saksigndato'] = 
null;
+                                               break;
+                                       case 'is_budget_responsible':
+                                               $value_set['budsjettsigndato'] 
= null;
+                                               break;
+                               }
+ 
+                               switch ( $values['approve'] )
+                               {
+                                       case 'is_janitor':
+                                               $value_set['oppsynsigndato'] = 
date( $this->db->datetime_format() );
+                                               $value_set['oppsynsmannid'] = 
$values['my_initials'];
+                                               break;
+                                       case 'is_supervisor':
+                                               $value_set['saksigndato'] = 
date( $this->db->datetime_format() );
+                                               $value_set['saksbehandlerid'] = 
$values['my_initials'];
+                                               break;
+                                       case 'is_budget_responsible':
+                                               $value_set['budsjettsigndato'] 
= date( $this->db->datetime_format() );
+                                               
$value_set['budsjettansvarligid'] = $values['my_initials'];
+                                               break;
+                               }
+
+                               $sql ="SELECT bilagsnr FROM {$table} WHERE id= 
{$id}";
+                               $this->db->query($sql,__LINE__,__FILE__);
+                               $this->db->next_record();
+                               $bilagsnr = (int)$this->db->f('bilagsnr');
+                               $value_set      = 
$this->db->validate_update($value_set);
+                               $this->db->query("UPDATE {$table} SET 
$value_set WHERE bilagsnr= {$bilagsnr}" ,__LINE__,__FILE__);
+                       }
+
+                       $value_set = array
                        (
                                'project_id'    => $values['project_group'],
                                'pmwrkord_code' => $values['order_id'],
@@ -720,15 +761,15 @@
                        );
 
                        $value_set      = 
$this->db->validate_update($value_set);
-                       $this->db->transaction_begin();
+
                        $this->db->query("UPDATE {$table} SET $value_set WHERE 
id= {$id}" ,__LINE__,__FILE__);
 
                        if(isset($values['split_line']) && 
$values['split_amount'] && isset($values['split_amount']) && 
$values['split_amount'])
                        {
+                               $metadata = $this->db->metadata($table);
                                $sql ="SELECT * FROM {$table} WHERE id= {$id}";
                                $this->db->query($sql,__LINE__,__FILE__);
                                $this->db->next_record();
-                               $metadata = $this->db->metadata($table);
 
                                $value_set = array();
 
@@ -791,7 +832,7 @@
                {
                        if(!isset($this->role) || !$this->role)
                        {
-                               $this->role=array(
+                               $this->role = array(
                                        'is_janitor'                            
=> $this->acl->check('.invoice', 32, 'property'),
                                        'is_supervisor'                         
=> $this->acl->check('.invoice', 64, 'property'),
                                        'is_budget_responsible'         => 
$this->acl->check('.invoice', 128, 'property'),
@@ -996,34 +1037,40 @@
                        {
                                $values[] = array
                                        (
-                                               'id'                            
=> $this->db->f('id'),
-                                               'art'                           
=> $this->db->f('artid'),
-                                               'type'                          
=> $this->db->f('typeid'),
-                                               'dim_a'                         
=> $this->db->f('dima'),
-                                               'dim_b'                         
=> $this->db->f('dimb'),
-                                               'dim_d'                         
=> $this->db->f('dimd'),
-                                               'tax'                           
=> $this->db->f('mvakode'),
-                                               'invoice_id'            => 
$this->db->f('fakturanr'),
-                                               'kid_nr'                        
=> $this->db->f('kidnr'),
-                                               'vendor_id'                     
=> $this->db->f('spvend_code'),
-                                               'janitor'                       
=> $this->db->f('oppsynsmannid'),
-                                               'supervisor'            => 
$this->db->f('saksbehandlerid'),
-                                               'budget_responsible'=> 
$this->db->f('budsjettansvarligid'),
-                                               'invoice_date'          => 
$this->db->f('fakturadato'),
-                                               'project_id'            => 
$this->db->f('project_id'),
-                                               'project_group'         => 
$this->db->f('project_id'),
-                                               'payment_date'          => 
$this->db->f('forfallsdato'),
-                                               'merknad'                       
=> $this->db->f('merknad'),
-                                               'b_account_id'          => 
$this->db->f('spbudact_code'),
-                                               'amount'                        
=> $this->db->f('belop'),
-                                               'order'                         
=> $this->db->f('pmwrkord_code'),
-                                               'order_id'                      
=> $this->db->f('pmwrkord_code'),
-                                               'kostra_id'                     
=> $this->db->f('kostra_id'),
-                                               'currency'                      
=> $this->db->f('currency'),
-                                               'process_code'          => 
$this->db->f('process_code'),
-                                               'process_log'           => 
$this->db->f('process_log',true),
+                                               'id'                            
        => $this->db->f('id'),
+                                               'art'                           
        => $this->db->f('artid'),
+                                               'type'                          
        => $this->db->f('typeid'),
+                                               'dim_a'                         
        => $this->db->f('dima'),
+                                               'dim_b'                         
        => $this->db->f('dimb'),
+                                               'dim_d'                         
        => $this->db->f('dimd'),
+                                               'tax'                           
        => $this->db->f('mvakode'),
+                                               'invoice_id'                    
=> $this->db->f('fakturanr'),
+                                               'kid_nr'                        
        => $this->db->f('kidnr'),
+                                               'vendor_id'                     
        => $this->db->f('spvend_code'),
+                                               'janitor'                       
        => $this->db->f('oppsynsmannid'),
+                                               'supervisor'                    
=> $this->db->f('saksbehandlerid'),
+                                               'budget_responsible'    => 
$this->db->f('budsjettansvarligid'),
+                                               'invoice_date'                  
=> $this->db->f('fakturadato'),
+                                               'project_id'                    
=> $this->db->f('project_id'),
+                                               'project_group'                 
=> $this->db->f('project_id'),
+                                               'payment_date'                  
=> $this->db->f('forfallsdato'),
+                                               'merknad'                       
        => $this->db->f('merknad'),
+                                               'b_account_id'                  
=> $this->db->f('spbudact_code'),
+                                               'amount'                        
        => $this->db->f('belop'),
+                                               'order'                         
        => $this->db->f('pmwrkord_code'),
+                                               'order_id'                      
        => $this->db->f('pmwrkord_code'),
+                                               'kostra_id'                     
        => $this->db->f('kostra_id'),
+                                               'currency'                      
        => $this->db->f('currency'),
+                                               'process_code'                  
=> $this->db->f('process_code'),
+                                               'process_log'                   
=> $this->db->f('process_log',true),
+                                               'oppsynsigndato'                
=> $this->db->f('oppsynsigndato'),
+                                               'saksigndato'                   
=> $this->db->f('saksigndato'),
+                                               'budsjettsigndato'              
=> $this->db->f('budsjettsigndato'),
                                        );
                        }
+
+
+
                        //_debug_array($values);
                        return $values;
                }

Modified: trunk/property/inc/class.uiinvoice.inc.php
===================================================================
--- trunk/property/inc/class.uiinvoice.inc.php  2010-12-28 15:15:42 UTC (rev 
6711)
+++ trunk/property/inc/class.uiinvoice.inc.php  2010-12-29 13:06:50 UTC (rev 
6712)
@@ -1769,6 +1769,11 @@
                        $GLOBALS['phpgw']->js->validate_file( 'yahoo', 
'invoice.list_sub', 'property' );
                }
 
+               /**
+                * Edit single line within a voucher
+                *
+                */
+
                public function edit()
                {
                        $GLOBALS['phpgw_info']['flags']['noframework'] =  true;
@@ -1778,6 +1783,29 @@
                        $voucher_id     = phpgw::get_var('voucher_id', 'int', 
'GET');
                        $redirect       = false;
 
+                       $role_check = array
+                       (
+                               'is_janitor'                            => 
lang('janitor'),
+                               'is_supervisor'                         => 
lang('supervisor'),
+                               'is_budget_responsible'         => lang('b - 
responsible')
+                       );
+
+                       $roles  = $this->bo->check_role();
+
+                       $approve = array();
+                       foreach ($roles as $role => $role_value)
+                       {
+                               if ($role_value && isset($role_check[$role]))
+                               {
+                                       $approve[] = array
+                                       (
+                                               'id'            => $role,
+                                               'name'          => 
$role_check[$role],
+                                               'selected'      => 0
+                                       );
+                               }       
+                       }
+
                        $values = phpgw::get_var('values');
 
                        $receipt = array();
@@ -1789,14 +1817,19 @@
                                        
$receipt['error'][]=array('msg'=>lang('repost'));
                                }
 
+                               if(!$approve)
+                               {
+                                       
$receipt['error'][]=array('msg'=>lang('you are not approved for this task'));   
                                
+                               }
+
                                if(!isset($values['process_log']) || 
!$values['process_log'])
                                {
-                                       
$receipt['error'][]=array('msg'=>lang('Missing log message'));
+//                                     
$receipt['error'][]=array('msg'=>lang('Missing log message'));
                                }
 
                                if( isset($values['order_id']) && 
$values['order_id'] && 
!execMethod('property.soXport.check_order',$values['order_id']) )
                                {
-                                       
$receipt['error'][]=array('msg'=>lang('No such order: 
%1',$values['order_id']));                                
+                                       
$receipt['error'][]=array('msg'=>lang('no such order: 
%1',$values['order_id']));                                
                                }
 
                                if(isset($values['split_line']) && 
isset($values['split_amount']) && $values['split_amount'])
@@ -1818,7 +1851,79 @@
                        }
 
                        $line = $this->bo->get_single_line($id);
+
 //                     _debug_array($line);
+
+                       $approved_list = array();
+                       
+                       $approved_list[] = array
+                       (
+                               'role'          => $role_check['is_janitor'],
+                               'initials'      => $line['janitor'] ? 
$line['janitor'] : '',
+                               'date'          => $line['oppsynsigndato'] ? 
$GLOBALS['phpgw']->common->show_date( strtotime( $line['oppsynsigndato'] ) ) :''
+                       );
+                       $approved_list[] = array
+                       (
+                               'role'          => $role_check['is_supervisor'],
+                               'initials'      => $line['supervisor'] ? 
$line['supervisor'] : '',
+                               'date'          => $line['saksigndato'] ? 
$GLOBALS['phpgw']->common->show_date( strtotime( $line['saksigndato'] ) ) :''
+                       );
+                       $approved_list[] = array
+                       (
+                               'role'          => 
$role_check['is_budget_responsible'],
+                               'initials'      => $line['budget_responsible'] 
? $line['budget_responsible'] : '',
+                               'date'          => $line['budsjettsigndato'] ? 
$GLOBALS['phpgw']->common->show_date( strtotime( $line['budsjettsigndato'] ) ) 
:''
+                       );
+
+                       $my_initials = 
$GLOBALS['phpgw_info']['user']['account_lid'];
+
+                       foreach($approve as &$_approve)
+                       {
+                               if($_approve['id'] == 'is_janitor' && 
$my_initials == $line['janitor'] && $line['oppsynsigndato'])
+                               {
+                                       $_approve['selected'] = 1;
+                                       $sign_orig = 'is_janitor';
+                               }
+                               else if($_approve['id'] == 'is_supervisor' && 
$my_initials == $line['supervisor'] && $line['saksigndato'])
+                               {
+                                       $_approve['selected'] = 1;
+                                       $sign_orig = 'is_supervisor';
+                               }
+                               else if($_approve['id'] == 
'is_budget_responsible' && $my_initials == $line['budget_responsible'] && 
$line['budsjettsigndato'])
+                               {
+                                       $_approve['selected'] = 1;
+                                       $sign_orig = 'is_budget_responsible';
+                               }
+                       }
+
+                       unset($_approve);
+
+                       $approve_list = array();
+                       foreach($approve as $_approve)
+                       {
+                               if($_approve['id'] == 'is_janitor')
+                               {
+                                       if(($my_initials == $line['janitor'] && 
$line['oppsynsigndato']) || !$line['oppsynsigndato'])
+                                       {
+                                               $approve_list[] = $_approve;
+                                       }
+                               }
+                               if($_approve['id'] == 'is_supervisor')
+                               {
+                                       if(($my_initials == $line['supervisor'] 
&& $line['saksigndato']) || !$line['saksigndato'])
+                                       {
+                                               $approve_list[] = $_approve;
+                                       }
+                               }
+                               if($_approve['id'] == 'is_budget_responsible')
+                               {
+                                       if(($my_initials == 
$line['budget_responsible'] && $line['budsjettsigndato']) || 
!$line['budsjettsigndato'])
+                                       {
+                                               $approve_list[] = $_approve;
+                                       }
+                               }
+                       }
+
                        $process_code_list = 
execMethod('property.bogeneric.get_list', array(
                                'type'          => 'voucher_process_code',
                                'selected'      => 
isset($values['process_code']) ? $values['process_code'] : 
$line['process_code']));
@@ -1827,16 +1932,21 @@
                                'project_group'                 => 
$values['project_group']?$values['project_group']:$line['project_group'],
                                'project_group_descr'   => 
$values['project_group_descr']));
 
-
                        $data = array
                        (
                                        'redirect'                              
=> $redirect ? $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uiinvoice.list_sub', 'user_lid' => $user_lid, 'voucher_id' => 
$voucher_id)) : null,
                                        'msgbox_data'                   => 
$GLOBALS['phpgw']->common->msgbox($GLOBALS['phpgw']->common->msgbox_data($receipt)),
                                        'from_name'                             
=> $GLOBALS['phpgw_info']['user']['fullname'],
                                        'form_action'                   => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction' => 
'property.uiinvoice.edit', 'id' => $id, 'user_lid' => $user_lid, 'voucher_id' 
=> $voucher_id)),
+                                       'approve_list'                  => 
$approve_list,
+                                       'approved_list'                 => 
$approved_list,
+                                       'sign_orig'                             
=> $sign_orig,
+                                       'my_initials'                   => 
$my_initials,
                                        'process_code_list'     => 
$process_code_list,
                                        'project_group_data'    => 
$project_group_data,
                                        'order_id'                              
=> $line['order_id'],
+                                       'value_amount'                  => 
$line['amount'],
+                                       'value_currency'                => 
$line['currency'],
                                        'value_process_log'             =>  
isset($values['process_log']) && $values['process_log'] ? 
$values['process_log'] : $line['process_log']
                        );
 
@@ -3170,12 +3280,12 @@
                        $order_type = $soXport->check_order($order_id);
                        switch($order_type)
                        {
-                       case 'workorder':
-                               
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=> 
'property.uiworkorder.edit', 'id'=> $order_id));
-                               break;
-                       case 's_agreement':
-                               
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=> 
'property.uis_agreement.view', 'id'=> $order_id));
-                               break;
+                               case 'workorder':
+                                       
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=> 
'property.uiworkorder.edit', 'id'=> $order_id));
+                                       break;
+                               case 's_agreement':
+                                       
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=> 
'property.uis_agreement.view', 'id'=> $order_id));
+                                       break;
                        }
                }
        }

Modified: trunk/property/js/yahoo/invoice.list_sub.js
===================================================================
--- trunk/property/js/yahoo/invoice.list_sub.js 2010-12-28 15:15:42 UTC (rev 
6711)
+++ trunk/property/js/yahoo/invoice.list_sub.js 2010-12-29 13:06:50 UTC (rev 
6712)
@@ -53,7 +53,7 @@
                        var frame = document.createElement('iframe');
                        frame.src = sUrl;
                        frame.width = "100%";
-                       frame.height = "400";
+                       frame.height = "460";
                        o.setBody(frame);
                };
                lightbox.showEvent.subscribe(onDialogShow, lightbox);

Modified: trunk/property/setup/phpgw_no.lang
===================================================================
--- trunk/property/setup/phpgw_no.lang  2010-12-28 15:15:42 UTC (rev 6711)
+++ trunk/property/setup/phpgw_no.lang  2010-12-29 13:06:50 UTC (rev 6712)
@@ -169,6 +169,7 @@
 approvals request      property        no      Anmodninger om godkjenning
 approval from  property        no      Godkjenning fra
 approval from is updated       property        no      Godkjenning fra er 
oppdatert
+approve        property        no      Godkjenn
 approved       property        no      Godkjent
 archive        property        no      Arkiv
 art    property        no      Art
@@ -1065,6 +1066,7 @@
 no revision    property        no      Ingen revisjon
 no role        property        no      Rolle ikke valgt
 no status      property        no      Status ikke valgt
+no such order: %1      property        no      Ordre %1 finnes ikke
 no supervisor  property        no      Attestant ikke valgt
 note   property        no      Notat
 nothing to do! property        no      Ingen ting å gjøre
@@ -1547,6 +1549,7 @@
 sort the tickets by their id   property        no      sorter meldinger etter 
ID
 sort the tickets by their priority     property        no      sorter 
meldinger etter prioritet
 space  property        no      Areal
+split line     property        no      Splitt linje
 sql    property        no      SQL
 standard       property        no      standard
 standard description   property        no      NS 3420

Modified: trunk/property/templates/base/invoice.xsl
===================================================================
--- trunk/property/templates/base/invoice.xsl   2010-12-28 15:15:42 UTC (rev 
6711)
+++ trunk/property/templates/base/invoice.xsl   2010-12-29 13:06:50 UTC (rev 
6712)
@@ -41,7 +41,7 @@
                                                        <xsl:value-of 
select="lang_content_statustext"/>
                                                        <xsl:text>'; return 
true;</xsl:text>
                                                </xsl:attribute>
-                                               <xsl:value-of select="remark"/> 
        
+                                               <xsl:value-of select="remark"/>
                                        </textarea>
                                </td>
                        </tr>
@@ -203,7 +203,7 @@
                                </xsl:attribute>
                                <xsl:for-each select="row" >
                                        <td align="{align}">
-                                               <xsl:value-of select="value"/>  
                                
+                                               <xsl:value-of select="value"/>
                                        </td>
                                </xsl:for-each>
                        </tr>
@@ -249,8 +249,7 @@
                        function abook()
                        {
                        Window1=window.open('<xsl:value-of 
select="addressbook_link"/>',"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");
-                       }               
-               </script>
+                       }                       </script>
 
                <xsl:apply-templates select="menu"/>
                <div align="left">
@@ -274,8 +273,8 @@
                                                <tr>
                                                        <td align="left" 
colspan="3">
                                                                <xsl:variable 
name="link_receipt"><xsl:value-of select="link_receipt"/></xsl:variable>
-                                                               <a 
href="{$link_receipt}" onMouseover="window.status='{lang_receipt}';return 
true;" onMouseout="window.status='';return true;" target="_blank"><xsl:value-of 
select="lang_receipt"/></a>
-
+                                                               <a 
href="{$link_receipt}" onMouseover="window.status='{lang_receipt}';return 
true;" onMouseout="window.status='';return true;" target="_blank"><xsl:value-of 
select="lang_receipt"/>
+                                                               </a>
                                                        </td>
                                                </tr>
                                        </xsl:when>
@@ -528,9 +527,8 @@
                                                                        
<xsl:value-of select="lang_merknad_statustext"/>
                                                                        
<xsl:text>'; return true;</xsl:text>
                                                                </xsl:attribute>
-                                                               <xsl:value-of 
select="value_merknad"/>          
+                                                               <xsl:value-of 
select="value_merknad"/>
                                                        </textarea>
-
                                                </td>
                                        </tr>
 
@@ -575,8 +573,7 @@
                        function abook()
                        {
                        Window1=window.open('<xsl:value-of 
select="addressbook_link"/>',"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");
-                       }               
-               </script>
+                       }                       </script>
 
                <xsl:apply-templates select="menu"/>
                <div align="left">
@@ -880,8 +877,7 @@
                </div>
        </xsl:template>
 
-<!-- art_list -->      
-
+<!-- art_list -->
        <xsl:template match="art_list">
                <xsl:variable name="id"><xsl:value-of 
select="id"/></xsl:variable>
                <xsl:choose>
@@ -894,8 +890,7 @@
                </xsl:choose>
        </xsl:template>
 
-<!-- type_list -->     
-
+<!-- type_list -->
        <xsl:template match="type_list">
                <xsl:variable name="id"><xsl:value-of 
select="id"/></xsl:variable>
                <xsl:choose>
@@ -908,8 +903,7 @@
                </xsl:choose>
        </xsl:template>
 
-<!-- dimb_list -->     
-
+<!-- dimb_list -->
        <xsl:template match="dimb_list">
                <xsl:variable name="id"><xsl:value-of 
select="id"/></xsl:variable>
                <xsl:choose>
@@ -923,8 +917,7 @@
        </xsl:template>
 
 
-<!-- janitor_list -->  
-
+<!-- janitor_list -->
        <xsl:template match="janitor_list">
                <xsl:variable name="lid"><xsl:value-of 
select="lid"/></xsl:variable>
                <xsl:choose>
@@ -937,8 +930,7 @@
                </xsl:choose>
        </xsl:template>
 
-<!-- supervisor_list -->       
-
+<!-- supervisor_list -->
        <xsl:template match="supervisor_list">
                <xsl:variable name="lid"><xsl:value-of 
select="lid"/></xsl:variable>
                <xsl:choose>
@@ -951,8 +943,7 @@
                </xsl:choose>
        </xsl:template>
 
-<!-- budget_responsible_list -->       
-
+<!-- budget_responsible_list -->
        <xsl:template match="budget_responsible_list">
                <xsl:variable name="lid"><xsl:value-of 
select="lid"/></xsl:variable>
                <xsl:choose>
@@ -966,8 +957,7 @@
        </xsl:template>
 
 
-<!-- conv_list -->     
-
+<!-- conv_list -->
        <xsl:template match="conv_list">
                <xsl:variable name="id"><xsl:value-of 
select="id"/></xsl:variable>
                <xsl:choose>
@@ -980,8 +970,7 @@
                </xsl:choose>
        </xsl:template>
 
-<!-- rollback_file_list -->    
-
+<!-- rollback_file_list -->
        <xsl:template match="rollback_file_list">
                <xsl:variable name="id"><xsl:value-of 
select="id"/></xsl:variable>
                <xsl:choose>
@@ -994,8 +983,7 @@
                </xsl:choose>
        </xsl:template>
 
-<!-- tax_code_list --> 
-
+<!-- tax_code_list -->
        <xsl:template match="tax_code_list">
                <xsl:variable name="id"><xsl:value-of 
select="id"/></xsl:variable>
                <xsl:choose>
@@ -1206,8 +1194,28 @@
                                        </xsl:when>
                                </xsl:choose>
                                <!--<xsl:variable 
name="lang_process_code"><xsl:value-of select="php:function('lang', 'voucher 
process code')" /></xsl:variable>-->
+                               <xsl:apply-templates select="approved_list"/>
                                <tr>
+                                       <input type="hidden" 
name="values[sign_orig]" value="{sign_orig}"></input>
+                                       <input type="hidden" 
name="values[my_initials]" value="{my_initials}"></input>
                                        <td class="th_text" align = "left" 
valign="top" style="white-space: nowrap;">
+                                               <xsl:value-of 
select="php:function('lang', 'approve')" />
+                                       </td>
+                    <td class="th_text" valign="top">
+                                               <select name="values[approve]" >
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'grant')" />
+                                                       </xsl:attribute>
+                                                       <option value="">
+                                                               <xsl:value-of 
select="php:function('lang', 'select')" />
+                                                       </option>
+                                                       <xsl:apply-templates 
select="approve_list"/>
+                                               </select>
+                                       </td>
+                               </tr>
+
+                               <tr>
+                                       <td class="th_text" align = "left" 
valign="top" style="white-space: nowrap;">
                                                <xsl:value-of 
select="php:function('lang', 'voucher process code')" />
                                        </td>
                     <td class="th_text" valign="top">
@@ -1219,8 +1227,7 @@
                                                                <xsl:value-of 
select="php:function('lang', 'voucher process code')" />
                                                        </option>
                                                        <xsl:apply-templates 
select="process_code_list"/>
-                                               </select>                       
-                                       </td>
+                                               </select>                       
                                </td>
                                </tr>
                                <xsl:call-template name="project_group_form"/>
                                <tr>
@@ -1247,8 +1254,8 @@
                                                        <xsl:attribute 
name="title">
                                                                <xsl:value-of 
select="php:function('lang', 'voucher process log')" />
                                                        </xsl:attribute>
-                                                       <xsl:value-of 
select="value_process_log"/>              
-                                               </textarea>
+                                                       <xsl:value-of 
select="value_process_log"/>
+                                                       </textarea>
                                        </td>
                                </tr>
                                <tr>
@@ -1261,6 +1268,11 @@
                                                                <xsl:value-of 
select="php:function('lang', 'split line')" />
                                                        </xsl:attribute>
                                                </input>
+                                               <xsl:text> [ </xsl:text>
+                                               <xsl:value-of 
select="value_amount"/>
+                                               <xsl:text> </xsl:text>
+                                               <xsl:value-of 
select="value_currency"/>
+                                               <xsl:text> ]</xsl:text>
                                        </td>
                                </tr>
                                <tr>
@@ -1281,7 +1293,7 @@
 
                                <tr height="50">
                                        <td>
-                                               <xsl:variable 
name="lang_send"><xsl:value-of select="php:function('lang', 'save')" 
/></xsl:variable>                                    
+                                               <xsl:variable 
name="lang_send"><xsl:value-of select="php:function('lang', 'save')" 
/></xsl:variable>
                                                <input type="submit" 
name="values[save]" value="{$lang_send}" title='{$lang_send}'>
                                                </input>
                                        </td>
@@ -1296,7 +1308,29 @@
                        <xsl:if test="selected != 0">
                                <xsl:attribute name="selected" value="selected" 
/>
                        </xsl:if>
-                       <xsl:value-of disable-output-escaping="yes" 
select="name"/>
+                       <xsl:value-of select="name"/>
                </option>
        </xsl:template>
 
+       <xsl:template match="approve_list">
+               <option value="{id}">
+                       <xsl:if test="selected != 0">
+                               <xsl:attribute name="selected" value="selected" 
/>
+                       </xsl:if>
+                       <xsl:value-of select="name"/>
+               </option>
+       </xsl:template>
+       <xsl:template match="approved_list">
+               <tr>
+                       <td align = "left" style="white-space: nowrap;">
+                               <xsl:value-of select="role"/>                   
                </td>
+                       <td align = "left" style="white-space: nowrap;">
+                               <xsl:if test="initials != ''">
+                                       <xsl:value-of select="initials"/>
+                                       <xsl:text>: </xsl:text>
+                                       <xsl:value-of select="date"/>
+                               </xsl:if>
+                       </td>
+               </tr>
+       </xsl:template>
+




reply via email to

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