fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7066] Merge 7058:7065 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [7066] Merge 7058:7065 from trunk
Date: Thu, 03 Mar 2011 12:54:43 +0000

Revision: 7066
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7066
Author:   sigurdne
Date:     2011-03-03 12:54:43 +0000 (Thu, 03 Mar 2011)
Log Message:
-----------
Merge 7058:7065 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/frontend/inc/class.uicontract.inc.php
    branches/Version-1_0-branch/frontend/inc/class.uidelegates.inc.php
    branches/Version-1_0-branch/property/inc/class.uilocation.inc.php
    branches/Version-1_0-branch/property/setup/phpgw_no.lang
    branches/Version-1_0-branch/rental/inc/class.socontract_price_item.inc.php
    branches/Version-1_0-branch/rental/inc/class.uicontract.inc.php
    branches/Version-1_0-branch/rental/inc/class.uidelegate.inc.php
    branches/Version-1_0-branch/rental/inc/class.uiparty.inc.php
    branches/Version-1_0-branch/rental/inc/class.uiresultunit.inc.php
    
branches/Version-1_0-branch/rental/inc/model/class.contract_price_item.inc.php
    branches/Version-1_0-branch/rental/setup/phpgw_no.lang
    branches/Version-1_0-branch/rental/templates/base/contract_list_partial.php

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
   + 
/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

Modified: branches/Version-1_0-branch/frontend/inc/class.uicontract.inc.php
===================================================================
--- branches/Version-1_0-branch/frontend/inc/class.uicontract.inc.php   
2011-03-03 12:43:51 UTC (rev 7065)
+++ branches/Version-1_0-branch/frontend/inc/class.uicontract.inc.php   
2011-03-03 12:54:43 UTC (rev 7066)
@@ -55,8 +55,11 @@
                {
                        $contract_id = phpgw::get_var('contract_id');
                        $contract_message = phpgw::get_var('contract_message');
+                       $config = CreateObject('phpgwapi.config','rental');
+                       $config->read();
                        $use_fellesdata = 
$config->config_data['use_fellesdata'];
-                       if($use_fellesdata){
+                       if($use_fellesdata)
+                       {
                                $user_data = 
frontend_bofellesdata::get_instance()->get_user($GLOBALS['phpgw_info']['user']['account_lid']);
                                        
                                if($user_data['email'])

Modified: branches/Version-1_0-branch/frontend/inc/class.uidelegates.inc.php
===================================================================
--- branches/Version-1_0-branch/frontend/inc/class.uidelegates.inc.php  
2011-03-03 12:43:51 UTC (rev 7065)
+++ branches/Version-1_0-branch/frontend/inc/class.uidelegates.inc.php  
2011-03-03 12:54:43 UTC (rev 7066)
@@ -19,6 +19,8 @@
 
                public function index()
                {               
+                       $config = CreateObject('phpgwapi.config','rental');
+                       $config->read();
                        $use_fellesdata = 
$config->config_data['use_fellesdata'];       
                        if(isset($_POST['search']))
                        {
@@ -204,6 +206,9 @@
                
                public function add_delegate(int $account_id, $org_unit_id, 
$org_name)
                {
+                       $config = CreateObject('phpgwapi.config','rental');
+                       $config->read();
+
                        $use_fellesdata = 
$config->config_data['use_fellesdata'];
                        if(!$use_fellesdata)
                        {

Modified: branches/Version-1_0-branch/property/inc/class.uilocation.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uilocation.inc.php   
2011-03-03 12:43:51 UTC (rev 7065)
+++ branches/Version-1_0-branch/property/inc/class.uilocation.inc.php   
2011-03-03 12:54:43 UTC (rev 7066)
@@ -654,7 +654,22 @@
                                                        )),
                                                        'parameters'    => 
$parameters3
                                                );
+                                               
+                                       $datatable['rowactions']['action'][] = 
array
+                                               (
+                                                       'my_name'               
        => 'view',
+                                                       'text'                  
=> lang('composites'),
+                                                       'action'                
=> $GLOBALS['phpgw']->link('/index.php',array
+                                                       (
+                                                               'menuaction'    
  => 'rental.uicomposite.index',
+                                                               'search_type'   
  => 'location_id',
+                                                               'populate_form' 
  => 'yes'
+                                                       )),
+                                                       'parameters'    => 
$parameters3
+                                               );
                                }
+                               
+                               
 
                                if($this->acl_read)
                                {

Modified: branches/Version-1_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/property/setup/phpgw_no.lang    2011-03-03 
12:43:51 UTC (rev 7065)
+++ branches/Version-1_0-branch/property/setup/phpgw_no.lang    2011-03-03 
12:54:43 UTC (rev 7066)
@@ -337,6 +337,7 @@
 common costs   property        no      Fellsekostnader
 communication descriptions manager     property        no      Kommunikasjons 
beskrivelse
 communication types manager    property        no      Type kommunikasjon
+composites     property        no      Leieobjekter
 condidtion degree      property        no      Tilstandsgrad
 config property        no      Konfigurer
 configuration  property        no      Konfigurasjon

Modified: 
branches/Version-1_0-branch/rental/inc/class.socontract_price_item.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.socontract_price_item.inc.php  
2011-03-03 12:43:51 UTC (rev 7065)
+++ branches/Version-1_0-branch/rental/inc/class.socontract_price_item.inc.php  
2011-03-03 12:54:43 UTC (rev 7066)
@@ -90,6 +90,10 @@
                        $cols = 'COUNT(DISTINCT(id)) AS count';
                        $order = "";
                }
+               else if(isset($filters['export']))
+               {
+                       $cols = 'id, price_item_id, contract_id, area, count, 
agresso_id, title, is_area, price, total_price, is_one_time, date_start, 
date_end';
+               }
                else
                {
                        $cols = '*';
@@ -97,7 +101,7 @@
                
                $tables = "rental_contract_price_item";
                $joins = "";
-               
+
                return "SELECT {$cols} FROM {$tables} {$joins} WHERE 
{$condition} {$order}";
        }
        

Modified: branches/Version-1_0-branch/rental/inc/class.uicontract.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.uicontract.inc.php     
2011-03-03 12:43:51 UTC (rev 7065)
+++ branches/Version-1_0-branch/rental/inc/class.uicontract.inc.php     
2011-03-03 12:54:43 UTC (rev 7066)
@@ -71,6 +71,7 @@
                        $result_objects = array();
                        $result_count = 0;
                        
+                       $price_items_only = phpgw::get_var('price_items'); 
//should only export contract price items
                        $exp_param      = phpgw::get_var('export');
                        $export = false;
                        if(isset($exp_param)){
@@ -178,7 +179,22 @@
                                foreach ($result_objects as $result) {
                                        if(isset($result))
                                        {
-                                               $rows[] = $result->serialize();
+                                               if(isset($price_items_only))
+                                               {
+                                                       //export contract price 
items
+                                                       $result_objects_pi = 
rental_socontract_price_item::get_instance()->get(null, null, null, null, null, 
null, array('contract_id' => $result->get_id(),'export'=>'true'));
+                                                       foreach 
($result_objects_pi as $result_pi) {
+                                                               
if(isset($result_pi))
+                                                               {
+                                                                       $rows[] 
= $result_pi->serialize();
+                                                               }
+                                                       }
+                                               }
+                                               else
+                                               {
+                                                       //export contracts
+                                                       $rows[] = 
$result->serialize();
+                                               }
                                        }
                                }
                                //var_dump("Usage " .memory_get_usage() . " 
bytes after serializing");

Modified: branches/Version-1_0-branch/rental/inc/class.uidelegate.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.uidelegate.inc.php     
2011-03-03 12:43:51 UTC (rev 7065)
+++ branches/Version-1_0-branch/rental/inc/class.uidelegate.inc.php     
2011-03-03 12:54:43 UTC (rev 7066)
@@ -50,6 +50,9 @@
                
                public function add_actions(&$value, $key, $params)
                {                       
+                       $config = CreateObject('phpgwapi.config','rental');
+                       $config->read();
+
                        $use_fellesdata = 
$config->config_data['use_fellesdata'];
                        if(($this->isExecutiveOfficer() || 
$this->isAdministrator()) && $use_fellesdata)
                        {
@@ -60,4 +63,4 @@
                                $value['labels'][] = lang('remove');
                        }
                }
-       }
\ No newline at end of file
+       }

Modified: branches/Version-1_0-branch/rental/inc/class.uiparty.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.uiparty.inc.php        
2011-03-03 12:43:51 UTC (rev 7065)
+++ branches/Version-1_0-branch/rental/inc/class.uiparty.inc.php        
2011-03-03 12:54:43 UTC (rev 7066)
@@ -76,6 +76,9 @@
                
                //Retrieve the type of query and perform type specific logic
                $type = phpgw::get_var('type');
+
+               $config = CreateObject('phpgwapi.config','rental');
+               $config->read();
                $use_fellesdata = $config->config_data['use_fellesdata'];       
                switch($type)
                {
@@ -178,6 +181,9 @@
         */
        public function update_all_org_enhet_id()
        {
+               $config = CreateObject('phpgwapi.config','rental');
+               $config->read();
+
                $use_fellesdata = $config->config_data['use_fellesdata'];       
                if(!$use_fellesdata){
                        return;

Modified: branches/Version-1_0-branch/rental/inc/class.uiresultunit.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.uiresultunit.inc.php   
2011-03-03 12:43:51 UTC (rev 7065)
+++ branches/Version-1_0-branch/rental/inc/class.uiresultunit.inc.php   
2011-03-03 12:54:43 UTC (rev 7066)
@@ -24,6 +24,8 @@
                
                public function query()
                {
+                       $config = CreateObject('phpgwapi.config','rental');
+                       $config->read();
                        $use_fellesdata = 
$config->config_data['use_fellesdata'];
                        
if($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] > 0)
                        {
@@ -91,11 +93,13 @@
                        }
                }
                
-               public function edit(){
-                       
+               public function edit()
+               {
                        $GLOBALS['phpgw_info']['flags']['app_header'] .= 
'::'.lang('edit');
+                       $config = CreateObject('phpgwapi.config','rental');
+                       $config->read();
                        $use_fellesdata = 
$config->config_data['use_fellesdata'];
-                       
+
                        $unit_id = (int)phpgw::get_var('id');
                        
                        if (isset($unit_id) && $unit_id > 0 && $use_fellesdata) 
{
@@ -174,6 +178,8 @@
                
                public function add_delegate(int $account_id, $org_unit_id, 
$org_name)
                {
+                       $config = CreateObject('phpgwapi.config','rental');
+                       $config->read();
                        $use_fellesdata = 
$config->config_data['use_fellesdata'];
                        if(!isset($account_id) || $account_id == '' && 
$use_fellesdata)
                        {
@@ -242,4 +248,4 @@
                        }
                        $GLOBALS['phpgw']->redirect_link('/index.php', $args);
                }
-       }
\ No newline at end of file
+       }

Modified: 
branches/Version-1_0-branch/rental/inc/model/class.contract_price_item.inc.php
===================================================================
--- 
branches/Version-1_0-branch/rental/inc/model/class.contract_price_item.inc.php  
    2011-03-03 12:43:51 UTC (rev 7065)
+++ 
branches/Version-1_0-branch/rental/inc/model/class.contract_price_item.inc.php  
    2011-03-03 12:54:43 UTC (rev 7066)
@@ -187,13 +187,13 @@
                                'contract_id' => $this->get_contract_id(),
                                'area' => $this->get_area(),
                                'count' => $this->get_count(),
-                               //'total_price' => $currency_prefix.' 
'.$this->get_total_price(),
-                               'total_price' => $this->get_total_price(),
+                               'agresso_id' => $this->get_agresso_id(),
                                'title' => $this->get_title(),
-                               'agresso_id' => $this->get_agresso_id(),
                                'is_area' => $this->get_type_text(),
                                //'price' => money_format($currency_prefix.' 
%.2n',$this->get_price()),
                                'price' => $this->get_price(),
+                               //'total_price' => $currency_prefix.' 
'.$this->get_total_price(),
+                               'total_price' => $this->get_total_price(),
                                'is_one_time' => $this->is_one_time(),
                                // We set a format fitting for the 
DateCellEditor here because
                                // this table has inline editing enabled.  The 
DateCellEditor is not

Modified: branches/Version-1_0-branch/rental/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/rental/setup/phpgw_no.lang      2011-03-03 
12:43:51 UTC (rev 7065)
+++ branches/Version-1_0-branch/rental/setup/phpgw_no.lang      2011-03-03 
12:54:43 UTC (rev 7066)
@@ -205,6 +205,8 @@
 executive_officer      rental  no      Saksbehandler
 executive_officer_for  rental  no      Saksbehandler for
 export rental  no      Eksport
+export_contracts       rental  no      Eksporter kontrakter
+export_contract_price_items    rental  no      Eksporter priselementer på 
kontrakter
 Export failed. rental  no      Eksporten feilet.
 Export format  rental  no      Format
 Export generated.      rental  no      Eksporten ble generert.
@@ -416,6 +418,7 @@
 place  rental  no      Sted
 previous       rental  no      Forrige
 price_item     rental  no      Priselement
+price_item_id  rental  no      Priselement ID
 price_item_type_apiece rental  no      Stk.
 price_item_type_area   rental  no      Areal
 price_item_inactive    rental  no      Inaktiv

Modified: 
branches/Version-1_0-branch/rental/templates/base/contract_list_partial.php
===================================================================
--- branches/Version-1_0-branch/rental/templates/base/contract_list_partial.php 
2011-03-03 12:43:51 UTC (rev 7065)
+++ branches/Version-1_0-branch/rental/templates/base/contract_list_partial.php 
2011-03-03 12:54:43 UTC (rev 7066)
@@ -162,6 +162,35 @@
             '&date_end='+endDate+
             '&export=true');
     }
+
+    function contract_export_price_items(ctype) {
+        var typeselect = document.getElementById('<?php echo $list_id 
?>_ctrl_toggle_contract_type');
+        var typeoption = typeselect.options[typeselect.selectedIndex].value;
+
+        var statusselect = document.getElementById('<?php echo $list_id 
?>_ctrl_toggle_contract_status');
+        var statusoption = 
statusselect.options[statusselect.selectedIndex].value;
+
+        var sSelect = document.getElementById('<?php echo $list_id 
?>_ctrl_toggle_search_type');
+        var sOption = sSelect.options[sSelect.selectedIndex].value;
+
+        var query = document.getElementById('<?php echo $list_id 
?>_ctrl_search_query').value;
+
+               var startDate = 
document.getElementById('start_date_report').value;
+               var endDate = document.getElementById('end_date_report').value;
+        
+        var dl = window.open('index.php?menuaction=rental.uicontract.download'+
+            '&amp;type='+ctype+
+            '&amp;contract_type='+typeoption+
+            '&amp;contract_status='+statusoption+
+            '<?php echo $url_add_on ?>'+
+            '&amp;query='+query+
+            '&amp;search_option='+sOption+
+            //'&amp;results=100'+
+            '&amp;date_start='+startDate+
+            '&amp;date_end='+endDate+
+            '&amp;price_items=true'+
+            '&amp;export=true');
+    }
 </script>
 <?php
        if($list_form)
@@ -228,7 +257,8 @@
                <!-- export with date limitation -->
                <h3><?php echo lang('export_to') ?></h3>
                <div id="export">
-                       <a href="javascript:contract_export('<?php echo 
$list_id ?>');"><img src="<?php echo RENTAL_TEMPLATE_PATH 
?>images/16x16/mimetypes/x-office-spreadsheet.png"/></a>
+                       <a href="javascript:contract_export('<?php echo 
$list_id ?>');"><img src="<?php echo RENTAL_TEMPLATE_PATH 
?>images/16x16/mimetypes/x-office-spreadsheet.png" alt="<?php echo 
lang('export_contracts') ?>" title="<?php echo lang('export_contracts') ?>" 
/></a>
+                       <a href="javascript:contract_export_price_items('<?php 
echo $list_id ?>');"><img src="<?php echo RENTAL_TEMPLATE_PATH 
?>images/16x16/mimetypes/x-office-spreadsheet.png" alt="<?php echo 
lang('export_contract_price_items') ?>" title="<?php echo 
lang('export_contract_price_items') ?>" /></a>
                        <label class="toolbar_element_label" 
for="start_date_report" id="label_start_date_report"><?php echo 
lang('date_start') ?></label>
                        <?php echo 
$GLOBALS['phpgw']->yuical->add_listener('start_date_report', 
$notification_date); ?>
                        <label class="toolbar_element_label" 
for="end_date_report" id="label_end_date_report"><?php echo lang('date_end') 
?></label>




reply via email to

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