fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7579] Merge 7574:7578 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [7579] Merge 7574:7578 from trunk
Date: Tue, 13 Sep 2011 06:45:39 +0000

Revision: 7579
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7579
Author:   sigurdne
Date:     2011-09-13 06:45:36 +0000 (Tue, 13 Sep 2011)
Log Message:
-----------
Merge 7574:7578 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/booking/inc/class.sobooking.inc.php
    branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php
    branches/Version-1_0-branch/phpgwapi/inc/class.xmlhelper.inc.php
    branches/Version-1_0-branch/property/inc/class.borequest.inc.php
    branches/Version-1_0-branch/property/inc/class.soXport.inc.php
    branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
    branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php
    branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
    
branches/Version-1_0-branch/property/inc/cron/default/Import_fra_basware_X205.php
    branches/Version-1_0-branch/property/inc/export/default/Basware_X114
    branches/Version-1_0-branch/property/js/yahoo/request.index.js

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,7567-7573
   + 
/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,7575-7578

Modified: branches/Version-1_0-branch/booking/inc/class.sobooking.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.sobooking.inc.php     
2011-09-12 18:27:01 UTC (rev 7578)
+++ branches/Version-1_0-branch/booking/inc/class.sobooking.inc.php     
2011-09-13 06:45:36 UTC (rev 7579)
@@ -443,6 +443,40 @@
                        return $this->db->f('name', false);
                }
 
+               function get_season($id)
+               {
+                       $this->db->limit_query("SELECT id FROM bb_season where 
id=" . intval($id), 0, __LINE__, __FILE__, 1);
+                       if(!$this->db->next_record())
+                       {
+                               return False;
+                       }
+                       return $this->db->f('id', false);
+               }
+
+               function get_group_of_organization($id)
+               {
+            $results = array();
+                       $this->db->query("SELECT id FROM bb_group WHERE active 
= 1 and organization_id=". intval($id), __LINE__, __FILE__);
+                       while ($this->db->next_record())
+                       {
+                               $results[] = $this->db->f('id', false);
+                       }
+                       return $results;
+               }
+
+               function get_organizations()
+               {
+            $results = array();
+                       $results[] = array('id' =>  0,'name' => lang('Not 
selected'));
+                       $this->db->query("SELECT id, name FROM bb_organization 
WHERE active = 1 ORDER BY name ASC", __LINE__, __FILE__);
+                       while ($this->db->next_record())
+                       {
+                               $results[] = array('id' => $this->db->f('id', 
false),
+                                                          'name' => 
$this->db->f('name', false));
+                       }
+                       return $results;
+               }
+
                public function find_expired() {
                        $table_name = $this->table_name;
                        $db = $this->db;

Modified: branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php     
2011-09-12 18:27:01 UTC (rev 7578)
+++ branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php     
2011-09-13 06:45:36 UTC (rev 7579)
@@ -45,6 +45,7 @@
                        if(phpgw::get_var('phpgw_return_as') == 'json') {
                                return $this->index_json();
                        }
+                       self::add_javascript('booking', 'booking', 
'allocation_list.js');
                        self::add_javascript('booking', 'booking', 
'datatable.js');
                        phpgwapi_yui::load_widget('datatable');
                        phpgwapi_yui::load_widget('paginator');
@@ -52,6 +53,24 @@
                                'form' => array(
                                        'toolbar' => array(
                                                'item' => array(
+                                                       array('type' => 
'autocomplete', 
+                                                               'name' => 
'building',
+                                                               'ui' => 
'building',
+                                                               'text' => 
lang('Building').':',
+                                                               'onItemSelect' 
=> 'updateBuildingFilter',
+                                                               
'onClearSelection' => 'clearBuildingFilter'
+                                                       ),
+                                                       array('type' => 
'autocomplete', 
+                                                               'name' => 
'season',
+                                                               'ui' => 
'season',
+                                                               'text' => 
lang('Season').':',
+                                                               
'requestGenerator' => 'requestWithBuildingFilter',
+                                                       ),
+                                                       array('type' => 
'filter', 
+                                                               'name' => 
'organizations',
+                                'text' => lang('Organization').':',
+                                'list' => $this->bo->so->get_organizations(),
+                                                       ),
                                                        array('type' => 'text', 
                                                                'name' => 
'query'
                                                        ),
@@ -115,13 +134,49 @@
                                                'href' => 
self::link(array('menuaction' => 'booking.uibooking.add'))
                                ));
                        }
-                       
+                       $data['filters'] = $this->export_filters;
                        self::render_template('datatable', $data);
                }
 
                public function index_json()
                {
-                       $bookings = $this->bo->read();
+                       if(isset($_SESSION['showall']))
+                       {
+                       unset($filters['building_name']);
+                unset($filters['group_id']);
+                unset($filters['season_id']);
+                       } else {
+                $testdata =  phpgw::get_var('filter_building_id', 'int', 
'REQUEST', null);
+                if ($testdata != 0) {
+                    $filters['building_name'] = 
$this->bo->so->get_building(phpgw::get_var('filter_building_id', 'int', 
'REQUEST', null));        
+                } else {
+                    unset($filters['building_name']);                
+                }
+                $testdata2 =  phpgw::get_var('organizations', 'int', 
'REQUEST', null);
+                if ($testdata2 != 0) {
+                    $filters['group_id'] = 
$this->bo->so->get_group_of_organization(phpgw::get_var('organizations', 'int', 
'REQUEST', null));        
+                } else {
+                           unset($filters['group_id']);
+                }
+                $testdata3 =  phpgw::get_var('filter_season_id', 'int', 
'REQUEST', null);
+                if ($testdata3 != 0 and $testdata3 != '') {
+                    $filters['season_id'] = 
$this->bo->so->get_season(phpgw::get_var('filter_season_id', 'int', 'REQUEST', 
null));        
+                } else {
+                    unset($filters['season_id']);                
+                }
+            }
+            
+                       $params = array(
+                               'start' => phpgw::get_var('startIndex', 'int', 
'REQUEST', 0),
+                               'results' => phpgw::get_var('results', 'int', 
'REQUEST', null),
+                               'query' => phpgw::get_var('query'),
+                               'sort'  => phpgw::get_var('sort'),
+                               'dir'   => phpgw::get_var('dir'),
+                               'filters' => $filters
+                       );
+
+                       $bookings = $this->bo->so->read($params);
+
                        foreach($bookings['results'] as &$booking) {
                                $building = 
$this->building_bo->read_single($booking['building_id']);
                                $booking['building_name'] = $building['name'];

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.xmlhelper.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.xmlhelper.inc.php    
2011-09-12 18:27:01 UTC (rev 7578)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.xmlhelper.inc.php    
2011-09-13 06:45:36 UTC (rev 7579)
@@ -39,7 +39,10 @@
                                        $numeric = 1;
                                        $key = $rootNodeName;
                                }
-
+                               if(is_object($value))
+                               {
+                                       $value = get_object_vars($value);
+                               }
                                // delete any char not allowed in XML element 
names
                                $key = preg_replace('/[^a-z0-9\-\_\.\:]/i', '', 
$key);
 

Modified: branches/Version-1_0-branch/property/inc/class.borequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.borequest.inc.php    
2011-09-12 18:27:01 UTC (rev 7578)
+++ branches/Version-1_0-branch/property/inc/class.borequest.inc.php    
2011-09-13 06:45:36 UTC (rev 7579)
@@ -41,6 +41,8 @@
                var $sort;
                var $order;
                var $cat_id;
+               public $sum_budget = 0;
+               public $sum_residual_demand = 0;
 
                var $public_functions = array
                        (
@@ -395,10 +397,11 @@
                                'filter' => $this->filter,'district_id' => 
$this->district_id,'cat_id' => $this->cat_id,'status_id' => $this->status_id,
                                'project_id' => 
$data['project_id'],'allrows'=>$data['allrows'],'list_descr' => 
$data['list_descr'],
                                'dry_run'=>$data['dry_run'], 'p_num' => 
$this->p_num,'start_date'=>$this->start_date,'end_date'=>$this->end_date));
-                       $this->total_records = $this->so->total_records;
 
-                       $this->uicols   = $this->so->uicols;
-                       $cols_extra             = $this->so->cols_extra;
+                       $this->total_records    = $this->so->total_records;
+                       $this->sum_budget               = $this->so->sum_budget;
+                       $this->uicols                   = $this->so->uicols;
+                       $cols_extra                             = 
$this->so->cols_extra;
 
                        $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
 

Modified: branches/Version-1_0-branch/property/inc/class.soXport.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soXport.inc.php      
2011-09-12 18:27:01 UTC (rev 7578)
+++ branches/Version-1_0-branch/property/inc/class.soXport.inc.php      
2011-09-13 06:45:36 UTC (rev 7579)
@@ -316,7 +316,10 @@
                                date($this->db->datetime_format()),
                                $data['item_type'],
                                $data['item_id'],
-                               $data['external_ref']
+                               $data['external_ref'],
+                               $data['currency'],
+                               $this->db->db_addslashes($data['process_log']),
+                               $data['process_code']
                        );
 
                        $values = $this->db->validate_insert($values);
@@ -325,7 +328,7 @@
                                . " 
periode,forfallsdato,fakturanr,spbudact_code,regtid,artid,spvend_code,dima,loc1,"
                                . " 
dimb,mvakode,dimd,oppsynsmannid,saksbehandlerid,budsjettansvarligid,oppsynsigndato,saksigndato,"
                                . " 
budsjettsigndato,merknad,splitt,utbetalingid,utbetalingsigndato,filnavn,overftid,item_type,item_id,external_ref,"
-                               . " belop,godkjentbelop,ordrebelop)"
+                               . " 
currency,process_log,process_code,belop,godkjentbelop,ordrebelop)"
                                . "values ($values, "
                                . $this->db->money_format($data['belop']) . ","
                                . 
$this->db->money_format($data['godkjentbelop']) . ","

Modified: branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sorequest.inc.php    
2011-09-12 18:27:01 UTC (rev 7578)
+++ branches/Version-1_0-branch/property/inc/class.sorequest.inc.php    
2011-09-13 06:45:36 UTC (rev 7579)
@@ -36,7 +36,9 @@
 
        class property_sorequest
        {
-               function property_sorequest()
+               public $sum_budget = 0;
+
+               function __construct()
                {
                        $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->soproject        = 
CreateObject('property.soproject');
@@ -297,8 +299,8 @@
                        $cols_return[]                          = 'budget';
                        $uicols['input_type'][]         = 'text';
                        $uicols['name'][]                       = 'budget';
-                       $uicols['descr'][]                      = 
lang('budget');
-                       $uicols['statustext'][]         = lang('Request 
budget');
+                       $uicols['descr'][]                      = lang('cost 
estimate');
+                       $uicols['statustext'][]         = lang('total cost 
estimate');
                        $uicols['exchange'][]           = '';
                        $uicols['align'][]                      = '';
                        $uicols['datatype'][]           = '';
@@ -442,11 +444,13 @@
                        $this->cols_extra       = $this->bocommon->cols_extra;
 
                        $this->db->fetchmode = 'ASSOC';
-                       $sql2 = 'SELECT count(*) as cnt ' . 
substr($sql,strripos($sql,'from'));
+
+                       $sql2 = 'SELECT count(*) as cnt, sum(budget) as 
sum_budget ' . substr($sql,strripos($sql,'from'));
                        $this->db->query($sql2,__LINE__,__FILE__);
                        $this->db->next_record();
                        $this->total_records = $this->db->f('cnt');
-
+                       $this->sum_budget       = $this->db->f('sum_budget');
+                       
                        //address@hidden 23/10/08 avoid retrieve data in first 
time, only render definition for headers (var myColumnDefs)
                        if($dry_run)
                        {

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-12 18:27:01 UTC (rev 7578)
+++ branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php    
2011-09-13 06:45:36 UTC (rev 7579)
@@ -1573,7 +1573,7 @@
                                                        
if(isset($invoices['external_ref']) && $invoices['external_ref'])
                                                        {
                                                                //      
$json_row[$uicols[$i]['col_name']] = " <a target='_blank' 
href='".$baseurl_invoice. $invoices['external_ref']."'>{$lang_picture}</a>";
-                                                               
$json_row[$uicols[$i]['col_name']] = " <a 
href=\"javascript:openwindow('".$baseurl_invoice. $invoices['external_ref']. 
"','640','800')\" >{$lang_picture}</a>";
+                                                               
$json_row[$uicols[$i]['col_name']] = " <a 
href=\"javascript:openwindow('{$baseurl_invoice}{$invoices['external_ref']}','640','800')\"
 >{$lang_picture}</a>";
                                                        }
                                                        else
                                                        {

Modified: branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uirequest.inc.php    
2011-09-12 18:27:01 UTC (rev 7578)
+++ branches/Version-1_0-branch/property/inc/class.uirequest.inc.php    
2011-09-13 06:45:36 UTC (rev 7579)
@@ -736,7 +736,10 @@
                                        'sort'                          => 
$datatable['sorting']['order'],
                                        'dir'                           => 
$datatable['sorting']['sort'],
                                        'currentPage'           => 
$datatable['sorting']['currentPage'],
-                                       'records'                       => 
array()
+                                       'records'                       => 
array(),
+                                       'sum_budget'            => 
$this->bo->sum_budget,
+                                       'sum_residual_demand'=> 
$this->bo->sum_residual_demand
+
                                );
 
                        // values for datatable

Modified: 
branches/Version-1_0-branch/property/inc/cron/default/Import_fra_basware_X205.php
===================================================================
--- 
branches/Version-1_0-branch/property/inc/cron/default/Import_fra_basware_X205.php
   2011-09-12 18:27:01 UTC (rev 7578)
+++ 
branches/Version-1_0-branch/property/inc/cron/default/Import_fra_basware_X205.php
   2011-09-13 06:45:36 UTC (rev 7579)
@@ -45,7 +45,7 @@
                var $invoice;
                var $bestiller = 85; //cat_id for rolle
                var $attestant = 83; //cat_id for rolle
-               var $budsjettansvarlig = 82; //cat_id for rolle
+               var $budsjettansvarlig = 146; //cat_id for rolle
                var $default_kostra_id = 9999; //dummy
 
                var $import = array(
@@ -327,6 +327,13 @@
                                                $this->receipt['message'][] = 
array('msg' => 'Ikke samsvar med leverandør på bestilling og mottatt faktura');
                                        }
 
+                                       $sql = 'SELECT id FROM fm_vendor WHERE 
id = ' . (int) $_data['SUPPLIER.CODE'];
+                                       
$this->db->query($sql,__LINE__,__FILE__);
+                                       if(!$this->db->next_record())
+                                       {
+                                               $this->receipt['error'][] = 
array('msg' => "Ikke gyldig leverandør id: {$_data['SUPPLIER.CODE']}");
+                                       }
+
                                        $vendor_id = $_data['SUPPLIER.CODE'];
 
                                        if($this->auto_tax)

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-12 18:27:01 UTC (rev 7578)
+++ branches/Version-1_0-branch/property/inc/export/default/Basware_X114        
2011-09-13 06:45:36 UTC (rev 7579)
@@ -222,13 +222,16 @@
                                        'oppsynsigndato'                => 
$this->db->f('oppsynsigndato'),
                                        'saksigndato'                   => 
$this->db->f('saksigndato'),
                                        'budsjettsigndato'              => 
$this->db->f('budsjettsigndato'),
-                                       'merknad'                               
=> $this->db->f('merknad'),
+                                       'merknad'                               
=> $this->db->f('merknad',true),
                                        'splitt'                                
=> $this->db->f('splitt'),
                                        'ordrebelop'                    => 
$this->db->f('ordrebelop'),
                                        'utbetalingid'                  => 
$this->db->f('utbetalingid'),
                                        'utbetalingsigndato'    => 
$this->db->f('utbetalingsigndato'),
                                        'external_ref'                  => 
$this->db->f('external_ref'),
                                        'currency'                              
=> $this->db->f('currency'),
+                                       'process_log'                   => 
$this->db->f('process_log',true),
+                                       'process_code'                  => 
$this->db->f('process_code'),                                        
+
                                );
                        }
 
@@ -275,7 +278,9 @@
                                $BilagOverf['external_ref'],
                                $BilagOverf['belop'],
                                $BilagOverf['godkjentbelop'],
-                               $BilagOverf['currency']
+                               $BilagOverf['currency'],
+                               
$this->db->db_addslashes($BilagOverf['process_log']),
+                               $BilagOverf['process_code'],
                        );
                        
                        $values = $this->db->validate_insert($values);
@@ -284,7 +289,7 @@
                        . " 
fakturadato,forfallsdato,regtid,artid,spvend_code,dimb,oppsynsmannid,"
                        . " 
saksbehandlerid,budsjettansvarligid,fakturanr,spbudact_code,dima,loc1,dimd,mvakode,"
                        . " 
periode,merknad,utbetalingid,oppsynsigndato,saksigndato,budsjettsigndato,utbetalingsigndato,"
-                       . " 
item_type,item_id,external_ref,belop,godkjentbelop,currency)"
+                       . " 
item_type,item_id,external_ref,belop,godkjentbelop,currency,process_log,process_code)"
                        . " VALUES ({$values})";
 
                        $this->db->query($sql,__LINE__,__FILE__);
@@ -455,7 +460,7 @@
                        //Velg ut alle hoved bilag som skal overføres
 
                        $oRsBilag = $this->get_voucher($voucher_id);
-
+//_debug_array($oRsBilag);die();
                        if(!isset($oRsBilag[0]['external_ref'])  || 
!$oRsBilag[0]['external_ref'])
                        {
                                $oRsBilag[0]['external_ref'] = mt_rand();
@@ -807,13 +812,16 @@
                                        'oppsynsigndato'                => 
$this->db->f('oppsynsigndato'),
                                        'saksigndato'                   => 
$this->db->f('saksigndato'),
                                        'budsjettsigndato'              => 
$this->db->f('budsjettsigndato'),
-                                       'merknad'                               
=> $this->db->f('merknad'),
+                                       'merknad'                               
=> $this->db->f('merknad',true),
                                        'splitt'                                
=> $this->db->f('splitt'),
                                        'utbetalingid'                  => 
$this->db->f('utbetalingid'),
                                        'utbetalingsigndato'    => 
$this->db->f('utbetalingsigndato'),
                                        'saksbehandler'                 => 
$this->db->f('saksbehandler'),
                                        'external_ref'                  => 
$this->db->f('external_ref'),
-                                       'kostra_id'                             
=> $this->db->f('kostra_id')
+                                       'kostra_id'                             
=> $this->db->f('kostra_id'),
+                                       'currency'                              
=> $this->db->f('currency'),
+                                       'process_log'                   => 
$this->db->f('process_log',true),
+                                       'process_code'                  => 
$this->db->f('process_code'),                                        
                                );
                        }
 

Modified: branches/Version-1_0-branch/property/js/yahoo/request.index.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/request.index.js      
2011-09-12 18:27:01 UTC (rev 7578)
+++ branches/Version-1_0-branch/property/js/yahoo/request.index.js      
2011-09-13 06:45:36 UTC (rev 7579)
@@ -46,10 +46,15 @@
                elCell.innerHTML = "<div 
align=\"right\">"+YAHOO.util.Number.format(oData, {thousandsSeparator:" 
"})+"</div>";
        }
 
+       var tableYUI;
+
        this.particular_setting = function()
        {
                if(flag_particular_setting=='init')
                {
+                       tableYUI = 
YAHOO.util.Dom.getElementsByClassName("yui-dt-data","tbody")[0].parentNode;
+                       tableYUI.setAttribute("id","tableYUI");
+
 //     console.log(path_values);
                        //district
                        index = 
locate_in_array_options(0,"value",path_values.district_id);
@@ -145,9 +150,46 @@
 
        this.myParticularRenderEvent = function()
        {
-       //don't delete it
+                       tableYUI.deleteTFoot();
+                       addFooterDatatable();
        }
 
+
+       this.addFooterDatatable = function()
+       {
+               tmp_sum_budget = YAHOO.util.Number.format(values_ds.sum_budget, 
{decimalPlaces:0, decimalSeparator:",", thousandsSeparator:" "});
+//             tmp_sum_residual_demand = 
YAHOO.util.Number.format(values_ds.sum_residual_demand, {decimalPlaces:0, 
decimalSeparator:",", thousandsSeparator:" "});
+
+               count_empty = 0;
+               for(i=0;i<myColumnDefs.length;i++)
+               {
+                       if (myColumnDefs[i].key == 'budget')
+                       {
+                               count_empty = i;
+                               break;
+                       }
+               }
+
+               count_empty_end = myColumnDefs.length - count_empty;
+
+               //Create ROW
+               newTR = document.createElement('tr');
+
+               td_empty(count_empty);
+               td_sum(tmp_sum_budget);
+       //      td_sum(tmp_sum_residual_demand);
+               td_empty(count_empty_end);
+               //Add to Table
+
+               myfoot = tableYUI.createTFoot();
+               myfoot.setAttribute("id","myfoot");
+               myfoot.appendChild(newTR.cloneNode(true));
+
+               //clean value for values_ds.message
+               //values_ds.message = null;
+       }
+
+
  
/****************************************************************************************/
 
        this.myexecuteTEMP = function()
@@ -164,9 +206,6 @@
 
        }
 
-
-
-
 
/****************************************************************************************/
 
        YAHOO.util.Event.addListener(window, "load", function()




reply via email to

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