[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16485] Stable: Merge 16476:16484 from trunk
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16485] Stable: Merge 16476:16484 from trunk |
Date: |
Sun, 26 Mar 2017 07:44:11 -0400 (EDT) |
Revision: 16485
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16485
Author: sigurdne
Date: 2017-03-26 07:44:11 -0400 (Sun, 26 Mar 2017)
Log Message:
-----------
Stable: Merge 16476:16484 from trunk
Modified Paths:
--------------
branches/Version-2_0-branch/phpgwapi/inc/class.jquery.inc.php
branches/Version-2_0-branch/phpgwapi/js/jquery/common.js
branches/Version-2_0-branch/phpgwapi/templates/base/datatable_inline.xsl
branches/Version-2_0-branch/property/inc/class.sogeneric.inc.php
branches/Version-2_0-branch/property/inc/class.soproject.inc.php
branches/Version-2_0-branch/property/inc/class.uiproject.inc.php
branches/Version-2_0-branch/property/inc/cron/default/Import_fra_agresso_X205_BK.php
branches/Version-2_0-branch/property/inc/cron/default/oppdater_betalte_faktura_BK.php
branches/Version-2_0-branch/property/js/portico/project.edit.js
branches/Version-2_0-branch/property/setup/phpgw_no.lang
branches/Version-2_0-branch/property/setup/setup.inc.php
branches/Version-2_0-branch/property/setup/tables_current.inc.php
branches/Version-2_0-branch/property/setup/tables_update.inc.php
branches/Version-2_0-branch/property/templates/base/wo_hour.index.xsl
branches/Version-2_0-branch/rental/inc/class.socontract_price_item.inc.php
branches/Version-2_0-branch/rental/inc/class.uibilling.inc.php
branches/Version-2_0-branch/rental/inc/model/class.contract_price_item.inc.php
branches/Version-2_0-branch/rental/inc/model/class.invoice.inc.php
branches/Version-2_0-branch/rental/setup/setup.inc.php
branches/Version-2_0-branch/rental/setup/tables_current.inc.php
branches/Version-2_0-branch/rental/setup/tables_update.inc.php
Property Changed:
----------------
branches/Version-2_0-branch/
Index: branches/Version-2_0-branch
===================================================================
--- branches/Version-2_0-branch 2017-03-26 11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch 2017-03-26 11:44:11 UTC (rev 16485)
Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,4 ##
/branches/dev-syncromind:13653
/branches/dev-syncromind-2:14933-16394
/branches/stavangerkommune:12743-12875,12986
-/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305,16307-16314,16316-16318,16320-16322,16324,16326-16330,16332,16334,16336,16338-16339,16341-16342,16344,16346,16348,16350,16352-16353,16355-16358,16360,16362,16364-16369,16371,16373,16375-16378,16380,16382-16383,16385,16387,16389,16391,16393-16395,16397,16399-16402,16404,16406,16408,16410-16415,16417,16419-16420,16422-16425,16427,16429-16440,16442,16444,16446,16448-16449,16451,16453,16455-16463,16465-16472,16474-16475
\ No newline at end of property
+/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305,16307-16314,16316-16318,16320-16322,16324,16326-16330,16332,16334,16336,16338-16339,16341-16342,16344,16346,16348,16350,16352-16353,16355-16358,16360,16362,16364-16369,16371,16373,16375-16378,16380,16382-16383,16385,16387,16389,16391,16393-16395,16397,16399-16402,16404,16406,16408,16410-16415,16417,16419-16420,16422-16425,16427,16429-16440,16442,16444,16446,16448-16449,16451,16453,16455-16463,16465-16472,16474-16475,16477-16484
\ No newline at end of property
Modified: branches/Version-2_0-branch/phpgwapi/inc/class.jquery.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.jquery.inc.php
2017-03-26 11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.jquery.inc.php
2017-03-26 11:44:11 UTC (rev 16485)
@@ -463,10 +463,7 @@
$js = <<<JS
$(document).ready(function ()
{
- /*if(typeof(JqueryPortico.inlineTablesDefined) ==
'undefined' || JqueryPortico.inlineTablesDefined == 0)
- {*/
- JqueryPortico.render_tabs();
- //}
+ JqueryPortico.render_tabs();
});
JqueryPortico.render_tabs = function ()
Modified: branches/Version-2_0-branch/phpgwapi/js/jquery/common.js
===================================================================
--- branches/Version-2_0-branch/phpgwapi/js/jquery/common.js 2017-03-26
11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch/phpgwapi/js/jquery/common.js 2017-03-26
11:44:11 UTC (rev 16485)
@@ -8,10 +8,6 @@
;
var JqueryPortico = {};
-/* Sigurd: Need to delay tab-rendering to after all tables are finished*/
-JqueryPortico.inlineTablesDefined = 0;
-JqueryPortico.inlineTablesRendered = 0;
-
JqueryPortico.parseURL = function (url)
{
var parser = document.createElement('a'),
@@ -259,7 +255,7 @@
return "<center>" + oData[key] + "</center>";
};
-JqueryPortico.inlineTableHelper = function (container, ajax_url, columns,
options, data)
+JqueryPortico.inlineTableHelper = function (container, ajax_url, columns,
options, data, num)
{
options = options || {};
var disablePagination = options['disablePagination'] || false;
@@ -275,6 +271,7 @@
var allrows = options['allrows'] || false;
var pageLength = options['rows_per_page'] || 10;
data = data || {};
+ num = num || 0;
for (i = 0; i < columns.length; i++)
{
@@ -393,7 +390,6 @@
}
// $(document).ready(function ()
// {
- JqueryPortico.inlineTablesRendered += 1;
var oTable = $("#" + container).dataTable({
paginate: disablePagination ? false : true,
@@ -439,19 +435,6 @@
},
fnInitComplete: function (oSettings, json)
{
- /*if(JqueryPortico.inlineTablesRendered ==
JqueryPortico.inlineTablesDefined)
- {
- if(typeof(JqueryPortico.render_tabs) == 'function')
- {
- var delay=15;//allow extra 350 milliseconds to really
finish
- setTimeout(function()
- {
- JqueryPortico.render_tabs();
- alert(JqueryPortico.inlineTablesRendered);
-
- },delay);
- }
- }*/
},
lengthMenu: lengthMenu,
pageLength: pageLength,
@@ -506,7 +489,7 @@
}
try
{
- window['local_DrawCallback' +
JqueryPortico.inlineTablesRendered](oTable);
+ window['local_DrawCallback' + num](oTable);
}
catch (err)
{
Modified:
branches/Version-2_0-branch/phpgwapi/templates/base/datatable_inline.xsl
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/base/datatable_inline.xsl
2017-03-26 11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch/phpgwapi/templates/base/datatable_inline.xsl
2017-03-26 11:44:11 UTC (rev 16485)
@@ -269,7 +269,6 @@
</xsl:when>
</xsl:choose>
- JqueryPortico.inlineTablesDefined += 1;
var PreColumns = [
<xsl:for-each select="$ColumnDefs">
{
@@ -391,7 +390,7 @@
</xsl:variable>
// $(document).ready(function() {
var paramsTable<xsl:number value="$num"/> = {};
- oTable<xsl:number value="$num"/> =
JqueryPortico.inlineTableHelper("<xsl:value-of select="$container"/>",
<xsl:value-of select="$requestUrl"/>, columns<xsl:number value="$num"/>,
options<xsl:number value="$num"/> , <xsl:value-of select="$dataset"/>);
+ oTable<xsl:number value="$num"/> =
JqueryPortico.inlineTableHelper("<xsl:value-of select="$container"/>",
<xsl:value-of select="$requestUrl"/>, columns<xsl:number value="$num"/>,
options<xsl:number value="$num"/> , <xsl:value-of select="$dataset"/>,
<xsl:number value="$num"/>);
// });
</script>
</xsl:template>
\ No newline at end of file
Modified: branches/Version-2_0-branch/property/inc/class.sogeneric.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.sogeneric.inc.php
2017-03-26 11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch/property/inc/class.sogeneric.inc.php
2017-03-26 11:44:11 UTC (rev 16485)
@@ -1031,6 +1031,12 @@
'name' =>
'closed',
'descr' =>
lang('closed'),
'type' =>
'checkbox'
+ ),
+ array
+ (
+ 'name' =>
'canceled',
+ 'descr' =>
lang('canceled'),
+ 'type' =>
'checkbox'
)
),
'edit_msg' => lang('edit
status'),
Modified: branches/Version-2_0-branch/property/inc/class.soproject.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.soproject.inc.php
2017-03-26 11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch/property/inc/class.soproject.inc.php
2017-03-26 11:44:11 UTC (rev 16485)
@@ -1039,11 +1039,11 @@
$filter_year = '';
if ($year)
{
- $filter_year = "AND (fm_workorder_budget.year =
{$year} OR fm_workorder_status.closed IS NULL)";
+ $filter_year = "AND (fm_workorder_budget.year =
{$year})";// OR fm_workorder_status.closed IS NULL)";
}
$sql = "SELECT DISTINCT fm_workorder.id AS
workorder_id, fm_workorder.title, fm_workorder.vendor_id,
fm_workorder.addition,"
- . " fm_workorder_status.descr as status,
fm_workorder_status.closed, fm_workorder.account_id AS b_account_id,
fm_workorder.charge_tenant,"
+ . " fm_workorder_status.descr as status,
fm_workorder_status.closed, fm_workorder_status.canceled,
fm_workorder.account_id AS b_account_id, fm_workorder.charge_tenant,"
. " fm_workorder.mail_recipients"
. " FROM fm_workorder"
. " {$this->join} fm_workorder_status ON
fm_workorder.status = fm_workorder_status.id"
@@ -1073,6 +1073,7 @@
'charge_tenant' =>
$this->db->f('charge_tenant'),
'status' => $this->db->f('status'),
'closed' => !!$this->db->f('closed'),
+ 'canceled' =>
!!$this->db->f('canceled'),
'mail_recipients' => explode(',',
trim($this->db->f('mail_recipients'), ',')),
'b_account_id' =>
$this->db->f('b_account_id'),
'addition_percentage' =>
(int)$this->db->f('addition'),
@@ -1099,10 +1100,18 @@
{
foreach ($order_budgets[$entry['workorder_id']]
as $budget)
{
- if ($budget['active'] == 2)
+ if ($budget['active'] == 2)// ||
$entry['canceled'])
{
continue;
}
+ else if($entry['canceled'])
+ {
+ $entry['actual_cost'] = 0;
+ $entry['combined_cost'] = 0;
+ $entry['budget'] = 0;
+ $entry['obligation'] = 0;
+ continue;
+ }
if ($year)
{
@@ -2241,9 +2250,10 @@
$project_total_budget = array_sum($project_budget);
- $sql = "SELECT fm_workorder.id AS order_id, vendor_id"
+ $sql = "SELECT fm_workorder.id AS order_id,
vendor_id,fm_workorder_status.canceled"
. " FROM fm_workorder"
- . " WHERE project_id = {$project_id}";
+ . " {$this->join} fm_workorder_status ON
fm_workorder.status = fm_workorder_status.id"
+ . " WHERE project_id = {$project_id} AND
fm_workorder_status.canceled IS NULL";
$this->db->query($sql, __LINE__, __FILE__);
$_order_list = array();
Modified: branches/Version-2_0-branch/property/inc/class.uiproject.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uiproject.inc.php
2017-03-26 11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch/property/inc/class.uiproject.inc.php
2017-03-26 11:44:11 UTC (rev 16485)
@@ -1661,9 +1661,7 @@
$sum_actual_cost +=
$b_entry['actual_cost'];
$sum_oblications +=
$b_entry['sum_oblications'];
$values['sum'] +=
$b_entry['budget'];
- }
- if ($b_entry['active'])
- {
+
$s_budget += $b_entry['budget'];
$s_orders +=
$b_entry['sum_orders'];
$s_actual_cost +=
$b_entry['actual_cost'];
@@ -1732,7 +1730,7 @@
array('key' => 'budget', 'label' =>
lang('budget'), 'sortable' => false, 'className' => 'right',
'formatter' =>
'JqueryPortico.FormatterAmount0', 'value_footer' => number_format($s_budget, 0,
$this->decimal_separator, '.')),
array('key' => 'sum_oblications',
'label' => lang('sum orders'), 'sortable' => false,
- 'className' => 'right',
'formatter' => 'JqueryPortico.FormatterAmount0', 'value_footer' =>
number_format($s_orders, 0, $this->decimal_separator, '.')),
+ 'className' => 'right',
'formatter' => 'JqueryPortico.FormatterAmount0', 'value_footer' =>
number_format($sum_oblications, 0, $this->decimal_separator, '.')),
array('key' => 'actual_cost', 'label'
=> lang('actual cost'), 'sortable' => false,
'className' => 'right',
'formatter' => 'JqueryPortico.FormatterAmount0', 'value_footer' =>
number_format($s_actual_cost, 0, $this->decimal_separator, '.')),
array('key' => 'diff', 'label' =>
lang('difference'), 'sortable' => false, 'className' => 'right',
Modified:
branches/Version-2_0-branch/property/inc/cron/default/Import_fra_agresso_X205_BK.php
===================================================================
---
branches/Version-2_0-branch/property/inc/cron/default/Import_fra_agresso_X205_BK.php
2017-03-26 11:42:19 UTC (rev 16484)
+++
branches/Version-2_0-branch/property/inc/cron/default/Import_fra_agresso_X205_BK.php
2017-03-26 11:44:11 UTC (rev 16485)
@@ -36,7 +36,7 @@
class Import_fra_agresso_X205_BK extends property_cron_parent
{
- protected $auto_tax = true;
+ protected $auto_tax = false;
protected $mvakode = 0;
protected $kildeid = 1;
protected $splitt = 0;
@@ -390,9 +390,9 @@
$buffer[$i]['loc1'] = $order_info['loc1'];
$buffer[$i]['line_text'] = $order_info['title'];
- $buffer[$i]['mvakode'] = $this->mvakode;
+ $buffer[$i]['mvakode'] =
$order_info['tax_code'];
- if ($buffer[$i]['loc1'] && $this->auto_tax)
+ if ($buffer[$i]['loc1'] &&
!$buffer[$i]['mvakode'])
{
$mvakode =
$this->soXport->auto_tax($buffer[$i]['loc1']);
@@ -411,7 +411,7 @@
$update_voucher = true;
$bilagsnr = $this->db->f('bilagsnr');
$buffer[$i]['bilagsnr'] = $bilagsnr;
- $this->receipt['message'][] =
array('msg' => "Oppdatert med nye data i arbeidsregister: {$_data['KEY']}");
+ $this->receipt['message'][] =
array('msg' => "Oppdatert med nye data i arbeidsregister: ordre = {$_order_id},
bilag = {$_data['KEY']}");
}
$sql = "SELECT bilagsnr FROM fm_ecobilagoverf
WHERE external_voucher_id = '{$_data['KEY']}'";
@@ -457,14 +457,8 @@
$this->receipt['message'][] =
array('msg' => 'Ikke samsvar med leverandør på bestilling og mottatt faktura');
}
- if ($this->auto_tax)
- {
- $buffer[$i]['mvakode'] =
$this->soXport->tax_b_account_override($buffer[$i]['mvakode'],
$order_info['spbudact_code']);
- $buffer[$i]['mvakode'] =
$this->soXport->tax_vendor_override($buffer[$i]['mvakode'], $vendor_id);
- }
+ $buffer[$i]['kostra_id'] =
$order_info['service_id'];
- $buffer[$i]['kostra_id'] =
$this->default_kostra_id;//$this->soXport->get_kostra_id($buffer[$i]['loc1']);
-
$buffer[$i]['merknad'] = $merknad;
$buffer[$i]['splitt'] = $this->splitt;
$buffer[$i]['kildeid'] = $this->kildeid;
@@ -598,6 +592,8 @@
. " fm_tts_tickets.vendor_id,"
. " fm_tts_tickets.b_account_id
as account_id,"
. " fm_tts_tickets.ecodimb,"
+ . " fm_tts_tickets.service_id,"
+ . " fm_tts_tickets.tax_code,"
. " fm_tts_tickets.cat_id as
category,"
. " fm_tts_tickets.ordered_by
as user_id,"
. " fm_tts_tickets.subject as
title"
@@ -613,6 +609,8 @@
. " fm_workorder.ecodimb,"
. " fm_workorder.category,"
. " fm_workorder.user_id,"
+ . " fm_workorder.service_id,"
+ . " fm_workorder.tax_code,"
. " fm_workorder.title"
. " FROM fm_workorder
{$this->join} fm_project ON fm_workorder.project_id = fm_project.id"
. " WHERE fm_workorder.id =
{$order_id}";
@@ -641,6 +639,8 @@
$order_info['dimb'] = $ecodimb ? $ecodimb :
$this->db->f('project_ecodimb');
$order_info['dime'] = $this->db->f('category');
$order_info['title'] = $this->db->f('title', true);
+ $order_info['service_id'] = $this->db->f('service_id');
+ $order_info['tax_code'] = $this->db->f('tax_code');
$janitor_user_id = $this->db->f('user_id');
$order_info['janitor'] =
$GLOBALS['phpgw']->accounts->get($janitor_user_id)->lid;
Modified:
branches/Version-2_0-branch/property/inc/cron/default/oppdater_betalte_faktura_BK.php
===================================================================
---
branches/Version-2_0-branch/property/inc/cron/default/oppdater_betalte_faktura_BK.php
2017-03-26 11:42:19 UTC (rev 16484)
+++
branches/Version-2_0-branch/property/inc/cron/default/oppdater_betalte_faktura_BK.php
2017-03-26 11:44:11 UTC (rev 16485)
@@ -44,6 +44,13 @@
$this->function_name = get_class($this);
$this->sub_location = lang('property');
$this->function_msg = 'oppdater bestillinger med
grunnlag i betalte faktura';
+ /**
+ * Bruker konffigurasjon fra '.ticket' - fordi denne
definerer oppslaget mot fullmaktsregisteret ved bestilling.
+ */
+ $config =
CreateObject('admin.soconfig', $GLOBALS['phpgw']->locations->get_id('property',
'.ticket'));
+ $this->soap_url =
$config->config_data['external_register']['url'];
+ $this->soap_username =
$config->config_data['external_register']['username'];
+ $this->soap_password =
$config->config_data['external_register']['password'];
}
function execute()
@@ -164,8 +171,26 @@
function check_payment( $voucher_id )
{
- //curl -s -u portico:BgPor790gfol
http://tjenester.usrv.ubergenkom.no/api/agresso/tjeneste?id=88010
+ //curl -s -u portico:BgPor790gfol
http://tjenester.usrv.ubergenkom.no/api/agresso/tjeneste?id=88010
+ $url = $this->soap_url;
+ $username = $this->soap_username; //'portico';
+ $password = $this->soap_password;
//'BgPor790gfol';
+ $ch = curl_init();
+ curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
+ curl_setopt($ch, CURLOPT_URL, $url);
+ curl_setopt($ch, CURLOPT_USERPWD,
"{$username}:{$password}");
+ curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json'));
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
+
+ $result = curl_exec($ch);
+
+ $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
+ curl_close($ch);
+
+ $result = json_decode($result, true);
+
return false;
}
Modified: branches/Version-2_0-branch/property/js/portico/project.edit.js
===================================================================
--- branches/Version-2_0-branch/property/js/portico/project.edit.js
2017-03-26 11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch/property/js/portico/project.edit.js
2017-03-26 11:44:11 UTC (rev 16485)
@@ -67,7 +67,7 @@
}
};
-function sum_columns_table_orders()
+this.local_DrawCallback1 = function ()
{
var api = oTable1.api();
// Remove the formatting to get integer data for summation
@@ -95,7 +95,7 @@
});
}
-function sum_columns_table_invoice()
+this.local_DrawCallback2 = function ()
{
var api = oTable2.api();
// Remove the formatting to get integer data for summation
@@ -180,17 +180,17 @@
JqueryPortico.updateinlineTableHelper(oTable2, requestUrl2);
});
- if (typeof (oTable1) !== 'undefined')
- {
- var api1 = oTable1.api();
- api1.on('draw', sum_columns_table_orders);
- }
+// if (typeof (oTable1) !== 'undefined')
+// {
+// var api1 = oTable1.api();
+// api1.on('draw', sum_columns_table_orders);
+// }
- if (typeof (oTable2) !== 'undefined')
- {
- var api2 = oTable2.api();
- api2.on('draw', sum_columns_table_invoice);
- }
+// if (typeof (oTable2) !== 'undefined')
+// {
+// var api2 = oTable2.api();
+// api2.on('draw', sum_columns_table_invoice);
+// }
// -- buttons--//
Modified: branches/Version-2_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/property/setup/phpgw_no.lang 2017-03-26
11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch/property/setup/phpgw_no.lang 2017-03-26
11:44:11 UTC (rev 16485)
@@ -2103,4 +2103,5 @@
category template property no Kategori mal
profile property no Profil
new attribute property no Ny attributt
-report property no Rapport
\ No newline at end of file
+report property no Rapport
+canceled property no Kansellert
\ No newline at end of file
Modified: branches/Version-2_0-branch/property/setup/setup.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/setup.inc.php 2017-03-26
11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch/property/setup/setup.inc.php 2017-03-26
11:44:11 UTC (rev 16485)
@@ -11,7 +11,7 @@
* @version $Id$
*/
$setup_info['property']['name'] = 'property';
- $setup_info['property']['version'] = '0.9.17.709';
+ $setup_info['property']['version'] = '0.9.17.710';
$setup_info['property']['app_order'] = 8;
$setup_info['property']['enable'] = 1;
$setup_info['property']['app_group'] = 'office';
Modified: branches/Version-2_0-branch/property/setup/tables_current.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/tables_current.inc.php
2017-03-26 11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch/property/setup/tables_current.inc.php
2017-03-26 11:44:11 UTC (rev 16485)
@@ -620,7 +620,8 @@
'approved' => array('type' => 'int',
'precision' => '2', 'nullable' => True),
'in_progress' => array('type' => 'int',
'precision' => '2', 'nullable' => True),
'delivered' => array('type' => 'int',
'precision' => '2', 'nullable' => True),
- 'closed' => array('type' => 'int', 'precision'
=> '2', 'nullable' => True)
+ 'closed' => array('type' => 'int', 'precision'
=> '2', 'nullable' => True),
+ 'canceled' => array('type' => 'int',
'precision' => '2', 'nullable' => True)
),
'pk' => array('id'),
'fk' => array(),
Modified: branches/Version-2_0-branch/property/setup/tables_update.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/tables_update.inc.php
2017-03-26 11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch/property/setup/tables_update.inc.php
2017-03-26 11:44:11 UTC (rev 16485)
@@ -9436,3 +9436,24 @@
}
}
+ /**
+ * Update property version from 0.9.17.709 to 0.9.17.710
+ *
+ */
+ $test[] = '0.9.17.709';
+
+ function property_upgrade0_9_17_709()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw_setup']->oProc->query("DELETE FROM fm_cache");
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_workorder_status', 'canceled',
array(
+ 'type' => 'int', 'precision' => 2, 'nullable' => True));
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.710';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+ }
Modified: branches/Version-2_0-branch/property/templates/base/wo_hour.index.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/wo_hour.index.xsl
2017-03-26 11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch/property/templates/base/wo_hour.index.xsl
2017-03-26 11:44:11 UTC (rev 16485)
@@ -215,11 +215,6 @@
</table>
<script>
- if (JqueryPortico.inlineTablesRendered == 0)
- {
- JqueryPortico.inlineTablesRendered = 1;
- }
-
var columns = [
<xsl:for-each select="//datatable/field">
{
Modified:
branches/Version-2_0-branch/rental/inc/class.socontract_price_item.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/class.socontract_price_item.inc.php
2017-03-26 11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch/rental/inc/class.socontract_price_item.inc.php
2017-03-26 11:44:11 UTC (rev 16485)
@@ -123,7 +123,8 @@
. "
rental_contract_price_item.contract_id, rental_contract_price_item.area,
rental_contract_price_item.count,"
. "
rental_contract_price_item.agresso_id, rental_contract_price_item.title,
rental_contract_price_item.is_area,"
. " rental_contract_price_item.price,
rental_contract_price_item.total_price, rental_contract_price_item.is_one_time,"
- . "
rental_contract_price_item.date_start,
rental_contract_price_item.date_end,rental_price_item.type";
+ . "
rental_contract_price_item.date_start,
rental_contract_price_item.date_end,rental_price_item.type,"
+ . "
rental_contract_price_item.billing_id";
}
else
{
@@ -162,6 +163,7 @@
$price_item->set_location_factor($this->unmarshal($this->db->f('location_factor'),
'float'));
$price_item->set_standard_factor($this->unmarshal($this->db->f('standard_factor'),
'float'));
$price_item->set_custom_factor($this->unmarshal($this->db->f('custom_factor'),
'float'));
+
$price_item->set_billing_id($this->unmarshal($this->db->f('billing_id'),
'int'));
}
return $price_item;
}
@@ -269,6 +271,12 @@
$cols[] = 'date_end';
}
+ if ($price_item->get_billing_id())
+ {
+ $values[] =
$this->marshal($price_item->get_billing_id(), 'int');
+ $cols[] = 'billing_id';
+ }
+
$q = "INSERT INTO rental_contract_price_item (" .
join(',', $cols) . ") VALUES (" . join(',', $values) . ")";
$result = $this->db->query($q);
@@ -366,7 +374,8 @@
"is_billed=" . ($price_item->is_billed() ?
"true" : "false"),
"location_factor = '{$location_factor}'",
"standard_factor = '{$standard_factor}'",
- "custom_factor = '{$custom_factor}'"
+ "custom_factor = '{$custom_factor}'",
+ "billing_id=" .
$this->marshal($price_item->get_billing_id(), 'int')
);
$this->db->query('UPDATE rental_contract_price_item SET
' . join(',', $values) . " WHERE id=$id", __LINE__, __FILE__);
Modified: branches/Version-2_0-branch/rental/inc/class.uibilling.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/class.uibilling.inc.php
2017-03-26 11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch/rental/inc/class.uibilling.inc.php
2017-03-26 11:44:11 UTC (rev 16485)
@@ -1398,6 +1398,7 @@
{
phpgw::no_access();
}
+ $billing_id = phpgw::get_var('id');
rental_sobilling::get_instance()->transaction_begin();
$billing_job =
rental_sobilling::get_instance()->get_single((int)phpgw::get_var('id'));
$billing_job->set_deleted(true);
@@ -1422,7 +1423,8 @@
foreach ($price_items as $price_item)
{
//Check for credit or valid date
- if (($price_item->get_is_one_time() &&
$price_item->get_total_price() < 0) || ($price_item->get_date_start() >=
$invoice->get_timestamp_start() && $price_item->get_date_start() <=
$invoice->get_timestamp_end()))
+// if (($price_item->get_is_one_time() &&
$price_item->get_total_price() < 0) || ($price_item->get_date_start() >=
$invoice->get_timestamp_start() && $price_item->get_date_start() <=
$invoice->get_timestamp_end()))
+ if ($price_item->get_billing_id() ==
$billing_id)
{
$price_item->set_is_billed(false);
rental_socontract_price_item::get_instance()->store($price_item);
Modified:
branches/Version-2_0-branch/rental/inc/model/class.contract_price_item.inc.php
===================================================================
---
branches/Version-2_0-branch/rental/inc/model/class.contract_price_item.inc.php
2017-03-26 11:42:19 UTC (rev 16484)
+++
branches/Version-2_0-branch/rental/inc/model/class.contract_price_item.inc.php
2017-03-26 11:44:11 UTC (rev 16485)
@@ -22,6 +22,7 @@
protected $standard_factor;
protected $custom_factor;
protected $price_type_id;
+ protected $billing_id;
/**
* Constructor. Takes an optional ID. If a price item is
created from outside
@@ -45,6 +46,15 @@
*/
}
+ public function get_billing_id()
+ {
+ return $this->billing_id;
+ }
+
+ public function set_billing_id( $id )
+ {
+ $this->billing_id = $id;
+ }
public function get_price_item_id()
{
return $this->price_item_id;
@@ -241,6 +251,7 @@
'date_start' => $this->get_date_start() != NULL
? date($date_format, $this->get_date_start()) : '',
'date_end' => $this->get_date_end() != NULL ?
date($date_format, $this->get_date_end()) : '',
'price_type_title' =>
lang($this->get_price_type_title()),
+ 'billing_id' => $this->get_billing_id(),
);
}
Modified: branches/Version-2_0-branch/rental/inc/model/class.invoice.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/model/class.invoice.inc.php
2017-03-26 11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch/rental/inc/model/class.invoice.inc.php
2017-03-26 11:44:11 UTC (rev 16485)
@@ -534,12 +534,18 @@
if ($contract_price_item->is_one_time())
{
$invoice_price_item->set_is_one_time(true);
- if ($billing_term == 5 ||
($contract_price_item_start >= $timestamp_invoice_start &&
$contract_price_item_start <= $timestamp_invoice_end))
+
+
+ /**
+ * FIXME: Sigurd: 24. mars: sjekk
denne!!
+ */
+// if ($billing_term == 5 ||
($contract_price_item_start >= $timestamp_invoice_start &&
$contract_price_item_start <= $timestamp_invoice_end))
{
// ... set the total price of
the invoice price item to the total price of the contract price item
$invoice_price_item->set_total_price($contract_price_item->get_total_price());
// ... and set the contract
price item as billed
$contract_price_item->set_is_billed(true);
+
$contract_price_item->set_billing_id($billing_id);
if (!$dry_run)
{
rental_socontract_price_item::get_instance()->store($contract_price_item);
Modified: branches/Version-2_0-branch/rental/setup/setup.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/setup/setup.inc.php 2017-03-26
11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch/rental/setup/setup.inc.php 2017-03-26
11:44:11 UTC (rev 16485)
@@ -1,6 +1,6 @@
<?php
$setup_info['rental']['name'] = 'rental'; // Module identifier
- $setup_info['rental']['version'] = '0.1.0.36'; // Current module version
+ $setup_info['rental']['version'] = '0.1.0.37'; // Current module version
$setup_info['rental']['app_order'] = 51; // (?)
$setup_info['rental']['tables'] = array(
'rental_party', // All contract participants, tenants etc.
Modified: branches/Version-2_0-branch/rental/setup/tables_current.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/setup/tables_current.inc.php
2017-03-26 11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch/rental/setup/tables_current.inc.php
2017-03-26 11:44:11 UTC (rev 16485)
@@ -298,7 +298,8 @@
'date_start' => array('type' => 'int',
'precision' => '8', 'nullable' => true),
'date_end' => array('type' => 'int',
'precision' => '8', 'nullable' => true),
'is_billed' => array('type' => 'bool',
'nullable' => false, 'default' => 'false'),
- 'is_one_time' => array('type' => 'bool',
'nullable' => true, 'default' => 'false')
+ 'is_one_time' => array('type' => 'bool',
'nullable' => true, 'default' => 'false'),
+ 'billing_id' => array('type' => 'int',
'precision' => '4', 'nullable' => true),
),
'pk' => array('id'),
'fk' => array(
Modified: branches/Version-2_0-branch/rental/setup/tables_update.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/setup/tables_update.inc.php
2017-03-26 11:42:19 UTC (rev 16484)
+++ branches/Version-2_0-branch/rental/setup/tables_update.inc.php
2017-03-26 11:44:11 UTC (rev 16485)
@@ -959,3 +959,21 @@
return $GLOBALS['setup_info']['rental']['currentver'];
}
}
+
+ $test[] = '0.1.0.36';
+ function rental_upgrade0_1_0_36()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('rental_contract_price_item',
'billing_id', array(
+ 'type' => 'int',
+ 'precision' => 4,
+ 'nullable' => true
+ ));
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['rental']['currentver'] =
'0.1.0.37';
+ return $GLOBALS['setup_info']['rental']['currentver'];
+ }
+ }
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16485] Stable: Merge 16476:16484 from trunk,
sigurdne <=