fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7574] Merge 7566:7573 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [7574] Merge 7566:7573 from trunk
Date: Sun, 11 Sep 2011 13:42:07 +0000

Revision: 7574
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7574
Author:   sigurdne
Date:     2011-09-11 13:42:06 +0000 (Sun, 11 Sep 2011)
Log Message:
-----------
Merge 7566:7573 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/demo/inc/class.sodemo.inc.php
    branches/Version-1_0-branch/demo/inc/class.uidemo.inc.php
    branches/Version-1_0-branch/demo/templates/base/attributes_form.xsl
    branches/Version-1_0-branch/property/inc/class.boinvoice.inc.php
    branches/Version-1_0-branch/property/inc/class.menu.inc.php
    branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php
    branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php
    branches/Version-1_0-branch/property/inc/export/default/Basware_X114
    branches/Version-1_0-branch/property/setup/phpgw_no.lang
    branches/Version-1_0-branch/rental/inc/model/class.contract.inc.php

Added Paths:
-----------
    branches/Version-1_0-branch/demo/js/yahoo/demo.edit.js
    branches/Version-1_0-branch/demo/setup/phpgw_no.lang
    branches/Version-1_0-branch/demo/templates/base/edit.xsl
    branches/Version-1_0-branch/property/templates/base/invoice_reporting.xsl

Property Changed:
----------------
    branches/Version-1_0-branch/


Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565
   + 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573

Modified: branches/Version-1_0-branch/demo/inc/class.sodemo.inc.php
===================================================================
--- branches/Version-1_0-branch/demo/inc/class.sodemo.inc.php   2011-09-11 
13:24:23 UTC (rev 7573)
+++ branches/Version-1_0-branch/demo/inc/class.sodemo.inc.php   2011-09-11 
13:42:06 UTC (rev 7574)
@@ -427,7 +427,7 @@
                                }
                        }
 
-                       if (isset($values_attribute) AND 
is_array($values_attribute))
+                       if (isset($values_attribute) && 
is_array($values_attribute))
                        {
                                foreach($values_attribute as $entry)
                                {
@@ -444,7 +444,7 @@
                                                        {
                                                                
if($entry['value'] == $entry['value2'])
                                                                {
-                                                                       $cols[] 
= $entry['column_name'];
+                                                                       $cols[] 
= $entry['name'];
                                                                        $vals[] 
= md5($entry['value']);
                                                                }
                                                                else
@@ -454,7 +454,7 @@
                                                        }
                                                        else
                                                        {
-                                                               $cols[] = 
$entry['column_name'];
+                                                               $cols[] = 
$entry['name'];
                                                                $vals[] = 
$entry['value'];
                                                        }
 
@@ -527,7 +527,7 @@
                                                        {
                                                                
if($entry['value'] == $entry['value2'])
                                                                {
-                                                                       
$value_set[$entry['column_name']]       = md5($entry['value']);
+                                                                       
$value_set[$entry['name']]      = md5($entry['value']);
                                                                }
                                                                else
                                                                {
@@ -537,7 +537,7 @@
                                                }
                                                else
                                                {
-                                                       
$value_set[$entry['column_name']]       = $entry['value'];
+                                                       
$value_set[$entry['name']]      = $entry['value'];
                                                }
                                        }
                                }

Modified: branches/Version-1_0-branch/demo/inc/class.uidemo.inc.php
===================================================================
--- branches/Version-1_0-branch/demo/inc/class.uidemo.inc.php   2011-09-11 
13:24:23 UTC (rev 7573)
+++ branches/Version-1_0-branch/demo/inc/class.uidemo.inc.php   2011-09-11 
13:42:06 UTC (rev 7574)
@@ -26,6 +26,7 @@
           along with this program.  If not, see <http://www.gnu.org/licenses/>.
         */
 
+       phpgw::import_class('rental.socontract');
        phpgw::import_class('phpgwapi.yui');
        /**
         * Description
@@ -683,8 +684,6 @@
                                }
                        }
 
-                       
$GLOBALS['phpgw']->xslttpl->add_file(array('demo','attributes_form'));
-
                        if (isset($values) && is_array($values))
                        {
                                if(!$this->acl_edit)
@@ -706,6 +705,11 @@
 
                                if ((isset($values['save']) && $values['save']) 
|| (isset($values['apply']) && $values['apply']))
                                {
+                                       
if($GLOBALS['phpgw']->session->is_repost())
+                                       {
+                                               
$receipt['error'][]=array('msg'=>lang('Hmm... looks like a repost!'));
+                                       }
+
                                        if(!$values['cat_id'] || 
$values['cat_id'] == 'none')
                                        {
                                                
$receipt['error'][]=array('msg'=>lang('Please select a category!'));
@@ -755,13 +759,13 @@
                                                if (isset($values['save']) && 
$values['save'])
                                                {
                                                        
$GLOBALS['phpgw']->session->appsession('session_data','demo_receipt',$receipt);
-                                                       
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction'=> 
'demo.uidemo.index', 'output'=> $output));
+                                                       
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction'=> 
'demo.uidemo.index2', 'output'=> $output));
                                                }
                                        }
                                }
                                else
                                {
-                                       
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction'=> 
'demo.uidemo.index', 'output'=> $output));
+                                       
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction'=> 
'demo.uidemo.index2', 'output'=> $output));
                                }
                        }
 
@@ -810,27 +814,82 @@
                                );
                        }
 
+                       // date 1 (jscalendar)
+                       
execMethod('phpgwapi.jscalendar.add_listener','values_start_date');
+
+                       // date 2 (YUI)
+                       $end_date = 
$GLOBALS['phpgw']->yuical->add_listener('end_date',date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'],
 time()));
+
+
+
+
+                       //inline tables
+                       $values['consume'][] = array
+                       (
+                               'amount'        => 123456,
+                               'date'          => 2012,
+                               'delete'        => ''
+                       );
+                       $values['consume'][] = array
+                       (
+                               'amount'        => 6789012,
+                               'date'          => 2013,
+                               'delete'        => ''
+                       );
                        
-                       $msgbox_data = 
(isset($receipt)?$GLOBALS['phpgw']->common->msgbox_data($receipt):'');
+                       
+                       $datavalues[0] = array
+                       (
+                               'name'                                  => "0",
+                               'values'                                => 
json_encode($values['consume']),
+                               'total_records'                 => 
count($values['consume']),
+                               'edit_action'                   => "''",
+                               'is_paginator'                  => 1,
+                               'footer'                                => 0
+                       );
 
+
+
+                       $myColumnDefs[0] = array
+                       (
+                               'name'          => "0",
+                               'values'        =>      json_encode(array(      
array('key' => 
'amount','label'=>lang('amount'),'sortable'=>true,'resizeable'=>true, 
'formatter' => FormatterRight),
+                                                                               
                        array('key' => 
'date','label'=>lang('date'),'sortable'=>true,'resizeable'=>true),
+                                                                               
                        array('key' => 
'delete','label'=>lang('delete'),'sortable'=>false,'resizeable'=>false)))
+                       );
+
+                       $msgbox_data = 
isset($receipt)?$GLOBALS['phpgw']->common->msgbox_data($receipt):'';
+
                        $data = array
                        (
-                               'value_entry_date'                              
=> (isset($values['entry_date'])?$values['entry_date']:''),
-                               'value_name'                                    
=> (isset($values['name'])?$values['name']:''),
-                               'value_address'                                 
=> (isset($values['address'])?$values['address']:''),
-                               'value_zip'                                     
        => (isset($values['zip'])?$values['zip']:''),
-                               'value_town'                                    
=> (isset($values['town'])?$values['town']:''),
-                               'value_remark'                                  
=> (isset($values['remark'])?$values['remark']:''),
+                               'contract'                                      
        => rental_socontract::get_instance()->get_single(19)->toArray(),
+                               'value_entry_date'                              
=> isset($values['entry_date'])?$values['entry_date']:'',
+                               'value_name'                                    
=> isset($values['name'])?$values['name']:'',
+                               'value_address'                                 
=> isset($values['address'])?$values['address']:'',
+                               'value_zip'                                     
        => isset($values['zip'])?$values['zip']:'',
+                               'value_town'                                    
=> isset($values['town'])?$values['town']:'',
+                               'value_remark'                                  
=> isset($values['remark'])?$values['remark']:'',
 
                                'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
                                'form_action'                                   
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'value_id'                                      
        => $demo_id,
 
                                'cat_select'                                    
=> $this->cats->formatted_xslt_list(array('select_name' => 
'values[cat_id]','selected' => 
(isset($values['cat_id'])?$values['cat_id']:''))),
-                               'attributes_values'                             
=> $values['attributes'],
+                               'custom_attributes'                             
=> array('attributes' => $values['attributes']),
                                'value_access'                                  
=> isset($values['access'])?$values['access']:'',
                                'generic_list_1'                                
=> array('options' => $generic_list_1),
                                'generic_list_2'                                
=> array('options' => $generic_list_2),
+
+                               'value_start_date'                              
=> date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'], 
time()),
+                               'img_cal'                                       
        => $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
+                               'end_date'                                      
        => $end_date,
+                               //inline tables
+                               'property_js'                                   
=> 
json_encode($GLOBALS['phpgw_info']['server']['webserver_url']."/property/js/yahoo/property2.js"),
+                               'datatable'                                     
        => $datavalues,
+                               'myColumnDefs'                                  
=> $myColumnDefs,
+                               'tabs'                                          
        => self::_generate_tabs(),
+                               'textareacols'                                  
=> 60,
+                               'textarearows'                                  
=> 10
                        );
 
                        $GLOBALS['phpgw']->richtext->replace_element('remark');
@@ -839,9 +898,43 @@
                        $appname                = lang('demo');
 
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('demo') . " - {$appname}: {$function_msg}";
+                       
$GLOBALS['phpgw']->xslttpl->add_file(array('edit','attributes_form'));
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit' => $data));
+
+                       $GLOBALS['phpgw']->js->validate_file( 'yahoo', 
'demo.edit', 'demo' );
+
+                       phpgwapi_yui::load_widget('dragdrop');
+                       phpgwapi_yui::load_widget('datatable');
+               //      phpgwapi_yui::load_widget('menu');
+                       phpgwapi_yui::load_widget('connection');
+                       phpgwapi_yui::load_widget('loader');
+                       phpgwapi_yui::load_widget('tabview');
+                       phpgwapi_yui::load_widget('paginator');
+                       phpgwapi_yui::load_widget('animation');
+                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/datatable/assets/skins/sam/datatable.css');
+                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/paginator/assets/skins/sam/paginator.css');
+                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/container/assets/skins/sam/container.css');
+
                }
 
+
+               protected function _generate_tabs()
+               {
+                       $tabs = array
+                       (
+                               'general'       => array('label' => 
lang('general'), 'link' => '#general'),
+                               'list'          => array('label' => 
lang('list'), 'link' => '#list'),
+                               'tables'        => array('label' => 
lang('inline tables'), 'link' => '#tables'),
+                               'dates'         => array('label' => 
lang('dates'), 'link' => '#dates'),
+                               'custom'        => array('label' => 
lang('custom attributes'), 'link' => '#custom'),
+                       );
+
+                       phpgwapi_yui::tabview_setup('demo_tabview');
+
+                       return  phpgwapi_yui::tabview_generate($tabs, 
'general');
+               }
+
+
                public function view()
                {
                        if(!$this->acl_read)

Copied: branches/Version-1_0-branch/demo/js/yahoo/demo.edit.js (from rev 7573, 
trunk/demo/js/yahoo/demo.edit.js)
===================================================================
--- branches/Version-1_0-branch/demo/js/yahoo/demo.edit.js                      
        (rev 0)
+++ branches/Version-1_0-branch/demo/js/yahoo/demo.edit.js      2011-09-11 
13:42:06 UTC (rev 7574)
@@ -0,0 +1,64 @@
+var myDataSource,myDataTable, myContextMenu;
+var tableYUI;
+var  myPaginator_0;
+var  myDataTable_0;
+
+
+/********************************************************************************
+        *
+        */
+       this.addFooterDatatable = function(paginator,datatable)
+       {
+               //call getSumPerPage(name of column) in property.js
+               tmp_sum1 = getSumPerPage('budget',2,paginator,datatable);
+               tmp_sum2 = getSumPerPage('calculation',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_sum(tmp_sum1);
+               td_sum(tmp_sum2);
+               td_empty(3);
+
+               myfoot = tableYUI.createTFoot();
+               myfoot.setAttribute("id","myfoot");
+               myfoot.appendChild(newTR);
+       }
+       
+/********************************************************************************/
     
+       var FormatterCenter = function(elCell, oRecord, oColumn, oData)
+       {
+               elCell.innerHTML = "<center>"+oData+"</center>";
+       }
+       
+       var FormatterRight = function(elCell, oRecord, oColumn, oData)
+       {
+               elCell.innerHTML = "<div 
align=\"right\">"+YAHOO.util.Number.format(oData, {thousandsSeparator:" 
"})+"</div>";
+       }
+
+/********************************************************************************/
+YAHOO.util.Event.addListener(window, "load", function()
+{
+       var loader = new YAHOO.util.YUILoader();
+       loader.addModule({
+               name: "anyone",
+               type: "js",
+           fullpath: property_js
+           });
+
+       loader.require("anyone");
+    loader.insert();
+});
+
+

Copied: branches/Version-1_0-branch/demo/setup/phpgw_no.lang (from rev 7573, 
trunk/demo/setup/phpgw_no.lang)
===================================================================
--- branches/Version-1_0-branch/demo/setup/phpgw_no.lang                        
        (rev 0)
+++ branches/Version-1_0-branch/demo/setup/phpgw_no.lang        2011-09-11 
13:42:06 UTC (rev 7574)
@@ -0,0 +1,15 @@
+demo app       demo    no      Demonstrasjonsmodul
+demo   common  no      Demo Modul
+Add    demo    no      Legg til
+Delete demo    no      Slett
+Edit   demo    no      Editer
+View   demo    no      Vis
+apply  demo    no      Mellomlagre
+list   demo    no      Liste
+general        demo    no      Generell
+dates  demo    no      Datoer
+custom attributes      demo    no      Egendefinerte attributter
+no category    demo    no      Kategori ikke valgt
+time created   demo    no      Tidsstempel
+inline tables  demo    no      Tabeller
+table  demo    no      Tabell

Modified: branches/Version-1_0-branch/demo/templates/base/attributes_form.xsl
===================================================================
--- branches/Version-1_0-branch/demo/templates/base/attributes_form.xsl 
2011-09-11 13:24:23 UTC (rev 7573)
+++ branches/Version-1_0-branch/demo/templates/base/attributes_form.xsl 
2011-09-11 13:42:06 UTC (rev 7574)
@@ -1,31 +1,27 @@
 <!-- $Id$ -->
-
        <xsl:template name="attributes_form">
                <xsl:apply-templates select="attributes_values"/>
        </xsl:template>
 
-       <xsl:template match="attributes_values">
-               <xsl:variable name="statustext"><xsl:value-of 
select="statustext"/></xsl:variable>
+
+       <xsl:template name="attributes_values" xmlns:php="http://php.net/xsl";>
+               <xsl:for-each select="attributes_group" >
+                       <div id="{link}">
+                               <table cellpadding="2" cellspacing="2" 
width="100%" align="center" border="0">
+                                       <xsl:apply-templates 
select="attributes"/>
+                               </table>
+                       </div>
+               </xsl:for-each>
+       </xsl:template>
+
+       <xsl:template match="attributes" xmlns:php="http://php.net/xsl";>
+                       <xsl:variable name="statustext"><xsl:value-of 
select="statustext"/></xsl:variable>
                        <tr>
-                               <xsl:attribute name="class">
+                               <td align="left" width="19%" valign="top" 
title="{$statustext}">
                                        <xsl:choose>
-                                               <xsl:when test="@class">
-                                                       <xsl:value-of 
select="@class"/>
-                                               </xsl:when>
-                                               <xsl:when test="position() mod 
2 = 0">
-                                                       
<xsl:text>row_off</xsl:text>
-                                               </xsl:when>
-                                               <xsl:otherwise>
-                                                       
<xsl:text>row_on</xsl:text>
-                                               </xsl:otherwise>
-                                       </xsl:choose>
-                               </xsl:attribute>
-
-                               <td class="{class}" align="left" valign="top" 
title="{$statustext}" style="cursor:help">
-                                       <xsl:choose>
                                                <xsl:when test="helpmsg=1">
-                                                       <xsl:variable 
name="help_url"><xsl:value-of select="help_url"/>&amp;attrib_id=<xsl:value-of 
select="attrib_id"/></xsl:variable>
-                                                       <a href="javascript:var 
w=window.open('{$help_url}','','width=550,height=400,scrollbars')">
+                                                       <xsl:variable 
name="help_url"><xsl:value-of select="help_url"/></xsl:variable>
+                                                       <a href="javascript:var 
w=window.open('{$help_url}','','left=50,top=100,width=550,height=400,scrollbars')">
                                                                
<xsl:text>[</xsl:text><xsl:value-of select="input_text"/><xsl:text>]</xsl:text>
                                                        </a>
                                                </xsl:when>
@@ -39,10 +35,10 @@
                                                        <xsl:text>[ </xsl:text>
                                                        <xsl:choose>
                                                                <xsl:when 
test="value!=''">
-                                                                       
<xsl:value-of select="//lang_edit"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'edit')" />
                                                                </xsl:when>
                                                                <xsl:otherwise>
-                                                                       
<xsl:value-of select="//lang_add"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'add')" />
                                                                </xsl:otherwise>
                                                        </xsl:choose>
                                                        <xsl:text> ]</xsl:text>
@@ -52,11 +48,11 @@
                                <td align="left">
                                        <xsl:choose>
                                                <xsl:when test="name!=''">
-                                                       <input type="hidden" 
name="values_attribute[{counter}][column_name]" value="{column_name}"></input>
+                                                       <input type="hidden" 
name="values_attribute[{counter}][name]" value="{name}"></input>
                                                        <input type="hidden" 
name="values_attribute[{counter}][datatype]" value="{datatype}"></input>
                                                        <input type="hidden" 
name="values_attribute[{counter}][history]" value="{history}"></input>
                                                        <input type="hidden" 
name="values_attribute[{counter}][attrib_id]" value="{id}"></input>
-                                                       <input type="hidden" 
name="values_attribute[{counter}][allow_null]" value="{allow_null}"></input>
+                                                       <input type="hidden" 
name="values_attribute[{counter}][nullable]" value="{nullable}"></input>
                                                        <input type="hidden" 
name="values_attribute[{counter}][input_text]" value="{input_text}"></input>
                                                        <xsl:choose>
                                                                <xsl:when 
test="datatype='R'">
@@ -66,7 +62,7 @@
                                                                        
<xsl:call-template name="choice"/>
                                                                </xsl:when>
                                                                <xsl:when 
test="datatype='LB'">
-                                                                       <select 
name="values_attribute[{counter}][value]" class="forms" 
onMouseover="window.status='{statustext}'; return true;" 
onMouseout="window.status='';return true;">
+                                                                       <select 
name="values_attribute[{counter}][value]" class="forms">
                                                                                
<xsl:choose>
                                                                                
        <xsl:when test="disabled!=''">
                                                                                
                <xsl:attribute name="disabled">
@@ -74,8 +70,10 @@
                                                                                
                </xsl:attribute>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
-                                                                               
<option value=""><xsl:value-of select="//lang_none"/></option>
-                                                                               
<xsl:for-each select="choice">  
+                                                                               
<option value="">
+                                                                               
        <xsl:value-of select="php:function('lang', 'select')" />
+                                                                               
</option>
+                                                                               
<xsl:for-each select="choice">
                                                                                
        <xsl:variable name="id"><xsl:value-of select="id"/></xsl:variable>
                                                                                
        <xsl:choose>
                                                                                
                <xsl:when test="checked='checked'">
@@ -84,46 +82,115 @@
                                                                                
                <xsl:otherwise>
                                                                                
                        <option value="{$id}"><xsl:value-of 
disable-output-escaping="yes" select="value"/></option>
                                                                                
                </xsl:otherwise>
-                                                                               
        </xsl:choose>                           
+                                                                               
        </xsl:choose>
                                                                                
</xsl:for-each>
                                                                        
</select>
                                                                </xsl:when>
                                                                <xsl:when 
test="datatype='AB'">
-                                                                       
<xsl:variable name="contact_name"><xsl:value-of 
select="name"/><xsl:text>_name</xsl:text></xsl:variable>
-                                                                       
<xsl:variable name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
-                                                                       <input 
type="text" name="{name}" value="{value}" onClick="{$lookup_function}" 
readonly="readonly" size="5" onMouseout="window.status='';return true;" >
+                                                                       <table>
+                                                                               
<tr>
+                                                                               
        <td>
+                                                                               
                <xsl:variable name="contact_name"><xsl:value-of 
select="name"/><xsl:text>_name</xsl:text></xsl:variable>
+                                                                               
                <xsl:variable 
name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
+                                                                               
                <xsl:variable 
name="clear_function"><xsl:text>clear_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
+                                                                               
                <input type="hidden" name="{name}" value="{value}" 
onClick="{$lookup_function}" readonly="readonly" size="5">
+                                                                               
                        <xsl:choose>
+                                                                               
                                <xsl:when test="disabled!=''">
+                                                                               
                                        <xsl:attribute name="disabled">
+                                                                               
                                                <xsl:text> disabled</xsl:text>
+                                                                               
                                        </xsl:attribute>
+                                                                               
                                </xsl:when>
+                                                                               
                        </xsl:choose>
+                                                                               
                </input>
+                                                                               
                <input  size="30" type="text" name="{$contact_name}" 
value="{contact_name}"  onClick="{$lookup_function}" readonly="readonly"> 
+                                                                               
                        <xsl:choose>
+                                                                               
                                <xsl:when test="disabled!=''">
+                                                                               
                                        <xsl:attribute name="disabled">
+                                                                               
                                                <xsl:text> disabled</xsl:text>
+                                                                               
                                        </xsl:attribute>
+                                                                               
                                </xsl:when>
+                                                                               
                        </xsl:choose>
+                                                                               
                </input>
+                                                                               
                <input type="checkbox" name="clear_{name}_box"  
onClick="{$clear_function}" >
+                                                                               
                        <xsl:attribute name="title">
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'delete')" />
+                                                                               
                        </xsl:attribute>
+                                                                               
                        <xsl:attribute name="readonly">
+                                                                               
                                <xsl:text>readonly</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </input>
+                                                                               
        </td>
+                                                                               
</tr>
                                                                                
<xsl:choose>
-                                                                               
        <xsl:when test="disabled!=''">
-                                                                               
                <xsl:attribute name="disabled">
-                                                                               
                        <xsl:text> disabled</xsl:text>
-                                                                               
                </xsl:attribute>
+                                                                               
        <xsl:when test="contact_tel!=''">
+                                                                               
                <tr>
+                                                                               
                        <td>
+                                                                               
                                <xsl:value-of select="contact_tel"/>
+                                                                               
                        </td>
+                                                                               
                </tr>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                                       <input  
size="30" type="text" name="{$contact_name}" value="{contact_name}"  
onClick="{$lookup_function}" readonly="readonly"> 
                                                                                
<xsl:choose>
-                                                                               
        <xsl:when test="disabled!=''">
-                                                                               
                <xsl:attribute name="disabled">
-                                                                               
                        <xsl:text> disabled</xsl:text>
-                                                                               
                </xsl:attribute>
+                                                                               
        <xsl:when test="contact_email!=''">
+                                                                               
                <tr>
+                                                                               
                        <td>
+                                                                               
                                <a href="mailto:{contact_email}";><xsl:value-of 
select="contact_email"/></a>
+                                                                               
                        </td>
+                                                                               
                </tr>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                       </input>
+                                                                       </table>
                                                                </xsl:when>
+                                                               <xsl:when 
test="datatype='ABO'">
+                                                                       <table>
+                                                                               
<tr>
+                                                                               
        <td>
+                                                                               
                <xsl:variable name="org_name"><xsl:value-of 
select="name"/><xsl:text>_name</xsl:text></xsl:variable>
+                                                                               
                <xsl:variable 
name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
+                                                                               
                <input type="hidden" name="{name}" value="{value}" 
onClick="{$lookup_function}" readonly="readonly" size="5">
+                                                                               
                        <xsl:choose>
+                                                                               
                                <xsl:when test="disabled!=''">
+                                                                               
                                        <xsl:attribute name="disabled">
+                                                                               
                                                <xsl:text> disabled</xsl:text>
+                                                                               
                                        </xsl:attribute>
+                                                                               
                                </xsl:when>
+                                                                               
                        </xsl:choose>
+                                                                               
                </input>
+                                                                               
                <input  size="30" type="text" name="{$org_name}" 
value="{org_name}"  onClick="{$lookup_function}" readonly="readonly"> 
+                                                                               
                        <xsl:choose>
+                                                                               
                                <xsl:when test="disabled!=''">
+                                                                               
                                        <xsl:attribute name="disabled">
+                                                                               
                                                <xsl:text> disabled</xsl:text>
+                                                                               
                                        </xsl:attribute>
+                                                                               
                                </xsl:when>
+                                                                               
                        </xsl:choose>
+                                                                               
                </input>
+                                                                               
        </td>
+                                                                               
</tr>
+                                                                               
<xsl:choose>
+                                                                               
        <xsl:when test="org_tel!=''">
+                                                                               
                <tr>
+                                                                               
                        <td>
+                                                                               
                                <xsl:value-of select="org_tel"/>
+                                                                               
                        </td>
+                                                                               
                </tr>
+                                                                               
        </xsl:when>
+                                                                               
</xsl:choose>
+                                                                               
<xsl:choose>
+                                                                               
        <xsl:when test="org_email!=''">
+                                                                               
                <tr>
+                                                                               
                        <td>
+                                                                               
                                <a href="mailto:{org_email}";><xsl:value-of 
select="org_email"/></a>
+                                                                               
                        </td>
+                                                                               
                </tr>
+                                                                               
        </xsl:when>
+                                                                               
</xsl:choose>
+                                                                       </table>
+                                                               </xsl:when>
                                                                <xsl:when 
test="datatype='VENDOR'">
                                                                        
<xsl:variable name="vendor_name"><xsl:value-of 
select="name"/><xsl:text>_org_name</xsl:text></xsl:variable>
                                                                        
<xsl:variable name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
-                                                                       <input 
type="text" name="{name}" value="{value}" onClick="{$lookup_function}" 
readonly="readonly" size="6" onMouseout="window.status='';return true;" >
+                                                                       <input 
type="text" name="{name}" value="{value}" onClick="{$lookup_function}" 
readonly="readonly" size="6">
                                                                                
<xsl:choose>
                                                                                
        <xsl:when test="disabled!=''">
                                                                                
                <xsl:attribute name="disabled">
@@ -131,11 +198,6 @@
                                                                                
                </xsl:attribute>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
                                                                        </input>
                                                                        <input  
size="30" type="text" name="{$vendor_name}" value="{vendor_name}"  
onClick="{$lookup_function}" readonly="readonly"> 
                                                                                
<xsl:choose>
@@ -145,17 +207,12 @@
                                                                                
                </xsl:attribute>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
                                                                        </input>
-                                                               </xsl:when>     
+                                                               </xsl:when>
                                                                <xsl:when 
test="datatype='user'">
                                                                        
<xsl:variable name="user_name"><xsl:value-of 
select="name"/><xsl:text>_user_name</xsl:text></xsl:variable>
                                                                        
<xsl:variable name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
-                                                                       <input 
type="text" name="{name}" value="{value}" onClick="{$lookup_function}" 
readonly="readonly" size="6" onMouseout="window.status='';return true;" >
+                                                                       <input 
type="text" name="{name}" value="{value}" onClick="{$lookup_function}" 
readonly="readonly" size="6">
                                                                                
<xsl:choose>
                                                                                
        <xsl:when test="disabled!=''">
                                                                                
                <xsl:attribute name="disabled">
@@ -163,11 +220,6 @@
                                                                                
                </xsl:attribute>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
                                                                        </input>
                                                                        <input  
size="30" type="text" name="{$user_name}" value="{user_name}"  
onClick="{$lookup_function}" readonly="readonly"> 
                                                                                
<xsl:choose>
@@ -177,23 +229,13 @@
                                                                                
                </xsl:attribute>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
                                                                        </input>
                                                                </xsl:when>
                                                                <xsl:when 
test="datatype='D'">
-                                                                       <input 
type="text" id="values_attribute_{counter}" 
name="values_attribute[{counter}][value]" value="{value}"  size="12" 
maxlength="12"  onMouseout="window.status='';return true;" >
+                                                                       <input 
type="text" id="values_attribute_{counter}" 
name="values_attribute[{counter}][value]" value="{value}"  size="12" 
maxlength="12" >
                                                                                
<xsl:attribute name="readonly">
                                                                                
        <xsl:text> readonly</xsl:text>
                                                                                
</xsl:attribute>
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="statustext"/>
-                                                                               
        <xsl:text>';return true;</xsl:text>
-                                                                               
</xsl:attribute>
                                                                                
<xsl:choose>
                                                                                
        <xsl:when test="disabled!=''">
                                                                                
                <xsl:attribute name="disabled">
@@ -205,7 +247,7 @@
                                                                        <img 
id="values_attribute_{counter}-trigger" src="{img_cal}" alt="{lang_datetitle}" 
title="{lang_datetitle}" style="cursor:pointer; cursor:hand;" />
                                                                </xsl:when>
                                                                <xsl:when 
test="datatype='T'">
-                                                                       
<textarea cols="40" rows="6" name="values_attribute[{counter}][value]" 
wrap="virtual" onMouseout="window.status='';return true;">
+                                                                       
<textarea cols="{//textareacols}" rows="{//textarearows}" 
name="values_attribute[{counter}][value]" >
                                                                                
<xsl:choose>
                                                                                
        <xsl:when test="disabled!=''">
                                                                                
                <xsl:attribute name="disabled">
@@ -213,19 +255,14 @@
                                                                                
                </xsl:attribute>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="statustext"/>
-                                                                               
        <xsl:text>';return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                               
<xsl:value-of select="value"/>          
+                                                                               
<xsl:value-of select="value"/>
                                                                        
</textarea>
                                                                </xsl:when>
                                                                <xsl:when 
test="datatype='pwd'">
                                                                        <table>
                                                                                
<tr>
                                                                                
        <td>
-                                                                               
                <input type="password" 
name="values_attribute[{counter}][value]"  size="30" 
onMouseout="window.status='';return true;" >
+                                                                               
                <input type="password" 
name="values_attribute[{counter}][value]"  size="30">
                                                                                
                        <xsl:choose>
                                                                                
                                <xsl:when test="disabled!=''">
                                                                                
                                        <xsl:attribute name="disabled">
@@ -233,40 +270,98 @@
                                                                                
                                        </xsl:attribute>
                                                                                
                                </xsl:when>
                                                                                
                        </xsl:choose>
-                                                                               
                        <xsl:attribute name="onMouseover">
-                                                                               
                                <xsl:text>window.status='</xsl:text>
-                                                                               
                                        <xsl:value-of select="statustext"/>
-                                                                               
                                        <xsl:text> - </xsl:text>
-                                                                               
                                        <xsl:value-of select="datatype_text"/>
-                                                                               
                                <xsl:text>';return true;</xsl:text>
-                                                                               
                        </xsl:attribute>
                                                                                
                </input>
                                                                                
        </td>
                                                                                
</tr>
                                                                                
<tr>
                                                                                
        <td>
-                                                                               
                <input type="password" 
name="values_attribute[{counter}][value2]"  size="30" 
onMouseout="window.status='';return true;" >
+                                                                               
                <input type="password" 
name="values_attribute[{counter}][value2]"  size="30">
                                                                                
                        <xsl:choose>
                                                                                
                                <xsl:when test="disabled!=''">
                                                                                
                                        <xsl:attribute name="disabled">
                                                                                
                                                <xsl:text> disabled</xsl:text>
                                                                                
                                        </xsl:attribute>
-                                                                               
                                        </xsl:when>
+                                                                               
                                </xsl:when>
                                                                                
                        </xsl:choose>
-                                                                               
                        <xsl:attribute name="onMouseover">
-                                                                               
                                <xsl:text>window.status='</xsl:text>
-                                                                               
                                        <xsl:value-of select="statustext"/>
-                                                                               
                                        <xsl:text> - </xsl:text>
-                                                                               
                                        <xsl:value-of select="datatype_text"/>
-                                                                               
                                <xsl:text>';return true;</xsl:text>
-                                                                               
                        </xsl:attribute>
                                                                                
                </input>
                                                                                
        </td>
                                                                                
</tr>
                                                                        </table>
                                                                </xsl:when>
+                                                               <xsl:when 
test="datatype='bolean'">
+                                                                       <input 
type="checkbox" name="values_attribute[{counter}][value]" value="1">
+                                                                               
<xsl:choose>
+                                                                               
        <xsl:when test="value!=''">
+                                                                               
                <xsl:attribute name="checked">
+                                                                               
                        <xsl:text>checked</xsl:text>
+                                                                               
                </xsl:attribute>
+                                                                               
        </xsl:when>
+                                                                               
</xsl:choose>
+                                                                       </input>
+                                                               </xsl:when>
+                                                               <xsl:when 
test="datatype='link'">
+                                                                       <input 
type="text" name="values_attribute[{counter}][value]" value="{value}" size="30">
+                                                                               
<xsl:choose>
+                                                                               
        <xsl:when test="disabled!=''">
+                                                                               
                <xsl:attribute name="disabled">
+                                                                               
                        <xsl:text> disabled</xsl:text>
+                                                                               
                </xsl:attribute>
+                                                                               
        </xsl:when>
+                                                                               
</xsl:choose>
+                                                                       </input>
+                                                                       
<xsl:choose>
+                                                                               
<xsl:when test="value!=''">
+                                                                               
        <br/><a href="{value}" target="_blank"><xsl:value-of 
select="value"/></a>
+                                                                               
</xsl:when>
+                                                                       
</xsl:choose>
+                                                               </xsl:when>
+                                                               <xsl:when 
test="datatype='event'">
+                                                                       
<xsl:choose>
+                                                                               
<xsl:when test="warning!=''">
+                                                                               
        <xsl:value-of select="warning"/>
+                                                                               
</xsl:when>
+                                                                               
<xsl:otherwise>
+                                                                               
        <xsl:variable name="event_descr"><xsl:value-of 
select="name"/><xsl:text>_descr</xsl:text></xsl:variable>
+                                                                               
        <xsl:variable 
name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
+                                                                               
        <table>
+                                                                               
                <tr>
+                                                                               
                        <td>
+                                                                               
                                <input type="text" name="{name}" 
value="{value}" onClick="{$lookup_function}" readonly="readonly" 
size="6"></input>
+                                                                               
                                <input  size="30" type="text" 
name="{$event_descr}" value="{descr}"  onClick="{$lookup_function}" 
readonly="readonly"> 
+                                                                               
                                        <xsl:choose>
+                                                                               
                                                <xsl:when test="disabled!=''">
+                                                                               
                                                        <xsl:attribute 
name="disabled">
+                                                                               
                                                                <xsl:text> 
disabled</xsl:text>
+                                                                               
                                                        </xsl:attribute>
+                                                                               
                                                </xsl:when>
+                                                                               
                                        </xsl:choose>
+                                                                               
                                </input>
+                                                                               
                        </td>
+                                                                               
                </tr>
+                                                                               
                <xsl:choose>
+                                                                               
                        <xsl:when test="next!=''">
+                                                                               
                                <tr>
+                                                                               
                                        <td>
+                                                                               
                                                <xsl:value-of 
select="lang_next_run"/>
+                                                                               
                                                <xsl:text>: </xsl:text>
+                                                                               
                                                <xsl:value-of select="next"/>
+                                                                               
                                        </td>
+                                                                               
                                </tr>
+                                                                               
                                <tr>
+                                                                               
                                        <td>
+                                                                               
                                                <xsl:value-of 
select="lang_enabled"/>
+                                                                               
                                                <xsl:text>: </xsl:text>
+                                                                               
                                                <xsl:value-of select="enabled"/>
+                                                                               
                                        </td>
+                                                                               
                                </tr>
+                                                                               
                        </xsl:when>
+                                                                               
                </xsl:choose>
+                                                                               
        </table>
+                                                                               
</xsl:otherwise>
+                                                                       
</xsl:choose>
+                                                               </xsl:when>
                                                                <xsl:otherwise>
-                                                                       <input 
type="text" name="values_attribute[{counter}][value]" value="{value}" size="30" 
onMouseout="window.status='';return true;" >
+                                                                       <input 
type="text" name="values_attribute[{counter}][value]" value="{value}" size="30">
                                                                                
<xsl:choose>
                                                                                
        <xsl:when test="disabled!=''">
                                                                                
                <xsl:attribute name="disabled">
@@ -274,34 +369,19 @@
                                                                                
                </xsl:attribute>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="statustext"/>
-                                                                               
                <xsl:text> - </xsl:text>
-                                                                               
                <xsl:value-of select="datatype_text"/>
-                                                                               
        <xsl:text>';return true;</xsl:text>
-                                                                               
</xsl:attribute>
                                                                        </input>
                                                                </xsl:otherwise>
                                                        </xsl:choose>
                                                        <xsl:choose>
                                                                <xsl:when 
test="history=1">
-                                                                       <input 
type="text" name="values_attribute[{counter}][date]" value="" 
onFocus="{//dateformat_validate}" onKeyUp="{//onKeyUp}" onBlur="{//onBlur}" 
size="12" maxlength="10"  onMouseout="window.status='';return true;" >
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="//lang_history_date_statustext"/>
-                                                                               
        <xsl:text>';return true;</xsl:text>
-                                                                               
</xsl:attribute>
+                                                                       <input 
type="text" name="values_attribute[{counter}][date]" value="" 
onFocus="{//dateformat_validate}" onKeyUp="{//onKeyUp}" onBlur="{//onBlur}" 
size="12" maxlength="10" >
                                                                        </input>
-                                                                       
                                                                        
<xsl:variable name="link_history"><xsl:value-of 
select="link_history"/></xsl:variable>
                                                                        
<xsl:variable name="lang_history_help"><xsl:value-of 
select="//lang_history_help"/></xsl:variable>
                                                                        
<xsl:variable name="lang_history"><xsl:value-of 
select="//lang_history"/></xsl:variable>
-                                                                       <a 
href="javascript:var 
w=window.open('{$link_history}','','width=550,height=400,scrollbars')"
-                                                                       
onMouseOver="overlib('{$lang_history_help}', CAPTION, '{$lang_history}')"
-                                                                       
onMouseOut="nd()">
-                                                                       
<xsl:value-of select="//lang_history"/></a>                                     
-
+                                                                       <a 
href="javascript:var 
w=window.open('{$link_history}','','left=50,top=100,width=550,height=400,scrollbars')"
+                                                                               
title="{$lang_history_help}">
+                                                                               
<xsl:value-of select="//lang_history"/></a>
                                                                </xsl:when>
                                                        </xsl:choose>
                                                </xsl:when>
@@ -312,22 +392,22 @@
 
        <xsl:template name="choice">
                <xsl:variable name="counter"><xsl:value-of 
select="counter"/></xsl:variable>
-                       <table cellpadding="2" cellspacing="2" width="50%" 
align="left">
-                               <xsl:for-each select="choice" >
-                                       <tr>
-                                               <xsl:attribute name="class">
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="@class">
-                                                                       
<xsl:value-of select="@class"/>
-                                                               </xsl:when>
-                                                               <xsl:when 
test="position() mod 2 = 0">
-                                                                       
<xsl:text>row_off</xsl:text>
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
-                                                                       
<xsl:text>row_on</xsl:text>
-                                                               </xsl:otherwise>
-                                                       </xsl:choose>
-                                               </xsl:attribute>
+               <table cellpadding="2" cellspacing="2" width="50%" align="left">
+                       <xsl:for-each select="choice" >
+                               <tr>
+                                       <xsl:attribute name="class">
+                                               <xsl:choose>
+                                                       <xsl:when test="@class">
+                                                               <xsl:value-of 
select="@class"/>
+                                                       </xsl:when>
+                                                       <xsl:when 
test="position() mod 2 = 0">
+                                                               
<xsl:text>row_off</xsl:text>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                               
<xsl:text>row_on</xsl:text>
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                       </xsl:attribute>
                                        <td align="left">
                                                <xsl:value-of select="value"/>
                                                <xsl:text> </xsl:text>
@@ -342,7 +422,7 @@
                                                        </xsl:otherwise>
                                                </xsl:choose>
                                        </td>
-                                       </tr>
-                               </xsl:for-each>                         
-                       </table>
+                               </tr>
+                       </xsl:for-each>
+               </table>
        </xsl:template>

Copied: branches/Version-1_0-branch/demo/templates/base/edit.xsl (from rev 
7573, trunk/demo/templates/base/edit.xsl)
===================================================================
--- branches/Version-1_0-branch/demo/templates/base/edit.xsl                    
        (rev 0)
+++ branches/Version-1_0-branch/demo/templates/base/edit.xsl    2011-09-11 
13:42:06 UTC (rev 7574)
@@ -0,0 +1,303 @@
+<!-- $Id: demo.xsl 7561 2011-09-07 14:01:50Z sigurdne $ -->
+
+<!-- add / edit  -->
+       <xsl:template match="edit" xmlns:php="http://php.net/xsl";>
+               <xsl:variable name="form_action"><xsl:value-of 
select="form_action"/></xsl:variable>
+               <form method="post" action="{$form_action}">
+                       <div class="yui-navset yui-navset-top" 
id="demo_tabview">
+                               <xsl:value-of disable-output-escaping="yes" 
select="tabs" />
+                               <div class="yui-content">
+                                       <div id="general">
+                                               <table cellpadding="2" 
cellspacing="2" width="90%" align="center">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="msgbox_data != ''">
+                                                                       <tr>
+                                                                               
<td align="left" colspan="3">
+                                                                               
        <xsl:call-template name="msgbox"/>
+                                                                               
</td>
+                                                                       </tr>
+                                                               </xsl:when>
+                                                       </xsl:choose>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="php:function('lang', 'contract id')" />
+                                                               </td>
+                                                               <td>
+                                                                       
<xsl:value-of select="contract/id"/>
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="php:function('lang', 'old contract id')" />
+                                                               </td>
+                                                               <td>
+                                                                       
<xsl:value-of select="contract/old_contract_id"/>
+                                                               </td>
+                                                       </tr>
+
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="value_id != ''">
+                                                               <tr>
+                                                                       <td 
valign="top">
+                                                                               
<xsl:value-of select="php:function('lang', 'id')" />
+                                                                       </td>
+                                                                       <td 
align="left">
+                                                                               
<xsl:value-of select="value_id"/>
+                                                                       </td>
+                                                               </tr>
+                                                               <tr>
+                                                                       <td 
valign="top">
+                                                                               
<xsl:value-of select="php:function('lang', 'entry_date')" />
+                                                                       </td>
+                                                                       <td>
+                                                                               
<xsl:value-of select="value_entry_date"/>
+                                                                       </td>
+                                                               </tr>
+                                                               </xsl:when>
+                                                       </xsl:choose>   
+                                                       <tr>
+                                                               <td>
+                                                                       
<xsl:value-of select="php:function('lang', 'category')" />
+                                                               </td>
+                                                               <td>
+                                                                       
<xsl:call-template name="categories"/>
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td 
valign="top" width="10%">
+                                                                       
<xsl:value-of select="php:function('lang', 'name')" />
+                                                               </td>
+                                                               <td>
+                                                                       <input 
type="text" size="60" name="values[name]" value="{value_name}">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="php:function('lang', 'name')" />
+                                                                               
</xsl:attribute>
+                                                                       </input>
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="php:function('lang', 'address')" />
+                                                               </td>
+                                                               <td>
+                                                                       <input 
type="text" size="60" name="values[address]" value="{value_address}">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="php:function('lang', 'address')" />
+                                                                               
</xsl:attribute>
+                                                                       </input>
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="php:function('lang', 'zip')" />
+                                                               </td>
+                                                               <td>
+                                                                       <input 
type="text" size="6" name="values[zip]" value="{value_zip}">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="lang_zip_status_text"/>
+                                                                               
</xsl:attribute>
+                                                                       </input>
+                                                                       
<xsl:value-of select="php:function('lang', 'town')" />
+                                                                       <input 
type="text" size="40" name="values[town]" value="{value_town}">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="php:function('lang', 'town')" />
+                                                                               
</xsl:attribute>
+                                                                       </input>
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="php:function('lang', 'remark')" />
+                                                               </td>
+                                                               <td>
+                                                                       
<textarea cols="60" rows="10" name="values[remark]" id="remark" wrap="virtual">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="lang_remark_status_text"/>
+                                                                               
</xsl:attribute>
+                                                                               
<xsl:value-of select="value_remark"/>           
+                                                                       
</textarea>
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td>
+                                                                       
<xsl:value-of select="php:function('lang', 'private')" />
+                                                               </td>
+                                                               <td>
+                                                                       
<xsl:choose>
+                                                                               
        <xsl:when test="value_access = 'private'">
+                                                                               
                <input type="checkbox" name="values[access]" value="True" 
checked="checked">
+                                                                               
                        <xsl:attribute name="title">
+                                                                               
                                <xsl:value-of select="php:function('lang', 'The 
note is private. If the note should be public, uncheck this box')" />
+                                                                               
                        </xsl:attribute>
+                                                                               
                </input>
+                                                                               
        </xsl:when>
+                                                                               
        <xsl:otherwise>
+                                                                               
                <input type="checkbox" name="values[access]" value="True">
+                                                                               
                        <xsl:attribute name="title">
+                                                                               
                                <xsl:value-of select="php:function('lang', 'The 
note is public. If the note should be private, check this box')" />
+                                                                               
                        </xsl:attribute>
+                                                                               
                </input>
+                                                                               
        </xsl:otherwise>
+                                                                       
</xsl:choose>
+                                                               </td>
+                                                       </tr>
+                                               </table>
+                                       </div>
+                                       <div id="list">
+                                               <table>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="php:function('lang', 'generic list 1')" />
+                                                               </td>
+                                                               <td>
+                                                                       <select 
name="values[generic_list_1]" >
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="php:function('lang', 'Set a value')" />
+                                                                               
</xsl:attribute>
+                                                                               
<option value="0">
+                                                                               
        <xsl:value-of select="php:function('lang', 'Set a value')" />
+                                                                               
</option>
+                                                                               
<xsl:apply-templates select="generic_list_1/options"/>
+                                                                       
</select>                       
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="php:function('lang', 'generic list 2')" />
+                                                               </td>
+                                                               <td>
+                                                                       <select 
name="values[generic_list_2]" >
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="php:function('lang', 'Set a value')" />
+                                                                               
</xsl:attribute>
+                                                                               
<option value="0">
+                                                                               
        <xsl:value-of select="php:function('lang', 'Set a value')" />
+                                                                               
</option>
+                                                                               
<xsl:apply-templates select="generic_list_2/options"/>
+                                                                       
</select>                       
+                                                               </td>
+                                                       </tr>
+                                               </table>
+                                       </div>
+                                       <div id="tables">
+                                               <table>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="php:function('lang', 'table')" />
+                                                               </td>
+                                                               <td>
+                                                                       <div 
id="paging_0"> </div>
+                                                                       <div 
id="datatable-container_0"></div>
+                                                                       <div 
id="contextmenu_0"></div>
+                                                               </td>
+                                                       </tr>
+                                               </table>
+                                       </div>
+                                       <div id="dates">
+                                               <table>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="php:function('lang', 'date')" /> 1
+                                                               </td>
+                                                               <td>
+                                                                       <input 
type="text" id="values_start_date" name="values[start_date]" size="10" 
value="{value_start_date}" readonly="readonly" >
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="lang_start_date_statustext"/>
+                                                                               
</xsl:attribute>
+                                                                       </input>
+                                                                       <img 
id="values_start_date-trigger" src="{img_cal}" >
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="php:function('lang', 'date')" />
+                                                                               
</xsl:attribute>
+                                                                               
<xsl:attribute name="alt">
+                                                                               
        <xsl:value-of select="php:function('lang', 'date')" />
+                                                                               
</xsl:attribute>
+                                                                               
<xsl:attribute name="style">
+                                                                               
        <xsl:text>cursor:pointer; cursor:hand;</xsl:text>
+                                                                               
</xsl:attribute>
+                                                                       </img>
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="php:function('lang', 'date')" /> 2
+                                                               </td>
+                                                               <td>
+                                                                       
<xsl:value-of disable-output-escaping="yes" select="end_date"/>
+                                                               </td>
+                                                       </tr>
+                                               </table>
+                                       </div>
+                                       <div id="custom">
+                                               <table>
+                                                       <xsl:apply-templates 
select="custom_attributes/attributes"/>
+                                               </table>
+                                       </div>
+                                       <table>
+                                               <tr height="50">
+                                                       <td colspan = "2" align 
= "center"><table><tr>
+                                                       <td valign="bottom">
+                                                               <xsl:variable 
name="lang_save"><xsl:value-of select="php:function('lang', 'save')" 
/></xsl:variable>
+                                                               <input 
type="submit" name="values[save]" value="{$lang_save}">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="php:function('lang', 'save')" />
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </td>
+                                                       <td valign="bottom">
+                                                               <xsl:variable 
name="lang_apply"><xsl:value-of select="php:function('lang', 'apply')" 
/></xsl:variable>
+                                                               <input 
type="submit" name="values[apply]" value="{$lang_apply}">
+                                                                       
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="php:function('lang', 'apply the values')" />
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </td>
+                                                       <td align="left" 
valign="bottom">
+                                                               <xsl:variable 
name="lang_cancel"><xsl:value-of select="php:function('lang', 'cancel')" 
/></xsl:variable>
+                                                               <input 
type="submit" name="values[cancel]" value="{$lang_cancel}">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="php:function('lang', 'Back to the list')" />
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </td>
+                                                       </tr></table></td>
+                                               </tr>
+                                       </table>
+                               </div>
+                       </div>
+               </form>
+
+               <script type="text/javascript">
+                       var property_js = <xsl:value-of select="property_js" />;
+                       var datatable = new Array();
+                       var myColumnDefs = new Array();
+
+                       <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"/>
+                               }
+                               ]
+                       </xsl:for-each>
+
+                       <xsl:for-each select="myColumnDefs">
+                               myColumnDefs[<xsl:value-of select="name"/>] = 
<xsl:value-of select="values"/>
+                       </xsl:for-each>
+               </script>
+
+       </xsl:template>
+
+       
+       <xsl:template match="options">
+               <option value="{id}">
+                       <xsl:if test="selected != 0">
+                               <xsl:attribute name="selected" value="selected" 
/>
+                       </xsl:if>
+                       <xsl:value-of disable-output-escaping="yes" 
select="name"/>
+               </option>
+       </xsl:template>
+

Modified: branches/Version-1_0-branch/property/inc/class.boinvoice.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boinvoice.inc.php    
2011-09-11 13:24:23 UTC (rev 7573)
+++ branches/Version-1_0-branch/property/inc/class.boinvoice.inc.php    
2011-09-11 13:42:06 UTC (rev 7574)
@@ -622,4 +622,31 @@
                        return $this->so->check_role();
                }
 
+               public function get_historical_accounting_periods()
+               {
+                       return $this->so->get_historical_accounting_periods();
+               }
+
+
+               public function export_historical_transactions_at_periods($data 
= array())
+               {
+                       $values =  
$this->so->get_historical_transactions_at_periods($data);
+                       
+                       if($values)
+                       {
+                               $names = $descr = array_keys($values[0]);
+                               
$this->bocommon->download($values,$names,$descr);
+                       }
+               }
+
+               public function export_deposition()
+               {
+                       $values =  $this->so->get_deposition();
+                       
+                       if($values)
+                       {
+                               $names = $descr = array_keys($values[0]);
+                               
$this->bocommon->download($values,$names,$descr);
+                       }
+               }
        }

Modified: branches/Version-1_0-branch/property/inc/class.menu.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.menu.inc.php 2011-09-11 
13:24:23 UTC (rev 7573)
+++ branches/Version-1_0-branch/property/inc/class.menu.inc.php 2011-09-11 
13:42:06 UTC (rev 7574)
@@ -665,7 +665,7 @@
 
                        if ( $acl->check('.project', PHPGW_ACL_READ, 
'property') )
                        {
-
+/*
                                $cats   = CreateObject('phpgwapi.categories', 
-1,  'property', '.project');
                                $cats->supress_info     = true;
 
@@ -682,7 +682,7 @@
                                        
                                        );      
                                }
-
+*/
                                $menus['navigation']['project'] = array
                                        (
                                                'url'           => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiproject.index')),
@@ -695,7 +695,7 @@
                                                                'url'   => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiproject.index')),
                                                                'text'  => 
lang('Project'),
                                                                'image'         
=> array('property', 'project'),
-                                                               'children'      
=> $project_children
+                                               //              'children'      
=> $project_children
                                                        ),
                                                        'workorder'     => array
                                                        (
@@ -769,12 +769,21 @@
                                                'image' => array('property', 
'invoice'),
                                                'children'      => 
array_merge(array
                                                (
+                                                       'deposition'    => array
+                                                       (
+                                                               'url'   =>      
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiinvoice.reporting', 'type' => 'deposition')),
+                                                               'text'  => 
lang('deposition')
+                                                       ),
+                                                       'reconciliation'        
=> array
+                                                       (
+                                                               'url'   =>      
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiinvoice.reporting', 'type' => 'reconciliation')),
+                                                               'text'  => 
lang('reconciliation')
+                                                       ),
                                                        'paid'          => array
                                                        (
                                                                'url'   =>      
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiinvoice.index', 'paid'=>true)),
                                                                'text'  => 
lang('Paid')
                                                        ),
-                                                       // Should this be 
process? skwashd jan08
                                                        'consume'       => array
                                                        (
                                                                'url'   =>      
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiinvoice.consume')),

Modified: branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php    
2011-09-11 13:24:23 UTC (rev 7573)
+++ branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php    
2011-09-11 13:42:06 UTC (rev 7574)
@@ -1379,4 +1379,107 @@
                        $line = $this->read_single_voucher(0, $id);
                        return $line[0];
                }
+
+               public function get_historical_accounting_periods()
+               {
+                       $sql = "SELECT DISTINCT periode FROM fm_ecobilagoverf 
ORDER BY periode DESC";
+                       $this->db->query($sql,__LINE__,__FILE__);
+                       
+                       $values = array();
+                       while ($this->db->next_record())
+                       {
+                               $periode = $this->db->f('periode');
+                               $values[] = array
+                               (
+                                       'id'    => $periode,
+                                       'name'  => $periode
+                               );
+                       }
+
+                       $i = 0;
+                       foreach ($values as &$periode)
+                       {
+                               if($i > 5)
+                               {
+                                       break;
+                               }
+                               $sql = "SELECT count(id) as cnt FROM 
fm_ecobilagoverf WHERE periode = {$periode['id']}";
+                               $this->db->query($sql,__LINE__,__FILE__);
+                               $this->db->next_record();
+                               $periode['name'] = $periode['name'] . ' [' . 
sprintf("%010s",$this->db->f('cnt')) . ']';
+                               $i ++;
+                       }
+                       return $values;
+               }
+
+               public function get_historical_transactions_at_periods($data = 
array())
+               {
+                       if(!$data && !is_array($data))
+                       {
+                               return array();
+                       }
+                       
+                       $filter = 'WHERE periode IN(' . implode(',', $data) . 
')';
+                       
+                       $sql = "SELECT * FROM fm_ecobilagoverf {$filter} ORDER 
BY periode DESC, id ASC";
+                       $this->db->query($sql,__LINE__,__FILE__);
+                       
+                       $values = array();
+                       while ($this->db->next_record())
+                       {
+                               $values[] = $this->db->Record;
+                       }
+                       return $values;
+               }
+
+
+               /*
+               * Orders without related historic invoices, tagged as 
'delivered'
+               *  - And orders related to active (not processed) invoices.
+               */
+               public function get_deposition()
+               {               
+                       $this->db->query("SELECT id FROM fm_workorder_status 
WHERE delivered IS NOT NULL");
+                       $delivered = array();
+                       while ($this->db->next_record())
+                       {
+                               $delivered[] = "'" . $this->db->f('id') . "'";
+                       }
+
+                       $orders = array();
+                       $values = array();
+
+                       $sql = 'SELECT fm_project.location_code as location, 
fm_project.address as adresse,fm_workorder.*, bilagsnr,kidnr,belop as 
invoice_amount,fakturadato,periode,forfallsdato,fakturanr,spvend_code as 
vendor,'
+                       . ' dima, fm_ecobilag.loc1 as loc1, dimb, mvakode, 
dimd, saksbehandlerid, budsjettansvarligid, utbetalingid, oppsynsigndato, 
saksigndato, budsjettsigndato,'
+                       . ' utbetalingsigndato, merknad, kreditnota, kostra_id, 
item_type, item_id, external_ref, currency, process_log'
+                       . ' FROM fm_workorder'
+                       . " {$this->join} fm_project ON 
(fm_workorder.project_id = fm_project.id)"
+                       . " {$this->join} fm_ecobilag ON (fm_workorder.id = 
fm_ecobilag.pmwrkord_code)";
+                       $this->db->query($sql,__LINE__,__FILE__);
+                       
+                       while ($this->db->next_record())
+                       {
+                                       $orders[] = $this->db->f('id');
+                                       $values[] = $this->db->Record;
+                       }
+
+                       if($delivered)
+                       {
+                               $sql = 'SELECT fm_project.location_code as 
location, fm_project.address as adresse,fm_workorder.* FROM fm_workorder'
+                               . " {$this->join} fm_project ON 
(fm_workorder.project_id = fm_project.id)"
+                               . " {$this->left_join} fm_ecobilagoverf ON 
(fm_workorder.id = fm_ecobilagoverf.pmwrkord_code)"
+                               . ' WHERE fm_workorder.status IN(' . 
implode(",", $delivered) . ')'
+                               . ' AND pmwrkord_code IS NULL';
+                               $this->db->query($sql,__LINE__,__FILE__);
+
+                               while ($this->db->next_record())
+                               {
+                                       if( 
!in_array($this->db->f('id'),$orders ) )
+                                       {
+                                               $values[] = $this->db->Record;
+                                       }
+                               }
+                       }
+                       return $values;
+               }
        }

Modified: branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php    
2011-09-11 13:24:23 UTC (rev 7573)
+++ branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php    
2011-09-11 13:42:06 UTC (rev 7574)
@@ -59,7 +59,8 @@
                                'download'              => true,
                                'download_sub'  => true,
                                'receipt'               => true,
-                               'edit'                  => true
+                               'edit'                  => true,
+                               'reporting'             => true
                        );
 
                function property_uiinvoice()
@@ -3297,4 +3298,79 @@
                                        break;
                        }
                }
+
+               public function reporting()
+               {
+                       $acl_location = '.demo_location';
+                       if(!$this->acl_read)
+                       {
+                               $this->bocommon->no_access();
+                               return;
+                       }
+
+                       $type   = phpgw::get_var('type', 'string', 'GET', 
'deposition');
+
+                       $GLOBALS['phpgw_info']['flags']['menu_selection'] .= 
"::{$type}";
+
+                       $values = phpgw::get_var('values');
+
+                       $receipt = array();
+                       if($values)
+                       {
+       //              _debug_array($values);die();
+                       
+                               if(isset($values['export_reconciliation']) && 
$values['export_reconciliation'])
+                               {
+                                       if(!isset($values['periods']))
+                                       {
+                                               $type   = 'reconciliation';
+                                               
$receipt['error'][]=array('msg'=>lang('missing values'));
+                                       }
+                                       else
+                                       {
+                                               
$this->bo->export_historical_transactions_at_periods($values['periods']);
+                                       
+                                       }
+                               }
+                               else if(isset($values['export_deposition']) && 
$values['export_deposition'])
+                               {
+                                       if(!isset($values['deposition']))
+                                       {
+                                               $type   = 'deposition';
+                                               
$receipt['error'][]=array('msg'=>lang('nothing to do'));
+                                       }
+                                       else
+                                       {
+                                               $this->bo->export_deposition();
+                                       }
+                               }
+                       }
+
+
+                       $tab_info = array
+                       (
+                               'deposition'            => array('label' => 
lang('deposition'), 'link' => '#deposition'),
+                               'reconciliation'        => array('label' => 
lang('reconciliation'), 'link' => '#reconciliation')
+                       );
+
+                       phpgwapi_yui::tabview_setup('reporting_tabview');
+
+                       $msgbox_data = 
isset($receipt)?$GLOBALS['phpgw']->common->msgbox_data($receipt):'';
+
+                       $data = array
+                       (
+                               'msgbox_data'                           => 
$GLOBALS['phpgw']->common->msgbox($msgbox_data),
+                               'form_action'                           => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiinvoice.reporting')),
+                               'accounting_periods'            => 
array('options' => $this->bo->get_historical_accounting_periods()),
+                               'tabs'                                          
=> phpgwapi_yui::tabview_generate($tab_info, $type)
+                       );
+
+                       $function_msg = lang('reporting');
+                       $appname                = lang('invoice');
+
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('property') . ' - ' . $appname . ': ' . $function_msg;
+                       
$GLOBALS['phpgw']->xslttpl->add_file(array('invoice_reporting','attributes_form'));
+                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('reporting' => $data));
+
+               }
        }

Modified: branches/Version-1_0-branch/property/inc/export/default/Basware_X114
===================================================================
--- branches/Version-1_0-branch/property/inc/export/default/Basware_X114        
2011-09-11 13:24:23 UTC (rev 7573)
+++ branches/Version-1_0-branch/property/inc/export/default/Basware_X114        
2011-09-11 13:42:06 UTC (rev 7574)
@@ -456,37 +456,40 @@
 
                        $oRsBilag = $this->get_voucher($voucher_id);
 
-                       if(isset($oRsBilag[0]['external_ref']) && 
$oRsBilag[0]['external_ref'])
+                       if(!isset($oRsBilag[0]['external_ref'])  || 
!$oRsBilag[0]['external_ref'])
                        {
-                               //Bestem filnavn
-                               $Filnavn = 
$this->LagFilnavn($oRsBilag[0]['external_ref']);
+                               $oRsBilag[0]['external_ref'] = mt_rand();
+                       }
+                       
+                       //Bestem filnavn
+                       $Filnavn = 
$this->LagFilnavn($oRsBilag[0]['external_ref']);
 
-                               if (!$Filnavn)
-                               {
-                                       $message='LagFilnavn: Filnavn er i 
bruk';
-                                       $this->errorhandler($batchid,$message);
-                                       return $message;
-                               }
+                       if (!$Filnavn)
+                       {
+                               $message='LagFilnavn: Filnavn er i bruk';
+                               $this->errorhandler($batchid,$message);
+                               return $message;
+                       }
 
-                               //Test om filen kan opprettes og skrives til
-                               if (@fopen($Filnavn, "wb"))
+                       //Test om filen kan opprettes og skrives til
+                       if (@fopen($Filnavn, "wb"))
+                       {
+                               unlink($Filnavn);
+                       }
+                       else
+                       {
+                               $message='kan ikke lagre til fil: '. $Filnavn 
.'<br>';
+                               if($this->debug)
                                {
-                                       unlink($Filnavn);
+                                       echo $message;
                                }
                                else
                                {
-                                       $message='kan ikke lagre til fil: '. 
$Filnavn .'<br>';
-                                       if($this->debug)
-                                       {
-                                               echo $message;
-                                       }
-                                       else
-                                       {
-                                               return $message;
-                                       }
+                                       return $message;
                                }
                        }
 
+
                        $antall = count($oRsBilag);
 
                        $this->db->transaction_begin();
@@ -722,11 +725,11 @@
                        //Fullfør transaksjon
                        if ($download=='on' && !$this->debug)
                        {
-                               $file_written = true;
+                       //      $file_written = true;
 
                        // aktiver neste blokk for a skrive filer for basware
                        // -- Start
-                       /* 
+                        
                                $file_written = false;
                                $fp = fopen($Filnavn, "wb");
                                fwrite($fp,$buffer);
@@ -735,7 +738,7 @@
                                {
                                        $file_written=true;
                                }
-                       */
+                       
                        // -- END
                                if( $file_written && 
$this->config->config_data['invoice_export_method'] != 'ftp' )
                                {

Modified: branches/Version-1_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/property/setup/phpgw_no.lang    2011-09-11 
13:24:23 UTC (rev 7573)
+++ branches/Version-1_0-branch/property/setup/phpgw_no.lang    2011-09-11 
13:42:06 UTC (rev 7574)
@@ -498,6 +498,7 @@
 delivered      property        no      Levert
 delivery address       property        no      Leveringsadresse
 deposit claim  property        no      Krav mot depositum
+deposition     property        no      Avsetning
 description    property        no      Beskrivelse
 description order      property        no      Bestilling til leverandør
 descr  property        no      Beskrivelse
@@ -1155,6 +1156,7 @@
 percentage addition    property        no      prosentvis tillegg
 performed      property        no      Utført
 period property        no      Periode
+periods        property        no      Perioder
 permission     property        no      rettighet
 permissions    property        no      Rettigheter
 permissions are updated!       property        no      rettigheter er oppdatert
@@ -1282,6 +1284,7 @@
 re-assigned group      property        no      Tildelt ny gruppe
 receipt        property        no      Kvittering
 receipt date   property        no      Kvitteringsdato
+reconciliation property        no      Avstemming
 record property        no      Post
 reference level        property        no      Referanse nivå
 regulations    property        no      Forskrifter
@@ -1401,8 +1404,9 @@
 select agreement group property        no      Velg en avtale-gruppe
 select agreement_group property        no      Velg avtalegruppe
 select all     property        no      velg alle
-select a location      property        no      vel en lokalisering
+select a location      property        no      velg en lokalisering
 select a location!     property        no      Velg en lokalisering
+select a value property        no      velg en verdi
 select a rental agreement type property        no      Velg en leieavtale-type
 select a service agreement type        property        no      Velg en 
serviceavtale-type
 select a standard-code from the norwegian standard     property        no      
velg en standard NS-kode

Copied: 
branches/Version-1_0-branch/property/templates/base/invoice_reporting.xsl (from 
rev 7573, trunk/property/templates/base/invoice_reporting.xsl)
===================================================================
--- branches/Version-1_0-branch/property/templates/base/invoice_reporting.xsl   
                        (rev 0)
+++ branches/Version-1_0-branch/property/templates/base/invoice_reporting.xsl   
2011-09-11 13:42:06 UTC (rev 7574)
@@ -0,0 +1,77 @@
+<!-- $Id: demo.xsl 7561 2011-09-07 14:01:50Z sigurdne $ -->
+
+<!-- add / edit  -->
+       <xsl:template match="reporting" xmlns:php="http://php.net/xsl";>
+               <xsl:variable name="lang_download"><xsl:value-of 
select="php:function('lang', 'download')" /></xsl:variable>
+               <xsl:variable name="form_action"><xsl:value-of 
select="form_action"/></xsl:variable>
+               <form method="post" action="{$form_action}">
+                       <div class="yui-navset yui-navset-top" 
id="reporting_tabview">
+                               <xsl:value-of disable-output-escaping="yes" 
select="tabs" />
+                                       <xsl:choose>
+                                               <xsl:when test="msgbox_data != 
''">
+                                                       <table cellpadding="2" 
cellspacing="2" width="90%" align="center">
+                                                               <tr>
+                                                                       <td 
align="left">
+                                                                               
<xsl:call-template name="msgbox"/>
+                                                                       </td>
+                                                               </tr>
+                                                       </table>
+                                               </xsl:when>
+                                       </xsl:choose>
+
+                               <div class="yui-content">
+                                       <div id="deposition">
+                                               <table cellpadding="2" 
cellspacing="2" width="90%" align="center">
+                                                       <tr>
+                                                               <td>
+                                                                       
<xsl:value-of select="php:function('lang', 'deposition')" />
+                                                                       
<xsl:text>  </xsl:text>
+                                                                       <input 
type="checkbox" name="values[deposition]" value="True">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="php:function('lang', 'deposition')" />
+                                                                               
</xsl:attribute>
+                                                                       </input>
+                                                               </td>
+                                                       </tr>
+                                                       <tr height="50">
+                                                               <td 
valign="bottom">
+                                                                       <input 
type="submit" name="values[export_deposition]" value="{$lang_download}">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="php:function('lang', 'save')" />
+                                                                               
</xsl:attribute>
+                                                                       </input>
+                                                               </td>
+                                                       </tr>
+                                               </table>
+                                       </div>
+                                       <div id="reconciliation">
+                                               <table cellpadding="2" 
cellspacing="2" width="90%" align="center">
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="php:function('lang', 'periods')" />
+                                                                               
<p style="height: 150px; overflow: auto; border: 5px solid #eee; background: 
#eee; color: #000; margin-bottom: 1.5em;">
+                                                                               
<xsl:apply-templates select="accounting_periods/options"/>
+                                                                               
</p>
+                                                               </td>
+                                                       </tr>
+                                                       <tr height="50">
+                                                               <td 
valign="bottom">
+                                                                       <input 
type="submit" name="values[export_reconciliation]" value="{$lang_download}">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="php:function('lang', 'save')" />
+                                                                               
</xsl:attribute>
+                                                                       </input>
+                                                               </td>
+                                                       </tr>
+                                               </table>
+                                       </div>
+                               </div>
+                       </div>
+               </form>
+       </xsl:template>
+
+       
+       <xsl:template match="options">
+               <label><input type="checkbox" name="values[periods][]" 
value="{id}" /> <xsl:value-of disable-output-escaping="yes" select="name"/> 
</label><br />
+       </xsl:template>
+

Modified: branches/Version-1_0-branch/rental/inc/model/class.contract.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/model/class.contract.inc.php 
2011-09-11 13:24:23 UTC (rev 7573)
+++ branches/Version-1_0-branch/rental/inc/model/class.contract.inc.php 
2011-09-11 13:42:06 UTC (rev 7574)
@@ -71,6 +71,38 @@
                        $bill_only_one_time = false;
                }
                
+               public function toArray()
+               {
+
+// Alternative 1
+//                     return get_object_vars($this);
+
+// Alternative 2
+                       $exclude = array
+                       (
+                               'get_available_composites', // feiler
+                               'get_contracts_for_composite', // feiler
+                               'get_field', // feiler (foreldreklassen)
+                               'get_so',//unødvendig
+                               'get_composites', //returnerer objekt
+                               'get_parties' //returnerer objekt
+                       );
+                       
+                       $class_methods = get_class_methods($this);
+                       $contract_arr = array();
+                       foreach ($class_methods as $class_method)
+                       {
+                               if( stripos($class_method , 'get_' ) === 0  && 
!in_array($class_method, $exclude))
+                               {
+                                       $_class_method_part = explode('get_', 
$class_method);
+                                       $contract_arr[$_class_method_part[1]] = 
$this->$class_method();
+                               }
+                       }
+
+//                     _debug_array($contract_arr);
+                       return $contract_arr;
+               }
+
                public function set_id($id)
                {
                        $this->id = $id;
@@ -1158,4 +1190,4 @@
                
        }
 
-?>
\ No newline at end of file
+?>




reply via email to

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