[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8692] Merge 8684:8691 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [8692] Merge 8684:8691 from trunk |
Date: |
Thu, 26 Jan 2012 10:13:57 +0000 |
Revision: 8692
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8692
Author: sigurdne
Date: 2012-01-26 10:13:57 +0000 (Thu, 26 Jan 2012)
Log Message:
-----------
Merge 8684:8691 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/controller/inc/class.menu.inc.php
branches/Version-1_0-branch/controller/inc/class.uicheck_list.inc.php
branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php
branches/Version-1_0-branch/controller/js/controller/ajax.js
branches/Version-1_0-branch/controller/setup/setup.inc.php
branches/Version-1_0-branch/controller/setup/tables_current.inc.php
branches/Version-1_0-branch/controller/setup/tables_update.inc.php
branches/Version-1_0-branch/controller/templates/base/control_group/control_groups.xsl
branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php
branches/Version-1_0-branch/property/inc/class.sotts.inc.php
branches/Version-1_0-branch/property/inc/cron/default/Import_fra_basware_X205.php
branches/Version-1_0-branch/property/inc/export/default/Basware_X114
Property Changed:
----------------
branches/Version-1_0-branch/
Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683
+
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691
Modified: branches/Version-1_0-branch/controller/inc/class.menu.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.menu.inc.php
2012-01-26 10:12:58 UTC (rev 8691)
+++ branches/Version-1_0-branch/controller/inc/class.menu.inc.php
2012-01-26 10:13:57 UTC (rev 8692)
@@ -144,6 +144,11 @@
'text' => lang('Configure
Access Permissions'),
'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'preferences.uiadmin_acl.list_acl', 'acl_app' => 'controller') )
),
+ 'check_item_status' => array
+ (
+ 'text' => lang('check item
status'),
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uigeneric.index', 'type' => 'controller_check_item_status') )
+ ),
'control_cats' => array
(
'text' => lang('Control area'),
Modified: branches/Version-1_0-branch/controller/inc/class.uicheck_list.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicheck_list.inc.php
2012-01-26 10:12:58 UTC (rev 8691)
+++ branches/Version-1_0-branch/controller/inc/class.uicheck_list.inc.php
2012-01-26 10:13:57 UTC (rev 8692)
@@ -54,18 +54,18 @@
// 'save_check_list'
=> true,
// 'view_check_list'
=> true,
// 'edit_check_list'
=> true,
- 'save_check_items'
=> true,
- 'save_check_item'
=> true,
- 'get_check_list_info' =>
true,
+ // 'save_check_items'
=> true,
+ // 'save_check_item'
=> true,
+ // 'get_check_list_info' =>
true,
// 'control_calendar_status_overview' => true,
- 'add_check_item_to_list' =>
true,
- 'view_control_items' =>
true,
+ // 'add_check_item_to_list' =>
true,
+ // 'view_control_items' =>
true,
//'view_control_details'
=> true,
//'register_case'
=> true,
//'view_open_cases'
=> true,
//'view_closed_cases'
=> true,
//'view_measurements'
=> true,
- 'get_cases_for_check_list' =>
true
+ // 'get_cases_for_check_list' =>
true
);
public function __construct()
Modified: branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php
2012-01-26 10:12:58 UTC (rev 8691)
+++ branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php
2012-01-26 10:13:57 UTC (rev 8692)
@@ -380,6 +380,8 @@
);
self::add_javascript('controller', 'yahoo',
'control_tabs.js');
+ self::add_javascript('controller', 'controller',
'jquery.js');
+ self::add_javascript('controller', 'controller',
'ajax.js');
self::render_template_xsl(array('control/control_tabs',
'control_group/control_groups'), $data);
}
@@ -465,6 +467,7 @@
self::add_javascript('controller', 'yahoo',
'control_tabs.js');
self::add_javascript('controller', 'controller',
'jquery.js');
self::add_javascript('controller', 'controller',
'custom_ui.js');
+ self::add_javascript('controller', 'controller',
'ajax.js');
self::render_template_xsl(array('control/control_tabs',
'control_item/choose_control_items'), $data);
}
Modified: branches/Version-1_0-branch/controller/js/controller/ajax.js
===================================================================
--- branches/Version-1_0-branch/controller/js/controller/ajax.js
2012-01-26 10:12:58 UTC (rev 8691)
+++ branches/Version-1_0-branch/controller/js/controller/ajax.js
2012-01-26 10:13:57 UTC (rev 8692)
@@ -144,12 +144,37 @@
}
});
});
-
+
+ $("#frm_save_control_groups").submit(function(e){
+ var thisForm = $(this);
+ var num_checked = $(this).find("input:checked").length;
+
+ if(num_checked == 0){
+ e.preventDefault();
+ $(thisForm).before("<div style='margin: 10px
0;text-align: center;width: 200px;' class='input_error_msg'>Du må velge en
eller flere grupper</div>");
+ }
+ });
+
+ $("#frm_control_items").submit(function(e){
+ var thisForm = $(this);
+ var num_checked = $(this).find("input:checked").length;
+
+ if(num_checked == 0){
+ e.preventDefault();
+ $(thisForm).before("<div style='margin: 10px
0;text-align: center;width: 200px;' class='input_error_msg'>Du må velge en
eller flere punkter</div>");
+ }
+ });
+
$("#frm_save_control_details input").focus(function(e){
$("#frm_save_control_details").find(".focus").removeClass("focus");
$(this).addClass("focus");
});
+ $("#frm_save_control_details input").focus(function(e){
+
$("#frm_save_control_details").find(".focus").removeClass("focus");
+ $(this).addClass("focus");
+ });
+
$("#frm_save_control_details select").focus(function(e){
$("#frm_save_control_details").find(".focus").removeClass("focus");
$(this).addClass("focus");
Modified: branches/Version-1_0-branch/controller/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/setup/setup.inc.php 2012-01-26
10:12:58 UTC (rev 8691)
+++ branches/Version-1_0-branch/controller/setup/setup.inc.php 2012-01-26
10:13:57 UTC (rev 8692)
@@ -1,6 +1,6 @@
<?php
$setup_info['controller']['name'] = 'controller';
- $setup_info['controller']['version'] = '0.1.22';
+ $setup_info['controller']['version'] = '0.1.23';
$setup_info['controller']['app_order'] = 100;
$setup_info['controller']['enable'] = 1;
$setup_info['controller']['app_group'] = 'office';
@@ -50,5 +50,6 @@
'controller_control_component_list',
'controller_document',
'controller_document_types',
- 'controller_check_item_case'
+ 'controller_check_item_case',
+ 'controller_check_item_status'
);
Modified: branches/Version-1_0-branch/controller/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/setup/tables_current.inc.php
2012-01-26 10:12:58 UTC (rev 8691)
+++ branches/Version-1_0-branch/controller/setup/tables_current.inc.php
2012-01-26 10:13:57 UTC (rev 8692)
@@ -206,5 +206,19 @@
'fk' => array('controller_check_item' => array('check_item_id'
=> 'id')),
'ix' => array(),
'uc' => array()
+ ),
+ 'controller_check_item_status' => array(
+ 'fd' => array(
+ 'id' => array('type' => 'auto','nullable' =>
False),
+ 'name' => array('type' => 'varchar','precision'
=> '50','nullable' => False),
+ 'open' => array('type' => 'int','precision' =>
'2','nullable' => True),
+ 'closed' => array('type' => 'int','precision'
=> '2','nullable' => True),
+ 'pending' => array('type' => 'int','precision'
=> '2','nullable' => True),
+ 'sorting' => array('type' => 'int','precision'
=> '4','nullable' => True)
+ ),
+ 'pk' => array('id'),
+ 'ix' => array(),
+ 'ix' => array(),
+ 'uc' => array()
)
);
Modified: branches/Version-1_0-branch/controller/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/setup/tables_update.inc.php
2012-01-26 10:12:58 UTC (rev 8691)
+++ branches/Version-1_0-branch/controller/setup/tables_update.inc.php
2012-01-26 10:13:57 UTC (rev 8692)
@@ -463,3 +463,36 @@
$GLOBALS['setup_info']['controller']['currentver'] = '0.1.22';
return $GLOBALS['setup_info']['controller']['currentver'];
}
+
+ /* Update Controller from v 0.1.22 to 0.1.23
+ * Add table for configurable status
+ */
+
+ $test[] = '0.1.22';
+ function controller_upgrade0_1_22()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw_setup']->oProc->CreateTable(
+ 'controller_check_item_status', array(
+ 'fd' => array(
+ 'id' => array('type' =>
'auto','nullable' => False),
+ 'name' => array('type' =>
'varchar','precision' => '50','nullable' => False),
+ 'open' => array('type' =>
'int','precision' => '2','nullable' => True),
+ 'closed' => array('type' =>
'int','precision' => '2','nullable' => True),
+ 'pending' => array('type' =>
'int','precision' => '2','nullable' => True),
+ 'sorting' => array('type' =>
'int','precision' => '4','nullable' => True)
+ ),
+ 'pk' => array('id'),
+ 'ix' => array(),
+ 'ix' => array(),
+ 'uc' => array()
+ )
+ );
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['controller']['currentver'] =
'0.1.23';
+ return
$GLOBALS['setup_info']['controller']['currentver'];
+ }
+ }
Modified:
branches/Version-1_0-branch/controller/templates/base/control_group/control_groups.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/control_group/control_groups.xsl
2012-01-26 10:12:58 UTC (rev 8691)
+++
branches/Version-1_0-branch/controller/templates/base/control_group/control_groups.xsl
2012-01-26 10:13:57 UTC (rev 8692)
@@ -6,7 +6,7 @@
<h2><xsl:value-of select="control_area/title"/></h2>
- <form
action="index.php?menuaction=controller.uicontrol.save_control_groups"
method="post">
+ <form id="frm_save_control_groups"
action="index.php?menuaction=controller.uicontrol.save_control_groups"
method="post">
<xsl:variable name="control_area_id"><xsl:value-of
select="control_area/id"/></xsl:variable>
<input type="hidden" name="control_area_id"
value="{$control_area_id}" />
Modified: branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php
2012-01-26 10:12:58 UTC (rev 8691)
+++ branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php
2012-01-26 10:13:57 UTC (rev 8692)
@@ -2132,6 +2132,58 @@
break;
// END BOOKING TABLES
+// START CONTROLLER TABLES
+ case 'controller_check_item_status':
+ $info = array
+ (
+ 'table'
=> 'controller_check_item_status',
+ 'id'
=> array('name' => 'id', 'type' => 'auto'),
+ 'fields'
=> array
+ (
+ array
+ (
+ 'name' =>
'name',
+ 'descr' =>
lang('name'),
+ 'type' =>
'varchar'
+ ),
+ array
+ (
+ 'name' =>
'sorting',
+ 'descr' =>
lang('sorting'),
+ 'type' =>
'integer',
+ 'sortable'=>
true
+ ),
+ array
+ (
+ 'name' =>
'open',
+ 'descr' =>
lang('open'),
+ 'type' =>
'checkbox'
+ ),
+ array
+ (
+ 'name' =>
'pending',
+ 'descr' =>
lang('pending'),
+ 'type' =>
'checkbox'
+ ),
+ array
+ (
+ 'name' =>
'closed',
+ 'descr' =>
lang('closed'),
+ 'type' =>
'checkbox'
+ )
+ ),
+ 'edit_msg'
=> lang('edit'),
+ 'add_msg'
=> lang('add'),
+ 'name'
=> lang('status'),
+ 'acl_app'
=> 'controller',
+ 'acl_location' =>
'admin',
+ 'menu_selection' =>
'admin::controller::check_item_status'
+ );
+ break;
+
+// END CONTROLLER TABLES
+
+
default:
$message =lang('ERROR: illegal type %1', $type);
phpgwapi_cache::message_set($message, 'error');
Modified: branches/Version-1_0-branch/property/inc/class.sotts.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sotts.inc.php
2012-01-26 10:12:58 UTC (rev 8691)
+++ branches/Version-1_0-branch/property/inc/class.sotts.inc.php
2012-01-26 10:13:57 UTC (rev 8692)
@@ -217,13 +217,13 @@
$public_user_list[] = $user;
}
}
-
+
if($public_user_list)
{
$public_user_list =
array_unique($public_user_list);
reset($public_user_list);
$filtermethod .= " $where (
fm_tts_tickets.user_id IN(" . implode(',',$public_user_list) . "))";
- $where= 'AND';
+ $where= 'AND';
}
if($tenant_id =
$GLOBALS['phpgw']->session->appsession('tenant_id','property'))
@@ -286,7 +286,7 @@
{
if($value)
{
- $filtermethod .= "{$or}
fm_tts_tickets.status = '{$value}'";
+ $filtermethod .= "{$or}
fm_tts_tickets.status = '{$value}'";
$or = ' OR';
}
}
@@ -437,7 +437,7 @@
.
"fm_tts_tickets.subject,fm_tts_tickets.address,fm_tts_tickets.location_code,fm_tts_tickets.priority,fm_tts_tickets.cat_id,fm_tts_tickets.group_id,"
.
"fm_tts_tickets.entry_date,fm_tts_tickets.finnish_date,fm_tts_tickets.finnish_date2,fm_tts_tickets.order_id,fm_tts_tickets.vendor_id,fm_tts_tickets.actual_cost,"
.
"fm_tts_tickets.budget,fm_tts_tickets.billable_hours,fm_district.descr as
district,fm_tts_views.id as view,fm_location1.loc1_name {$result_order_field}";
-
+
//fm_tts_tickets.* ,fm_location1.loc1_name,
fm_tts_views.id as view {$result_order_field},fm_district.descr as district
$sql = "SELECT DISTINCT {$return_fields} FROM
fm_tts_tickets"
. " {$this->join} fm_location1 ON
fm_tts_tickets.loc1=fm_location1.loc1"
@@ -464,7 +464,7 @@
{
$cache_info = array();
}
-
+
if(!$cache_info)
{
$sql2 = "SELECT count(*) as cnt, sum(budget) as
sum_budget, sum(actual_cost) as sum_actual_cost FROM ({$sql_cnt}) as t";
@@ -689,7 +689,7 @@
if(isset($entity_category) && $entity_category)
{
- $_address[] =
"{$entity_category['name']}::{$ticket['extra']['p_num']}";
+ $_address[] =
"{$entity_category['name']}::{$ticket['extra']['p_num']}";
}
$address =
$this->db->db_addslashes(implode('::', $_address));
@@ -733,7 +733,7 @@
(
'location1_id'
=> $GLOBALS['phpgw']->locations->get_id('property',
$ticket['origin'][0]['location']),
'location1_item_id' =>
$ticket['origin'][0]['data'][0]['id'],
- 'location2_id'
=> $GLOBALS['phpgw']->locations->get_id('property', '.ticket'),
+ 'location2_id'
=> $GLOBALS['phpgw']->locations->get_id('property', '.ticket'),
'location2_item_id' =>
$id,
'account_id'
=> $this->account
);
@@ -817,8 +817,9 @@
$check_old_custom = (int) trim($old_status,'C');
$this->db->query("SELECT * from fm_tts_status
WHERE id = {$check_old_custom}",__LINE__,__FILE__);
$this->db->next_record();
+ $old_closed = $this->db->f('closed');
$this->fields_updated = true;
- if($old_status=='X' || $this->db->f('closed'))
+ if($old_status=='X' || $old_closed)
{
$new_status = $ticket['status'];
$this->historylog->add('R',$id,$ticket['status'],$old_status);
@@ -831,6 +832,21 @@
$this->db->query("UPDATE fm_tts_tickets
SET status='{$ticket['status']}' WHERE id={$id}",__LINE__,__FILE__);
}
$this->check_pending_action($ticket, $id);
+
+ //Close cases at controller
+
if(isset($GLOBALS['phpgw_info']['user']['apps']['controller']))
+ {
+ $check_new_custom = (int)
trim($ticket['status'],'C');
+ $this->db->query("SELECT closed from
fm_tts_status WHERE id = {$check_new_custom}",__LINE__,__FILE__);
+ $this->db->next_record();
+
+ if($this->db->f('closed') &&
($old_status!='X' && !$old_closed))
+ {
+ $location_id =
$GLOBALS['phpgw']->locations->get_id('property', '.ticket');
+ $controller =
CreateObject('controller.uicase');
+
$controller->updateStatusForCases($location_id, $id, 0);
+ }
+ }
}
$this->db->transaction_commit();
@@ -985,8 +1001,9 @@
$check_old_custom = (int) trim($old_status,'C');
$this->db->query("SELECT * from fm_tts_status
WHERE id = {$check_old_custom}",__LINE__,__FILE__);
$this->db->next_record();
+ $old_closed = $this->db->f('closed');
$this->fields_updated[] = 'status';
- if($old_status=='X' || $this->db->f('closed'))
+ if($old_status=='X' || $old_closed)
{
$new_status = $ticket['status'];
$this->historylog->add('R',$id,$ticket['status'],$old_status);
@@ -999,6 +1016,21 @@
$this->db->query("UPDATE fm_tts_tickets
SET status='{$ticket['status']}' WHERE id={$id}",__LINE__,__FILE__);
}
$this->check_pending_action($ticket, $id);
+
+ //Close cases at controller
+
if(isset($GLOBALS['phpgw_info']['user']['apps']['controller']))
+ {
+ $check_new_custom = (int)
trim($ticket['status'],'C');
+ $this->db->query("SELECT closed from
fm_tts_status WHERE id = {$check_new_custom}",__LINE__,__FILE__);
+ $this->db->next_record();
+
+ if($this->db->f('closed') &&
($old_status!='X' && !$old_closed))
+ {
+ $location_id =
$GLOBALS['phpgw']->locations->get_id('property', '.ticket');
+ $controller =
CreateObject('controller.uicase');
+
$controller->updateStatusForCases($location_id, $id, 0);
+ }
+ }
}
if (($oldassigned != $ticket['assignedto']) &&
$ticket['assignedto'] != 'ignore')
@@ -1170,7 +1202,7 @@
if(isset($entity_category) &&
$entity_category)
{
- $_address[] =
"{$entity_category['name']}::{$ticket['extra']['p_num']}";
+ $_address[] =
"{$entity_category['name']}::{$ticket['extra']['p_num']}";
}
$address =
$this->db->db_addslashes(implode('::', $_address));
@@ -1335,7 +1367,7 @@
throw new Exception("phpgwapi_locations::get_id
('property', '.ticket') returned 0");
}
- $this->db->transaction_begin();
+ $this->db->transaction_begin();
$this->db->query("DELETE FROM fm_action_pending WHERE
location_id = {$location_id} AND item_id = {$id}",__LINE__,__FILE__);
$this->db->query("DELETE FROM phpgw_interlink WHERE
location1_id = {$location_id} AND location1_item_id = {$id}",__LINE__,__FILE__);
@@ -1358,7 +1390,7 @@
{
$values = array();
$sql = "SELECT DISTINCT fm_vendor.id,
fm_vendor.org_name FROM fm_tts_tickets {$this->join} fm_vendor ON
fm_tts_tickets.vendor_id = fm_vendor.id ORDER BY org_name ASC";
-
+
$this->db->query($sql, __LINE__,__FILE__);
while ($this->db->next_record())
@@ -1369,14 +1401,14 @@
'name' => $this->db->f('org_name',
true)
);
}
-
+
return $values;
}
public function get_ecodimb()
{
$values = array();
$sql = "SELECT DISTINCT fm_ecodimb.id, fm_ecodimb.descr
as name FROM fm_tts_tickets {$this->join} fm_ecodimb ON fm_tts_tickets.ecodimb
= fm_ecodimb.id ORDER BY name ASC";
-
+
$this->db->query($sql, __LINE__,__FILE__);
while ($this->db->next_record())
@@ -1387,14 +1419,14 @@
'name' => $this->db->f('name', true)
);
}
-
+
return $values;
}
public function get_b_account()
{
$values = array();
$sql = "SELECT DISTINCT fm_b_account.id,
fm_b_account.descr as name FROM fm_tts_tickets {$this->join} fm_b_account ON
fm_tts_tickets.b_account_id = fm_b_account.id ORDER BY id ASC";
-
+
$this->db->query($sql, __LINE__,__FILE__);
while ($this->db->next_record())
@@ -1405,14 +1437,14 @@
'name' => $this->db->f('name', true)
);
}
-
+
return $values;
}
public function get_building_part()
{
$values = array();
$sql = "SELECT DISTINCT fm_building_part.id,
fm_building_part.descr as name FROM fm_tts_tickets {$this->join}
fm_building_part ON fm_tts_tickets.building_part = fm_building_part.id ORDER BY
id ASC";
-
+
$this->db->query($sql, __LINE__,__FILE__);
while ($this->db->next_record())
@@ -1424,14 +1456,14 @@
'name' => $id . ' ' .
$this->db->f('name', true)
);
}
-
+
return $values;
}
public function get_branch()
{
$values = array();
$sql = "SELECT DISTINCT fm_branch.id, fm_branch.descr
as name FROM fm_tts_tickets {$this->join} fm_branch ON fm_tts_tickets.branch_id
= fm_branch.id ORDER BY name ASC";
-
+
$this->db->query($sql, __LINE__,__FILE__);
while ($this->db->next_record())
@@ -1442,14 +1474,14 @@
'name' => $this->db->f('name', true)
);
}
-
+
return $values;
}
public function get_order_dim1()
{
$values = array();
$sql = "SELECT DISTINCT fm_order_dim1.id,
fm_order_dim1.descr as name FROM fm_tts_tickets {$this->join} fm_order_dim1 ON
fm_tts_tickets.order_dim1 = fm_order_dim1.id ORDER BY name ASC";
-
+
$this->db->query($sql, __LINE__,__FILE__);
while ($this->db->next_record())
@@ -1460,7 +1492,7 @@
'name' => $this->db->f('name', true)
);
}
-
+
return $values;
}
}
Modified:
branches/Version-1_0-branch/property/inc/cron/default/Import_fra_basware_X205.php
===================================================================
---
branches/Version-1_0-branch/property/inc/cron/default/Import_fra_basware_X205.php
2012-01-26 10:12:58 UTC (rev 8691)
+++
branches/Version-1_0-branch/property/inc/cron/default/Import_fra_basware_X205.php
2012-01-26 10:13:57 UTC (rev 8692)
@@ -461,12 +461,12 @@
$rc =
$this->send->msg('email', $to, 'Ikke gyldig leverandør ved import av faktura
til Portico', $body, '', '', '','','','html');
if($rc)
{
-
$receipt['error'][] = array('msg'=> "epost sendt til {$to}");
+
$this->receipt['error'][] = array('msg'=> "epost sendt til {$to}");
}
}
catch
(phpmailerException $e)
{
-
$receipt['error'][] = array('msg' => $e->getMessage());
+
$this->receipt['error'][] = array('msg' => $e->getMessage());
}
}
}
@@ -546,12 +546,12 @@
}
catch (phpmailerException $e)
{
- $receipt['error'][] =
array('msg' => $e->getMessage());
+
$this->receipt['error'][] = array('msg' => $e->getMessage());
}
}
else
{
- $receipt['error'][] =
array('msg'=>lang('SMTP server is not set! (admin section)'));
+ $this->receipt['error'][] =
array('msg'=>lang('SMTP server is not set! (admin section)'));
}
}
@@ -620,6 +620,7 @@
$order_info['budget_responsible'] =
isset($this->config->config_data['import']['budget_responsible']) &&
$this->config->config_data['import']['budget_responsible'] ?
$this->config->config_data['import']['budget_responsible'] : 'karhal';
}
+/*
$budget_responsible_user_id =
$GLOBALS['phpgw']->accounts->name2id($order_info['budget_responsible']);
if($budget_responsible_user_id)
{
@@ -629,7 +630,7 @@
$toarray[] = $prefs['email'];
}
}
-
+*/
$order_info['toarray'] = $toarray;
return $order_info;
}
Modified: branches/Version-1_0-branch/property/inc/export/default/Basware_X114
===================================================================
--- branches/Version-1_0-branch/property/inc/export/default/Basware_X114
2012-01-26 10:12:58 UTC (rev 8691)
+++ branches/Version-1_0-branch/property/inc/export/default/Basware_X114
2012-01-26 10:13:57 UTC (rev 8692)
@@ -46,12 +46,14 @@
function __construct()
{
$GLOBALS['phpgw_info']['flags']['currentapp'] =
'property';
- $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- $this->db = &
$GLOBALS['phpgw']->db;
- $this->join = &
$this->db->join;
+ $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
+ $this->db = &
$GLOBALS['phpgw']->db;
+ $this->join = &
$this->db->join;
- $this->soXport =
CreateObject('property.soXport');
- $this->config =
CreateObject('admin.soconfig',$GLOBALS['phpgw']->locations->get_id('property',
'.invoice'));
+ $this->soXport =
CreateObject('property.soXport');
+ $this->config =
CreateObject('admin.soconfig',$GLOBALS['phpgw']->locations->get_id('property',
'.invoice'));
+ $this->cats =
CreateObject('phpgwapi.categories', -1, 'property', '.project');
+ $this->cats->supress_info = true;
if(!isset($this->config->config_data['common']['method']))
{
@@ -166,8 +168,9 @@
return $vendor_info;
}
- protected function get_order_title($order_id='')
+ protected function get_order_info($order_id='')
{
+ $order_info = array();
$sql = "SELECT type FROM fm_orders WHERE
id='$order_id'";
$this->db->query($sql,__LINE__,__FILE__);
$this->db->next_record();
@@ -175,20 +178,24 @@
switch($this->db->f('type'))
{
case 'workorder':
- $sql2 = "SELECT title FROM fm_workorder
WHERE id='$order_id'";
+ $sql2 = "SELECT title, category FROM
fm_workorder WHERE id='$order_id'";
$this->db->query($sql2,__LINE__,__FILE__);
$this->db->next_record();
- $order_title = $this->db->f('title');
+ $order_info['title'] =
$this->db->f('title');
+ $cat_id = (int)$this->db->f('category');
+ $category =
$this->cats->return_single($cat_id);
+ $category_arr =
explode('-',$category[0]['name']);
+ $order_info['category'] =
(int)trim($category_arr[0]);
break;
case 's_agreement':
$sql2 = "SELECT descr as title FROM
fm_s_agreement WHERE id='$order_id'";
$this->db->query($sql2,__LINE__,__FILE__);
$this->db->next_record();
- $order_title = $this->db->f('title');
+ $order_info['title'] =
$this->db->f('title');
break;
}
- return $order_title;
+ return $order_info;
}
@@ -708,6 +715,12 @@
$this->soXport->add_OverfBilag($oRsOverfBilag);
}
+ if ($line['order_id'])
+ {
+ $order_info =
$this->get_order_info($line['order_id']);
+ $dim6 = isset($order_info['category'])
&& $order_info['category'] ? $order_info['category'] : '';
+ }
+
$descr = '';
if($line['merknad'])
{
@@ -715,7 +728,7 @@
}
else if ($line['order_id'])
{
- $descr =
$this->get_order_title($line['order_id']);
+ $descr = $order_info['title'];
}
$accountline[] = array
@@ -723,7 +736,7 @@
'TRANSACTIONTYPE' =>
'R114',
'ACCOUNTLINK.CODE' =>
$line['spbudact_code'], // 4180
'AMOUNT'
=> $amount, // 312500
- 'APPROVER.FULLNAME' =>
$GLOBALS['phpgw_info']['user']['fullname'], //Batch 04 - 14
+ 'APPROVER.FULLNAME' =>
$line['budsjettansvarligid'], //Batch 04 - 14
'DIMENSION.D1.CODE' =>
$line['dimb'], // 1111
'DIMENSION.D2.CODE' =>
'',//$line['dima'], // 62000
'DIMENSION.D3.CODE' => '',
@@ -736,7 +749,7 @@
'POITEMNUMBER' =>
$itemnumber, //200200
'POITEMTYPE' => 'C',
// A = Item, B = Special Product (SP), C = Text based (Misc.)
'POLINENUMBER' =>
$linenumber, // 10
- 'RECEIVER.FULLNAME' =>
$GLOBALS['phpgw_info']['user']['fullname'], // Batch 04 - 14
+ 'RECEIVER.FULLNAME' =>
$line['budsjettansvarligid'], // Batch 04 - 14
'STATUS'
=> 5,
'SUBACCOUNT' =>
$periode, //200905 Accounting period YYYYMM
'ALLOCATION.KEY' =>
$line['periodization'],//0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8692] Merge 8684:8691 from trunk,
Sigurd Nes <=