fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14991] SMS and QR-Code for order at ticket


From: sigurdne
Subject: [Fmsystem-commits] [14991] SMS and QR-Code for order at ticket
Date: Tue, 10 May 2016 11:33:34 +0000 (UTC)

Revision: 14991
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14991
Author:   sigurdne
Date:     2016-05-10 11:33:33 +0000 (Tue, 10 May 2016)
Log Message:
-----------
SMS and QR-Code for order at ticket

Modified Paths:
--------------
    trunk/property/inc/class.uitts.inc.php
    trunk/sms/setup/default_records.inc.php
    trunk/sms/setup/setup.inc.php
    trunk/sms/setup/tables_update.inc.php

Modified: trunk/property/inc/class.uitts.inc.php
===================================================================
--- trunk/property/inc/class.uitts.inc.php      2016-05-10 00:31:38 UTC (rev 
14990)
+++ trunk/property/inc/class.uitts.inc.php      2016-05-10 11:33:33 UTC (rev 
14991)
@@ -3236,7 +3236,42 @@
                                                , lang('descr') => 
array('width' => 120))
                                ));
                        }
+//start SMS::QRCODE
+                       $sms_location_id = 
$GLOBALS['phpgw']->locations->get_id('sms', 'run');
+                       $config_sms = CreateObject('admin.soconfig', 
$sms_location_id);
+                       $gateway_number = 
$config_sms->config_data['common']['gateway_number'];
+                       $gateway_codeword = 
$config_sms->config_data['common']['gateway_codeword'];
+                       phpgw::import_class('phpgwapi.phpqrcode');
+                       $code_text = "SMSTO:{$gateway_number}: 
{$gateway_codeword} STATUS {$ticket['order_id']} ";
 
+                       $filename = 
$GLOBALS['phpgw_info']['server']['temp_dir'] . '/' . md5($code_text) . '.png';
+                       QRcode::png($code_text, $filename);
+                       $pdf->ezSetDy(-20);
+
+                       $lang_status_code = lang('status code');
+                       $lang_to = lang('to');
+                       $code_help = "Send:  {$gateway_codeword} STATUS 
{$ticket['order_id']} <{$lang_status_code}> {$lang_to} {$gateway_number}\n\n"
+                               . $lang_status_code
+                               . ":\n\n 1 => " . lang('performed')
+                               . "\n 2 => " . lang('No access')
+                               . "\n 3 => I arbeid";
+                       $data = array(
+                               array('col1' => "<C:showimage:{$filename} 90>", 
'col2' => $code_help)
+                       );
+
+                       $pdf->ezTable($data, array('col1' => '', 'col2' => ''), 
'', array('showHeadings' => 0,
+                               'shaded' => 0, 'xPos' => 0,
+                               'xOrientation' => 'right', 'width' => 500,
+                               'gridlines' => EZ_GRIDLINE_ALL,
+                               'cols' => array
+                                       (
+                                       'col1' => array('width' => 150, 
'justification' => 'left'),
+                                       'col2' => array('width' => 350, 
'justification' => 'left'),
+                               )
+                       ));
+
+//end SMS::QRCODE
+
                        if 
(isset($this->bo->config->config_data['order_footer_header']) && 
$this->bo->config->config_data['order_footer_header'])
                        {
                                if (!$content)

Modified: trunk/sms/setup/default_records.inc.php
===================================================================
--- trunk/sms/setup/default_records.inc.php     2016-05-10 00:31:38 UTC (rev 
14990)
+++ trunk/sms/setup/default_records.inc.php     2016-05-10 11:33:33 UTC (rev 
14991)
@@ -66,8 +66,9 @@
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (1 + $num_sections) . ", 
1,'listbox', 'gateway_module_get', 'Active gateway module GET')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (1 + $num_sections) . ", 
2,'listbox', 'gateway_module_send', 'Active gateway module SEND')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (1 + $num_sections) . ", 3, 
'text', 'gateway_number', 'Gateway number')");
-       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (1 + $num_sections) . ", 4, 
'text', 'anonymous_user', 'anonymous user for delivering data via 
wev-service')");
-       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (1 + $num_sections) . ", 5, 
'password', 'anonymous_pass', 'Password for anonymous user for delivering data 
via wev-service')");
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (1 + $num_sections) . ", 4, 
'text', 'gateway_codeword', 'Gateway codeword')");
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (1 + $num_sections) . ", 5, 
'text', 'anonymous_user', 'anonymous user for delivering data via 
web-service')");
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (1 + $num_sections) . ", 6, 
'password', 'anonymous_pass', 'Password for anonymous user for delivering data 
via web-service')");
 
 
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (2 + $num_sections) . ", 1, 
'text', 'gnokii_cfg', 'Gnokii Installation Path')");

Modified: trunk/sms/setup/setup.inc.php
===================================================================
--- trunk/sms/setup/setup.inc.php       2016-05-10 00:31:38 UTC (rev 14990)
+++ trunk/sms/setup/setup.inc.php       2016-05-10 11:33:33 UTC (rev 14991)
@@ -9,7 +9,7 @@
         * @version $Id$
         */
        $setup_info['sms']['name'] = 'sms';
-       $setup_info['sms']['version'] = '0.9.17.512';
+       $setup_info['sms']['version'] = '0.9.17.513';
        $setup_info['sms']['app_order'] = 8;
        $setup_info['sms']['enable'] = 1;
        $setup_info['sms']['app_group'] = 'office';

Modified: trunk/sms/setup/tables_update.inc.php
===================================================================
--- trunk/sms/setup/tables_update.inc.php       2016-05-10 00:31:38 UTC (rev 
14990)
+++ trunk/sms/setup/tables_update.inc.php       2016-05-10 11:33:33 UTC (rev 
14991)
@@ -558,3 +558,48 @@
                        return $GLOBALS['setup_info']['sms']['currentver'];
                }
        }
+       /**
+        * Update sms version from 0.9.17.512 to 0.9.17.513
+        *
+        */
+       $test[] = '0.9.17.512';
+
+       function sms_upgrade0_9_17_512()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_sms_received_data', 
'external_id', array(
+                       'type' => 'int',
+                       'precision' => 4,
+                       'nullable' => True
+                       )
+               );
+
+               $custom_config = CreateObject('admin.soconfig', 
$GLOBALS['phpgw']->locations->get_id('sms', 'run'));
+
+               $sections = $custom_config->read_section(array('allrows'=> 
true));
+               foreach ($sections as $section)
+               {
+                       if($section['name'] == 'common')
+                       {
+                               $section_id = $section['id'];
+                               break;
+                       }
+               }
+       
+               $receipt = $custom_config->add_attrib(array(
+                       'section_id' => $section_id,
+                       'input_type' => 'text',
+                       'name' => 'gateway_codeword',
+                       'descr' => 'Gateway codeword'
+                       )
+               );
+
+               if ($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['sms']['currentver'] = 
'0.9.17.513';
+                       return $GLOBALS['setup_info']['sms']['currentver'];
+               }
+       }
+




reply via email to

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