fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8199] Property: invoice handling


From: Sigurd Nes
Subject: [Fmsystem-commits] [8199] Property: invoice handling
Date: Fri, 25 Nov 2011 15:30:51 +0000

Revision: 8199
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8199
Author:   sigurdne
Date:     2011-11-25 15:30:50 +0000 (Fri, 25 Nov 2011)
Log Message:
-----------
Property: invoice handling

Modified Paths:
--------------
    trunk/property/inc/class.soadmin.inc.php
    trunk/property/inc/class.uiadmin.inc.php
    trunk/property/inc/class.uiinvoice.inc.php
    trunk/property/inc/class.uiproject.inc.php
    trunk/property/inc/class.uiworkorder.inc.php
    trunk/property/inc/export/default/Basware_X114
    trunk/property/js/yahoo/invoice.index.js
    trunk/property/js/yahoo/project.edit.js
    trunk/property/js/yahoo/property2.js
    trunk/property/js/yahoo/workorder.edit.js
    trunk/property/setup/setup.inc.php
    trunk/property/setup/tables_current.inc.php
    trunk/property/setup/tables_update.inc.php
    trunk/property/templates/base/admin.xsl

Modified: trunk/property/inc/class.soadmin.inc.php
===================================================================
--- trunk/property/inc/class.soadmin.inc.php    2011-11-25 13:15:54 UTC (rev 
8198)
+++ trunk/property/inc/class.soadmin.inc.php    2011-11-25 15:30:50 UTC (rev 
8199)
@@ -68,15 +68,17 @@
 
                function read_fm_id()
                {
-                       $sql = "select * from fm_idgenerator ";
+                       $sql = "SELECT * FROM fm_idgenerator ORDER BY descr 
asc";
                        $this->db->query($sql,__LINE__,__FILE__);
 
+                       $fm_ids = array();
                        while ($this->db->next_record())
                        {
-                               $fm_ids[] = array(
-                                       'descr'         => $this->db->f('name'),
+                               $fm_ids[] = array
+                               (
+                                       'name'          => $this->db->f('name'),
+                                       'descr'         => 
$this->db->f('descr'),
                                        'value'         => 
$this->db->f('value'),
-                                       'remark'        => 
$this->db->f('remark')
                                );
 
                        }

Modified: trunk/property/inc/class.uiadmin.inc.php
===================================================================
--- trunk/property/inc/class.uiadmin.inc.php    2011-11-25 13:15:54 UTC (rev 
8198)
+++ trunk/property/inc/class.uiadmin.inc.php    2011-11-25 15:30:50 UTC (rev 
8199)
@@ -604,26 +604,28 @@
 
                        $fm_ids = $this->bo->read_fm_id();
 
+                       $content = array();
                        for ($i=0;$i<count($fm_ids);$i++)
                        {
 
                                $content[] = array
-                                       (
-                                               'descr'         => 
$fm_ids[$i]['descr'],
-                                               'value'         => 
$fm_ids[$i]['value'],
-                                               'remark'        => 
$fm_ids[$i]['remark'],
-                                               'key_id'        => $i
-                                       );
-                       }
-
-                       $table_header[] = array
                                (
-                                       'lang_select'           => 
lang('Select'),
-                                       'lang_descr'            => 
lang('Descr'),
-                                       'lang_value'            => 
lang('Value'),
-                                       'lang_remark'           => 
lang('Remark'),
+                                       'name'          => $fm_ids[$i]['name'],
+                                       'descr'         => $fm_ids[$i]['descr'],
+                                       'value'         => $fm_ids[$i]['value'],
+                                       'remark'        => 
$fm_ids[$i]['remark'],
+                                       'key_id'        => $i
                                );
+                       }
 
+                       $table_header = array
+                       (
+                               'lang_select'           => lang('Select'),
+                               'lang_descr'            => lang('Descr'),
+                               'lang_value'            => lang('Value'),
+                               'lang_remark'           => lang('Remark'),
+                       );
+
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
 
                        $data = array

Modified: trunk/property/inc/class.uiinvoice.inc.php
===================================================================
--- trunk/property/inc/class.uiinvoice.inc.php  2011-11-25 13:15:54 UTC (rev 
8198)
+++ trunk/property/inc/class.uiinvoice.inc.php  2011-11-25 15:30:50 UTC (rev 
8199)
@@ -664,11 +664,49 @@
                                        )
                                );
 
+                       $periodization_list = 
execMethod('property.bogeneric.get_list', array('type'=>'periodization'));
+
+                       $jscode = <<<JS
+                           var myPeriodizationDropDown = function(elCell, 
oRecord, oColumn, oData)
+                               {
+JS;
+                       $jscode .= <<<JS
+                               var _label = new String(oData);
+                               tmp_count = oRecord._oData.counter_num;
+                               voucher_id = oRecord._oData.voucher_id_num
+                           elCell.innerHTML = "<div 
id=\"divPeriodizationDropDown"+tmp_count+"\"></div>";
+
+                           var tmp_button = new YAHOO.widget.Button({
+                                type:"menu",
+                                id:"oPeriodizationDropDown"+tmp_count,
+                                label: "<en>" +_label+"</en>",
+                                value: oData,
+                                container: 
"divPeriodizationDropDown"+tmp_count,
+                                menu: [
+
+JS;
+                   foreach ($periodization_list as $key => 
$periodization_entry)
+               {
+                               $jscode_arr[] = "{ text: 
'{$periodization_entry['name']}', value: '{$periodization_entry['id']}', 
onclick: { fn: onPeriodizationDropDownItemClick, idvoucher: voucher_id, id: 
'{$periodization_entry['id']}'} }";
+               }
+
+                       $jscode_inner = implode(",\n",  $jscode_arr);
+                       $jscode .= <<<JS
+                       $jscode_inner
+                       ]});
+
+                                       //Define this variable in the window 
scope (GLOBAL)
+                                       
eval("window.oPeriodizationDropDown"+tmp_count+" = tmp_button");
+                               }
+JS;
+                               $GLOBALS['phpgw']->js->add_code('', $jscode);
+
                        } //-- of if( phpgw::get_var('phpgw_return_as') != 
'json' )
 
                        $content = array();
                        //the first time, $content is empty, because 
$user_lid=''.In the seconfd time, user_lid=all; It is done using  base_java_url.
                        $content = 
$this->bo->read_invoice($paid,$start_date,$end_date,$vendor_id,$loc1,$workorder_id,$voucher_id);
+                       
 
                        $uicols = array (
                                'input_type'    =>      array
@@ -1271,7 +1309,7 @@
                                        'currentPage'           => 
$datatable['sorting']['currentPage'],
                                        'records'                       => 
array(),
                                        'sum_amount'            => 
$this->bo->sum_amount,
-                                       'periodization'         => $paid ? 
array() : execMethod('property.bogeneric.get_list', 
array('type'=>'periodization'))
+                                       'periodization'         => $paid ? 
array() : $periodization_list
                                );
 
                        // values for datatable

Modified: trunk/property/inc/class.uiproject.inc.php
===================================================================
--- trunk/property/inc/class.uiproject.inc.php  2011-11-25 13:15:54 UTC (rev 
8198)
+++ trunk/property/inc/class.uiproject.inc.php  2011-11-25 15:30:50 UTC (rev 
8199)
@@ -1613,6 +1613,7 @@
                                        'dimb'                                  
=> $entry['dimb'],
                                        'dimd'                                  
=> $entry['dimd'],
                                        'amount'                                
=> $entry['amount'],
+                                       'approved_amount'               => 
$entry['approved_amount'],
                                        'vendor'                                
=> $entry['vendor'],
                                        'paid_percent'                  => 
$entry['paid_percent'],
                                        'project_group'                 => 
$entry['project_id'],
@@ -1633,7 +1634,6 @@
                                        'footer'                                
=> 0
                                );
 
-
                        $myColumnDefs[2] = array
                                (
                                        'name'          => "2",
@@ -1641,7 +1641,8 @@
                                                                                
                                array('key' => 
'voucher_id','label'=>lang('bilagsnr'),'sortable'=>false,'resizeable'=>true,'formatter'=>'YAHOO.widget.DataTable.formatLink_voucher'),
                                                                                
                                array('key' => 
'invoice_id','label'=>lang('invoice 
number'),'sortable'=>false,'resizeable'=>true),
                                                                                
                                array('key' => 
'vendor','label'=>lang('vendor'),'sortable'=>false,'resizeable'=>true),
-                                                                               
                                array('key' => 
'amount','label'=>lang('amount'),'sortable'=>false,'resizeable'=>true),
+                                                                               
                                array('key' => 
'amount','label'=>lang('amount'),'sortable'=>false,'resizeable'=>true,'formatter'=>'FormatterRight'),
+                                                                               
                                array('key' => 
'approved_amount','label'=>lang('approved 
amount'),'sortable'=>false,'resizeable'=>true,'formatter'=>'FormatterRight'),
                                                                                
                                array('key' => 
'currency','label'=>lang('currency'),'sortable'=>false,'resizeable'=>true),
                                                                                
                                array('key' => 
'budget_responsible','label'=>lang('budget 
responsible'),'sortable'=>false,'resizeable'=>true),
                                                                                
                                array('key' => 
'budsjettsigndato','label'=>lang('budsjettsigndato'),'sortable'=>false,'resizeable'=>true),

Modified: trunk/property/inc/class.uiworkorder.inc.php
===================================================================
--- trunk/property/inc/class.uiworkorder.inc.php        2011-11-25 13:15:54 UTC 
(rev 8198)
+++ trunk/property/inc/class.uiworkorder.inc.php        2011-11-25 15:30:50 UTC 
(rev 8199)
@@ -1470,6 +1470,7 @@
                                        'dimb'                                  
=> $entry['dimb'],
                                        'dimd'                                  
=> $entry['dimd'],
                                        'amount'                                
=> $entry['amount'],
+                                       'approved_amount'               => 
$entry['approved_amount'],
                                        'vendor'                                
=> $entry['vendor'],
                                        'paid_percent'                  => 
$entry['paid_percent'],
                                        'project_group'                 => 
$entry['project_id'],
@@ -1497,7 +1498,8 @@
                                        'values'        =>      
json_encode(array(      array('key' => 
'voucher_id','label'=>lang('bilagsnr'),'sortable'=>false,'resizeable'=>true,'formatter'=>'YAHOO.widget.DataTable.formatLink'),
                                                                                
                                array('key' => 
'invoice_id','label'=>lang('invoice 
number'),'sortable'=>false,'resizeable'=>true),
                                                                                
                                array('key' => 
'vendor','label'=>lang('vendor'),'sortable'=>false,'resizeable'=>true),
-                                                                               
                                array('key' => 
'amount','label'=>lang('amount'),'sortable'=>false,'resizeable'=>true),
+                                                                               
                                array('key' => 
'amount','label'=>lang('amount'),'sortable'=>false,'resizeable'=>true,'formatter'=>'FormatterRight'),
+                                                                               
                                array('key' => 
'approved_amount','label'=>lang('approved 
amount'),'sortable'=>false,'resizeable'=>true,'formatter'=>'FormatterRight'),
                                                                                
                                array('key' => 
'currency','label'=>lang('currency'),'sortable'=>false,'resizeable'=>true),
                                                                                
                                array('key' => 
'budget_responsible','label'=>lang('budget 
responsible'),'sortable'=>false,'resizeable'=>true),
                                                                                
                                array('key' => 
'budsjettsigndato','label'=>lang('budsjettsigndato'),'sortable'=>false,'resizeable'=>true),

Modified: trunk/property/inc/export/default/Basware_X114
===================================================================
--- trunk/property/inc/export/default/Basware_X114      2011-11-25 13:15:54 UTC 
(rev 8198)
+++ trunk/property/inc/export/default/Basware_X114      2011-11-25 15:30:50 UTC 
(rev 8199)
@@ -187,7 +187,7 @@
                        if($rollback_voucher)
                        {
                                $rollback_voucher = (int)$rollback_voucher;
-                               $sql="SELECT * FROM fm_ecobilagoverf WHERE 
bilagsnr = {$rollback_voucher}";
+                               $sql="SELECT * FROM fm_ecobilagoverf WHERE 
bilagsnr_ut = {$rollback_voucher}";
                        }
                        else
                        {
@@ -202,6 +202,7 @@
                                (
                                        'id'                                    
=> $this->db->f('id'),
                                        'bilagsnr'                              
=> $this->db->f('bilagsnr'),
+                                       'bilagsnr_ut'                   => 
$this->db->f('bilagsnr_ut'),
                                        'kidnr'                                 
=> $this->db->f('kidnr'),
                                        'typeid'                                
=> $this->db->f('typeid'),
                                        'kildeid'                               
=> $this->db->f('kildeid'),
@@ -258,6 +259,7 @@
                                $BilagOverf['kostra_id'],
                                $BilagOverf['pmwrkord_code'],
                                $BilagOverf['bilagsnr'],
+                               $BilagOverf['bilagsnr_ut'],
                                $BilagOverf['splitt'],
                                $BilagOverf['kildeid'],
                                $BilagOverf['kidnr'],
@@ -298,7 +300,7 @@
                        
                        $values = $this->db->validate_insert($values);
 
-                       $sql= "INSERT INTO fm_ecobilag 
(project_id,kostra_id,pmwrkord_code,bilagsnr,splitt,kildeid,kidnr,typeid,"
+                       $sql= "INSERT INTO fm_ecobilag 
(project_id,kostra_id,pmwrkord_code,bilagsnr,bilagsnr_ut,splitt,kildeid,kidnr,typeid,"
                        . " 
fakturadato,forfallsdato,regtid,artid,spvend_code,dimb,oppsynsmannid,"
                        . " 
saksbehandlerid,budsjettansvarligid,fakturanr,spbudact_code,dima,loc1,dimd,mvakode,"
                        . " 
periode,periodization,periodization_start,merknad,utbetalingid,oppsynsigndato,saksigndato,budsjettsigndato,utbetalingsigndato,"
@@ -528,7 +530,30 @@
 
                        $this->db->transaction_begin();
 
-                       $tranfser_bilag = array($oRsBilag[0]['bilagsnr']);
+                       $get_bilagsnr_ut = false;
+                       if(!$bilagsnr_ut = $oRsBilag[0]['external_ref'])
+                       {
+                               foreach ($oRsBilag as $line)
+                               {
+                                       if(abs($line['godkjentbelop']) > 0)
+                                       {
+                                               $get_bilagsnr_ut = true;
+                                       }
+                               }
+
+                               if($get_bilagsnr_ut)
+                               {
+                                       $this->db->query("UPDATE fm_idgenerator 
SET value = value + 1 WHERE name = 'bilagsnr_ut'");
+                                       $this->db->query("SELECT value FROM 
fm_idgenerator WHERE name = 'bilagsnr_ut'");
+                                       $this->db->next_record();
+                                       $bilagsnr_ut = $this->db->f('value');
+
+                                       $this->db->query("UPDATE fm_ecobilag 
SET bilagsnr_ut = {$bilagsnr_ut} WHERE bilagsnr = '$voucher_id'");
+                               }
+                       }
+
+                       $tranfser_bilag = array($bilagsnr_ut);
+
                        $localtime = phpgwapi_datetime::user_localtime();
 
                        $transactioninformation = array
@@ -553,7 +578,7 @@
                                (
                                        'TRANSACTIONTYPE'                       
=> 'X114',
                                        'KEY'                                   
        => '', //dummy
-                                       'VOUCHERID'                             
        => $oRsBilag[0]['bilagsnr'], // 70903541
+                                       'VOUCHERID'                             
        => $bilagsnr_ut,
                                        'SCANNINGNO'                            
=> $oRsBilag[0]['external_ref'], // 11E28NJINL3VR6
                                        'PROFILE'                               
        => 'TRAINVPOMA',
                                        'CLIENT.CODE'                           
=> $this->client_code, //14,
@@ -787,7 +812,6 @@
                
        protected function get_voucher($bilagsnr)
        {
-                       $bilagsnr = $bilagsnr;
                        $sql= "SELECT fm_ecobilag.*,fm_ecouser.initials as 
saksbehandler FROM fm_ecobilag $this->join fm_ecouser ON 
fm_ecobilag.budsjettansvarligid=fm_ecouser.lid WHERE bilagsnr = {$bilagsnr}";
                        $this->db->query($sql,__LINE__,__FILE__);
 
@@ -798,6 +822,7 @@
                                (
                                        'id'                                    
=> $this->db->f('id'),
                                        'bilagsnr'                              
=> $bilagsnr,
+                                       'bilagsnr_ut'                   => 
$this->db->f('bilagsnr_ut'),
                                        'kidnr'                                 
=> $this->db->f('kidnr'),
                                        'typeid'                                
=> $this->db->f('typeid'),
                                        'kildeid'                               
=> $this->db->f('kildeid'),

Modified: trunk/property/js/yahoo/invoice.index.js
===================================================================
--- trunk/property/js/yahoo/invoice.index.js    2011-11-25 13:15:54 UTC (rev 
8198)
+++ trunk/property/js/yahoo/invoice.index.js    2011-11-25 15:30:50 UTC (rev 
8199)
@@ -167,42 +167,6 @@
     }
 
        
/********************************************************************************
-       * Format column myPeriodizationDropDown
-       */
-    var myPeriodizationDropDown = function(elCell, oRecord, oColumn, oData)
-       {
-               var periodization = values_ds.periodization;
-
-               for(i=0; i<periodization.length; i++)
-               {
-//                     alert(periodization[i].name);
-               }
-
-               var _label = new String(oData);
-
-//alert(_label);
-               tmp_count = oRecord._oData.counter_num;
-               voucher_id = oRecord._oData.voucher_id_num
-           elCell.innerHTML = "<div 
id=\"divPeriodizationDropDown"+tmp_count+"\"></div>";
-
-           var tmp_button = new YAHOO.widget.Button({
-                 type:"menu",
-                 id:"oPeriodizationDropDown"+tmp_count,
-//                 label: "<en>" +periodization[0].id+"</en>",
-                 label: "<en>" +_label+"</en>",
-                 value: oData,
-                 container: "divPeriodizationDropDown"+tmp_count,
-                 menu: [
-                               { text: periodization[0].name, value: 
periodization[0].id, onclick: { fn: onPeriodizationDropDownItemClick, 
idvoucher: voucher_id, id: periodization[0].id} },
-                                           { text: periodization[1].name, 
value: periodization[1].id, onclick: { fn: onPeriodizationDropDownItemClick, 
idvoucher: voucher_id, id: periodization[1].id} },
-                                           { text: periodization[2].name, 
value: periodization[2].id, onclick: { fn: onPeriodizationDropDownItemClick, 
idvoucher: voucher_id, id: periodization[2].id} }
-                                           ]});
-           //Define this variable in the window scope (GLOBAL)
-        eval("window.oPeriodizationDropDown"+tmp_count+" = tmp_button");
-
-    }
-
-       
/********************************************************************************
         * CLick option combobox Periodization
 
         */

Modified: trunk/property/js/yahoo/project.edit.js
===================================================================
--- trunk/property/js/yahoo/project.edit.js     2011-11-25 13:15:54 UTC (rev 
8198)
+++ trunk/property/js/yahoo/project.edit.js     2011-11-25 15:30:50 UTC (rev 
8199)
@@ -32,17 +32,18 @@
 
/********************************************************************************/
     
        this.myParticularRenderEvent = function()
        {
-               this.addFooterDatatable(myPaginator_0,myDataTable_0);
+               this.addFooterDatatable0(myPaginator_0,myDataTable_0);
+               this.addFooterDatatable1(myPaginator_2,myDataTable_2);
        }
 
 
/********************************************************************************/
-       this.addFooterDatatable = function(paginator,datatable)
+       this.addFooterDatatable0 = 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);
-               tmp_sum3 = getSumPerPage('actual_cost',2,paginator,datatable);
-               tmp_sum4 = getSumPerPage('contract_sum',2,paginator,datatable);
+               //call getTotalSum(name of column) in property.js
+               tmp_sum1 = getTotalSum('budget',2,paginator,datatable);
+               tmp_sum2 = getTotalSum('calculation',2,paginator,datatable);
+               tmp_sum3 = getTotalSum('actual_cost',2,paginator,datatable);
+               tmp_sum4 = getTotalSum('contract_sum',2,paginator,datatable);
 
                if(typeof(tableYUI)=='undefined')
                {
@@ -63,13 +64,44 @@
                td_sum(tmp_sum1);
                td_sum(tmp_sum2);
                td_sum(tmp_sum3);
-               td_empty(3);
+               td_empty(5);
 
                myfoot = tableYUI.createTFoot();
                myfoot.setAttribute("id","myfoot");
                myfoot.appendChild(newTR);
        }
 
+/********************************************************************************/
+       this.addFooterDatatable1 = function(paginator,datatable)
+       {
+               //call getTotalSum(name of column) in property.js
+               tmp_sum1 = getTotalSum('amount',2,paginator,datatable);
+               tmp_sum2 = getTotalSum('approved_amount',2,paginator,datatable);
+
+               if(typeof(tableYUI2)=='undefined')
+               {
+                       tableYUI2 = 
YAHOO.util.Dom.getElementsByClassName("yui-dt-data","tbody")[1].parentNode;
+                       tableYUI2.setAttribute("id","tableYUI");
+               }
+               else
+               {
+                       tableYUI2.deleteTFoot();
+               }
+
+               //Create ROW
+               newTR = document.createElement('tr');
+
+               td_sum('Sum');
+               td_empty(3);
+               td_sum(tmp_sum1);
+               td_sum(tmp_sum2);
+               td_empty(4);
+
+               myfoot = tableYUI2.createTFoot();
+               myfoot.setAttribute("id","myfoot");
+               myfoot.appendChild(newTR);
+       }
+
  
/********************************************************************************/
 
 YAHOO.util.Event.addListener(window, "load", function()

Modified: trunk/property/js/yahoo/property2.js
===================================================================
--- trunk/property/js/yahoo/property2.js        2011-11-25 13:15:54 UTC (rev 
8198)
+++ trunk/property/js/yahoo/property2.js        2011-11-25 15:30:50 UTC (rev 
8199)
@@ -31,6 +31,27 @@
 
 
/********************************************************************************/
 
+       this.getTotalSum = function(name_column,round,paginator,datatable)
+       {
+               if(!paginator.getPageRecords())
+               {
+                       return;
+               }
+               begin = end = 0;
+               end = datatable.getRecordSet().getLength();
+
+               tmp_sum = 0;
+               for(i = begin; i < end; i++)
+               {
+                       tmp_sum = tmp_sum + 
parseFloat(datatable.getRecordSet().getRecords(0)[i].getData(name_column));
+               }
+
+               return tmp_sum = YAHOO.util.Number.format(tmp_sum, 
{decimalPlaces:round, decimalSeparator:",", thousandsSeparator:" "});
+       }
+
+
+/********************************************************************************/
+
        this.td_empty = function(colspan)
        {
                newTD = document.createElement('td');

Modified: trunk/property/js/yahoo/workorder.edit.js
===================================================================
--- trunk/property/js/yahoo/workorder.edit.js   2011-11-25 13:15:54 UTC (rev 
8198)
+++ trunk/property/js/yahoo/workorder.edit.js   2011-11-25 15:30:50 UTC (rev 
8199)
@@ -26,7 +26,8 @@
        this.addFooterDatatable = function(paginator,datatable)
        {
                //call getSumPerPage(name of column) in property.js
-               tmp_sum1 = getSumPerPage('amount',2,paginator,datatable);
+               tmp_sum1 = getTotalSum('amount',2,paginator,datatable);
+               tmp_sum2 = getTotalSum('approved_amount',2,paginator,datatable);
 
                if(typeof(tableYUI)=='undefined')
                {
@@ -44,7 +45,8 @@
                td_sum('Sum');
                td_empty(2);
                td_sum(tmp_sum1);
-               td_empty(3);
+               td_sum(tmp_sum2);
+               td_empty(4);
 
                myfoot = tableYUI.createTFoot();
                myfoot.setAttribute("id","myfoot");
@@ -53,6 +55,13 @@
 
  
/********************************************************************************/
 
+/********************************************************************************/
     
+       var FormatterRight = function(elCell, oRecord, oColumn, oData)
+       {
+               elCell.innerHTML = "<div align=\"right\">"+oData+"</div>";
+       }       
+       
+/********************************************************************************/
     
 
 
 YAHOO.util.Event.addListener(window, "load", function()

Modified: trunk/property/setup/setup.inc.php
===================================================================
--- trunk/property/setup/setup.inc.php  2011-11-25 13:15:54 UTC (rev 8198)
+++ trunk/property/setup/setup.inc.php  2011-11-25 15:30:50 UTC (rev 8199)
@@ -12,7 +12,7 @@
        */
 
        $setup_info['property']['name']                 = 'property';
-       $setup_info['property']['version']              = '0.9.17.626';
+       $setup_info['property']['version']              = '0.9.17.627';
        $setup_info['property']['app_order']    = 8;
        $setup_info['property']['enable']               = 1;
        $setup_info['property']['app_group']    = 'office';

Modified: trunk/property/setup/tables_current.inc.php
===================================================================
--- trunk/property/setup/tables_current.inc.php 2011-11-25 13:15:54 UTC (rev 
8198)
+++ trunk/property/setup/tables_current.inc.php 2011-11-25 15:30:50 UTC (rev 
8199)
@@ -1015,6 +1015,7 @@
                        'fd' => array(
                                'id' => array('type' => 'auto','precision' => 
'4','nullable' => False),
                                'bilagsnr' => array('type' => 'int','precision' 
=> '4','nullable' => False),
+                               'bilagsnr_ut' => array('type' => 
'int','precision' => '4','nullable' => False),
                                'kidnr' => array('type' => 
'varchar','precision' => '30','nullable' => True),
                                'typeid' => array('type' => 'int','precision' 
=> '2','nullable' => False),
                                'kildeid' => array('type' => 'int','precision' 
=> '2','nullable' => False),
@@ -1066,6 +1067,7 @@
                        'fd' => array(
                                'id' => array('type' => 'int','precision' => 
'4','nullable' => False),
                                'bilagsnr' => array('type' => 'int','precision' 
=> '4','nullable' => False),
+                               'bilagsnr_ut' => array('type' => 
'int','precision' => '4','nullable' => False),
                                'kidnr' => array('type' => 
'varchar','precision' => '30','nullable' => True),
                                'typeid' => array('type' => 'int','precision' 
=> '2','nullable' => False),
                                'kildeid' => array('type' => 'int','precision' 
=> '2','nullable' => False),

Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php  2011-11-25 13:15:54 UTC (rev 
8198)
+++ trunk/property/setup/tables_update.inc.php  2011-11-25 15:30:50 UTC (rev 
8199)
@@ -5514,6 +5514,32 @@
        }
 
        /**
+       * Update property version from 0.9.17.626 to 0.9.17.627
+       * Add assign voucher id on export from system
+       */
+       $test[] = '0.9.17.626';
+       function property_upgrade0_9_17_626()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_ecobilag','bilagsnr_ut',array('type'
 => 'int','precision' => 4,'nullable' => True));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_ecobilagoverf','bilagsnr_ut',array('type'
 => 'int','precision' => 4,'nullable' => True));
+
+               
$GLOBALS['phpgw_setup']->oProc->DropColumn('fm_idgenerator',array(),'maxvalue');
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_idgenerator','date_from',array('type'
 => 'int','precision' => 4,'nullable' => True,'default' => '0'));
+
+               $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO 
fm_idgenerator(name,value,descr) "
+                       . "VALUES('bilagsnr_ut', 0, 'Bilagsnummer 
utgƄende')",__LINE__,__FILE__);
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.627';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
+       }
+
+
+       /**
        * Update property version from 0.9.17.607 to 0.9.17.608
        * Add more room for address at tickets
        * 

Modified: trunk/property/templates/base/admin.xsl
===================================================================
--- trunk/property/templates/base/admin.xsl     2011-11-25 13:15:54 UTC (rev 
8198)
+++ trunk/property/templates/base/admin.xsl     2011-11-25 15:30:50 UTC (rev 
8199)
@@ -757,6 +757,7 @@
                <xsl:variable name="value"><xsl:value-of 
select="value"/></xsl:variable>
                <xsl:variable name="key_id"><xsl:value-of 
select="key_id"/></xsl:variable>
                <xsl:variable name="descr"><xsl:value-of 
select="descr"/></xsl:variable>
+               <xsl:variable name="name"><xsl:value-of 
select="name"/></xsl:variable>
                <tr>
                        <xsl:attribute name="class">
                                <xsl:choose>
@@ -779,7 +780,7 @@
                                <xsl:value-of select="descr"/>
                        </td>
                        <td>
-                               <INPUT type="hidden" 
name="values[field][{$key_id}]" value="{$descr}" ></INPUT>
+                               <INPUT type="hidden" 
name="values[field][{$key_id}]" value="{$name}" ></INPUT>
                                <INPUT type="text" name="values[{$key_id}]" 
value="{$value}" ></INPUT>
                        </td>
                        <td align="center">




reply via email to

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