phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property inc/class.uiinvoice.inc.php templates/...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] property inc/class.uiinvoice.inc.php templates/...
Date: Tue, 19 Sep 2006 09:51:46 +0000

CVSROOT:        /sources/phpgroupware
Module name:    property
Changes by:     Sigurd Nes <sigurdne>   06/09/19 09:51:46

Modified files:
        inc            : class.uiinvoice.inc.php 
        templates/base : invoice.xsl 

Log message:
        Excel

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiinvoice.inc.php?cvsroot=phpgroupware&r1=1.37&r2=1.38
http://cvs.savannah.gnu.org/viewcvs/property/templates/base/invoice.xsl?cvsroot=phpgroupware&r1=1.17&r2=1.18

Patches:
Index: inc/class.uiinvoice.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiinvoice.inc.php,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- inc/class.uiinvoice.inc.php 13 Sep 2006 12:56:22 -0000      1.37
+++ inc/class.uiinvoice.inc.php 19 Sep 2006 09:51:46 -0000      1.38
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage eco
-       * @version $Id: class.uiinvoice.inc.php,v 1.37 2006/09/13 12:56:22 
sigurdne Exp $
+       * @version $Id: class.uiinvoice.inc.php,v 1.38 2006/09/19 09:51:46 
sigurdne Exp $
        */
 
        /**
@@ -41,6 +41,7 @@
                        'debug'         => True,
                        'view_order'    => True,
                        'excel'         => True,
+                       'excel_sub'     => True,
                        'receipt'       => True
                );
 
@@ -126,6 +127,52 @@
                        $this->bocommon->excel($list,$name,$descr);
                }
 
+
+               function excel_sub()
+               {
+                       $voucher_id     = 
get_var('voucher_id',array('POST','GET'));
+                       $paid           = 
get_var('voucher_id',array('POST','GET'));
+                       
+                       if ($voucher_id)
+                       {
+                               $list = 
$this->bo->read_invoice_sub($voucher_id,$paid);
+                       
+                               $name = array(
+                                       'workorder_id',
+                                       'status',
+                                       'voucher_id',
+                                       'invoice_id',
+                                       'budget_account',
+                                       'dima',
+                                       'dimb',
+                                       'dimd',
+                                       'tax_code',
+                                       'amount',
+                                       'charge_tenant',
+                                       'claim_issued',
+                                       'vendor'
+                                   );
+
+                               $descr = array(
+                                       lang('Workorder'),
+                                       lang('status'),
+                                       lang('voucher'),
+                                       lang('Invoice Id'),
+                                       lang('Budget account'),
+                                       lang('Dim A'),
+                                       lang('Dim B'),
+                                       lang('Dim D'),
+                                       lang('Tax code'),
+                                       lang('Sum'),
+                                       lang('Charge tenant'),
+                                       lang('claim issued'),
+                                       lang('vendor')
+                                   );
+
+                               $this->bocommon->excel($list,$name,$descr);
+                       }
+               }
+
                function index()
                {
 //                     $start_time = explode(' ',microtime());
@@ -607,8 +654,21 @@
 
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
 
+
+                       $link_excel = array
+                       (
+                               'menuaction'    => 
$this->currentapp.'.uiinvoice.excel_sub',
+                               'voucher_id'    => $voucher_id,
+                               'paid'          => $paid
+                       );
+
                        $data = array
                        (
+
+                               'lang_excel'                                    
=> 'excel',
+                               'link_excel'                                    
=> $GLOBALS['phpgw']->link('/index.php',$link_excel),
+                               'lang_excel_help'                               
=> lang('Download table to MS Excel'),
+
                                'img_check'                                     
=> $GLOBALS['phpgw']->common->get_image_path($this->currentapp).'/check.png',
                                'check_source'                                  
=> './'.$this->currentapp.'/inc/check.js',
                                'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),

Index: templates/base/invoice.xsl
===================================================================
RCS file: /sources/phpgroupware/property/templates/base/invoice.xsl,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- templates/base/invoice.xsl  3 Jul 2006 12:32:04 -0000       1.17
+++ templates/base/invoice.xsl  19 Sep 2006 09:51:46 -0000      1.18
@@ -1,4 +1,4 @@
-<!-- $Id: invoice.xsl,v 1.17 2006/07/03 12:32:04 sigurdne Exp $ -->
+<!-- $Id: invoice.xsl,v 1.18 2006/09/19 09:51:46 sigurdne Exp $ -->
 
        <xsl:template name="app_data">
                <xsl:choose>
@@ -2290,7 +2290,8 @@
                                                <td width="25%" class="th_text" 
align="left">
                                                        <xsl:value-of 
select="vendor"/>
                                                </td>
-                                               <td width="50%">
+                                               <td width="50%" 
class="small_text" valign="top" align="right">
+                                                       <xsl:call-template 
name="excel"/>
                                                </td>
                                        </tr>
                                </xsl:when>




reply via email to

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