fmsystem-commits
[Top][All Lists]
Advanced

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

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


From: Sigurd Nes
Subject: [Fmsystem-commits] [7071] property: invoice info at project/order
Date: Mon, 07 Mar 2011 12:04:26 +0000

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

Modified Paths:
--------------
    trunk/property/inc/class.bocommon.inc.php
    trunk/property/inc/class.sogeneric.inc.php
    trunk/property/inc/class.uigeneric.inc.php
    trunk/property/inc/class.uilookup.inc.php
    trunk/property/js/yahoo/generic.index.js
    trunk/property/js/yahoo/lookup.tenant.index.js
    trunk/property/setup/setup.inc.php
    trunk/property/setup/tables_current.inc.php
    trunk/property/setup/tables_update.inc.php
    trunk/property/templates/base/project.xsl
    trunk/property/templates/base/project_group_form.xsl
    trunk/property/templates/base/project_group_view.xsl

Modified: trunk/property/inc/class.bocommon.inc.php
===================================================================
--- trunk/property/inc/class.bocommon.inc.php   2011-03-04 13:31:32 UTC (rev 
7070)
+++ trunk/property/inc/class.bocommon.inc.php   2011-03-07 12:04:24 UTC (rev 
7071)
@@ -747,8 +747,8 @@
                                
$project_group_object->get_location_info('project_group',false);
                                $project_group_data                             
        = $project_group_object->read_single(array('id'=> 
$data['project_group']));
                                $project_group['value_project_group_descr']     
= $project_group_data['descr'];
+                               $project_group['value_project_group_budget']    
= $project_group_data['budget'];
                        }
-
                        return $project_group;
                }
 

Modified: trunk/property/inc/class.sogeneric.inc.php
===================================================================
--- trunk/property/inc/class.sogeneric.inc.php  2011-03-04 13:31:32 UTC (rev 
7070)
+++ trunk/property/inc/class.sogeneric.inc.php  2011-03-07 12:04:24 UTC (rev 
7071)
@@ -116,6 +116,7 @@
                        $uicols['descr'][]                      = lang('id');
                        $uicols['datatype'][]           = 
$this->location_info['id']['type'] == 'varchar' ? 'V' : 'I';
                        $uicols['sortable'][]           = true;
+                       $uicols['formatter'][]          = '';
 
                        foreach($this->location_info['fields'] as $field)
                        {
@@ -124,6 +125,7 @@
                                $uicols['descr'][]                      = 
$field['descr'];
                                $uicols['datatype'][]           = 'V';
                                $uicols['sortable'][]           = 
isset($field['sortable']) && $field['sortable'] ? true : false;
+                               $uicols['formatter'][]          = 
$field['type'] == 'int' ? 'FormatterRight' : '';
                        }
 
                        $custom_fields = false;
@@ -154,6 +156,7 @@
                                        $uicols['statustext'][]         = 
$this->_db->f('statustext');
                                        $uicols['datatype'][$i]         = 
$this->_db->f('datatype');
                                        $uicols['attib_id'][$i]         = 
$this->_db->f('id');
+                                       $uicols['formatter'][$i]        = 
$this->_db->f('datatype') == 'I' ? 'FormatterRight' : '';
                                        $cols_return_extra[]= array(
                                                'name'  => 
$this->_db->f('column_name'),
                                                'datatype'      => 
$this->_db->f('datatype'),
@@ -398,6 +401,12 @@
                                                                'name' => 
'descr',
                                                                'descr' => 
lang('descr'),
                                                                'type' => 
'varchar'
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'budget',
+                                                               'descr' => 
lang('budget'),
+                                                               'type' => 'int'
                                                        )
                                                ),
                                                'edit_msg'      => lang('edit'),

Modified: trunk/property/inc/class.uigeneric.inc.php
===================================================================
--- trunk/property/inc/class.uigeneric.inc.php  2011-03-04 13:31:32 UTC (rev 
7070)
+++ trunk/property/inc/class.uigeneric.inc.php  2011-03-07 12:04:24 UTC (rev 
7071)
@@ -621,6 +621,14 @@
                                                                
$receipt['error'][]=array('msg'=>lang('missing value for %1', 
$field_info['descr']));                                                         
          
                                                        }
                                                }
+
+                                               if ($field_info['type'] == 
'int')
+                                               {
+                                                       if( 
$values[$field_info['name']] && !ctype_digit($values[$field_info['name']]) )
+                                                       {
+                                                               
$receipt['error'][]=array('msg'=> "{$field_info['descr']}: " . lang('Please 
enter an integer !'));
+                                                       }
+                                               }
                                        }
 
                                        if($values['id'] && 
$this->location_info['id']['type'] == 'int' && !ctype_digit($values['id']))

Modified: trunk/property/inc/class.uilookup.inc.php
===================================================================
--- trunk/property/inc/class.uilookup.inc.php   2011-03-04 13:31:32 UTC (rev 
7070)
+++ trunk/property/inc/class.uilookup.inc.php   2011-03-07 12:04:24 UTC (rev 
7071)
@@ -2526,10 +2526,10 @@
                        }
 
                        $uicols = array (
-                               'input_type'    =>      array('text','text'),
-                               'name'                  =>      
array('id','descr'),
-                               'formatter'             =>      array('',''),
-                               'descr'                 =>      
array(lang('ID'),lang('Name'))
+                               'input_type'    =>      
array('text','text','text'),
+                               'name'                  =>      
array('id','descr','budget'),
+                               'formatter'             =>      
array('','','FormatterRight'),
+                               'descr'                 =>      
array(lang('ID'),lang('Name'),lang('budget'))
                        );
 
                        $project_group_list = array();

Modified: trunk/property/js/yahoo/generic.index.js
===================================================================
--- trunk/property/js/yahoo/generic.index.js    2011-03-04 13:31:32 UTC (rev 
7070)
+++ trunk/property/js/yahoo/generic.index.js    2011-03-07 12:04:24 UTC (rev 
7071)
@@ -28,6 +28,13 @@
                date_search : 0, //if search has link "Data search"
                particular_done : "admin.uimainscreen.mainscreen"
        }
+
+/********************************************************************************/
     
+       var FormatterRight = function(elCell, oRecord, oColumn, oData)
+       {
+               elCell.innerHTML = "<div align=\"right\">"+oData+"</div>";
+       }       
+
 
/****************************************************************************************/
        this.particular_setting = function()
        {

Modified: trunk/property/js/yahoo/lookup.tenant.index.js
===================================================================
--- trunk/property/js/yahoo/lookup.tenant.index.js      2011-03-04 13:31:32 UTC 
(rev 7070)
+++ trunk/property/js/yahoo/lookup.tenant.index.js      2011-03-07 12:04:24 UTC 
(rev 7071)
@@ -12,6 +12,13 @@
        {order:0, name:'btn_search', funct:"onSearchClick"}
        ]
 
+/********************************************************************************/
     
+       var FormatterRight = function(elCell, oRecord, oColumn, oData)
+       {
+               elCell.innerHTML = "<div align=\"right\">"+oData+"</div>";
+       }       
+       
+
        // define Text buttons
        var textImput = [
        {order:0, name:'query', id:'txt_query'}

Modified: trunk/property/setup/setup.inc.php
===================================================================
--- trunk/property/setup/setup.inc.php  2011-03-04 13:31:32 UTC (rev 7070)
+++ trunk/property/setup/setup.inc.php  2011-03-07 12:04:24 UTC (rev 7071)
@@ -12,7 +12,7 @@
        */
 
        $setup_info['property']['name']                 = 'property';
-       $setup_info['property']['version']              = '0.9.17.610';
+       $setup_info['property']['version']              = '0.9.17.611';
        $setup_info['property']['app_order']    = 8;
        $setup_info['property']['enable']               = 1;
        $setup_info['property']['app_group']    = 'office';

Modified: trunk/property/setup/tables_current.inc.php
===================================================================
--- trunk/property/setup/tables_current.inc.php 2011-03-04 13:31:32 UTC (rev 
7070)
+++ trunk/property/setup/tables_current.inc.php 2011-03-07 12:04:24 UTC (rev 
7071)
@@ -1318,7 +1318,8 @@
                'fm_project_group' => array(
                        'fd' => array(
                                'id' => array('type' => 'int','precision' => 
'4','nullable' => False),
-                               'descr' => array('type' => 
'varchar','precision' => '255','nullable' => False)
+                               'descr' => array('type' => 
'varchar','precision' => '255','nullable' => False),
+                               'budget' => array('type' => 'int','precision' 
=> '4','nullable' => True),
                        ),
                        'pk' => array('id'),
                        'fk' => array(),

Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php  2011-03-04 13:31:32 UTC (rev 
7070)
+++ trunk/property/setup/tables_update.inc.php  2011-03-07 12:04:24 UTC (rev 
7071)
@@ -5067,7 +5067,26 @@
                }
        }
 
+       /**
+       * Update property version from 0.9.17.610 to 0.9.17.611
+       * Add budget to project group
+       * 
+       */
 
+       $test[] = '0.9.17.610';
+       function property_upgrade0_9_17_610()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_project_group','budget',array('type'
 => 'int','precision' => 4,'nullable' => True));
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.611';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
+       }
+
        /**
        * Update property version from 0.9.17.607 to 0.9.17.608
        * Add more room for address at tickets

Modified: trunk/property/templates/base/project.xsl
===================================================================
--- trunk/property/templates/base/project.xsl   2011-03-04 13:31:32 UTC (rev 
7070)
+++ trunk/property/templates/base/project.xsl   2011-03-07 12:04:24 UTC (rev 
7071)
@@ -235,7 +235,6 @@
                                                                </xsl:otherwise>
                                                        </xsl:choose>
 
-                                                       <xsl:call-template 
name="project_group_form"/>
                                                        <tr>
                                                                <td 
valign="top">
                                                                        
<xsl:value-of select="lang_name"/>
@@ -443,6 +442,8 @@
                        </td>
                </tr>
 
+               <xsl:call-template name="project_group_form"/>
+
                <xsl:choose>
                        <xsl:when test="ecodimb_data!=''">
                                <xsl:call-template name="ecodimb_form"/>

Modified: trunk/property/templates/base/project_group_form.xsl
===================================================================
--- trunk/property/templates/base/project_group_form.xsl        2011-03-04 
13:31:32 UTC (rev 7070)
+++ trunk/property/templates/base/project_group_form.xsl        2011-03-07 
12:04:24 UTC (rev 7071)
@@ -4,7 +4,7 @@
                <xsl:apply-templates select="project_group_data"/>
        </xsl:template>
 
-       <xsl:template match="project_group_data">
+       <xsl:template match="project_group_data" xmlns:php="http://php.net/xsl";>
                <script type="text/javascript">
                        self.name="first_Window";
                        function project_group_lookup()
@@ -29,7 +29,28 @@
                                                <xsl:value-of 
select="lang_select_project_group_help"/>
                                        </xsl:attribute>
                                </input>
+                               <xsl:choose>
+                                       <xsl:when 
test="value_project_group_budget != ''">
+                                               <xsl:value-of 
select="php:function('lang', 'budget')" />
+                                               <xsl:text>: </xsl:text>
+                                               <xsl:value-of 
select="value_project_group_budget"/>
+                                       </xsl:when>
+                               </xsl:choose>
                        </td>
                </tr>
-
+<!--
+               <xsl:choose>
+                       <xsl:when test="value_project_group_budget != ''">
+                               <tr>
+                                       <td>
+                                       </td>
+                                       <td valign="top">
+                                               <xsl:value-of 
select="php:function('lang', 'budget')" />
+                                               <xsl:text>: </xsl:text>
+                                               <xsl:value-of 
select="value_project_group_budget"/>
+                                       </td>
+                               </tr>
+                       </xsl:when>
+               </xsl:choose>
+-->
        </xsl:template>

Modified: trunk/property/templates/base/project_group_view.xsl
===================================================================
--- trunk/property/templates/base/project_group_view.xsl        2011-03-04 
13:31:32 UTC (rev 7070)
+++ trunk/property/templates/base/project_group_view.xsl        2011-03-07 
12:04:24 UTC (rev 7071)
@@ -4,7 +4,7 @@
                <xsl:apply-templates select="project_group_data"/>
        </xsl:template>
 
-       <xsl:template match="project_group_data">
+       <xsl:template match="project_group_data" xmlns:php="http://php.net/xsl";>
                <tr>
                        <td valign="top">
                                <xsl:value-of select="lang_project_group"/>
@@ -14,6 +14,13 @@
                                <xsl:text> [</xsl:text>
                                <xsl:value-of 
select="value_project_group_descr"/>
                                <xsl:text>]</xsl:text>
+                               <xsl:choose>
+                                       <xsl:when 
test="value_project_group_budget != ''">
+                                               <xsl:value-of 
select="php:function('lang', 'budget')" />
+                                               <xsl:text>: </xsl:text>
+                                               <xsl:value-of 
select="value_project_group_budget"/>
+                                       </xsl:when>
+                               </xsl:choose>
                        </td>
                </tr>
        </xsl:template>




reply via email to

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