fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14962] property: more on integration


From: Sigurd Nes
Subject: [Fmsystem-commits] [14962] property: more on integration
Date: Mon, 02 May 2016 11:05:28 +0000

Revision: 14962
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14962
Author:   sigurdne
Date:     2016-05-02 11:05:25 +0000 (Mon, 02 May 2016)
Log Message:
-----------
property: more on integration

Modified Paths:
--------------
    trunk/property/inc/class.uiworkorder.inc.php
    trunk/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php
    trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
    trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
    trunk/property/js/portico/workorder.edit.js
    trunk/property/setup/tables_current.inc.php
    trunk/property/setup/tables_update.inc.php
    trunk/property/templates/base/workorder.xsl

Modified: trunk/property/inc/class.uiworkorder.inc.php
===================================================================
--- trunk/property/inc/class.uiworkorder.inc.php        2016-05-02 10:23:13 UTC 
(rev 14961)
+++ trunk/property/inc/class.uiworkorder.inc.php        2016-05-02 11:05:25 UTC 
(rev 14962)
@@ -2373,6 +2373,7 @@
                                'collect_building_part' => 
$collect_building_part,
                                'building_part_list' => $building_part_list,
                                'order_dim1_list' => $order_dim1_list,
+                               'value_order_received'  => 
$GLOBALS['phpgw']->common->show_date($values['order_received'])
                        );
 
                        $appname = lang('Workorder');

Modified: 
trunk/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php
===================================================================
--- 
trunk/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php    
    2016-05-02 10:23:13 UTC (rev 14961)
+++ 
trunk/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php    
    2016-05-02 11:05:25 UTC (rev 14962)
@@ -103,7 +103,8 @@
                                        break;
                        }
                        $historylog->add('RM', $id, "Varemottak overført til 
agresso");
-                       $GLOBALS['phpgw']->db->query("UPDATE {$table} SET 
order_received = 1 WHERE id = {$id}");
+                       $now = time();
+                       $GLOBALS['phpgw']->db->query("UPDATE {$table} SET 
order_received = {$now} WHERE id = {$id}");
                }
        }
 

Modified: 
trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
===================================================================
--- trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php  
2016-05-02 10:23:13 UTC (rev 14961)
+++ trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php  
2016-05-02 11:05:25 UTC (rev 14962)
@@ -161,6 +161,7 @@
                {
                        $historylog = CreateObject('property.historylog', 
'tts');
                        $historylog->add('RM', $id, "Ordre overført til 
agresso");
-                       $GLOBALS['phpgw']->db->query("UPDATE fm_tts_tickets SET 
order_sent = 1 WHERE id = {$id}");
+                       $now = time();
+                       $GLOBALS['phpgw']->db->query("UPDATE fm_tts_tickets SET 
order_sent = {$now} WHERE id = {$id}");
                }
        }
\ No newline at end of file

Modified: 
trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
===================================================================
--- 
trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php    
    2016-05-02 10:23:13 UTC (rev 14961)
+++ 
trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php    
    2016-05-02 11:05:25 UTC (rev 14962)
@@ -226,6 +226,7 @@
                {
                        $historylog = CreateObject('property.historylog', 
'workorder');
                        $historylog->add('RM', $id, "Ordre overført til 
agresso");
-                       $GLOBALS['phpgw']->db->query("UPDATE fm_workorder SET 
order_sent = 1 WHERE id = {$id}");
+                       $now = time();
+                       $GLOBALS['phpgw']->db->query("UPDATE fm_workorder SET 
order_sent = {$now} WHERE id = {$id}");
                }
        }
\ No newline at end of file

Modified: trunk/property/js/portico/workorder.edit.js
===================================================================
--- trunk/property/js/portico/workorder.edit.js 2016-05-02 10:23:13 UTC (rev 
14961)
+++ trunk/property/js/portico/workorder.edit.js 2016-05-02 11:05:25 UTC (rev 
14962)
@@ -34,6 +34,13 @@
 
 });
 
+function receive_order(workorder_id)
+{
+       var oArgs = {menuaction: 'property.uiworkorder.receive_order', 
order_id: workorder_id};
+       var sUrl = phpGWLink('index.php', oArgs);
+       alert(sUrl);
+}
+
 function check_and_submit_valid_session()
 {
        var oArgs = {menuaction: 'property.bocommon.confirm_session'};

Modified: trunk/property/setup/tables_current.inc.php
===================================================================
--- trunk/property/setup/tables_current.inc.php 2016-05-02 10:23:13 UTC (rev 
14961)
+++ trunk/property/setup/tables_current.inc.php 2016-05-02 11:05:25 UTC (rev 
14962)
@@ -595,8 +595,8 @@
                                'service_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => True),
                                'building_part' => array('type' => 'varchar', 
'precision' => 4, 'nullable' => True),
                                'order_dim1' => array('type' => 'int', 
'precision' => 4, 'nullable' => True),
-                               'order_sent' => array('type' => 'int', 
'precision' => 2, 'nullable' => True),
-                               'order_received' => array('type' => 'int', 
'precision' => 2, 'nullable' => True),
+                               'order_sent' => array('type' => 'int', 
'precision' => 8, 'nullable' => True),
+                               'order_received' => array('type' => 'int', 
'precision' => 8, 'nullable' => True),
                        ),
                        'pk' => array('id'),
                        'fk' => array(),
@@ -1156,8 +1156,8 @@
                                'publish_note' => array('type' => 'int', 
'precision' => 2, 'nullable' => True),
                                'branch_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => True),
                                'modified_date' => array('type' => 'int', 
'precision' => '4', 'nullable' => True),
-                               'order_sent' => array('type' => 'int', 
'precision' => 2, 'nullable' => True),
-                               'order_received' => array('type' => 'int', 
'precision' => 2, 'nullable' => True),
+                               'order_sent' => array('type' => 'int', 
'precision' => 8, 'nullable' => True),
+                               'order_received' => array('type' => 'int', 
'precision' => 8, 'nullable' => True),
                        ),
                        'pk' => array('id'),
                        'ix' => array(),

Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php  2016-05-02 10:23:13 UTC (rev 
14961)
+++ trunk/property/setup/tables_update.inc.php  2016-05-02 11:05:25 UTC (rev 
14962)
@@ -9064,25 +9064,25 @@
 
                $GLOBALS['phpgw_setup']->oProc->AddColumn("fm_workorder", 
'order_sent', array(
                        'type' => 'int',
-                       'precision' => 2,
+                       'precision' => 8,
                        'nullable' => True
                        )
                );
                $GLOBALS['phpgw_setup']->oProc->AddColumn("fm_workorder", 
'order_received', array(
                        'type' => 'int',
-                       'precision' => 2,
+                       'precision' => 8,
                        'nullable' => True
                        )
                );
                $GLOBALS['phpgw_setup']->oProc->AddColumn("fm_tts_tickets", 
'order_sent', array(
                        'type' => 'int',
-                       'precision' => 2,
+                       'precision' => 8,
                        'nullable' => True
                        )
                );
                $GLOBALS['phpgw_setup']->oProc->AddColumn("fm_tts_tickets", 
'order_received', array(
                        'type' => 'int',
-                       'precision' => 2,
+                       'precision' => 8,
                        'nullable' => True
                        )
                );

Modified: trunk/property/templates/base/workorder.xsl
===================================================================
--- trunk/property/templates/base/workorder.xsl 2016-05-02 10:23:13 UTC (rev 
14961)
+++ trunk/property/templates/base/workorder.xsl 2016-05-02 11:05:25 UTC (rev 
14962)
@@ -971,6 +971,24 @@
                                                        </xsl:attribute>
                                                </input>
                                        </div>
+                                       <xsl:choose>
+                                               <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')"/>
+                                                               </label>
+                                                               <xsl:variable 
name="lang_receive_order">
+                                                                       
<xsl:value-of select="php:function('lang', 'receive order')"/>
+                                                               </xsl:variable>
+                                                               <input 
type="button" class="pure-button pure-button-primary" name="edit" 
value="{$lang_receive_order}" onClick="receive_order({value_workorder_id});">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="$lang_receive_order"/>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                               <xsl:value-of 
select="value_order_received"/>
+                                                       </div>
+                                               </xsl:when>
+                                       </xsl:choose>
                                        <div class="pure-control-group">
                                                <label for="name">
                                                        <xsl:choose>




reply via email to

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