[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [17020] property: tag continuous orders in tickets
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [17020] property: tag continuous orders in tickets |
Date: |
Thu, 31 Aug 2017 10:22:24 -0400 (EDT) |
Revision: 17020
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17020
Author: sigurdne
Date: 2017-08-31 10:22:24 -0400 (Thu, 31 Aug 2017)
Log Message:
-----------
property: tag continuous orders in tickets
Modified Paths:
--------------
trunk/property/inc/class.botts.inc.php
trunk/property/inc/class.sotts.inc.php
trunk/property/inc/class.uitts.inc.php
trunk/property/inc/cron/default/oppdater_betalte_faktura_BK.php
trunk/property/setup/setup.inc.php
trunk/property/setup/tables_current.inc.php
trunk/property/setup/tables_update.inc.php
trunk/property/templates/base/tts.xsl
Modified: trunk/property/inc/class.botts.inc.php
===================================================================
--- trunk/property/inc/class.botts.inc.php 2017-08-31 11:37:22 UTC (rev
17019)
+++ trunk/property/inc/class.botts.inc.php 2017-08-31 14:22:24 UTC (rev
17020)
@@ -288,6 +288,13 @@
'id' => 'b_account_id',
'name' => lang('budget account')
);
+
+ $columns['continuous'] = array
+ (
+ 'id' => 'continuous',
+ 'name' => lang('continuous')
+ );
+
}
$columns['ecodimb'] = array
Modified: trunk/property/inc/class.sotts.inc.php
===================================================================
--- trunk/property/inc/class.sotts.inc.php 2017-08-31 11:37:22 UTC (rev
17019)
+++ trunk/property/inc/class.sotts.inc.php 2017-08-31 14:22:24 UTC (rev
17020)
@@ -588,6 +588,7 @@
'tax_code' => 'fm_tts_tickets.tax_code',
'unspsc_code' => 'fm_tts_tickets.unspsc_code',
'b_account_id' => 'fm_tts_tickets.b_account_id',
+ 'continuous' => 'fm_tts_tickets.continuous',
);
$custom_cols = $this->custom->find('property',
'.ticket', 0, '', 'ASC', 'attrib_sort', true, true);
@@ -781,6 +782,7 @@
'tax_code' =>
$this->db->f('tax_code'),
'unspsc_code' =>
$this->db->f('unspsc_code'),
'b_account_id' =>
$this->db->f('b_account_id'),
+ 'continuous' =>
$this->db->f('continuous'),
);
foreach ($custom_cols as $custom_col)
@@ -868,6 +870,7 @@
$ticket['finnish_date2'] =
$this->db->f('finnish_date2');
$ticket['contact_id'] =
$this->db->f('contact_id');
$ticket['order_id'] = $this->db->f('order_id');
+ $ticket['continuous'] =
$this->db->f('continuous');
$ticket['vendor_id'] =
$this->db->f('vendor_id');
$ticket['contract_id'] =
$this->db->f('contract_id',true);
$ticket['service_id'] =
$this->db->f('service_id',true);
@@ -1735,6 +1738,7 @@
$value_set['ecodimb'] = $ticket['ecodimb'];
$value_set['branch_id'] = $ticket['branch_id'];
$value_set['tax_code'] = $ticket['tax_code'];
+ $value_set['continuous'] =
$ticket['continuous'];
if(isset($ticket['vendor_email']) &&
is_array($ticket['vendor_email']))
{
Modified: trunk/property/inc/class.uitts.inc.php
===================================================================
--- trunk/property/inc/class.uitts.inc.php 2017-08-31 11:37:22 UTC (rev
17019)
+++ trunk/property/inc/class.uitts.inc.php 2017-08-31 14:22:24 UTC (rev
17020)
@@ -3097,6 +3097,7 @@
'value_order_received' =>
$ticket['order_received'] ?
$GLOBALS['phpgw']->common->show_date($ticket['order_received']) : '[ DD/MM/YYYY
- H:i ]',
'value_order_received_amount' => (int)
$ticket['order_received_amount'],
'value_extra_mail_address' =>
$value_extra_mail_address,
+ 'value_continuous' => $ticket['continuous']
);
phpgwapi_jquery::load_widget('numberformat');
Modified: trunk/property/inc/cron/default/oppdater_betalte_faktura_BK.php
===================================================================
--- trunk/property/inc/cron/default/oppdater_betalte_faktura_BK.php
2017-08-31 11:37:22 UTC (rev 17019)
+++ trunk/property/inc/cron/default/oppdater_betalte_faktura_BK.php
2017-08-31 14:22:24 UTC (rev 17020)
@@ -156,14 +156,21 @@
}
break;
case 'ticket':
- $this->db->query("SELECT id
FROM fm_tts_tickets WHERE order_id= '{$voucher['order_id']}'", __LINE__,
__FILE__);
+ $this->db->query("SELECT id,
continuous FROM fm_tts_tickets WHERE order_id= '{$voucher['order_id']}'",
__LINE__, __FILE__);
$this->db->next_record();
$ticket_id = $this->db->f('id');
- $ticket = array(
- 'status' => 'C8'
//Avsluttet og fakturert (C)
- );
- $ok =
$sotts->update_status($ticket, $ticket_id);
+ if($this->db->f('continuous'))
+ {
+ $ok = true;
+ }
+ else
+ {
+ $ticket = array(
+
'status' => 'C8' //Avsluttet og fakturert (C)
+ );
+ $ok =
$sotts->update_status($ticket, $ticket_id);
+ }
break;
default:
throw new Exception('Order type
not supported');
Modified: trunk/property/setup/setup.inc.php
===================================================================
--- trunk/property/setup/setup.inc.php 2017-08-31 11:37:22 UTC (rev 17019)
+++ trunk/property/setup/setup.inc.php 2017-08-31 14:22:24 UTC (rev 17020)
@@ -11,7 +11,7 @@
* @version $Id$
*/
$setup_info['property']['name'] = 'property';
- $setup_info['property']['version'] = '0.9.17.717';
+ $setup_info['property']['version'] = '0.9.17.718';
$setup_info['property']['app_order'] = 8;
$setup_info['property']['enable'] = 1;
$setup_info['property']['app_group'] = 'office';
Modified: trunk/property/setup/tables_current.inc.php
===================================================================
--- trunk/property/setup/tables_current.inc.php 2017-08-31 11:37:22 UTC (rev
17019)
+++ trunk/property/setup/tables_current.inc.php 2017-08-31 14:22:24 UTC (rev
17020)
@@ -1178,7 +1178,8 @@
'order_received_amount' => array('type' =>
'decimal', 'precision' => '20', 'scale' => '2', 'nullable' => True, 'default'
=> '0.00'),
'mail_recipients' => array('type' => 'varchar',
'precision' => 255, 'nullable' => True),
'file_attachments' => array('type' =>
'varchar', 'precision' => 255, 'nullable' => True),
- 'delivery_address' => array('type' => 'text',
'nullable' => True)
+ 'delivery_address' => array('type' => 'text',
'nullable' => True),
+ 'continuous' => array('type' => 'int',
'precision' => 2, 'nullable' => True),
),
'pk' => array('id'),
'ix' => array(),
Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php 2017-08-31 11:37:22 UTC (rev
17019)
+++ trunk/property/setup/tables_update.inc.php 2017-08-31 14:22:24 UTC (rev
17020)
@@ -9767,3 +9767,23 @@
return $GLOBALS['setup_info']['property']['currentver'];
}
}
+
+ /**
+ * Update property version from 0.9.17.717 to 0.9.17.718
+ *
+ */
+ $test[] = '0.9.17.717';
+
+ function property_upgrade0_9_17_717()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw_setup']->oProc->AddColumn('fm_tts_tickets',
'continuous', array(
+ 'type' => 'int', 'precision' => 2, 'nullable' => true));
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.718';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+ }
Modified: trunk/property/templates/base/tts.xsl
===================================================================
--- trunk/property/templates/base/tts.xsl 2017-08-31 11:37:22 UTC (rev
17019)
+++ trunk/property/templates/base/tts.xsl 2017-08-31 14:22:24 UTC (rev
17020)
@@ -688,7 +688,7 @@
<xsl:attribute name="title">
<xsl:value-of select="$lang_sms_text"/>
</xsl:attribute>
-
<xsl:value-of select="$lang_sms_text"/>
+
<xsl:value-of select="$lang_sms_text"/>
</a>
</label>
<textarea
class="pure-input-1-2" rows="{textarearows}" id="response_text"
name="values[response_text]" onKeyUp="javascript: SmsCountKeyUp(160);"
onKeyDown="javascript: SmsCountKeyDown(160);" wrap="virtual">
@@ -763,6 +763,24 @@
</input>
</div>
<div
class="pure-control-group">
+
<xsl:variable name="lang_continuous">
+
<xsl:value-of select="php:function('lang', 'continuous')"/>
+
</xsl:variable>
+
<label for="name">
+
<xsl:value-of select="$lang_continuous"/>
+
</label>
+
<input type="checkbox" name="values[continuous]" value="1">
+
<xsl:attribute name="title">
+
<xsl:value-of select="$lang_continuous"/>
+
</xsl:attribute>
+
<xsl:if test="value_continuous = '1'">
+
<xsl:attribute name="checked">
+
<xsl:text>checked</xsl:text>
+
</xsl:attribute>
+
</xsl:if>
+
</input>
+ </div>
+ <div
class="pure-control-group">
<label>
<xsl:value-of select="php:function('lang', 'external project')"/>
</label>
@@ -1334,7 +1352,7 @@
<xsl:if test="simple !='1'">
<hr noshade="noshade" width="100%" align="center" size="1"/>
- <div class="pure-g">
+ <div class="pure-g">
<xsl:choose>
<xsl:when test="request_link != ''">
<xsl:variable name="request_link">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [17020] property: tag continuous orders in tickets,
sigurdne <=