fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [15771] Syncromind: merge 15749:15770 from trunk


From: sigurdne
Subject: [Fmsystem-commits] [15771] Syncromind: merge 15749:15770 from trunk
Date: Sat, 1 Oct 2016 10:02:28 +0000 (UTC)

Revision: 15771
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15771
Author:   sigurdne
Date:     2016-10-01 10:02:28 +0000 (Sat, 01 Oct 2016)
Log Message:
-----------
Syncromind: merge 15749:15770 from trunk

Modified Paths:
--------------
    branches/dev-syncromind-2/helpdesk/inc/class.uitts.inc.php
    branches/dev-syncromind-2/phpgwapi/inc/class.uicommon_jquery.inc.php
    branches/dev-syncromind-2/property/inc/class.soinvoice.inc.php
    branches/dev-syncromind-2/property/inc/class.uitts.inc.php
    branches/dev-syncromind-2/property/inc/class.uiworkorder.inc.php
    
branches/dev-syncromind-2/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php
    branches/dev-syncromind-2/property/inc/soap_client/bra5/soap.php
    branches/dev-syncromind-2/property/templates/base/workorder.xsl
    branches/dev-syncromind-2/rental/inc/class.uicontract.inc.php

Removed Paths:
-------------
    
branches/dev-syncromind-2/phpgwapi/js/jquery/file-upload/server/php/files/737-Utend?\195?\131?\194?\184rs
 forsyningsanlegg for termisk energi.png
    
branches/dev-syncromind-2/phpgwapi/js/jquery/file-upload/server/php/files/thumbnail/737-Utend?\195?\131?\194?\184rs
 forsyningsanlegg for termisk energi.png

Property Changed:
----------------
    branches/dev-syncromind-2/


Property changes on: branches/dev-syncromind-2
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/dev-syncromind:13653
/branches/stavangerkommune:12743-12875,12986
/trunk:14934-14935,15165-15215,15218-15220,15222-15304,15306-15337,15339,15341-15398,15400-15421,15423-15474,15476-15607,15609,15611,15613-15652,15654-15732,15734,15736-15746
   + /branches/dev-syncromind:13653
/branches/stavangerkommune:12743-12875,12986
/trunk:14934-14935,15165-15215,15218-15220,15222-15304,15306-15337,15339,15341-15398,15400-15421,15423-15474,15476-15607,15609,15611,15613-15652,15654-15732,15734,15736-15746,15750-15770

Modified: branches/dev-syncromind-2/helpdesk/inc/class.uitts.inc.php
===================================================================
--- branches/dev-syncromind-2/helpdesk/inc/class.uitts.inc.php  2016-10-01 
00:59:01 UTC (rev 15770)
+++ branches/dev-syncromind-2/helpdesk/inc/class.uitts.inc.php  2016-10-01 
10:02:28 UTC (rev 15771)
@@ -759,8 +759,8 @@
                                'action' => 
$GLOBALS['phpgw']->link('/index.php', array
                                        (
                                        'menuaction' => 'helpdesk.uitts._print',
-                                       'target' => '_blank'
                                )),
+                               'target' => '_blank',
                                'parameters' => json_encode($parameters)
                        );
 
@@ -778,8 +778,8 @@
                                                        (
                                                        'menuaction' => 
'helpdesk.uijasper.view',
                                                        'jasper_id' => 
$report['id'],
-                                                       'target' => '_blank'
                                                )),
+                                               'target' => '_blank',
                                                'parameters' => 
json_encode($parameters)
                                        );
                                }

Modified: branches/dev-syncromind-2/phpgwapi/inc/class.uicommon_jquery.inc.php
===================================================================
--- branches/dev-syncromind-2/phpgwapi/inc/class.uicommon_jquery.inc.php        
2016-10-01 00:59:01 UTC (rev 15770)
+++ branches/dev-syncromind-2/phpgwapi/inc/class.uicommon_jquery.inc.php        
2016-10-01 10:02:28 UTC (rev 15771)
@@ -185,11 +185,17 @@
                public function link( $data )
                {
                        if ($GLOBALS['phpgw_info']['flags']['currentapp'] == 
'bookingfrontend')
+                       {
                                return 
$GLOBALS['phpgw']->link('/bookingfrontend/', $data);
-                       elseif ($GLOBALS['phpgw_info']['flags']['currentapp'] 
== 'activitycalendarfrontend')
+                       }
+                       else if ($GLOBALS['phpgw_info']['flags']['currentapp'] 
== 'activitycalendarfrontend')
+                       {
                                return 
$GLOBALS['phpgw']->link('/activitycalendarfrontend/', $data);
+                       }
                        else
+                       {
                                return $GLOBALS['phpgw']->link('/index.php', 
$data);
+                       }
                }
 
                public function redirect( $link_data )

Deleted: 
branches/dev-syncromind-2/phpgwapi/js/jquery/file-upload/server/php/files/737-Utend?\195?\131?\194?\184rs
 forsyningsanlegg for termisk energi.png
===================================================================
(Binary files differ)

Deleted: 
branches/dev-syncromind-2/phpgwapi/js/jquery/file-upload/server/php/files/thumbnail/737-Utend?\195?\131?\194?\184rs
 forsyningsanlegg for termisk energi.png
===================================================================
(Binary files differ)

Modified: branches/dev-syncromind-2/property/inc/class.soinvoice.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.soinvoice.inc.php      
2016-10-01 00:59:01 UTC (rev 15770)
+++ branches/dev-syncromind-2/property/inc/class.soinvoice.inc.php      
2016-10-01 10:02:28 UTC (rev 15771)
@@ -596,6 +596,11 @@
                                $where = 'AND';
                        }
 
+                       if(!$filtermethod)
+                       {
+                               return array();
+                       }
+
                        $groupmethod = "GROUP BY 
pmwrkord_code,bilagsnr,bilagsnr_ut,fakturanr,"
                                . " 
currency,budsjettansvarligid,org_name,periode,periodization,periodization_start";
 

Modified: branches/dev-syncromind-2/property/inc/class.uitts.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.uitts.inc.php  2016-10-01 
00:59:01 UTC (rev 15770)
+++ branches/dev-syncromind-2/property/inc/class.uitts.inc.php  2016-10-01 
10:02:28 UTC (rev 15771)
@@ -56,7 +56,8 @@
                        'get_external_project'=> true,
                        'get_unspsc_code'=> true,
                        'receive_order' => true,
-                       'check_purchase_right'=> true
+                       'check_purchase_right'=> true,
+                       'show_attachment'       => true
                );
 
                /**
@@ -229,6 +230,35 @@
                        echo $html;
                }
 
+               function show_attachment(  )
+               {
+                       if (!$this->acl->check('.ticket.order', PHPGW_ACL_ADD, 
'property') && !$this->acl->check('.project', PHPGW_ACL_ADD, 'property'))
+                       {
+                               phpgw::no_access();
+                       }
+                       $GLOBALS['phpgw_info']['flags']['noheader'] = true;
+                       $GLOBALS['phpgw_info']['flags']['nofooter'] = true;
+                       $GLOBALS['phpgw_info']['flags']['xslt_app'] = false;
+
+                       $file_name = urldecode(phpgw::get_var('file_name'));
+                       $key = phpgw::get_var('key');
+                       $invoice_config = CreateObject('admin.soconfig', 
$GLOBALS['phpgw']->locations->get_id('property', '.invoice'));
+                       $directory_attachment = 
rtrim($invoice_config->config_data['import']['local_path'], '/') . 
'/attachment/' . $key;
+
+                       $file = "$directory_attachment/$file_name";
+
+                       if (file_exists($file))
+                       {
+                               $size = filesize($file);
+                               $content = file_get_contents($file);
+
+                               $browser = CreateObject('phpgwapi.browser');
+                               $browser->content_header($document['name'], '', 
$size);
+                               echo $content;
+                       }
+
+               }
+
                function download2()
                {
                        if (!$this->acl->check('.ticket.external', 
PHPGW_ACL_READ, 'property'))
@@ -642,7 +672,7 @@
                                        )
                                )
                        );
-               
+
                        if($order_read)
                        {
                                $check_date_type['list'][] = array(
@@ -733,6 +763,8 @@
 
                                $values_combo_box[4] = 
$this->_get_user_list($this->user_id);
 
+                               $filter_tts_assigned_to_me = 
$GLOBALS['phpgw_info']['user']['preferences']['property']['tts_assigned_to_me'];
+
                                array_unshift($values_combo_box[4], array(
                                        'id' => -1 * 
$GLOBALS['phpgw_info']['user']['account_id'],
                                        'name' => lang('my assigned tickets'),
@@ -940,15 +972,21 @@
 
                        $parameters = array
                                (
-                               'parameter' => array
-                                       (
-                                       array
-                                               (
+                               'parameter' => array(
+                                       array(
                                                'name' => 'id',
                                                'source' => 'id'
                                        ),
                                )
                        );
+                       $parameters_location = array(
+                               'parameter' => array(
+                                       array(
+                                               'name' => 'location_code',
+                                               'source' => 'location_code'
+                                       ),
+                               )
+                       );
 
                        $data['datatable']['actions'][] = array
                                (
@@ -969,12 +1007,11 @@
                                'action' => 
$GLOBALS['phpgw']->link('/index.php', array
                                        (
                                        'menuaction' => 'property.uitts._print',
-                                       'target' => '_blank'
                                )),
+                               'target' => '_blank',
                                'parameters' => json_encode($parameters)
                        );
 
-
                        $jasper = execMethod('property.sojasper.read', 
array('location_id' => $GLOBALS['phpgw']->locations->get_id('property', 
$this->acl_location)));
 
                        foreach ($jasper as $report)
@@ -987,8 +1024,8 @@
                                                (
                                                'menuaction' => 
'property.uijasper.view',
                                                'jasper_id' => $report['id'],
-                                               'target' => '_blank'
                                        )),
+                                       'target' => '_blank',
                                        'parameters' => json_encode($parameters)
                                );
                        }
@@ -1008,6 +1045,18 @@
                                        'parameters' => json_encode($parameters)
                                );
                        }
+                       $data['datatable']['actions'][] = array
+                               (
+                               'my_name' => 'docs',
+                               'statustext' => lang('documents'),
+                               'text' => lang('documents'),
+                               'action' => 
$GLOBALS['phpgw']->link('/index.php', array
+                                       (
+                                       'menuaction' => 
'property.uidocument.list_doc',
+                               )),
+                               'target' => '_blank',
+                               'parameters' => 
json_encode($parameters_location)
+                       );
 
                        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['tts_status_link'])
 && 
$GLOBALS['phpgw_info']['user']['preferences']['property']['tts_status_link'] == 
'yes' && $this->acl_edit)
                        {
@@ -1237,7 +1286,7 @@
                                        {
                                                if(!$values['assignedto'] = 
$GLOBALS['phpgw_info']['user']['preferences']['property']['assigntodefault'])
                                                {
-                                               
+
                                                        $receipt['error'][] = 
array('msg' => lang('Please select a person or a group to handle the ticket 
!'));
                                                }
                                        }
@@ -2514,14 +2563,16 @@
 
                        // start invoice
                        $invoices = array();
-                       $active_invoices = 
execMethod('property.soinvoice.read_invoice_sub_sum', array(
-                               'order_id' => $ticket['order_id']));
-                       $historical_invoices = 
execMethod('property.soinvoice.read_invoice_sub_sum', array(
-                               'order_id' => $ticket['order_id'],
-                               'paid' => true));
-                       $invoices = array_merge($active_invoices, 
$historical_invoices);
+                       if(!empty($ticket['order_id']))
+                       {
+                               $active_invoices = 
execMethod('property.soinvoice.read_invoice_sub_sum', array(
+                                       'order_id' => $ticket['order_id']));
+                               $historical_invoices = 
execMethod('property.soinvoice.read_invoice_sub_sum', array(
+                                       'order_id' => $ticket['order_id'],
+                                       'paid' => true));
+                               $invoices = array_merge($active_invoices, 
$historical_invoices);
+                       }
 
-
                        $link_data_invoice1 = array
                                (
                                'menuaction' => 'property.uiinvoice.index',
@@ -2580,6 +2631,7 @@
 
                                $content_invoice[] = array
                                        (
+                                       'external_voucher_id'   => 
$entry['external_voucher_id'],
                                        'voucher_id' => ($_lean) ? 
$entry['voucher_id'] : $link_voucher_id,
                                        'voucher_out_id' => 
$entry['voucher_out_id'],
                                        'status' => $entry['status'],
@@ -2606,14 +2658,72 @@
                                $approved_amount += $entry['approved_amount'];
                        }
 
+
+                       if($invoices)
+                       {
+                               $invoice_config = 
CreateObject('admin.soconfig', $GLOBALS['phpgw']->locations->get_id('property', 
'.invoice'));
+                       }
+
+                       foreach ($invoices as $entry)
+                       {
+                               $directory_attachment = 
rtrim($invoice_config->config_data['import']['local_path'], '/') . 
'/attachment/' .$entry['external_voucher_id'];
+                               $attachmen_list = array();
+                               try
+                               {
+                                       $dir = new 
DirectoryIterator("$directory_attachment/");
+                                       if (is_object($dir))
+                                       {
+                                               foreach ($dir as $file)
+                                               {
+                                                       if ($file->isDot() || 
!$file->isFile() || !$file->isReadable())
+                                                       {
+                                                               continue;
+                                                       }
+
+                                                       $url = self::link(array(
+                                                               'menuaction'=> 
'property.uitts.show_attachment',
+                                                               'file_name' => 
urlencode((string)$file),
+                                                               'key'=> 
$entry['external_voucher_id']
+                                                               ));
+
+                                                       $attachmen_list[] = 
array(
+                                                               'voucher_id'    
=> $entry['external_voucher_id'],
+                                                               'file_name'     
        => "<a href='{$url}' target='_blank'>" . (string)$file . "</a>"
+                                                       );
+                                               }
+                                       }
+                               }
+                               catch (Exception $e)
+                               {
+
+                               }
+                       }
+                       $attachmen_def = array(
+                               array(
+                                       'key' => 'voucher_id',
+                                       'label' => 'key',
+                                       'hidden' => false
+                                       ),
+                               array(
+                                       'key' => 'file_name',
+                                       'label' => lang('attachments'),
+                                       'hidden' => false,
+                                       'sortable' => true,
+                                       )
+                               );
+
                        $invoice_def = array
                                (
                                array(
-                                       'key' => 'voucher_id',
-                                       'label' => lang('bilagsnr'),
+                                       'key' => 'external_voucher_id',
+                                       'label' => 'key',
                                        'sortable' => false,
                                        'value_footer' => lang('Sum')),
                                array(
+                                       'key' => 'voucher_id',
+                                       'label' => lang('bilagsnr'),
+                                       'sortable' => false),
+                               array(
                                        'key' => 'voucher_out_id',
                                        'hidden' => true),
                                array(
@@ -2684,8 +2794,22 @@
                                )
                        );
 
+                       $datatable_def[] = array
+                               (
+                               'container' => 'datatable-container_8',
+                               'requestUrl' => "''",
+                               'data' => json_encode($attachmen_list),
+                               'ColumnDefs' => $attachmen_def,
+                               'config' => array(
+                                       array(
+                                               'disableFilter' => true),
+                                       array(
+                                               'disablePagination' => true)
+                               )
+                       );
 
 
+
                        // end invoice table
 
                        
//----------------------------------------------datatable settings--------

Modified: branches/dev-syncromind-2/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.uiworkorder.inc.php    
2016-10-01 00:59:01 UTC (rev 15770)
+++ branches/dev-syncromind-2/property/inc/class.uiworkorder.inc.php    
2016-10-01 10:02:28 UTC (rev 15771)
@@ -1781,6 +1781,59 @@
                                $approved_amount += $entry['approved_amount'];
                        }
 
+                       if($invoices)
+                       {
+                               $invoice_config = 
CreateObject('admin.soconfig', $GLOBALS['phpgw']->locations->get_id('property', 
'.invoice'));
+                       }
+
+                       foreach ($invoices as $entry)
+                       {
+                               $directory_attachment = 
rtrim($invoice_config->config_data['import']['local_path'], '/') . 
'/attachment/' .$entry['external_voucher_id'];
+                               $attachmen_list = array();
+                               try
+                               {
+                                       $dir = new 
DirectoryIterator("$directory_attachment/");
+                                       if (is_object($dir))
+                                       {
+                                               foreach ($dir as $file)
+                                               {
+                                                       if ($file->isDot() || 
!$file->isFile() || !$file->isReadable())
+                                                       {
+                                                               continue;
+                                                       }
+
+                                                       $url = self::link(array(
+                                                               'menuaction'=> 
'property.uitts.show_attachment',
+                                                               'file_name' => 
urlencode((string)$file),
+                                                               'key'=> 
$entry['external_voucher_id']
+                                                               ));
+
+                                                       $attachmen_list[] = 
array(
+                                                               'voucher_id'    
=> $entry['external_voucher_id'],
+                                                               'file_name'     
        => "<a href='{$url}' target='_blank'>" . (string)$file . "</a>"
+                                                       );
+                                               }
+                                       }
+                               }
+                               catch (Exception $e)
+                               {
+
+                               }
+                       }
+                       $attachmen_def = array(
+                               array(
+                                       'key' => 'voucher_id',
+                                       'label' => 'key',
+                                       'hidden' => false
+                                       ),
+                               array(
+                                       'key' => 'file_name',
+                                       'label' => lang('attachments'),
+                                       'hidden' => false,
+                                       'sortable' => true,
+                                       )
+                               );
+
                        $invoice_def = array
                                (
                                array(
@@ -1876,6 +1929,19 @@
                                )
                        );
 
+                       $datatable_def[] = array(
+                               'container' => 'datatable-container_6',
+                               'requestUrl' => "''",
+                               'data' => json_encode($attachmen_list),
+                               'ColumnDefs' => $attachmen_def,
+                               'config' => array(
+                                       array(
+                                               'disableFilter' => true),
+                                       array(
+                                               'disablePagination' => true)
+                               )
+                       );
+
                        $datatable_def[] = array
                                (
                                'container' => 'datatable-container_3',

Modified: 
branches/dev-syncromind-2/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php
===================================================================
--- 
branches/dev-syncromind-2/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php
    2016-10-01 00:59:01 UTC (rev 15770)
+++ 
branches/dev-syncromind-2/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php
    2016-10-01 10:02:28 UTC (rev 15771)
@@ -72,8 +72,8 @@
                                'order_id' => $values['order_id'],
                                'lines' => array(
                                        array(
-                                               'UnitCode' => 'STK',
-                                               'Quantity' => 
($received_amount),
+                                               'UnitCode' => 'SUM',
+                                               'Amount' => ($received_amount),
                                        )
                                )
                        );

Modified: branches/dev-syncromind-2/property/inc/soap_client/bra5/soap.php
===================================================================
--- branches/dev-syncromind-2/property/inc/soap_client/bra5/soap.php    
2016-10-01 00:59:01 UTC (rev 15770)
+++ branches/dev-syncromind-2/property/inc/soap_client/bra5/soap.php    
2016-10-01 10:02:28 UTC (rev 15771)
@@ -76,12 +76,27 @@
 
        $location_id = phpgw::get_var('location_id', 'int');
        $section = phpgw::get_var('section', 'string');
-       $bygningsnr = (int)phpgw::get_var('bygningsnr', 'int');
        $fileid = phpgw::get_var('fileid', 'string');
 
-       if (!$fileid && !$bygningsnr)
+       $where_parameter =  phpgw::get_var('where_parameter', 'string');
+
+       $_where = '';
+       if (!$fileid)
        {
-               $GLOBALS['phpgw_info']['message']['errors'][] = 
"{$system_name}::Bygningsnr ikke angitt som innparameter";
+               if ($where_parameter)
+               {
+                       $_where = "{$where_parameter} = ". 
phpgw::get_var($where_parameter);
+               }
+               else
+               {
+                       $bygningsnr = (int)phpgw::get_var('bygningsnr', 'int');
+                       $_where = "Byggnr = {$bygningsnr}";
+               }
+
+               if (!$_where)
+               {
+                       $GLOBALS['phpgw_info']['message']['errors'][] = 
"{$system_name}::Mangler innparameter for avgrensing av listes√łk";
+               }
        }
 
        $c = CreateObject('admin.soconfig', $location_id);
@@ -175,7 +190,7 @@
        }
        $bra5ServiceSearch = new Bra5ServiceSearch();
        /*
-         if($bra5ServiceSearch->searchDocument(new 
Bra5StructSearchDocument($secKey,$_baseclassname = 
'Eiendomsarkiver',$classname,$_where = "Byggnr = {$bygningsnr}",$_maxhits = 2)))
+         if($bra5ServiceSearch->searchDocument(new 
Bra5StructSearchDocument($secKey,$_baseclassname = 
'Eiendomsarkiver',$classname,$_where,$_maxhits = 2)))
          {
          //            _debug_array($bra5ServiceSearch->getResult());
          }
@@ -184,7 +199,7 @@
          print_r($bra5ServiceSearch->getLastError());
          }
         */
-       if ($bra5ServiceSearch->searchAndGetDocuments(new 
Bra5StructSearchAndGetDocuments($secKey, $_baseclassname = 'Eiendomsarkiver', 
$classname, $_where = "Byggnr = {$bygningsnr}", $_maxhits = -1)))
+       if ($bra5ServiceSearch->searchAndGetDocuments(new 
Bra5StructSearchAndGetDocuments($secKey, $_baseclassname = 'Eiendomsarkiver', 
$classname, $_where, $_maxhits = -1)))
        {
 //             _debug_array($bra5ServiceSearch->getResult());die();
                $_result = 
$bra5ServiceSearch->getResult()->getsearchAndGetDocumentsResult()->getExtendedDocument()->getsearchAndGetDocumentsResult()->ExtendedDocument;

Modified: branches/dev-syncromind-2/property/templates/base/workorder.xsl
===================================================================
--- branches/dev-syncromind-2/property/templates/base/workorder.xsl     
2016-10-01 00:59:01 UTC (rev 15770)
+++ branches/dev-syncromind-2/property/templates/base/workorder.xsl     
2016-10-01 10:02:28 UTC (rev 15771)
@@ -975,7 +975,7 @@
                                                </input>
                                        </div>
                                        <xsl:choose>
-                                               <xsl:when test="mode='edit'">
+                                               <xsl:when 
test="value_workorder_id!='' and mode='edit'">
                                                        <div 
class="pure-control-group">
                                                                <label 
for="name">
                                                                        
<xsl:value-of select="php:function('lang', 'order received')"/>
@@ -1012,34 +1012,57 @@
                                                        </div>
                                                </xsl:when>
                                        </xsl:choose>
-                                       <div class="pure-control-group">
-                                               <label for="name">
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="value_workorder_id!='' and mode='edit'">
-                                                                       
<xsl:variable name="lang_add_invoice_statustext">
-                                                                               
<xsl:value-of select="php:function('lang', 'add invoice')"/>
-                                                                       
</xsl:variable>
-                                                                       <a 
href="javascript:showlightbox_manual_invoice({value_workorder_id})" 
title="{$lang_add_invoice_statustext}">
-                                                                               
<xsl:value-of select="php:function('lang', 'add invoice')"/>
-                                                                       </a>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                               </label>
-                                               <div class="pure-custom">
-                                                       <xsl:for-each 
select="datatable_def">
-                                                               <xsl:if 
test="container = 'datatable-container_2'">
-                                                                       
<xsl:call-template name="table_setup">
-                                                                               
<xsl:with-param name="container" select ='container'/>
-                                                                               
<xsl:with-param name="requestUrl" select ='requestUrl' />
-                                                                               
<xsl:with-param name="ColumnDefs" select ='ColumnDefs' />
-                                                                               
<xsl:with-param name="tabletools" select ='tabletools' />
-                                                                               
<xsl:with-param name="data" select ='data' />
-                                                                               
<xsl:with-param name="config" select ='config' />
-                                                                       
</xsl:call-template>
-                                                               </xsl:if>
-                                                       </xsl:for-each>
-                                               </div>
-                                       </div>
+                                       <xsl:choose>
+                                               <xsl:when 
test="value_workorder_id!=''">
+                                                       <div 
class="pure-control-group">
+                                                               <label 
for="name">
+                                                                       
<xsl:choose>
+                                                                               
<xsl:when test="mode='edit'">
+                                                                               
        <xsl:variable name="lang_add_invoice_statustext">
+                                                                               
                <xsl:value-of select="php:function('lang', 'add invoice')"/>
+                                                                               
        </xsl:variable>
+                                                                               
        <a href="javascript:showlightbox_manual_invoice({value_workorder_id})" 
title="{$lang_add_invoice_statustext}">
+                                                                               
                <xsl:value-of select="php:function('lang', 'add invoice')"/>
+                                                                               
        </a>
+                                                                               
</xsl:when>
+                                                                       
</xsl:choose>
+                                                               </label>
+                                                               <div 
class="pure-custom">
+                                                                       
<xsl:for-each select="datatable_def">
+                                                                               
<xsl:if test="container = 'datatable-container_2'">
+                                                                               
        <xsl:call-template name="table_setup">
+                                                                               
                <xsl:with-param name="container" select ='container'/>
+                                                                               
                <xsl:with-param name="requestUrl" select ='requestUrl' />
+                                                                               
                <xsl:with-param name="ColumnDefs" select ='ColumnDefs' />
+                                                                               
                <xsl:with-param name="tabletools" select ='tabletools' />
+                                                                               
                <xsl:with-param name="data" select ='data' />
+                                                                               
                <xsl:with-param name="config" select ='config' />
+                                                                               
        </xsl:call-template>
+                                                                               
</xsl:if>
+                                                                       
</xsl:for-each>
+                                                               </div>
+                                                       </div>
+                                                       <div 
class="pure-control-group">
+                                                               <label 
for="name">
+                                                                       
<xsl:value-of select="php:function('lang', 'attachments')"/>
+                                                               </label>
+                                                               <div 
class="pure-custom">
+                                                                       
<xsl:for-each select="datatable_def">
+                                                                               
<xsl:if test="container = 'datatable-container_6'">
+                                                                               
        <xsl:call-template name="table_setup">
+                                                                               
                <xsl:with-param name="container" select ='container'/>
+                                                                               
                <xsl:with-param name="requestUrl" select ='requestUrl' />
+                                                                               
                <xsl:with-param name="ColumnDefs" select ='ColumnDefs' />
+                                                                               
                <xsl:with-param name="tabletools" select ='tabletools' />
+                                                                               
                <xsl:with-param name="data" select ='data' />
+                                                                               
                <xsl:with-param name="config" select ='config' />
+                                                                               
        </xsl:call-template>
+                                                                               
</xsl:if>
+                                                                       
</xsl:for-each>
+                                                               </div>
+                                                       </div>
+                                               </xsl:when>
+                                       </xsl:choose>
                                </fieldset>
                        </div>
                        <div id="coordination">

Modified: branches/dev-syncromind-2/rental/inc/class.uicontract.inc.php
===================================================================
--- branches/dev-syncromind-2/rental/inc/class.uicontract.inc.php       
2016-10-01 00:59:01 UTC (rev 15770)
+++ branches/dev-syncromind-2/rental/inc/class.uicontract.inc.php       
2016-10-01 10:02:28 UTC (rev 15771)
@@ -1064,12 +1064,6 @@
                                'form' => array(
                                        'toolbar' => array(
                                                'item' => array(
-                                                       array(
-                                                               'type' => 
'link',
-                                                               'value' => 
lang('new'),
-                                                               'onclick' => 
'onNew_contract()',
-                                                               'class' => 
'new_item'
-                                                       ),
                                                        array
                                                                (
                                                                'type' => 
'date-picker',
@@ -1205,6 +1199,12 @@
 
                        $filters = $this->_get_Filters();
                        krsort($filters);
+
+                       $filters[] = array('type' => 'link',
+                                                               'value' => 
lang('new'),
+                                                               'onclick' => 
'onNew_contract()',
+                                                               'class' => 
'new_item'
+                                                       );
                        foreach ($filters as $filter)
                        {
                                array_unshift($data['form']['toolbar']['item'], 
$filter);




reply via email to

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