[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16188] Syncromind: Merge 16130:16187 from trunk
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16188] Syncromind: Merge 16130:16187 from trunk |
Date: |
Wed, 25 Jan 2017 03:38:31 -0500 (EST) |
Revision: 16188
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16188
Author: sigurdne
Date: 2017-01-25 03:38:31 -0500 (Wed, 25 Jan 2017)
Log Message:
-----------
Syncromind: Merge 16130:16187 from trunk
Modified Paths:
--------------
branches/dev-syncromind-2/booking/inc/class.uimetasettings.inc.php
branches/dev-syncromind-2/bookingfrontend/change.php
branches/dev-syncromind-2/bookingfrontend/setup/default_records.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.bobooking.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.bovendor.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.menu.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.sobooking.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.uiapplication.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.uibooking.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.uicustomer.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.uiresource.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.uivendor.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.uivendor_report.inc.php
branches/dev-syncromind-2/eventplanner/inc/model/class.application.inc.php
branches/dev-syncromind-2/eventplanner/inc/model/class.booking.inc.php
branches/dev-syncromind-2/eventplanner/inc/model/class.customer.inc.php
branches/dev-syncromind-2/eventplanner/inc/model/class.vendor.inc.php
branches/dev-syncromind-2/eventplanner/inc/model/class.vendor_report.inc.php
branches/dev-syncromind-2/eventplanner/js/portico/application.edit.js
branches/dev-syncromind-2/eventplanner/setup/phpgw_no.lang
branches/dev-syncromind-2/eventplanner/setup/setup.inc.php
branches/dev-syncromind-2/eventplanner/setup/tables_current.inc.php
branches/dev-syncromind-2/eventplanner/setup/tables_update.inc.php
branches/dev-syncromind-2/eventplanner/templates/base/application.xsl
branches/dev-syncromind-2/eventplanner/templates/base/application_info.xsl
branches/dev-syncromind-2/eventplanner/templates/base/booking.xsl
branches/dev-syncromind-2/eventplanner/templates/base/config.tpl
branches/dev-syncromind-2/eventplanner/templates/base/customer.xsl
branches/dev-syncromind-2/eventplanner/templates/base/vendor.xsl
branches/dev-syncromind-2/eventplanner/templates/base/vendor_report.xsl
branches/dev-syncromind-2/phpgwapi/inc/class.categories.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.config.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.db_pdo.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.socommon.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.uicommon.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.uicommon_jquery.inc.php
branches/dev-syncromind-2/phpgwapi/inc/sso/include_login.inc.php
branches/dev-syncromind-2/phpgwapi/templates/base/datatable_jquery.xsl
branches/dev-syncromind-2/phpgwapi/templates/bookingfrontend/head.inc.php
branches/dev-syncromind-2/phpgwapi/templates/pure/css/pure-extension.css
branches/dev-syncromind-2/property/inc/class.bocondition_survey.inc.php
branches/dev-syncromind-2/property/inc/class.socondition_survey.inc.php
branches/dev-syncromind-2/property/inc/class.soentity.inc.php
branches/dev-syncromind-2/property/inc/class.sogeneric_.inc.php
branches/dev-syncromind-2/property/inc/class.soproject.inc.php
branches/dev-syncromind-2/property/inc/class.sorequest.inc.php
branches/dev-syncromind-2/property/inc/class.uibudget.inc.php
branches/dev-syncromind-2/property/inc/class.uicondition_survey.inc.php
branches/dev-syncromind-2/property/inc/class.uientity.inc.php
branches/dev-syncromind-2/property/inc/class.uiinvoice2.inc.php
branches/dev-syncromind-2/property/inc/class.uitts.inc.php
branches/dev-syncromind-2/property/inc/class.uiwo_hour.inc.php
branches/dev-syncromind-2/property/inc/class.uiworkorder.inc.php
branches/dev-syncromind-2/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
branches/dev-syncromind-2/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
branches/dev-syncromind-2/property/js/portico/ajax_invoice.js
branches/dev-syncromind-2/property/setup/phpgw_no.lang
branches/dev-syncromind-2/property/templates/base/tenant_claim.xsl
branches/dev-syncromind-2/rental/inc/class.boemail_out.inc.php
branches/dev-syncromind-2/rental/inc/class.socontract_price_item.inc.php
branches/dev-syncromind-2/rental/inc/class.soemail_out.inc.php
branches/dev-syncromind-2/rental/inc/class.soparty.inc.php
branches/dev-syncromind-2/rental/inc/class.uicomposite.inc.php
branches/dev-syncromind-2/rental/inc/class.uiemail_out.inc.php
branches/dev-syncromind-2/rental/inc/model/class.email_out.inc.php
branches/dev-syncromind-2/rental/setup/phpgw_no.lang
branches/dev-syncromind-2/rental/templates/base/email_out.xsl
Added Paths:
-----------
branches/dev-syncromind-2/eventplanner/inc/class.uievents.inc.php
branches/dev-syncromind-2/eventplanner/inc/hook_config.inc.php
branches/dev-syncromind-2/eventplanner/js/portico/events.index.js
branches/dev-syncromind-2/eventplanner/templates/base/events.xsl
branches/dev-syncromind-2/eventplannerfrontend/
branches/dev-syncromind-2/rental/inc/class.uilookup.inc.php
branches/dev-syncromind-2/rental/js/rental/email_out.edit.js
Property Changed:
----------------
branches/dev-syncromind-2/
branches/dev-syncromind-2/booking/
branches/dev-syncromind-2/bookingfrontend/
Index: branches/dev-syncromind-2
===================================================================
--- branches/dev-syncromind-2 2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2 2017-01-25 08:38:31 UTC (rev 16188)
Property changes on: branches/dev-syncromind-2
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,3 ##
/branches/dev-syncromind:13653
/branches/stavangerkommune:12743-12875,12986
-/trunk:14934-14935,15165-15215,15218-15220,15222-15304,15306-15337,15339,15341-15398,15400-15421,15423-15474,15476-15607,15609,15611,15613-15652,15654-15732,15734,15736-15746,15750-15770,15772-15775,15777-15795,15797-15798,15800-15812,15814-15838,15840,15842-15888,15890,15892-15997,15999-16097,16103-16128
\ No newline at end of property
+/trunk:14934-14935,15165-15215,15218-15220,15222-15304,15306-15337,15339,15341-15398,15400-15421,15423-15474,15476-15607,15609,15611,15613-15652,15654-15732,15734,15736-15746,15750-15770,15772-15775,15777-15795,15797-15798,15800-15812,15814-15838,15840,15842-15888,15890,15892-15997,15999-16097,16103-16128,16131-16187
\ No newline at end of property
Index: branches/dev-syncromind-2/booking
===================================================================
--- branches/dev-syncromind-2/booking 2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/booking 2017-01-25 08:38:31 UTC (rev 16188)
Property changes on: branches/dev-syncromind-2/booking
___________________________________________________________________
Modified: svn:mergeinfo
## -1,2 +1,2 ##
/branches/stavangerkommune/booking:9468-12740,12743-12875,12986
-/trunk/booking:14937-15027,15165-15215,15253-15304,15306-15337,15341-15398,15476-15607,15613-15652,15654-15732,15814-15838,15892-15997,15999-16097
\ No newline at end of property
+/trunk/booking:14937-15027,15165-15215,15253-15304,15306-15337,15341-15398,15476-15607,15613-15652,15654-15732,15814-15838,15892-15997,15999-16097,16131-16187
\ No newline at end of property
Modified: branches/dev-syncromind-2/booking/inc/class.uimetasettings.inc.php
===================================================================
--- branches/dev-syncromind-2/booking/inc/class.uimetasettings.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/booking/inc/class.uimetasettings.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -22,7 +22,9 @@
public function index()
{
- $config = CreateObject('phpgwapi.config', 'booking');
+ $appname = phpgw::get_var('appname');
+ $appname = $appname ? $appname : 'booking';
+ $config = CreateObject('phpgwapi.config', $appname);
$config->read();
if ($_SERVER['REQUEST_METHOD'] == 'POST')
Index: branches/dev-syncromind-2/bookingfrontend
===================================================================
--- branches/dev-syncromind-2/bookingfrontend 2017-01-24 15:09:10 UTC (rev
16187)
+++ branches/dev-syncromind-2/bookingfrontend 2017-01-25 08:38:31 UTC (rev
16188)
Property changes on: branches/dev-syncromind-2/bookingfrontend
___________________________________________________________________
Modified: svn:mergeinfo
## -1,2 +1,2 ##
/branches/stavangerkommune/bookingfrontend:9468-12740,12986
-/trunk/bookingfrontend:14937-15027,15253-15304,15306-15337,15476-15607,15613-15652,15814-15838,15892-15997
\ No newline at end of property
+/trunk/bookingfrontend:14937-15027,15253-15304,15306-15337,15476-15607,15613-15652,15814-15838,15892-15997,16131-16187
\ No newline at end of property
Modified: branches/dev-syncromind-2/bookingfrontend/change.php
===================================================================
--- branches/dev-syncromind-2/bookingfrontend/change.php 2017-01-24
15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/bookingfrontend/change.php 2017-01-25
08:38:31 UTC (rev 16188)
@@ -16,10 +16,10 @@
include_once('../header.inc.php');
$GLOBALS['phpgw']->sessions = createObject('phpgwapi.sessions');
}
+ $config = createobject('phpgwapi.config', 'bookingfrontend')->read();
+ $login = $config['anonymous_user'];
+ $passwd = $config['anonymous_passwd'];
- $login = "bookingguest";
- $passwd = "bkbooking";
-
$_POST['submitit'] = "";
$GLOBALS['sessionid'] = $GLOBALS['phpgw']->session->create($login,
$passwd);
$GLOBALS['phpgw']->session->appsession('tenant_id', 'property',
$tenant_id);
Modified:
branches/dev-syncromind-2/bookingfrontend/setup/default_records.inc.php
===================================================================
--- branches/dev-syncromind-2/bookingfrontend/setup/default_records.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/bookingfrontend/setup/default_records.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -13,12 +13,14 @@
if (!$GLOBALS['phpgw']->accounts->exists('bookingguest')) // no guest
account already exists
{
+ $passwd = $GLOBALS['phpgw']->common->randomstring(6) . "ABab1!";
+
$GLOBALS['phpgw_info']['server']['password_level'] = '8CHAR';
$account = new phpgwapi_user();
$account->lid = 'bookingguest';
$account->firstname = 'booking';
$account->lastname = 'Guest';
- $account->passwd = 'bkbooking';
+ $account->passwd = $passwd;
$account->enabled = true;
$account->expires = -1;
$bookingguest = $GLOBALS['phpgw']->accounts->create($account,
array(), array(), $modules);
@@ -25,6 +27,12 @@
$preferences = createObject('phpgwapi.preferences');
$preferences->set_account_id($bookingguest);
- $preferences->add('bookingfrontend', 'template_set',
'bkbooking');
+ $preferences->add('common', 'template_set', 'bookingfrontend');
$preferences->save_repository(true, $GLOBALS['type']);
+
+ $config = CreateObject('phpgwapi.config', 'bookingfrontend');
+ $config->read();
+ $config->value('anonymous_user', 'bookingguest');
+ $config->value('anonymous_passwd', $passwd);
+ $config->save_repository();
}
Modified: branches/dev-syncromind-2/eventplanner/inc/class.bobooking.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.bobooking.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/inc/class.bobooking.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -68,6 +68,7 @@
public function read($params)
{
+ $status_text = array(lang('inactive'), lang('active'));
if(empty($params['filters']['active']))
{
$params['filters']['active'] = 1;
@@ -84,6 +85,7 @@
$entry['modified'] =
$GLOBALS['phpgw']->common->show_date($entry['modified']);
$entry['from_'] =
$GLOBALS['phpgw']->common->show_date($entry['from_']);
$entry['to_'] =
$GLOBALS['phpgw']->common->show_date($entry['to_']);
+ $entry['status'] =
$status_text[$entry['active']];
}
return $values;
}
@@ -104,7 +106,59 @@
public function update_active_status( $ids, $action )
{
- return
eventplanner_sobooking::get_instance()->update_active_status($ids, $action);
+ if($action == 'enable' && $ids)
+ {
+ $_ids = array();
+ $application_id =
eventplanner_sobooking::get_instance()->read_single($ids[0],
true)->application_id;
+
+ $application =
createObject('eventplanner.boapplication')->read_single($application_id);
+ $params = array();
+ $params['filters']['active'] = 1;
+ $params['filters']['application_id'] =
$application_id;
+
+ $bookings =
eventplanner_sobooking::get_instance()->read($params);
+
+ $number_of_active =
(int)$bookings['total_records'];
+ $limit = (int)$application->num_granted_events;
+
+
+ foreach ($ids as $id)
+ {
+ if($limit > $number_of_active)
+ {
+ $_ids[] = $id;
+ $number_of_active ++;
+ }
+ else
+ {
+ $message = lang('maximum of
granted events are reached');
+
phpgwapi_cache::message_set($message, 'error');
+ break;
+ }
+ }
+ }
+ else if ($action == 'delete' && $ids)
+ {
+ foreach ($ids as $id)
+ {
+ $booking =
eventplanner_sobooking::get_instance()->read_single($id, true);
+ if(!$booking->customer_id)
+ {
+ $_ids[] = $id;
+ }
+ else
+ {
+ $message = lang('can not delete
booking with customer');
+
phpgwapi_cache::message_set($message, 'error');
+ }
+ }
+ }
+ else
+ {
+ $_ids = $ids;
+ }
+
+ return
eventplanner_sobooking::get_instance()->update_active_status($_ids, $action);
}
public function update_schedule( $id, $from_ )
Modified: branches/dev-syncromind-2/eventplanner/inc/class.bovendor.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.bovendor.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/inc/class.bovendor.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -86,7 +86,7 @@
// $entry['status'] =
$status_text[$entry['status']];
if($organization_number)
{
- $entry['name'] .= "
[{$entry['vendor_organization_number']}]";
+ $entry['name'] .= "
[{$entry['organization_number']}]";
}
$entry['created'] =
$GLOBALS['phpgw']->common->show_date($entry['created']);
$entry['modified'] =
$GLOBALS['phpgw']->common->show_date($entry['modified']);
Modified: branches/dev-syncromind-2/eventplanner/inc/class.menu.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.menu.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/inc/class.menu.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -62,6 +62,12 @@
{
$menus['admin'] = array
(
+ 'index' => array
+ (
+ 'text' => lang('Configuration'),
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'admin.uiconfig.index',
+ 'appname' =>
'eventplanner'))
+ ),
'acl' => array(
'text' =>
$GLOBALS['phpgw']->translation->translate('Configure Access Permissions',
array(), true),
'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'preferences.uiadmin_acl.list_acl',
@@ -151,10 +157,10 @@
'text' => lang('application'),
'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'eventplanner.uiapplication.index'))
),
- 'resource' => array(
- 'text' => lang('resource'),
- 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
"eventplanner.uiresource.index")),
- 'image' => array('resource', 'navbar'),
+ 'events' => array(
+ 'text' => lang('events'),
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
"eventplanner.uievents.index")),
+ 'image' => array('events', 'navbar'),
),
'customer' => array(
'text' => lang('customer'),
Modified: branches/dev-syncromind-2/eventplanner/inc/class.sobooking.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.sobooking.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/inc/class.sobooking.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -139,18 +139,25 @@
{
case 'disable':
$sql = "UPDATE eventplanner_booking SET
active = 0";
+ $where = 'WHERE';
break;
case 'enable':
$sql = "UPDATE eventplanner_booking SET
active = 1";
+ $where = 'WHERE';
break;
+ case 'delete':
+ $sql = "DELETE FROM
eventplanner_booking WHERE customer_id IS NULL";
+ $where = 'AND';
+ break;
+
default:
throw new Exception("action {$action}
not supported");
break;
}
- $sql .= 'WHERE id IN(' . implode(',', $ids) . ')';
+ $sql .= " {$where} id IN(". implode(',', $ids) . ')';
$this->db->transaction_begin();
$this->db->query($sql,__LINE__,__FILE__);
Modified: branches/dev-syncromind-2/eventplanner/inc/class.uiapplication.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uiapplication.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uiapplication.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -38,6 +38,7 @@
'add' => true,
'index' => true,
'query' => true,
+ 'get_list'=> true,
'view' => true,
'edit' => true,
'save' => true,
@@ -82,6 +83,7 @@
'name' => 'vendor',
'app' => 'eventplanner',
'ui' => 'vendor',
+ 'function' => 'get_list',
'label_attr' => 'name',
'text' => lang('vendor') . ':',
'requestGenerator' => 'requestWithVendorFilter'
@@ -175,7 +177,7 @@
(
'my_name' => 'view',
'text' => lang('show'),
- 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
+ 'action' => self::link( array
(
'menuaction' =>
'eventplanner.uiapplication.view'
)),
@@ -186,7 +188,7 @@
(
'my_name' => 'edit',
'text' => lang('edit'),
- 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
+ 'action' => self::link(array
(
'menuaction' =>
'eventplanner.uiapplication.edit'
)),
@@ -206,7 +208,7 @@
public function edit( $values = array(), $mode = 'edit' )
{
$active_tab = !empty($values['active_tab']) ?
$values['active_tab'] : phpgw::get_var('active_tab', 'string', 'REQUEST',
'first_tab');
- $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' .
lang('edit');
+ // $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' .
lang('edit');
if (empty($this->permissions[PHPGW_ACL_ADD]))
{
phpgw::no_access();
@@ -221,8 +223,9 @@
$id = !empty($values['id']) ? $values['id'] :
phpgw::get_var('id', 'int');
$application = $this->bo->read_single($id);
}
+ $config = CreateObject('phpgwapi.config',
'eventplanner')->read();
+ $default_category =
!empty($config['default_application_category']) ?
$config['default_application_category'] : null;
-
$tabs = array();
$tabs['first_tab'] = array(
'label' => lang('application'),
@@ -282,9 +285,9 @@
array('key' => 'id', 'label' => lang('id'),
'sortable' => true, 'resizeable' => true,'formatter' =>
'JqueryPortico.formatLink'),
array('key' => 'from_', 'label' =>
lang('From'), 'sortable' => false, 'resizeable' => true),
array('key' => 'to_', 'label' => lang('To'),
'sortable' => false, 'resizeable' => true),
- array('key' => 'active', 'label' =>
lang('active'), 'sortable' => false, 'resizeable' => true),
+ array('key' => 'status', 'label' =>
lang('status'), 'sortable' => false, 'resizeable' => true),
+ array('key' => 'customer_name', 'label' =>
lang('who'), 'sortable' => true, 'resizeable' => true),
array('key' => 'location', 'label' =>
lang('location'), 'sortable' => false, 'resizeable' => true),
- array('key' => 'customer_name', 'label' =>
lang('who'), 'sortable' => true, 'resizeable' => true),
array('key' => 'comment', 'label' =>
lang('Note'), 'sortable' => false, 'resizeable' => true),
array('key' => 'application_id', 'hidden' =>
true),
);
@@ -315,6 +318,13 @@
onActionsClick('disable');"
),
array(
+ 'my_name' => 'delete',
+ 'text' => lang('delete'),
+ 'type' => 'custom',
+ 'custom_code' => "
+
onActionsClick('delete');"
+ ),
+ array(
'my_name' => 'edit',
'text' => lang('edit'),
'type' => 'custom',
@@ -375,14 +385,14 @@
// die();
$data = array(
'datatable_def' => $datatable_def,
- 'form_action' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'eventplanner.uiapplication.save')),
- 'cancel_url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'eventplanner.uiapplication.index',)),
+ 'form_action' => self::link(array('menuaction'
=> 'eventplanner.uiapplication.save')),
+ 'cancel_url' => self::link(array('menuaction'
=> 'eventplanner.uiapplication.index',)),
'application' => $application,
'new_vendor_url' =>
self::link(array('menuaction' => 'eventplanner.uivendor.add')),
'list_case_officer' => array('options' =>
$case_officer_options),
'cat_select' =>
$this->cats->formatted_xslt_list(array(
'select_name' => 'category_id',
- 'selected' =>
$application->category_id,
+ 'selected' =>
$application->category_id ? $application->category_id : $default_category,
'use_acl' => $this->_category_acl,
'required' => true)),
'status_list' => array('options' =>
$this->get_status_options($application->status)),
Modified: branches/dev-syncromind-2/eventplanner/inc/class.uibooking.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uibooking.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uibooking.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -38,6 +38,7 @@
'add' => true,
'index' => true,
'query' => true,
+ 'get_list'=> true,
'view' => true,
'edit' => true,
'save' => true,
@@ -47,7 +48,8 @@
);
protected
$fields,
- $permissions;
+ $permissions,
+ $currentapp;
public function __construct()
{
@@ -57,6 +59,7 @@
$this->bo = createObject('eventplanner.bobooking');
$this->fields = eventplanner_booking::get_fields();
$this->permissions =
eventplanner_booking::get_instance()->get_permission_array();
+ $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
}
public function index()
@@ -83,8 +86,9 @@
array(
'type' =>
'autocomplete',
'name' =>
'application',
- 'app' =>
'eventplanner',
+ 'app' =>
$this->currentapp,
'ui' =>
'application',
+ 'function' =>
'get_list',
'label_attr' =>
'title',
'text' =>
lang('application') . ':',
'requestGenerator' => 'requestWithApplicationFilter'
@@ -101,7 +105,7 @@
),
'datatable' => array(
'source' => self::link(array(
- 'menuaction' =>
'eventplanner.uibooking.index',
+ 'menuaction' =>
"{$this->currentapp}.uibooking.index",
'phpgw_return_as' => 'json'
)),
'allrows' => true,
@@ -124,9 +128,9 @@
(
'my_name' => 'view',
'text' => lang('show'),
- 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
+ 'action' => self::link(array
(
- 'menuaction' =>
'eventplanner.uibooking.view'
+ 'menuaction' =>
"{$this->currentapp}.uibooking.view"
)),
'parameters' => json_encode($parameters)
);
@@ -135,9 +139,9 @@
(
'my_name' => 'edit',
'text' => lang('edit'),
- 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
+ 'action' => self::link(array
(
- 'menuaction' =>
'eventplanner.uibooking.edit'
+ 'menuaction' =>
"{$this->currentapp}.uibooking.edit"
)),
'parameters' => json_encode($parameters)
);
@@ -229,7 +233,7 @@
$datatable_def[] = array(
'container' => 'datatable-container_1',
- 'requestUrl' =>
json_encode(self::link(array('menuaction' =>
'eventplanner.uivendor_report.query',
+ 'requestUrl' =>
json_encode(self::link(array('menuaction' =>
"{$this->currentapp}.uivendor_report.query",
'filter_booking_id' => $id,
'filter_active' => 1,
'phpgw_return_as' => 'json'))),
@@ -255,12 +259,12 @@
'type' => 'custom',
'className' => 'add',
'custom_code' => "
-
add_report('vendor');"
+
add_report('customer');"
)
);
$datatable_def[] = array(
'container' => 'datatable-container_2',
-// 'requestUrl' =>
json_encode(self::link(array('menuaction' =>
'eventplanner.uicustomer_report.query',
+// 'requestUrl' =>
json_encode(self::link(array('menuaction' =>
"{$this->currentapp}.uicustomer_report.query",
// 'filter_booking_id' => $id,
// 'filter_active' => 1,
// 'phpgw_return_as' => 'json'))),
@@ -299,22 +303,35 @@
}
}
+
+
+
+ $application_url = self::link(array('menuaction' =>
"{$this->currentapp}.uiapplication.edit", 'id' => $booking->application_id));
+ $lang_application = lang('application');
+ if($this->currentapp == 'eventplannerfrontend')
+ {
+ $application_url =
self::link(array('menuaction' => "{$this->currentapp}.uievents.edit", 'id' =>
$booking->application_id));
+ $lang_application = lang('event');
+ }
+
+
$data = array(
'datatable_def' => $datatable_def,
- 'form_action' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'eventplanner.uibooking.save')),
- 'cancel_url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'eventplanner.uibooking.index',)),
+ 'form_action' => self::link(array('menuaction'
=> "{$this->currentapp}.uibooking.save")),
+ 'cancel_url' => self::link(array('menuaction'
=> "{$this->currentapp}.uibooking.index",)),
'booking' => $booking,
'application' => $application,
'application_type_list' =>
$application_type_list,
- 'new_customer_url' =>
self::link(array('menuaction' => 'eventplanner.uicustomer.add')),
- 'application_url' =>
self::link(array('menuaction' => 'eventplanner.uiapplication.edit', 'id' =>
$booking->application_id)),
- 'customer_url' => self::link(array('menuaction'
=> 'eventplanner.uicustomer.edit', 'id' => $booking->customer_id)),
+ 'new_customer_url' =>
self::link(array('menuaction' => "{$this->currentapp}.uicustomer.add")),
+ 'application_url' => $application_url,
+ 'lang_application' => $lang_application,
+ 'customer_url' => self::link(array('menuaction'
=> "{$this->currentapp}.uicustomer.edit", 'id' => $booking->customer_id)),
'mode' => $mode,
'tabs' =>
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
'value_active_tab' => $active_tab
);
phpgwapi_jquery::formvalidator_generate(array());
- self::add_javascript('eventplanner', 'portico',
'booking.edit.js');
+ self::add_javascript($this->currentapp, 'portico',
'booking.edit.js');
phpgwapi_jquery::load_widget('autocomplete');
self::render_template_xsl(array('booking',
'datatable_inline'), array($mode => $data));
}
@@ -344,11 +361,11 @@
}
else
{
- return array
- (
+ $messages = phpgwapi_cache::message_get(true);
+ return array(
'status_kode' => 'error',
'status' => lang('error'),
- 'msg' => lang('messages_form_error')
+ 'msg' => $messages ? $messages :
lang('did not validate')
);
}
}
Modified: branches/dev-syncromind-2/eventplanner/inc/class.uicustomer.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uicustomer.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uicustomer.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -46,7 +46,8 @@
protected
$fields,
- $permissions;
+ $permissions,
+ $currentapp;
public function __construct()
{
@@ -56,6 +57,7 @@
$this->bo = createObject('eventplanner.bocustomer');
$this->fields = eventplanner_customer::get_fields();
$this->permissions =
eventplanner_customer::get_instance()->get_permission_array();
+ $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
}
private function get_category_options( $selected = 0 )
@@ -118,11 +120,11 @@
),
'datatable' => array(
'source' => self::link(array(
- 'menuaction' =>
'eventplanner.uicustomer.index',
+ 'menuaction' =>
"{$this->currentapp}.uicustomer.index",
'phpgw_return_as' => 'json'
)),
'allrows' => true,
- 'new_item' =>
self::link(array('menuaction' => 'eventplanner.uicustomer.add')),
+ 'new_item' =>
self::link(array('menuaction' => "{$this->currentapp}.uicustomer.add")),
'editor_action' => '',
'field' => parent::_get_fields()
)
@@ -141,9 +143,9 @@
(
'my_name' => 'view',
'text' => lang('show'),
- 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
+ 'action' => self::link(array
(
- 'menuaction' =>
'eventplanner.uicustomer.view'
+ 'menuaction' =>
"{$this->currentapp}.uicustomer.view"
)),
'parameters' => json_encode($parameters)
);
@@ -152,9 +154,9 @@
(
'my_name' => 'edit',
'text' => lang('edit'),
- 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
+ 'action' => self::link(array
(
- 'menuaction' =>
'eventplanner.uicustomer.edit'
+ 'menuaction' =>
"{$this->currentapp}.uicustomer.edit"
)),
'parameters' => json_encode($parameters)
);
@@ -224,8 +226,8 @@
$data = array(
'datatable_def' => $datatable_def,
- 'form_action' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'eventplanner.uicustomer.save')),
- 'cancel_url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'eventplanner.uicustomer.index',)),
+ 'form_action' => self::link(array('menuaction'
=> "{$this->currentapp}.uicustomer.save")),
+ 'cancel_url' => self::link(array('menuaction'
=> "{$this->currentapp}.uicustomer.index",)),
'customer' => $customer,
'category_list' => array('options' =>
$this->get_category_options( $customer->category_id )),
'mode' => $mode,
@@ -233,7 +235,7 @@
'value_active_tab' => $active_tab
);
phpgwapi_jquery::formvalidator_generate(array());
- self::add_javascript('eventplanner', 'portico',
'customer.edit.js');
+ self::add_javascript('eventplannerfrontend', 'portico',
'validate.js');
self::render_template_xsl(array('customer',
'datatable_inline'), array($mode => $data));
}
Copied: branches/dev-syncromind-2/eventplanner/inc/class.uievents.inc.php (from
rev 16187, trunk/eventplanner/inc/class.uievents.inc.php)
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uievents.inc.php
(rev 0)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uievents.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -0,0 +1,280 @@
+<?php
+/**
+ * phpGroupWare - eventplanner: a part of a Facilities Management
System.
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2016 Free Software Foundation, Inc.
http://www.fsf.org/
+ * This file is part of phpGroupWare.
+ *
+ * phpGroupWare is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * phpGroupWare is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with phpGroupWare; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA
+ *
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/
+ * @package eventplanner
+ * @subpackage events
+ * @version $Id: $
+ */
+ phpgw::import_class('phpgwapi.uicommon');
+ phpgw::import_class('phpgwapi.datetime');
+
+ include_class('eventplanner', 'application', 'inc/model/');
+
+ class eventplanner_uievents extends phpgwapi_uicommon
+ {
+ public $public_functions = array(
+ 'index' => true,
+ 'query' => true,
+ 'edit' => true
+ );
+
+ protected
+ $fields,
+ $permissions,
+ $currentapp;
+
+ public function __construct()
+ {
+ parent::__construct();
+ self::set_active_menu('eventplanner::uievents');
+ $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' .
lang('events');
+ $this->bo = createObject('eventplanner.boapplication');
+ $this->cats = & $this->bo->cats;
+ $this->fields = eventplanner_application::get_fields();
+ unset($this->fields['modified']);
+ unset($this->fields['created']);
+ unset($this->fields['contact_email']);
+ unset($this->fields['case_officer_name']);
+ $this->permissions =
eventplanner_application::get_instance()->get_permission_array();
+ $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
+
+ }
+
+ private function get_status_options( $selected = 0 )
+ {
+ $status_options = array();
+ $status_list =
eventplanner_application::get_status_list();
+
+ foreach ($status_list as $_key => $_value)
+ {
+ $status_options[] = array(
+ 'id' => $_key,
+ 'name' => $_value,
+ 'selected' => $_key == $selected ? 1 : 0
+ );
+ }
+ return $status_options;
+ }
+
+ private function _get_filters()
+ {
+ $combos = array();
+ $combos[] = array(
+ 'type' => 'autocomplete',
+ 'name' => 'vendor',
+ 'app' => $this->currentapp,
+ 'ui' => 'vendor',
+ 'function' => 'get_list',
+ 'label_attr' => 'name',
+ 'text' => lang('vendor') . ':',
+ 'requestGenerator' => 'requestWithVendorFilter'
+ );
+
+ $categories =
$this->cats->formatted_xslt_list(array('format' => 'filter',
+ 'selected' => $this->cat_id, 'globals'
=> true, 'use_acl' => $this->_category_acl));
+ $default_value = array('cat_id' => '', 'name' =>
lang('no category'));
+ array_unshift($categories['cat_list'], $default_value);
+
+ $_categories = array();
+ foreach ($categories['cat_list'] as $_category)
+ {
+ $_categories[] = array('id' =>
$_category['cat_id'], 'name' => $_category['name']);
+ }
+
+ $combos[] = array('type' => 'filter',
+ 'name' => 'filter_category_id',
+ 'extra' => '',
+ 'text' => lang('category'),
+ 'list' => $_categories
+ );
+
+ return $combos;
+
+ }
+ public function index()
+ {
+ if (empty($this->permissions[PHPGW_ACL_READ]))
+ {
+ phpgw::no_access();
+ }
+
+ if (phpgw::get_var('phpgw_return_as') == 'json')
+ {
+ return $this->query();
+ }
+
+ phpgwapi_jquery::load_widget('autocomplete');
+
+ $function_msg = lang('events');
+
+ $data = array(
+ 'datatable_name' => $function_msg,
+ 'form' => array(
+ 'toolbar' => array(
+ 'item' => array(
+ )
+ )
+ ),
+ 'datatable' => array(
+ 'source' => self::link(array(
+ 'menuaction' =>
"{$this->currentapp}.uievents.index",
+ 'phpgw_return_as' => 'json'
+ )),
+ 'allrows' => true,
+ 'editor_action' => '',
+ 'field' => parent::_get_fields()
+ )
+ );
+
+ $filters = $this->_get_filters();
+
+ foreach ($filters as $filter)
+ {
+ array_unshift($data['form']['toolbar']['item'],
$filter);
+ }
+
+ $parameters = array(
+ 'parameter' => array(
+ array(
+ 'name' => 'id',
+ 'source' => 'id'
+ )
+ )
+ );
+
+ $data['datatable']['actions'][] = array
+ (
+ 'my_name' => 'view',
+ 'text' => lang('show'),
+ 'action' => self::link(array
+ (
+ 'menuaction' =>
"{$this->currentapp}.uievents.edit"
+ )),
+ 'parameters' => json_encode($parameters)
+ );
+
+ self::add_javascript('eventplanner', 'portico',
'events.index.js');
+ phpgwapi_jquery::load_widget('numberformat');
+
+ self::render_template_xsl('datatable_jquery', $data);
+ }
+
+
+ public function edit( )
+ {
+ $active_tab = !empty($values['active_tab']) ?
$values['active_tab'] : phpgw::get_var('active_tab', 'string', 'REQUEST',
'first_tab');
+ $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' .
lang('show');
+ if (empty($this->permissions[PHPGW_ACL_READ]))
+ {
+ phpgw::no_access();
+ }
+
+ $id = phpgw::get_var('id', 'int');
+ $application = $this->bo->read_single($id);
+
+ $tabs = array();
+ $tabs['first_tab'] = array(
+ 'label' => lang('event'),
+ 'link' => '#first_tab',
+ 'function' => "set_tab('first_tab')"
+ );
+
+
+ $dates_def = array(
+ array('key' => 'id', 'label' => lang('id'),
'sortable' => true, 'resizeable' => true,'formatter' =>
'JqueryPortico.formatLink'),
+ array('key' => 'from_', 'label' =>
lang('From'), 'sortable' => false, 'resizeable' => true),
+ array('key' => 'to_', 'label' => lang('To'),
'sortable' => false, 'resizeable' => true),
+ array('key' => 'status', 'label' =>
lang('status'), 'sortable' => false, 'resizeable' => true),
+ array('key' => 'customer_name', 'label' =>
lang('who'), 'sortable' => true, 'resizeable' => true),
+ array('key' => 'location', 'label' =>
lang('location'), 'sortable' => false, 'resizeable' => true),
+ array('key' => 'comment', 'label' =>
lang('Note'), 'sortable' => false, 'resizeable' => true),
+ array('key' => 'application_id', 'hidden' =>
true),
+ );
+
+
+
+ $datatable_def[] = array(
+ 'container' => 'datatable-container_0',
+ 'requestUrl' =>
json_encode(self::link(array('menuaction' =>
"{$this->currentapp}.uibooking.query",
+ 'filter_application_id' => $id,
+ // 'filter_active' => 1,
+ 'phpgw_return_as' => 'json'))),
+ 'ColumnDefs' => $dates_def,
+ 'data' => json_encode(array()),
+ 'config' => array(
+ array('disableFilter' => true),
+ array('disablePagination' => true)
+ )
+ );
+
+ $application_type_list =
execMethod('eventplanner.bogeneric.get_list', array('type' =>
'application_type'));
+ $types = (array)$application->types;
+ if($types)
+ {
+ foreach ($application_type_list as
&$application_type)
+ {
+ foreach ($types as $type)
+ {
+ if((!empty($type['type_id']) &&
$type['type_id'] == $application_type['id']) || ($type ==
$application_type['id']))
+ {
+
$application_type['selected'] = 1;
+ break;
+ }
+ }
+ }
+ }
+
+ $category =
$this->cats->return_single($application->category_id);
+
+ $data = array(
+ 'datatable_def' => $datatable_def,
+ 'cancel_url' => self::link(array('menuaction'
=> "{$this->currentapp}.uievents.index",)),
+ 'application' => $application,
+ 'category_name' => $category[0]['name'],
+ 'status_list' => array('options' =>
$this->get_status_options($application->status)),
+ 'application_type_list' =>
$application_type_list,
+ 'tabs' =>
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
+ 'value_active_tab' => $active_tab
+ );
+ self::render_template_xsl(array('events',
'application_info', 'datatable_inline'), array('edit' => $data));
+ }
+
+
+ public function save()
+ {
+ //Nothing to do here
+ return false;
+ }
+
+
+ public function query()
+ {
+ $params = $this->bo->build_default_read_params();
+ $params['filters']['status'] =
eventplanner_application::STATUS_APPROVED;
+ $values = $this->bo->read($params);
+ array_walk($values["results"], array($this,
"_add_links"),
"{$this->called_class_arr[0]}.{$this->called_class_arr[1]}.edit");
+
+ return $this->jquery_results($values);
+ }
+ }
\ No newline at end of file
Modified: branches/dev-syncromind-2/eventplanner/inc/class.uiresource.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uiresource.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uiresource.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -147,7 +147,7 @@
(
'my_name' => 'view',
'text' => lang('show'),
- 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
+ 'action' => self::link(array
(
'menuaction' =>
'eventplanner.uiresource.view'
)),
@@ -158,7 +158,7 @@
(
'my_name' => 'edit',
'text' => lang('edit'),
- 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
+ 'action' => self::link(array
(
'menuaction' =>
'eventplanner.uiresource.edit'
)),
@@ -279,8 +279,8 @@
$data = array(
'datatable_def' => $datatable_def,
- 'form_action' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'eventplanner.uiresource.save')),
- 'cancel_url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'eventplanner.uiresource.index',)),
+ 'form_action' => self::link(array('menuaction'
=> 'eventplanner.uiresource.save')),
+ 'cancel_url' => self::link(array('menuaction'
=> 'eventplanner.uiresource.index',)),
'resource' => $resource,//->toArray(),
'list_executive_officer' => array('options' =>
$executive_officer_options),
'step' => $step,
Modified: branches/dev-syncromind-2/eventplanner/inc/class.uivendor.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uivendor.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uivendor.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -41,11 +41,13 @@
'view' => true,
'edit' => true,
'save' => true,
+ 'get_list' => true
);
protected
$fields,
- $permissions;
+ $permissions,
+ $currentapp;
public function __construct()
{
@@ -55,6 +57,7 @@
$this->bo = createObject('eventplanner.bovendor');
$this->fields = eventplanner_vendor::get_fields();
$this->permissions =
eventplanner_vendor::get_instance()->get_permission_array();
+ $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
}
private function get_category_options( $selected = 0 )
@@ -117,11 +120,11 @@
),
'datatable' => array(
'source' => self::link(array(
- 'menuaction' =>
'eventplanner.uivendor.index',
+ 'menuaction' =>
"{$this->currentapp}.uivendor.index",
'phpgw_return_as' => 'json'
)),
'allrows' => true,
- 'new_item' =>
self::link(array('menuaction' => 'eventplanner.uivendor.add')),
+ 'new_item' =>
self::link(array('menuaction' => "{$this->currentapp}.uivendor.add")),
'editor_action' => '',
'field' => parent::_get_fields()
)
@@ -140,9 +143,9 @@
(
'my_name' => 'view',
'text' => lang('show'),
- 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
+ 'action' => self::link(array
(
- 'menuaction' =>
'eventplanner.uivendor.view'
+ 'menuaction' =>
"{$this->currentapp}.uivendor.view"
)),
'parameters' => json_encode($parameters)
);
@@ -151,9 +154,9 @@
(
'my_name' => 'edit',
'text' => lang('edit'),
- 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
+ 'action' => self::link(array
(
- 'menuaction' =>
'eventplanner.uivendor.edit'
+ 'menuaction' =>
"{$this->currentapp}.uivendor.edit"
)),
'parameters' => json_encode($parameters)
);
@@ -223,8 +226,8 @@
$data = array(
'datatable_def' => $datatable_def,
- 'form_action' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'eventplanner.uivendor.save')),
- 'cancel_url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'eventplanner.uivendor.index',)),
+ 'form_action' => self::link(array('menuaction'
=> "{$this->currentapp}.uivendor.save")),
+ 'cancel_url' => self::link(array('menuaction'
=> "{$this->currentapp}.uivendor.index",)),
'vendor' => $vendor,
'category_list' => array('options' =>
$this->get_category_options( $vendor->category_id )),
'mode' => $mode,
@@ -232,7 +235,7 @@
'value_active_tab' => $active_tab
);
phpgwapi_jquery::formvalidator_generate(array());
- self::add_javascript('eventplanner', 'portico',
'vendor.edit.js');
+ self::add_javascript('eventplannerfrontend', 'portico',
'validate.js');
self::render_template_xsl(array('vendor',
'datatable_inline'), array($mode => $data));
}
Modified:
branches/dev-syncromind-2/eventplanner/inc/class.uivendor_report.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uivendor_report.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uivendor_report.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -29,7 +29,7 @@
phpgw::import_class('phpgwapi.uicommon');
phpgw::import_class('phpgwapi.datetime');
- include_class('eventplanner', 'vendor_report', 'inc/model/');
+// include_class('eventplanner', 'vendor_report', 'inc/model/');
class eventplanner_uivendor_report extends phpgwapi_uicommon
{
@@ -133,7 +133,7 @@
(
'my_name' => 'view',
'text' => lang('show'),
- 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
+ 'action' => self::link(array
(
'menuaction' =>
'eventplanner.uivendor_report.view'
)),
@@ -144,7 +144,7 @@
(
'my_name' => 'edit',
'text' => lang('edit'),
- 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
+ 'action' => self::link(array
(
'menuaction' =>
'eventplanner.uivendor_report.edit'
)),
@@ -234,8 +234,8 @@
);
$data = array(
- 'form_action' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'eventplanner.uivendor_report.save')),
- 'cancel_url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'eventplanner.uivendor_report.index',)),
+ 'form_action' => self::link(array('menuaction'
=> 'eventplanner.uivendor_report.save')),
+ 'cancel_url' => self::link(array('menuaction'
=> 'eventplanner.uivendor_report.index',)),
'vendor_report' => $vendor_report,
'booking' => $booking,
'application' => $application,
Copied: branches/dev-syncromind-2/eventplanner/inc/hook_config.inc.php (from
rev 16187, trunk/eventplanner/inc/hook_config.inc.php)
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/hook_config.inc.php
(rev 0)
+++ branches/dev-syncromind-2/eventplanner/inc/hook_config.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -0,0 +1,44 @@
+<?php
+ /**
+ * Eventplanner - configuration hook
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2000-2009 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @package phpgroupware
+ * @subpackage eventplanner
+ * @category hooks
+ * @version $Id: hook_config.inc.php 15466 2016-08-15 17:36:10Z
sigurdne $
+ */
+ /*
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+ /**
+ * Get HTML listbox with categories that are candidates for the dimb
responsibility_1
+ *
+ * @param $config
+ * @return string HTML listbox to be placed in a table
+ */
+ function default_application_category( $config )
+ {
+ $cats = CreateObject('phpgwapi.categories', -1, 'eventplanner',
'.application');
+ $cats->supress_info = true;
+
+ $selected = isset($config['default_application_category']) ?
$config['default_application_category'] : null;
+ $cat_select = '<option value="">' . lang('none selected') .
'</option>' . "\n";
+ $cat_select .= $cats->formatted_list(array('selected' =>
$selected));
+ return $cat_select;
+ }
+
Modified:
branches/dev-syncromind-2/eventplanner/inc/model/class.application.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/model/class.application.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/inc/model/class.application.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -48,6 +48,7 @@
$vendor_id,
$vendor_name,
$status,
+ $num_granted_events,
$created,
$modified,
$secret,
@@ -144,6 +145,11 @@
'label' => 'status',
'history' => true
),
+ 'num_granted_events' => array('action'=>
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
+ 'type' => 'int',
+ 'label' => 'number of granted events',
+ 'history' => true
+ ),
'created' => array('action'=> PHPGW_ACL_READ |
PHPGW_ACL_ADD,
'type' => 'date',
'label' => 'created',
@@ -293,7 +299,7 @@
),
'timespan' => array('action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
'type' => 'int',
- 'label' => 'timespan',
+ 'label' => 'event timespan',
'required' => true,
'history' => true,
),
Modified: branches/dev-syncromind-2/eventplanner/inc/model/class.booking.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/model/class.booking.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/inc/model/class.booking.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -259,6 +259,39 @@
}
+ protected function doValidate( $entity, &$errors )
+ {
+ $application =
createObject('eventplanner.boapplication')->read_single($entity->application_id);
+ $params = array();
+ $params['filters']['active'] = 1;
+ $params['filters']['application_id'] =
$entity->application_id;
+
+ $bookings =
eventplanner_sobooking::get_instance()->read($params);
+
+ if($entity->customer_id)
+ {
+ $test_total_tecords =
(int)$bookings['total_records'];
+ }
+ else
+ {
+ $test_total_tecords =
(int)$bookings['total_records'] + 1;
+ }
+
+ if($test_total_tecords >
(int)$application->num_granted_events)
+ {
+ $errors['num_granted_events'] = lang('maximum
of granted events are reached');
+ }
+
+ $date_start = date('Ymd',$application->date_start);
+ $date_end = date('Ymd',$application->date_end);
+ $from_ = date('Ymd',$entity->from_);
+
+ if($from_ < $date_start || $from_ > $date_end)
+ {
+ $errors['from_'] = lang('date is outside the
scope');
+ }
+ }
+
protected function generate_secret( $length = 10 )
{
return substr(base64_encode(rand(1000000000,
9999999999)), 0, $length);
Modified:
branches/dev-syncromind-2/eventplanner/inc/model/class.customer.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/model/class.customer.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/inc/model/class.customer.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -52,7 +52,7 @@
$address_2,
$zip_code,
$city,
- $customer_organization_number,
+ $organization_number,
$contact_name,
$contact_email,
$contact_phone,
@@ -59,9 +59,6 @@
$account_number,
$description,
$remark,
- // $customer_identifier_type,
- // $customer_ssn,
-
$comments,
$comment;
@@ -180,27 +177,13 @@
'query' => true,
'label' => 'contact phone',
),
-/* 'customer_identifier_type' => array(
- 'action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
- 'type' => 'string',
- 'required' => true,
- 'label' => 'customer_identifier_type',
- ),
- 'customer_ssn' => array(
+ 'organization_number' => array(
'action'=> PHPGW_ACL_READ |
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
'type' => 'string',
- 'required' => false,
- 'query' => true,
- 'sf_validator' =>
createObject('booking.sfValidatorNorwegianSSN', array('full_required' =>
false)),
- 'label' => 'customer_ssn'
- ),*/
- 'customer_organization_number' => array(
- 'action'=> PHPGW_ACL_READ |
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
- 'type' => 'string',
'required' => true,
'query' => true,
'sf_validator' =>
createObject('booking.sfValidatorNorwegianOrganizationNumber', array(),
array('invalid' => '%field% is invalid')),
- 'label' => 'organization_number'
+ 'label' => 'organization number'
),
'comments' => array(
'action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
@@ -247,9 +230,9 @@
'type' => 'comment'
);
}
- if (!empty($entity->customer_organization_number))
+ if (!empty($entity->organization_number))
{
- $entity->customer_organization_number =
str_replace(' ', '', $entity->customer_organization_number);
+ $entity->organization_number = str_replace(' ',
'', $entity->organization_number);
}
$entity->modified = time();
Modified: branches/dev-syncromind-2/eventplanner/inc/model/class.vendor.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/model/class.vendor.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/inc/model/class.vendor.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -52,7 +52,7 @@
$address_2,
$zip_code,
$city,
- $vendor_organization_number,
+ $organization_number,
$contact_name,
$contact_email,
$contact_phone,
@@ -59,9 +59,6 @@
$account_number,
$description,
$remark,
- // $vendor_identifier_type,
- // $vendor_ssn,
-
$comments,
$comment;
@@ -180,27 +177,13 @@
'query' => true,
'label' => 'contact phone',
),
-/* 'vendor_identifier_type' => array(
- 'action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
- 'type' => 'string',
- 'required' => true,
- 'label' => 'vendor_identifier_type',
- ),
- 'vendor_ssn' => array(
+ 'organization_number' => array(
'action'=> PHPGW_ACL_READ |
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
'type' => 'string',
- 'required' => false,
- 'query' => true,
- 'sf_validator' =>
createObject('booking.sfValidatorNorwegianSSN', array('full_required' =>
false)),
- 'label' => 'vendor_ssn'
- ),*/
- 'vendor_organization_number' => array(
- 'action'=> PHPGW_ACL_READ |
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
- 'type' => 'string',
'required' => true,
'query' => true,
'sf_validator' =>
createObject('booking.sfValidatorNorwegianOrganizationNumber', array(),
array('invalid' => '%field% is invalid')),
- 'label' => 'organization_number'
+ 'label' => 'organization number'
),
'comments' => array(
'action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
Modified:
branches/dev-syncromind-2/eventplanner/inc/model/class.vendor_report.inc.php
===================================================================
---
branches/dev-syncromind-2/eventplanner/inc/model/class.vendor_report.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++
branches/dev-syncromind-2/eventplanner/inc/model/class.vendor_report.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -60,18 +60,14 @@
return new eventplanner_vendor_report();
}
- public function set_custom_fields()
+ public static function get_custom_fields()
{
- $this->custom_fields =
$GLOBALS['phpgw']->custom_fields->find('eventplanner', self::acl_location, 0,
'', 'ASC', 'attrib_sort', true, true);
- }
-
- public function get_custom_fields()
- {
- if (!$this->custom_fields)
+ static $custom_fields = array();
+ if(!$custom_fields)
{
- $this->set_custom_fields();
+ $custom_fields =
$GLOBALS['phpgw']->custom_fields->find('eventplanner', self::acl_location, 0,
'', 'ASC', 'attrib_sort', true, true);
}
- return $this->custom_fields;
+ return $custom_fields;
}
public function get_organized_fields()
@@ -153,8 +149,6 @@
if (!$entity->get_id())
{
$entity->created = time();
- $entity->owner_id =
$GLOBALS['phpgw_info']['user']['account_id'];
- $entity->status =
eventplanner_vendor_report::STATUS_REGISTERED;
$entity->secret = self::generate_secret();
}
}
Modified: branches/dev-syncromind-2/eventplanner/js/portico/application.edit.js
===================================================================
--- branches/dev-syncromind-2/eventplanner/js/portico/application.edit.js
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/js/portico/application.edit.js
2017-01-25 08:38:31 UTC (rev 16188)
@@ -20,7 +20,14 @@
{
return;
}
+ var id = $("#application_id").val();
+ if (id > 0)
+ {
+ document.form.submit();
+ return;
+ }
+
if (active_tab === 'first_tab')
{
$('#tab-content').responsiveTabs('activate', 1);
@@ -143,6 +150,8 @@
check_button_names = function ()
{
var tab = $("#active_tab").val();
+ var id = $("#application_id").val();
+
if (tab === 'calendar')
{
$("#floating-box").hide();
@@ -150,8 +159,16 @@
}
else if (tab === 'first_tab')
{
- $("#save_button").val(lang['next']);
- $("#save_button_bottom").val(lang['next']);
+ if (id > 0)
+ {
+ $("#save_button").val(lang['save']);
+ $("#save_button_bottom").val(lang['save']);
+ }
+ else
+ {
+ $("#save_button").val(lang['next']);
+ $("#save_button_bottom").val(lang['next']);
+ }
$("#floating-box").show();
$("#submit_group_bottom").show();
}
@@ -214,7 +231,7 @@
var requestUrl = phpGWLink('index.php', oArgs, true);
var htmlString = '';
$("#receipt").html("");
- var data = {from_: from_, active: 1};
+ var data = {from_: from_, active: 1};
JqueryPortico.execute_ajax(requestUrl,
function (result)
@@ -223,12 +240,23 @@
{
$("#from_").val('');
htmlString += "<div class=\"msg_good\">";
+ htmlString += result.msg;
}
else
{
htmlString += "<div class=\"error\">";
+ var msg = result.msg;
+ if (typeof (msg) == 'object')
+ {
+ htmlString += msg['error'][0]['msg'];
+ }
+ else
+ {
+ htmlString += result.msg;
+ }
}
- htmlString += result.msg;
+
+
htmlString += '</div>';
$("#receipt").html(htmlString);
@@ -235,7 +263,7 @@
JqueryPortico.updateinlineTableHelper('datatable-container_1');
}, data, "POST", "json"
- );
+ );
};
@@ -273,7 +301,7 @@
JqueryPortico.updateinlineTableHelper('datatable-container_1');
}, data, "POST", "json"
- );
+ );
};
@@ -332,12 +360,21 @@
{
$("#from_").val('');
htmlString += "<div
class=\"msg_good\">";
+ htmlString += result.msg;
}
else
{
htmlString += "<div class=\"error\">";
+ var msg = result.msg;
+ if (typeof (msg) == 'object')
+ {
+ htmlString +=
msg['error'][0]['msg'];
+ }
+ else
+ {
+ htmlString += result.msg;
+ }
}
- htmlString += result.msg;
htmlString += '</div>';
$("#receipt").html(htmlString);
@@ -344,6 +381,6 @@
JqueryPortico.updateinlineTableHelper('datatable-container_1');
}, data, "POST", "json"
- );
+ );
}
};
Copied: branches/dev-syncromind-2/eventplanner/js/portico/events.index.js (from
rev 16187, trunk/eventplanner/js/portico/events.index.js)
===================================================================
--- branches/dev-syncromind-2/eventplanner/js/portico/events.index.js
(rev 0)
+++ branches/dev-syncromind-2/eventplanner/js/portico/events.index.js
2017-01-25 08:38:31 UTC (rev 16188)
@@ -0,0 +1,4 @@
+function requestWithVendorFilter(request)
+{
+ return request + '&organization_number=1';
+}
Modified: branches/dev-syncromind-2/eventplanner/setup/phpgw_no.lang
===================================================================
--- branches/dev-syncromind-2/eventplanner/setup/phpgw_no.lang 2017-01-24
15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/setup/phpgw_no.lang 2017-01-25
08:38:31 UTC (rev 16188)
@@ -7,6 +7,7 @@
list eventplanner no Liste
general eventplanner no Generell
dates eventplanner no Datoer
+event dates eventplanner no Arrangement-dato
custom attributes eventplanner no Egendefinerte attributter
no category eventplanner no Kategori ikke valgt
time created eventplanner no Tidsstempel
@@ -21,28 +22,34 @@
rejected eventplanner no Avvist
approved eventplanner no Godkjent
vendor eventplanner no Utøver
+vendor name eventplanner no Navn på utøver/utøvergruppe
+vendor description eventplanner no Beskrivelse av utøver
new eventplanner no Ny
show eventplanner no vis
history eventplanner no Historikk
-date start eventplanner no Første dato
-date end eventplanner no Siste dato
-contact name eventplanner no Kontaktperson
+date start eventplanner no Første arrangementsdato
+date end eventplanner no Siste arrangementsdato
+contact name eventplanner no Navn kontaktperson
contact email eventplanner no Epost kontaktperson
contact phone eventplanner no Tlf. kontaktperson
case officer eventplanner no Saksbehandler
active eventplanner no Aktiv
+inactive eventplanner no Inaktiv
select eventplanner no Velg
remark eventplanner no Merknad
comment eventplanner no Kommentar
demands eventplanner no Forutsetning
payment eventplanner no Betaling
-labour support eventplanner no Personellstøtte
+labour support eventplanner no Opprigging/nedrigging
+rig up min before eventplanner no Antatt oppriggingstid
+rig down min after eventplanner no Antatt nedriggingstid
technical support eventplanner no Teknisk støtte
-charge per unit eventplanner no betaling pr stk
-timespan eventplanner no Varighet (min.)
+charge per unit eventplanner no Betaling pr
forestilling/kurs/omvisning
+event timespan eventplanner no Programvarighet (minutter)
number of units eventplanner no Antall arrangement
integer eventplanner no Heltall
-total amount eventplanner no Sum
+total amount eventplanner no Søknadssum
+number of granted events eventplanner no Antall innvilgede
arrangementer
created eventplanner no Registrert
modified eventplanner no Endret
id eventplanner no Id
@@ -56,15 +63,18 @@
other participants eventplanner no Navn på andre medvirkende (+
rolle)
arena requirement eventplanner no Krav til lokale
stage eventplanner no Scene
+size of stage eventplanner no Scenestørrelse
stage requirement eventplanner no Krav til scene
width eventplanner no Bredde
depth eventplanner no Dybde
-wardrobe eventplanner no Garderobe
+wardrobe eventplanner no Kryss av for behov for utøvergarderobe
audience limit eventplanner no Maksimum antall publikum
-raider eventplanner no Raider
+raider eventplanner no Andre raiderønsker – (valgfri)
vendor report eventplanner no Utøverrapport
calendar eventplanner no Kalender
from eventplanner no Fra
+event start eventplanner no Ønsket arrangement dato/tid
+select event start eventplanner no Klikk på og velg ønsket måned,
dato og klokkeslett
select all eventplanner no Velg alle
enable eventplanner no Aktiver
disable eventplanner no Deaktiver
@@ -71,4 +81,27 @@
reports eventplanner no Rapporter
location eventplanner no Lokalisering
who eventplanner no Hvem
-note eventplanner no Merknad
\ No newline at end of file
+note eventplanner no Merknad
+customer eventplanner no Mottakersted
+customer report eventplanner no Rapport fra mottakersted
+organization number eventplanner no Organisasjonsnummer
+program type eventplanner no Programtype
+program title eventplanner no Programtittel
+program description eventplanner no Programbeskrivelse
+zip code eventplanner no Postnummer
+city eventplanner no Sted
+address eventplanner no Adresse
+account number eventplanner no Kontonummer
+history eventplanner no Endringslogg
+user eventplanner no Bruker
+proceedings eventplanner no Saksbehandling
+maximum of granted events are reached eventplanner no Maksimalt
antall arrangement er nådd
+did not validate eventplanner no Feil med datasettet
+date is outside the scope eventplanner no Dato ligger utenfor
tillat tidsrom
+can not delete booking with customer eventplanner no Kan ikke slette
booking som er koplet med mottakersted
+report eventplanner no Rapport
+events eventplanner no Arrangementer
+event eventplanner no Arrangement
+please enter a valid organization number eventplanner no Angi et
gyldig organisasjonsnummer
+please enter a valid account number eventplanner no Angi et gyldig
kontonummer
+program data eventplanner no Om programmet
\ No newline at end of file
Modified: branches/dev-syncromind-2/eventplanner/setup/setup.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/setup/setup.inc.php 2017-01-24
15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/setup/setup.inc.php 2017-01-25
08:38:31 UTC (rev 16188)
@@ -11,7 +11,7 @@
* @version $Id: setup.inc.php 14728 2016-02-11 22:28:46Z sigurdne $
*/
$setup_info['eventplanner']['name'] = 'eventplanner';
- $setup_info['eventplanner']['version'] = '0.9.18.002';
+ $setup_info['eventplanner']['version'] = '0.9.18.004';
$setup_info['eventplanner']['app_order'] = 20;
$setup_info['eventplanner']['enable'] = 1;
$setup_info['eventplanner']['app_group'] = 'office';
@@ -68,6 +68,7 @@
/* The hooks this app includes, needed for hooks registration */
$setup_info['eventplanner']['hooks'] = array(
+ 'config',
'manual',
'settings',
'help',
Modified: branches/dev-syncromind-2/eventplanner/setup/tables_current.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/setup/tables_current.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/setup/tables_current.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -38,9 +38,7 @@
'description' => array('type' => 'text',
'nullable' => False),
'remark' => array('type' => 'text', 'nullable'
=> True),
'secret' => array('type' => 'text', 'nullable'
=> False),
- 'vendor_identifier_type' => array('type' =>
'varchar', 'precision' => '255','nullable' => True),
- 'vendor_organization_number' => array('type' =>
'varchar', 'precision' => '9','nullable' => True),
- 'vendor_ssn' => array('type' => 'varchar',
'precision' => '12', 'nullable' => True),
+ 'organization_number' => array('type' =>
'varchar', 'precision' => '9','nullable' => True),
'created' => array('type' => 'int', 'precision'
=> '8', 'nullable' => False, 'default' => 'current_timestamp'),
'modified' => array('type' => 'int',
'precision' => '8', 'nullable' => False, 'default' => 'current_timestamp'),
'json_representation' => array('type' =>
'jsonb', 'nullable' => true),
@@ -95,9 +93,7 @@
'description' => array('type' => 'text',
'nullable' => False),
'remark' => array('type' => 'text', 'nullable'
=> True),
'secret' => array('type' => 'text', 'nullable'
=> False),
- 'customer_identifier_type' => array('type' =>
'varchar', 'precision' => '255','nullable' => True),
- 'customer_organization_number' => array('type'
=> 'varchar', 'precision' => '9','nullable' => True),
- 'customer_ssn' => array('type' => 'varchar',
'precision' => '12', 'nullable' => True),
+ 'organization_number' => array('type' =>
'varchar', 'precision' => '9','nullable' => True),
'created' => array('type' => 'int', 'precision'
=> '8', 'nullable' => False, 'default' => 'current_timestamp'),
'modified' => array('type' => 'int',
'precision' => '8', 'nullable' => False, 'default' => 'current_timestamp'),
'json_representation' => array('type' =>
'jsonb', 'nullable' => true),
@@ -138,6 +134,7 @@
'date_start' => array('type' => 'int',
'precision' => '8', 'nullable' => False),
'date_end' => array('type' => 'int',
'precision' => '8', 'nullable' => False),
'modified' => array('type' => 'int',
'precision' => '8', 'nullable' => False),
+ 'num_granted_events' => array('type' => 'int',
'precision' => '4', 'nullable' => True,'default' => '0'),
'frontend_modified' => array('type' => 'int',
'precision' => '8', 'nullable' => True),
'other_participants' => array('type' => 'text',
'nullable' => True),
'title' => array('type' => 'text', 'nullable'
=> False),
Modified: branches/dev-syncromind-2/eventplanner/setup/tables_update.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/setup/tables_update.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/setup/tables_update.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -43,3 +43,40 @@
}
return $GLOBALS['setup_info']['eventplanner']['currentver'];
}
+
+ $test[] = '0.9.18.002';
+
+ function eventplanner_upgrade0_9_18_002()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_application',
'num_granted_events', array(
+ 'type' => 'int', 'precision' => 4, 'nullable' =>
True,'default' => 0));
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['eventplanner']['currentver'] =
'0.9.18.003';
+ }
+ return $GLOBALS['setup_info']['eventplanner']['currentver'];
+ }
+
+ $test[] = '0.9.18.003';
+
+ function eventplanner_upgrade0_9_18_003()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
$GLOBALS['phpgw_setup']->oProc->RenameColumn('eventplanner_vendor',
'vendor_organization_number', 'organization_number');
+
$GLOBALS['phpgw_setup']->oProc->RenameColumn('eventplanner_customer',
'customer_organization_number', 'organization_number');
+
+
$GLOBALS['phpgw_setup']->oProc->DropColumn('eventplanner_vendor', array(),
'vendor_identifier_type');
+
$GLOBALS['phpgw_setup']->oProc->DropColumn('eventplanner_vendor', array(),
'vendor_ssn');
+
$GLOBALS['phpgw_setup']->oProc->DropColumn('eventplanner_customer', array(),
'customer_identifier_type');
+
$GLOBALS['phpgw_setup']->oProc->DropColumn('eventplanner_customer', array(),
'customer_ssn');
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['eventplanner']['currentver'] =
'0.9.18.004';
+ }
+ return $GLOBALS['setup_info']['eventplanner']['currentver'];
+ }
Modified: branches/dev-syncromind-2/eventplanner/templates/base/application.xsl
===================================================================
--- branches/dev-syncromind-2/eventplanner/templates/base/application.xsl
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/templates/base/application.xsl
2017-01-25 08:38:31 UTC (rev 16188)
@@ -46,13 +46,29 @@
<xsl:value-of
disable-output-escaping="yes" select="tabs"/>
<div id="floating-box">
<div id="submitbox">
+ <xsl:variable
name="lang_cancel">
+ <xsl:value-of
select="php:function('lang', 'cancel')"/>
+ </xsl:variable>
+ <xsl:variable
name="lang_save">
+ <xsl:value-of
select="php:function('lang', 'next')"/>
+ </xsl:variable>
+ <!--xsl:choose>
+ <xsl:when
test="application/id > 0">
+
<xsl:variable name="lang_save">
+
<xsl:value-of select="php:function('lang', 'save')"/>
+
</xsl:variable>
+ </xsl:when>
+ <xsl:otherwise>
+
<xsl:variable name="lang_save">
+
<xsl:value-of select="php:function('lang', 'next')"/>
+
</xsl:variable>
+ </xsl:otherwise>
+ </xsl:choose-->
+
<table width="200px">
<tbody>
<tr>
<td width="200px">
-
<xsl:variable name="lang_save">
-
<xsl:value-of select="php:function('lang', 'next')"/>
-
</xsl:variable>
<input type="button" class="pure-button pure-button-primary"
name="save" id="save_button" onClick="validate_submit();">
<xsl:attribute name="value">
<xsl:value-of select="$lang_save"/>
@@ -63,9 +79,6 @@
</input>
</td>
<td>
-
<xsl:variable name="lang_cancel">
-
<xsl:value-of select="php:function('lang', 'cancel')"/>
-
</xsl:variable>
<input type="button" class="pure-button pure-button-primary"
name="done" value="{$lang_cancel}" onClick="window.location = '{cancel_url}';">
<xsl:attribute name="title">
<xsl:value-of select="php:function('lang', 'Back to the
ticket list')"/>
@@ -80,6 +93,9 @@
<input type="hidden" id="active_tab"
name="active_tab" value="{value_active_tab}"/>
<div id="first_tab">
<fieldset>
+ <legend>
+ <xsl:value-of
select="php:function('lang', 'application')"/>
+ </legend>
<xsl:if
test="application/id > 0">
<div
class="pure-control-group">
<label>
@@ -97,7 +113,7 @@
</div>
<div
class="pure-control-group">
<xsl:variable
name="lang_vendor">
-
<xsl:value-of select="php:function('lang', 'vendor')"/>
+
<xsl:value-of select="php:function('lang', 'vendor name')"/>
</xsl:variable>
<label>
<xsl:value-of select="$lang_vendor"/>
@@ -124,37 +140,13 @@
<xsl:text>
</xsl:text>
<a
href="{new_vendor_url}" target="_blank">
<xsl:value-of select="php:function('lang', 'new')"/>
+
<xsl:text> </xsl:text>
+
<xsl:value-of select="php:function('lang', 'vendor')"/>
</a>
<div
id="vendor_container"/>
</div>
<div
class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'other participants')"/>
- </label>
- <textarea
cols="47" rows="7" name="other_participants">
-
<xsl:value-of select="application/other_participants"/>
- </textarea>
- </div>
- <div
class="pure-control-group">
- <label>
-
<xsl:value-of select="php:function('lang', 'active')"/>
- </label>
- <input
type="checkbox" name="active" id="active" value="1">
- <xsl:if
test="application/active = 1">
-
<xsl:attribute name="checked" value="checked"/>
-
</xsl:if>
- </input>
- </div>
- <div
class="pure-control-group">
- <label>
-
<xsl:value-of select="php:function('lang', 'case officer')"/>
- </label>
- <select
id="case_officer_id" name="case_officer_id">
-
<xsl:apply-templates select="list_case_officer/options"/>
- </select>
- </div>
- <div
class="pure-control-group">
- <label>
<xsl:value-of select="php:function('lang', 'contact name')"/>
</label>
<input
type="text" id="contact_name" name="contact_name"
value="{application/contact_name}">
@@ -204,8 +196,48 @@
</div>
<div
class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'type')"/>
+
<xsl:value-of select="php:function('lang', 'other participants')"/>
</label>
+ <textarea
cols="47" rows="7" name="other_participants">
+
<xsl:value-of select="application/other_participants"/>
+ </textarea>
+ </div>
+ </fieldset>
+ <fieldset>
+ <legend>
+ <xsl:value-of
select="php:function('lang', 'program data')"/>
+ </legend>
+ <div
class="pure-control-group">
+ <label>
+
<xsl:value-of select="php:function('lang', 'program title')"/>
+ </label>
+ <input
type="text" id="title" name="title" value="{application/title}">
+
<xsl:attribute name="data-validation">
+
<xsl:text>required</xsl:text>
+
</xsl:attribute>
+
<xsl:attribute name="data-validation-error-msg">
+
<xsl:value-of select="php:function('lang', 'program title')"/>
+
</xsl:attribute>
+
<xsl:attribute name="placeholder">
+
<xsl:value-of select="php:function('lang', 'program title')"/>
+
</xsl:attribute>
+ </input>
+ </div>
+ <div
class="pure-control-group">
+ <label>
+
<xsl:value-of select="php:function('lang', 'program description')"/>
+ </label>
+ <textarea
cols="47" rows="7" name="description">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'might be published')"/>
+
</xsl:attribute>
+
<xsl:value-of select="application/description"/>
+ </textarea>
+ </div>
+ <div
class="pure-control-group">
+ <label>
+
<xsl:value-of select="php:function('lang', 'program type')"/>
+ </label>
<div
class="pure-custom">
<table
class="pure-table pure-table-bordered" border="0" cellspacing="2"
cellpadding="2">
<thead>
@@ -214,7 +246,7 @@
<xsl:value-of select="php:function('lang', 'select')"/>
</th>
<th>
-
<xsl:value-of select="php:function('lang', 'type')"/>
+
<xsl:value-of select="php:function('lang', 'program
type')"/>
</th>
</tr>
</thead>
@@ -238,30 +270,8 @@
</div>
</div>
+
<div
class="pure-control-group">
- <xsl:variable
name="lang_status">
-
<xsl:value-of select="php:function('lang', 'status')"/>
- </xsl:variable>
- <label>
-
<xsl:value-of select="$lang_status"/>
- </label>
- <select
name="status">
-
<xsl:attribute name="title">
-
<xsl:value-of select="$lang_status"/>
-
</xsl:attribute>
-
<!--xsl:attribute name="data-validation">
-
<xsl:text>required</xsl:text>
-
</xsl:attribute>
-
<xsl:attribute name="data-validation-error-msg">
-
<xsl:value-of select="$lang_status"/>
-
</xsl:attribute-->
- <option
value="">
-
<xsl:value-of select="$lang_status"/>
-
</option>
-
<xsl:apply-templates select="status_list/options"/>
- </select>
- </div>
- <div
class="pure-control-group">
<xsl:variable
name="lang_date_start">
<xsl:value-of select="php:function('lang', 'date start')"/>
</xsl:variable>
@@ -307,7 +317,7 @@
</div>
<div
class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'timespan')"/>
+
<xsl:value-of select="php:function('lang', 'event timespan')"/>
</label>
<input
type="text" id="timespan" name="timespan" value="{application/timespan}">
<xsl:attribute name="data-validation">
@@ -314,10 +324,10 @@
<xsl:text>number</xsl:text>
</xsl:attribute>
<xsl:attribute name="data-validation-error-msg">
-
<xsl:value-of select="php:function('lang', 'timespan')"/>
+
<xsl:value-of select="php:function('lang', 'event timespan')"/>
</xsl:attribute>
<xsl:attribute name="placeholder">
-
<xsl:value-of select="php:function('lang', 'timespan')"/>
+
<xsl:value-of select="php:function('lang', 'event timespan')"/>
</xsl:attribute>
</input>
@@ -362,40 +372,69 @@
</label>
<input
id="total_amount" type="text" disabled="disabled"/>
</div>
+
<div
class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'title')"/>
+
<xsl:value-of select="php:function('lang', 'remark')"/>
</label>
- <input
type="text" id="title" name="title" value="{application/title}">
-
<xsl:attribute name="data-validation">
-
<xsl:text>required</xsl:text>
-
</xsl:attribute>
-
<xsl:attribute name="data-validation-error-msg">
-
<xsl:value-of select="php:function('lang', 'title')"/>
-
</xsl:attribute>
-
<xsl:attribute name="placeholder">
-
<xsl:value-of select="php:function('lang', 'title')"/>
-
</xsl:attribute>
+ <textarea
cols="47" rows="7" name="remark">
+
<xsl:value-of select="application/remark"/>
+ </textarea>
+ </div>
+ </fieldset>
+ <fieldset>
+ <legend>
+ <xsl:value-of
select="php:function('lang', 'proceedings')"/>
+ </legend>
+
+ <div
class="pure-control-group">
+ <label>
+
<xsl:value-of select="php:function('lang', 'case officer')"/>
+ </label>
+ <select
id="case_officer_id" name="case_officer_id">
+
<xsl:apply-templates select="list_case_officer/options"/>
+ </select>
+ </div>
+ <div
class="pure-control-group">
+ <label>
+
<xsl:value-of select="php:function('lang', 'active')"/>
+ </label>
+ <input
type="checkbox" name="active" id="active" value="1">
+ <xsl:if
test="application/active = 1">
+
<xsl:attribute name="checked" value="checked"/>
+
</xsl:if>
</input>
</div>
+
<div
class="pure-control-group">
+ <xsl:variable
name="lang_status">
+
<xsl:value-of select="php:function('lang', 'status')"/>
+ </xsl:variable>
<label>
-
<xsl:value-of select="php:function('lang', 'description')"/>
+
<xsl:value-of select="$lang_status"/>
</label>
- <textarea
cols="47" rows="7" name="description">
+ <select
name="status">
<xsl:attribute name="title">
-
<xsl:value-of select="php:function('lang', 'might be published')"/>
+
<xsl:value-of select="$lang_status"/>
</xsl:attribute>
-
<xsl:value-of select="application/description"/>
- </textarea>
+
<!--xsl:attribute name="data-validation">
+
<xsl:text>required</xsl:text>
+
</xsl:attribute>
+
<xsl:attribute name="data-validation-error-msg">
+
<xsl:value-of select="$lang_status"/>
+
</xsl:attribute-->
+ <option
value="">
+
<xsl:value-of select="$lang_status"/>
+
</option>
+
<xsl:apply-templates select="status_list/options"/>
+ </select>
</div>
<div
class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'remark')"/>
+
<xsl:value-of select="php:function('lang', 'number of granted events')"/>
</label>
- <textarea
cols="47" rows="7" name="remark">
-
<xsl:value-of select="application/remark"/>
- </textarea>
+ <input
type="text" id="num_granted_events" name="num_granted_events"
value="{application/num_granted_events}">
+ </input>
</div>
<div
class="pure-control-group">
<label>
@@ -433,7 +472,7 @@
<div
class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'stage')"/>
+
<xsl:value-of select="php:function('lang', 'size of stage')"/>
</label>
<input
type="text" id="stage_width" name="stage_width"
value="{application/stage_width}" size="2">
<xsl:attribute name="title">
@@ -503,7 +542,6 @@
<div
class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'support')"/>
</label>
<div
class="pure-custom">
<table
class="pure-table pure-table-bordered" border="0" cellspacing="2"
cellpadding="2">
@@ -510,27 +548,16 @@
<thead>
<tr>
<th></th>
-
<th>minutt før</th>
-
<th>Antall personer</th>
-
<th>minutt etter</th>
+
<th>Minutt</th>
</tr>
</thead>
<tbody>
<tr>
-
<td>Hjelp til opprigging</td>
<td>
-
<input type="text" id="rig_up_min_before"
name="rig_up_min_before" value="{application/rig_up_min_before}" size="3">
-
<xsl:attribute name="data-validation">
-
<xsl:text>number</xsl:text>
-
</xsl:attribute>
-
<xsl:attribute name="data-validation-optional">
-
<xsl:text>true</xsl:text>
-
</xsl:attribute>
-
</input>
+
<xsl:value-of select="php:function('lang', 'rig up min
before')"/>
</td>
-
<td>
-
<input type="text" id="rig_up_num_person"
name="rig_up_num_person" value="{application/rig_up_num_person}" size="3">
+
<input type="text" id="rig_up_min_before"
name="rig_up_min_before" value="{application/rig_up_min_before}" size="3">
<xsl:attribute name="data-validation">
<xsl:text>number</xsl:text>
</xsl:attribute>
@@ -539,43 +566,12 @@
</xsl:attribute>
</input>
</td>
-
<td>
-
</td>
</tr>
<tr>
-
<td>Hjelp undervegs i arrangement</td>
<td>
+
<xsl:value-of select="php:function('lang', 'rig down
min after')"/>
</td>
-
<td>
-
<input type="text" id="during_num_person"
name="during_num_person" value="{application/during_num_person}" size="3">
-
<xsl:attribute name="data-validation">
-
<xsl:text>number</xsl:text>
-
</xsl:attribute>
-
<xsl:attribute name="data-validation-optional">
-
<xsl:text>true</xsl:text>
-
</xsl:attribute>
-
</input>
-
</td>
-
<td>
-
</td>
-
</tr>
-
<tr>
-
<td>Hjelp til nedrigging</td>
-
<td>
-
</td>
-
-
<td>
-
<input type="text" id="rig_down_num_person"
name="rig_down_num_person" value="{application/rig_down_num_person}" size="3">
-
<xsl:attribute name="data-validation">
-
<xsl:text>number</xsl:text>
-
</xsl:attribute>
-
<xsl:attribute name="data-validation-optional">
-
<xsl:text>true</xsl:text>
-
</xsl:attribute>
-
</input>
-
</td>
-
<td>
<input type="text" id="rig_down_min_after"
name="rig_down_min_after" value="{application/rig_down_min_after}" size="3">
<xsl:attribute name="data-validation">
<xsl:text>number</xsl:text>
@@ -597,7 +593,6 @@
</legend>
<div
class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'support')"/>
</label>
<div
class="pure-custom">
<table
class="pure-table pure-table-bordered" border="0" cellspacing="2"
cellpadding="2">
@@ -604,7 +599,7 @@
<thead>
<tr>
<th>Hva</th>
-
<th>Ja/Nei</th>
+
<th>Ja</th>
<th>Fritekst</th>
</tr>
</thead>
@@ -687,7 +682,6 @@
</legend>
<div
class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'raider')"/>
</label>
<textarea
cols="47" rows="7" name="raider">
<xsl:value-of select="application/raider"/>
@@ -697,7 +691,7 @@
</div>
<div id='calendar'>
<fieldset>
-
+
<div
class="pure-control-group">
<label>
<xsl:value-of select="php:function('lang', 'date start')"/>
@@ -716,7 +710,7 @@
</div>
<div
class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'timespan')"/>
+
<xsl:value-of select="php:function('lang', 'event timespan')"/>
</label>
<xsl:if
test="application/date_end != 0 and application/timespan != ''">
<xsl:value-of select="application/timespan"/>
@@ -725,9 +719,12 @@
<div
class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'from')"/>
+
<xsl:value-of select="php:function('lang', 'event start')"/>
</label>
<input
type="text" id="from_" name="from_" size="16" readonly="readonly">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'select event start')"/>
+
</xsl:attribute>
</input>
</div>
<!--div
class="pure-control-group">
@@ -740,7 +737,7 @@
<div
class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'dates')"/>
+
<xsl:value-of select="php:function('lang', 'event dates')"/>
</label>
<div
class="pure-custom">
<xsl:for-each select="datatable_def">
Modified:
branches/dev-syncromind-2/eventplanner/templates/base/application_info.xsl
===================================================================
--- branches/dev-syncromind-2/eventplanner/templates/base/application_info.xsl
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/templates/base/application_info.xsl
2017-01-25 08:38:31 UTC (rev 16188)
@@ -11,7 +11,7 @@
</div>
<div class="pure-control-group">
<label>
- <xsl:value-of select="php:function('lang',
'application')"/>
+ <xsl:value-of select="php:function('lang', 'event')"/>
</label>
<xsl:value-of select="application/title"/>
</div>
@@ -44,7 +44,7 @@
</div>
<div class="pure-control-group">
<label>
- <xsl:value-of select="php:function('lang', 'type')"/>
+ <xsl:value-of select="php:function('lang', 'program
type')"/>
</label>
<div class="pure-custom">
<table class="pure-table pure-table-bordered"
border="0" cellspacing="2" cellpadding="2">
@@ -51,29 +51,30 @@
<thead>
<tr>
<th>
- <xsl:value-of
select="php:function('lang', 'select')"/>
+ <xsl:value-of
select="php:function('lang', 'program type')"/>
</th>
- <th>
- <xsl:value-of
select="php:function('lang', 'type')"/>
- </th>
</tr>
</thead>
<tbody>
<xsl:for-each
select="application_type_list">
- <tr>
- <td>
- <xsl:if
test="selected = 1">
-
<xsl:text>X</xsl:text>
- </xsl:if>
- </td>
- <td>
- <xsl:value-of
disable-output-escaping="yes" select="name"/>
- </td>
- </tr>
+ <xsl:if test="selected = 1">
+ <tr>
+ <td>
+
<xsl:value-of disable-output-escaping="yes" select="name"/>
+ </td>
+ </tr>
+ </xsl:if>
</xsl:for-each>
</tbody>
</table>
</div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of select="php:function('lang',
'event timespan')"/>
+ </label>
+ <xsl:value-of select="application/timespan"/>
+ </div>
+
</div>
</xsl:template>
Modified: branches/dev-syncromind-2/eventplanner/templates/base/booking.xsl
===================================================================
--- branches/dev-syncromind-2/eventplanner/templates/base/booking.xsl
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/templates/base/booking.xsl
2017-01-25 08:38:31 UTC (rev 16188)
@@ -99,7 +99,7 @@
<div class="pure-control-group">
<label>
<a
href="{application_url}" target="_blank">
-
<xsl:value-of select="php:function('lang', 'application')"/>
+
<xsl:value-of select="lang_application"/>
</a>
</label>
@@ -134,7 +134,7 @@
</div>
<div class="pure-control-group">
<label>
- <xsl:value-of
select="php:function('lang', 'type')"/>
+ <xsl:value-of
select="php:function('lang', 'program type')"/>
</label>
<div
class="pure-custom">
<table
class="pure-table pure-table-bordered" border="0" cellspacing="2"
cellpadding="2">
@@ -141,25 +141,19 @@
<thead>
<tr>
<th>
-
<xsl:value-of select="php:function('lang', 'select')"/>
+
<xsl:value-of select="php:function('lang', 'program type')"/>
</th>
-
<th>
-
<xsl:value-of select="php:function('lang', 'type')"/>
-
</th>
</tr>
</thead>
<tbody>
<xsl:for-each select="application_type_list">
-
<tr>
-
<td>
-
<xsl:if test="selected = 1">
-
<xsl:text>X</xsl:text>
-
</xsl:if>
-
</td>
-
<td>
-
<xsl:value-of disable-output-escaping="yes"
select="name"/>
-
</td>
-
</tr>
+
<xsl:if test="selected = 1">
+
<tr>
+
<td>
+
<xsl:value-of disable-output-escaping="yes"
select="name"/>
+
</td>
+
</tr>
+
</xsl:if>
</xsl:for-each>
</tbody>
</table>
@@ -166,10 +160,6 @@
</div>
</div>
-
-
-
-
</fieldset>
<fieldset>
@@ -233,7 +223,7 @@
<xsl:text>required</xsl:text>
</xsl:attribute>
<xsl:attribute
name="placeholder">
-
<xsl:value-of select="php:function('lang', 'contact_name')"/>
+
<xsl:value-of select="php:function('lang', 'contact name')"/>
</xsl:attribute>
</input>
</div>
@@ -267,7 +257,7 @@
<xsl:text>required</xsl:text>
</xsl:attribute>
<xsl:attribute
name="placeholder">
-
<xsl:value-of select="php:function('lang', 'contact_phone')"/>
+
<xsl:value-of select="php:function('lang', 'contact phone')"/>
</xsl:attribute>
</input>
</div>
@@ -323,7 +313,7 @@
</div>
<div class="pure-control-group">
<label>
- <xsl:value-of
select="php:function('lang', 'timespan')"/>
+ <xsl:value-of
select="php:function('lang', 'event timespan')"/>
</label>
<xsl:value-of
select="application/timespan"/>
</div>
@@ -364,7 +354,7 @@
</div>
<div class="pure-control-group">
<label>
- <xsl:value-of
select="php:function('lang', 'details')"/>
+ <xsl:value-of
select="php:function('lang', 'history')"/>
</label>
<div
class="pure-custom">
<xsl:for-each
select="datatable_def">
Modified: branches/dev-syncromind-2/eventplanner/templates/base/config.tpl
===================================================================
--- branches/dev-syncromind-2/eventplanner/templates/base/config.tpl
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/templates/base/config.tpl
2017-01-25 08:38:31 UTC (rev 16188)
@@ -1,30 +1,35 @@
<!-- BEGIN header -->
<form method="POST" action="{action_url}">
<table class="pure-table pure-table-bordered">
- <!--
- <tr class="th">
+ <tr class="th">
<td colspan="2"><font
color="{th_text}"> <b>{title}</b></font></td>
- </tr>
- -->
+ </tr>
<!-- END header -->
<!-- BEGIN body -->
+ <tr>
+ <td>{lang_default_application_category}:</td>
+ <td>
+ <select
name="newsettings[default_application_category]">
+ {hook_default_application_category}
+ </select>
+ </td>
+ </tr>
<!-- END body -->
<!-- BEGIN footer -->
- <!--
- <tr class="th">
+
+ <tr class="th">
<td colspan="2">
-
+
</td>
- </tr>
+ </tr>
- <tr>
+ <tr>
<td colspan="2" align="center">
- <input type="submit" name="submit"
value="{lang_submit}">
- <input type="submit" name="cancel"
value="{lang_cancel}">
+ <input type="submit" name="submit"
value="{lang_submit}">
+ <input type="submit" name="cancel"
value="{lang_cancel}">
</td>
- </tr>
- -->
+ </tr>
</table>
</form>
<!-- END footer -->
Modified: branches/dev-syncromind-2/eventplanner/templates/base/customer.xsl
===================================================================
--- branches/dev-syncromind-2/eventplanner/templates/base/customer.xsl
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/templates/base/customer.xsl
2017-01-25 08:38:31 UTC (rev 16188)
@@ -26,7 +26,7 @@
<div>
<script type="text/javascript">
- var lang = <xsl:value-of
select="php:function('js_lang', 'Name or company is required')"/>;
+ var lang = <xsl:value-of
select="php:function('js_lang', 'Name or company is required', 'please enter a
valid organization number', 'please enter a valid account number')"/>;
</script>
<form id="form" name="form" method="post"
action="{$form_action}" class="pure-form pure-form-aligned">
<div id="tab-content">
@@ -88,10 +88,12 @@
</div>
<div class="pure-control-group">
<xsl:variable
name="lang_address_1">
- <xsl:value-of
select="php:function('lang', 'address_1')"/>
+ <xsl:value-of
select="php:function('lang', 'address')"/>
+ <xsl:text>
1</xsl:text>
</xsl:variable>
<xsl:variable
name="lang_address_2">
- <xsl:value-of
select="php:function('lang', 'address_2')"/>
+ <xsl:value-of
select="php:function('lang', 'address')"/>
+ <xsl:text>
2</xsl:text>
</xsl:variable>
<label>
<xsl:value-of
select="php:function('lang', 'address')"/>
@@ -113,7 +115,7 @@
</div>
<div class="pure-control-group">
<label>
- <xsl:value-of
select="php:function('lang', 'postal_code_place')"/>
+ <xsl:value-of
select="php:function('lang', 'zip code')"/>
</label>
<input type="text"
name="zip_code" value="{customer/zip_code}">
<xsl:attribute
name="data-validation">
@@ -120,7 +122,7 @@
<xsl:text>required</xsl:text>
</xsl:attribute>
<xsl:attribute
name="placeholder">
-
<xsl:value-of select="php:function('lang', 'zip_code')"/>
+
<xsl:value-of select="php:function('lang', 'zip code')"/>
</xsl:attribute>
</input>
<input type="text"
name="city" value="{customer/city}">
@@ -134,14 +136,17 @@
</div>
<div class="pure-control-group">
<label>
- <xsl:value-of
select="php:function('lang', 'customer_organization_number')"/>
+ <xsl:value-of
select="php:function('lang', 'organization number')"/>
</label>
- <input type="text"
id="lastname" name="customer_organization_number"
value="{customer/customer_organization_number}">
+ <input type="text"
id="organization_number" name="organization_number"
value="{customer/organization_number}">
<xsl:attribute
name="data-validation">
-
<xsl:text>required</xsl:text>
+
<xsl:text>organization_number</xsl:text>
</xsl:attribute>
+ <xsl:attribute
name="data-validation-optional">
+
<xsl:text>true</xsl:text>
+ </xsl:attribute>
<xsl:attribute
name="placeholder">
-
<xsl:value-of select="php:function('lang', 'customer_organization_number')"/>
+
<xsl:value-of select="php:function('lang', 'organization number')"/>
</xsl:attribute>
</input>
</div>
@@ -154,7 +159,7 @@
<xsl:text>required</xsl:text>
</xsl:attribute>
<xsl:attribute
name="placeholder">
-
<xsl:value-of select="php:function('lang', 'contact_name')"/>
+
<xsl:value-of select="php:function('lang', 'contact name')"/>
</xsl:attribute>
</input>
</div>
@@ -188,20 +193,23 @@
<xsl:text>required</xsl:text>
</xsl:attribute>
<xsl:attribute
name="placeholder">
-
<xsl:value-of select="php:function('lang', 'contact_phone')"/>
+
<xsl:value-of select="php:function('lang', 'contact phone')"/>
</xsl:attribute>
</input>
</div>
<div class="pure-control-group">
<label>
- <xsl:value-of
select="php:function('lang', 'account_number')"/>
+ <xsl:value-of
select="php:function('lang', 'account number')"/>
</label>
- <input type="text"
name="account_number" value="{customer/account_number}">
+ <input type="text"
id="account_number" name="account_number" value="{customer/account_number}">
<xsl:attribute
name="data-validation">
-
<xsl:text>required</xsl:text>
+
<xsl:text>account_number</xsl:text>
</xsl:attribute>
+ <xsl:attribute
name="data-validation-optional">
+
<xsl:text>true</xsl:text>
+ </xsl:attribute>
<xsl:attribute
name="placeholder">
-
<xsl:value-of select="php:function('lang', 'account_number')"/>
+
<xsl:value-of select="php:function('lang', 'account number')"/>
</xsl:attribute>
</input>
</div>
@@ -231,7 +239,7 @@
</div>
<div class="pure-control-group">
<label>
- <xsl:value-of
select="php:function('lang', 'details')"/>
+ <xsl:value-of
select="php:function('lang', 'history')"/>
</label>
<div
class="pure-custom">
<xsl:for-each
select="datatable_def">
Copied: branches/dev-syncromind-2/eventplanner/templates/base/events.xsl (from
rev 16187, trunk/eventplanner/templates/base/events.xsl)
===================================================================
--- branches/dev-syncromind-2/eventplanner/templates/base/events.xsl
(rev 0)
+++ branches/dev-syncromind-2/eventplanner/templates/base/events.xsl
2017-01-25 08:38:31 UTC (rev 16188)
@@ -0,0 +1,138 @@
+
+<!-- $Id: price_item.xsl 12604 2015-01-15 17:06:11Z nelson224 $ -->
+<xsl:template match="data">
+ <xsl:choose>
+ <xsl:when test="edit">
+ <xsl:apply-templates select="edit" />
+ </xsl:when>
+ <xsl:when test="view">
+ <xsl:apply-templates select="view" />
+ </xsl:when>
+ </xsl:choose>
+
+</xsl:template>
+
+<!-- add / edit -->
+<xsl:template xmlns:php="http://php.net/xsl" match="edit">
+ <xsl:variable name="date_format">
+ <xsl:value-of select="php:function('get_phpgw_info',
'user|preferences|common|dateformat')" />
+ <xsl:text> H:i</xsl:text>
+ </xsl:variable>
+ <xsl:variable name="form_action">
+ <xsl:value-of select="form_action"/>
+ </xsl:variable>
+ <xsl:variable name="mode">
+ <xsl:value-of select="mode"/>
+ </xsl:variable>
+
+ <div>
+ <script type="text/javascript">
+ var lang = <xsl:value-of
select="php:function('js_lang', 'Name or company is required')"/>;
+ </script>
+ <form id="form" name="form" method="post"
action="{$form_action}" class="pure-form pure-form-aligned">
+ <div id="tab-content">
+ <xsl:value-of disable-output-escaping="yes"
select="tabs"/>
+ <input type="hidden" id="active_tab"
name="active_tab" value="{value_active_tab}"/>
+ <div id="first_tab">
+ <xsl:if test="booking/id > 0">
+ <div class="pure-control-group">
+ <label>
+ <a
href="{booking_url}">
+
<xsl:value-of select="php:function('lang', 'booking')"/>
+ </a>
+ </label>
+ <input type="hidden"
name="booking_id" value="{booking/id}"/>
+ <xsl:value-of
select="booking/id"/>
+ </div>
+ </xsl:if>
+ <xsl:if test="vendor_report/id > 0">
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'report')"/>
+ </label>
+ <input type="hidden"
name="id" value="{vendor_report/id}"/>
+ <xsl:value-of
select="vendor_report/id"/>
+ </div>
+ </xsl:if>
+ <xsl:call-template
name="application_info">
+ <xsl:with-param
name="application" select ='application'/>
+ <xsl:with-param
name="application_type_list" select ='application_type_list'/>
+ </xsl:call-template>
+
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'category')"/>
+ </label>
+ <xsl:value-of
select="category_name"/>
+ </div>
+
+
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'event dates')"/>
+ </label>
+ <div class="pure-custom">
+ <xsl:for-each
select="datatable_def">
+ <xsl:if
test="container = 'datatable-container_0'">
+
<xsl:call-template name="table_setup">
+
<xsl:with-param name="container" select ='container'/>
+
<xsl:with-param name="requestUrl" select ='requestUrl'/>
+
<xsl:with-param name="ColumnDefs" select ='ColumnDefs'/>
+
<xsl:with-param name="tabletools" select ='tabletools'/>
+
<xsl:with-param name="data" select ='data'/>
+
<xsl:with-param name="config" select ='config'/>
+
</xsl:call-template>
+ </xsl:if>
+ </xsl:for-each>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ <div class="proplist-col">
+ <!--input type="submit" class="pure-button
pure-button-primary" name="save">
+ <xsl:attribute name="value">
+ <xsl:value-of
select="php:function('lang', 'save')"/>
+ </xsl:attribute>
+ </input-->
+ <xsl:variable name="cancel_url">
+ <xsl:value-of select="cancel_url"/>
+ </xsl:variable>
+ <input type="button" class="pure-button
pure-button-primary" name="cancel" onClick="window.location = '{cancel_url}';">
+ <xsl:attribute name="value">
+ <xsl:value-of
select="php:function('lang', 'cancel')"/>
+ </xsl:attribute>
+ </input>
+ </div>
+ </form>
+ </div>
+</xsl:template>
+
+<xsl:template match="options">
+ <option value="{id}">
+ <xsl:if test="selected != 0">
+ <xsl:attribute name="selected" value="selected"/>
+ </xsl:if>
+ <xsl:value-of disable-output-escaping="yes" select="name"/>
+ </option>
+</xsl:template>
+
+
+<xsl:template xmlns:php="http://php.net/xsl" match="view">
+ <div>
+ <form id="form" name="form" method="post" action=""
class="pure-form pure-form-aligned">
+ <div id="tab-content">
+ <xsl:value-of disable-output-escaping="yes"
select="tabs"/>
+ <div id="showing">
+
+ </div>
+ </div>
+ <div class="proplist-col">
+ <xsl:variable name="cancel_url">
+ <xsl:value-of select="cancel_url"/>
+ </xsl:variable>
+ <input type="button" class="pure-button
pure-button-primary" name="cancel" value="{lang_cancel}"
onMouseout="window.status='';return true;" onClick="window.location =
'{cancel_url}';"/>
+ </div>
+ </form>
+ </div>
+</xsl:template>
Modified: branches/dev-syncromind-2/eventplanner/templates/base/vendor.xsl
===================================================================
--- branches/dev-syncromind-2/eventplanner/templates/base/vendor.xsl
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/templates/base/vendor.xsl
2017-01-25 08:38:31 UTC (rev 16188)
@@ -26,7 +26,7 @@
<div>
<script type="text/javascript">
- var lang = <xsl:value-of
select="php:function('js_lang', 'Name or company is required')"/>;
+ var lang = <xsl:value-of
select="php:function('js_lang', 'Name or company is required', 'please enter a
valid organization number', 'please enter a valid account number')"/>;
</script>
<form id="form" name="form" method="post"
action="{$form_action}" class="pure-form pure-form-aligned">
<div id="tab-content">
@@ -88,10 +88,12 @@
</div>
<div class="pure-control-group">
<xsl:variable
name="lang_address_1">
- <xsl:value-of
select="php:function('lang', 'address_1')"/>
+ <xsl:value-of
select="php:function('lang', 'address')"/>
+ <xsl:text>
1</xsl:text>
</xsl:variable>
<xsl:variable
name="lang_address_2">
- <xsl:value-of
select="php:function('lang', 'address_2')"/>
+ <xsl:value-of
select="php:function('lang', 'address')"/>
+ <xsl:text>
2</xsl:text>
</xsl:variable>
<label>
<xsl:value-of
select="php:function('lang', 'address')"/>
@@ -113,7 +115,7 @@
</div>
<div class="pure-control-group">
<label>
- <xsl:value-of
select="php:function('lang', 'postal_code_place')"/>
+ <xsl:value-of
select="php:function('lang', 'zip code')"/>
</label>
<input type="text"
name="zip_code" value="{vendor/zip_code}">
<xsl:attribute
name="data-validation">
@@ -120,7 +122,7 @@
<xsl:text>required</xsl:text>
</xsl:attribute>
<xsl:attribute
name="placeholder">
-
<xsl:value-of select="php:function('lang', 'zip_code')"/>
+
<xsl:value-of select="php:function('lang', 'zip code')"/>
</xsl:attribute>
</input>
<input type="text"
name="city" value="{vendor/city}">
@@ -134,20 +136,20 @@
</div>
<div class="pure-control-group">
<label>
- <xsl:value-of
select="php:function('lang', 'vendor_organization_number')"/>
+ <xsl:value-of
select="php:function('lang', 'organization number')"/>
</label>
- <input type="text"
id="lastname" name="vendor_organization_number"
value="{vendor/vendor_organization_number}">
+ <input type="text"
id="organization_number" name="organization_number"
value="{vendor/organization_number}">
<xsl:attribute
name="data-validation">
-
<xsl:text>required</xsl:text>
+
<xsl:text>organization_number</xsl:text>
</xsl:attribute>
<xsl:attribute
name="placeholder">
-
<xsl:value-of select="php:function('lang', 'vendor_organization_number')"/>
+
<xsl:value-of select="php:function('lang', 'organization number')"/>
</xsl:attribute>
</input>
</div>
<div class="pure-control-group">
<label>
- <xsl:value-of
select="php:function('lang', 'contact_name')"/>
+ <xsl:value-of
select="php:function('lang', 'contact name')"/>
</label>
<input type="text"
name="contact_name" value="{vendor/contact_name}">
<xsl:attribute
name="data-validation">
@@ -154,7 +156,7 @@
<xsl:text>required</xsl:text>
</xsl:attribute>
<xsl:attribute
name="placeholder">
-
<xsl:value-of select="php:function('lang', 'contact_name')"/>
+
<xsl:value-of select="php:function('lang', 'contact name')"/>
</xsl:attribute>
</input>
</div>
@@ -173,7 +175,7 @@
</div>
<div class="pure-control-group">
<label>
- <xsl:value-of
select="php:function('lang', 'contact_phone')"/>
+ <xsl:value-of
select="php:function('lang', 'contact phone')"/>
</label>
<input type="text"
name="contact_phone" value="{vendor/contact_phone}">
<xsl:attribute
name="data-validation">
@@ -180,26 +182,26 @@
<xsl:text>required</xsl:text>
</xsl:attribute>
<xsl:attribute
name="placeholder">
-
<xsl:value-of select="php:function('lang', 'contact_phone')"/>
+
<xsl:value-of select="php:function('lang', 'contact phone')"/>
</xsl:attribute>
</input>
</div>
<div class="pure-control-group">
<label>
- <xsl:value-of
select="php:function('lang', 'account_number')"/>
+ <xsl:value-of
select="php:function('lang', 'account number')"/>
</label>
<input type="text"
name="account_number" value="{vendor/account_number}">
<xsl:attribute
name="data-validation">
-
<xsl:text>required</xsl:text>
+
<xsl:text>account_number</xsl:text>
</xsl:attribute>
<xsl:attribute
name="placeholder">
-
<xsl:value-of select="php:function('lang', 'account_number')"/>
+
<xsl:value-of select="php:function('lang', 'account number')"/>
</xsl:attribute>
</input>
</div>
<div class="pure-control-group">
<label>
- <xsl:value-of
select="php:function('lang', 'description')"/>
+ <xsl:value-of
select="php:function('lang', 'vendor description')"/>
</label>
<textarea cols="47"
rows="7" name="description">
<xsl:value-of
select="vendor/description"/>
@@ -226,7 +228,7 @@
</div>
<div class="pure-control-group">
<label>
- <xsl:value-of
select="php:function('lang', 'details')"/>
+ <xsl:value-of
select="php:function('lang', 'history')"/>
</label>
<div
class="pure-custom">
<xsl:for-each
select="datatable_def">
Modified:
branches/dev-syncromind-2/eventplanner/templates/base/vendor_report.xsl
===================================================================
--- branches/dev-syncromind-2/eventplanner/templates/base/vendor_report.xsl
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/eventplanner/templates/base/vendor_report.xsl
2017-01-25 08:38:31 UTC (rev 16188)
@@ -67,12 +67,6 @@
</label>
<xsl:value-of
select="php:function('show_date', number(booking/from_), $date_format)"/>
</div>
- <div class="pure-control-group">
- <label>
- <xsl:value-of
select="php:function('lang', 'timespan')"/>
- </label>
- <xsl:value-of
select="application/timespan"/>
- </div>
<div class="pure-control-group">
<label>
Modified: branches/dev-syncromind-2/phpgwapi/inc/class.categories.inc.php
===================================================================
--- branches/dev-syncromind-2/phpgwapi/inc/class.categories.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/phpgwapi/inc/class.categories.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -269,8 +269,8 @@
'main' =>
$this->db->f('cat_main'),
'level' =>
$this->db->f('cat_level'),
'parent' =>
$this->db->f('cat_parent'),
- 'name' =>
$this->db->f('cat_name'),
- 'description' =>
$this->db->f('cat_description'),
+ 'name' =>
$this->db->f('cat_name',true),
+ 'description' =>
$this->db->f('cat_description',true),
'data' =>
$this->db->f('cat_data'),
'last_mod' =>
$this->db->f('last_mod'),
'active' =>
(int)$this->db->f('active')
@@ -367,8 +367,8 @@
'main' =>
(int)$this->db->f('cat_main'),
'level' =>
(int)$this->db->f('cat_level'),
'parent' =>
(int)$this->db->f('cat_parent'),
- 'name' =>
$this->db->f('cat_name'),
- 'description' =>
$this->db->f('cat_description'),
+ 'name' =>
$this->db->f('cat_name',true),
+ 'description' =>
$this->db->f('cat_description',true),
'data' =>
$this->db->f('cat_data'),
'active' =>
(int)$this->db->f('active')
);
@@ -413,8 +413,8 @@
'main' =>
(int)$this->db->f('cat_main'),
'level' =>
(int)$this->db->f('cat_level'),
'parent' =>
(int)$this->db->f('cat_parent'),
- 'name' =>
$this->db->f('cat_name'),
- 'description' =>
$this->db->f('cat_description'),
+ 'name' =>
$this->db->f('cat_name',true),
+ 'description' =>
$this->db->f('cat_description',true),
'data' =>
$this->db->f('cat_data'),
'active' =>
(int)$this->db->f('active')
);
@@ -595,9 +595,9 @@
}
*/
- $s .= '>' . str_repeat(' ' ,
(int)$cat['level'] ) . $GLOBALS['phpgw']->strip_html($cat['name']);
+ $s .= '>' . str_repeat('. ' ,
(int)$cat['level'] ) . $GLOBALS['phpgw']->strip_html($cat['name']);
- $s .=
$GLOBALS['phpgw']->strip_html($cat['name']);
+// $s .=
$GLOBALS['phpgw']->strip_html($cat['name']);
if ($cat['app_name'] == 'phpgw')
{
$s .= ' [' .
lang('Global') . ']';
Modified: branches/dev-syncromind-2/phpgwapi/inc/class.config.inc.php
===================================================================
--- branches/dev-syncromind-2/phpgwapi/inc/class.config.inc.php 2017-01-24
15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/phpgwapi/inc/class.config.inc.php 2017-01-25
08:38:31 UTC (rev 16188)
@@ -50,6 +50,12 @@
public $config_data = array();
/**
+ *
+ * @var bool $global_lock to be used in nested transactions
+ */
+ protected $global_lock = false;
+
+ /**
* Constructor
*
* @param string $module the module to store the data for
@@ -115,7 +121,15 @@
if ( is_array($config_data) && count($config_data) )
{
- $this->db->transaction_begin();
+ if ( $this->db->get_transaction() )
+ {
+ $this->global_lock = true;
+ }
+ else
+ {
+ $this->db->transaction_begin();
+ }
+
$this->delete_repository();
foreach ( $config_data as $name => $value )
{
@@ -129,7 +143,11 @@
. "VALUES ('{$this->module}',
'{$name}', '{$value}')";
$this->db->query($query, __LINE__,
__FILE__);
}
- $this->db->transaction_commit();
+
+ if ( !$this->global_lock )
+ {
+ $this->db->transaction_commit();
+ }
}
}
Modified: branches/dev-syncromind-2/phpgwapi/inc/class.db_pdo.inc.php
===================================================================
--- branches/dev-syncromind-2/phpgwapi/inc/class.db_pdo.inc.php 2017-01-24
15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/phpgwapi/inc/class.db_pdo.inc.php 2017-01-25
08:38:31 UTC (rev 16188)
@@ -831,8 +831,11 @@
{
if ($strip_slashes ||
($this->auto_stripslashes && ! $strip_slashes))
{
- return
htmlspecialchars_decode(stripslashes(str_replace(array('&','(',
')', '=','−−',';'), array('&','(', ')', '=', '--',';'),
$this->Record[$name])),ENT_QUOTES);
-// return
htmlspecialchars_decode(stripslashes($this->Record[$name]));
+ // $str =
preg_replace_callback('/\\\\u([0-9a-fA-F]{4})/', function ($match){
+ $str =
preg_replace_callback('/u([0-9a-fA-F]{4})/', function ($match){
+ return
mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UTF-16BE');
+ }, $this->Record[$name]);
+ return
htmlspecialchars_decode(stripslashes(str_replace(array('&','(',
')', '=','−−',';'), array('&','(', ')', '=', '--',';'),
$str)),ENT_QUOTES);
}
else
{
Modified: branches/dev-syncromind-2/phpgwapi/inc/class.socommon.inc.php
===================================================================
--- branches/dev-syncromind-2/phpgwapi/inc/class.socommon.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/phpgwapi/inc/class.socommon.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -582,9 +582,17 @@
}
}
}
-// $custom_fields = $object::get_custom_fields();
- $values_attribute =
createObject('phpgwapi.custom_fields')->convert_attribute_save($object->values_attribute);
+ $class_info = explode('_', get_class($object), 2);
+ $appname = $class_info[0];
+
+ $attrib_table =
$GLOBALS['phpgw']->locations->get_attrib_table($appname, $object::acl_location);
+ $values_attribute = array();
+ if($attrib_table)
+ {
+ $values_attribute =
createObject('phpgwapi.custom_fields')->convert_attribute_save($object->values_attribute);
+ }
+
if ( $values_attribute)
{
foreach ($values_attribute as $attrib_id =>
$entry)
@@ -654,8 +662,17 @@
}
}
}
- $values_attribute =
createObject('phpgwapi.custom_fields')->convert_attribute_save($object->values_attribute);
+ $class_info = explode('_', get_class($object), 2);
+ $appname = $class_info[0];
+
+ $attrib_table =
$GLOBALS['phpgw']->locations->get_attrib_table($appname, $object::acl_location);
+ $values_attribute = array();
+ if($attrib_table)
+ {
+ $values_attribute =
createObject('phpgwapi.custom_fields')->convert_attribute_save($object->values_attribute);
+ }
+
if ( $values_attribute)
{
foreach ($values_attribute as $attrib_id =>
$entry)
Modified: branches/dev-syncromind-2/phpgwapi/inc/class.uicommon.inc.php
===================================================================
--- branches/dev-syncromind-2/phpgwapi/inc/class.uicommon.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/phpgwapi/inc/class.uicommon.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -40,6 +40,7 @@
'view' => true,
'edit' => true,
'save' => true,
+ 'get_list' => true
);
protected
@@ -187,11 +188,11 @@
{
if($ajax)
{
-
phpgwapi_cache::session_clear('phpgwapi', 'phpgw_messages');
+ $messages =
phpgwapi_cache::message_get(true);
return array(
'status_kode' => 'error',
'status' => lang('error'),
- 'msg' => lang('Did not
validate')
+ 'msg' => $messages ? $messages
: lang('did not validate')
);
}
else
@@ -210,6 +211,16 @@
}
}
+ private function get_data()
+ {
+ if (empty($this->permissions[PHPGW_ACL_READ]))
+ {
+ phpgw::no_access();
+ }
+ $params = $this->bo->build_default_read_params();
+ return $this->bo->read($params);
+ }
+
/**
* (non-PHPdoc)
* @see eventplanner/inc/eventplanner_uicommon#query()
@@ -216,8 +227,7 @@
*/
public function query()
{
- $params = $this->bo->build_default_read_params();
- $values = $this->bo->read($params);
+ $values = $this->get_data();
array_walk($values["results"], array($this,
"_add_links"),
"{$this->called_class_arr[0]}.{$this->called_class_arr[1]}.edit");
return $this->jquery_results($values);
@@ -224,8 +234,34 @@
}
/**
+ * Returns a minimum for - let say - autocomplete
+ * @param void
+ * @return array An associative array
+ */
+ public function get_list()
+ {
+ $values = $this->get_data();
+
+ $results = array();
+ foreach ($values['results'] as $row)
+ {
+ $results[] = array(
+ 'id' => $row['id'],
+ 'name' =>$row['name'],
+ 'title' =>$row['title']
+ );
+ }
+ $values['results'] = $results;
+ return $this->jquery_results($values);
+ }
+
+ /**
* Called from subclasses
+ * @param type $fakebase
+ * @param type $sub_module
* @param type $id
+ * @return type
+ * @throws Exception
*/
protected function _handle_files( $fakebase, $sub_module, $id )
{
Modified: branches/dev-syncromind-2/phpgwapi/inc/class.uicommon_jquery.inc.php
===================================================================
--- branches/dev-syncromind-2/phpgwapi/inc/class.uicommon_jquery.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/phpgwapi/inc/class.uicommon_jquery.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -184,6 +184,25 @@
public function link( $data )
{
+ switch ($GLOBALS['phpgw_info']['flags']['currentapp'])
+ {
+ case 'bookingfrontend':
+ $base = '/bookingfrontend/';
+ break;
+ case 'activitycalendarfrontend':
+ $base = '/activitycalendarfrontend/';
+ break;
+ case 'eventplannerfrontend':
+ $base = '/eventplannerfrontend/';
+ break;
+ default:
+ $base = '/index.php/';
+ break;
+ }
+
+ return $GLOBALS['phpgw']->link($base, $data);
+
+/*
if ($GLOBALS['phpgw_info']['flags']['currentapp'] ==
'bookingfrontend')
{
return
$GLOBALS['phpgw']->link('/bookingfrontend/', $data);
@@ -196,6 +215,7 @@
{
return $GLOBALS['phpgw']->link('/index.php',
$data);
}
+ */
}
public function redirect( $link_data )
Modified: branches/dev-syncromind-2/phpgwapi/inc/sso/include_login.inc.php
===================================================================
--- branches/dev-syncromind-2/phpgwapi/inc/sso/include_login.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/phpgwapi/inc/sso/include_login.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -14,6 +14,11 @@
/*
* Generic include for login.php like pages
*/
+ if(!empty( $GLOBALS['phpgw_info']['flags']['session_name'] ))
+ {
+ $session_name = $GLOBALS['phpgw_info']['flags']['session_name'];
+ }
+
$GLOBALS['phpgw_info'] = array();
$GLOBALS['phpgw_info']['flags'] = array
@@ -23,6 +28,10 @@
'currentapp' => 'login',
'noheader' => true
);
+ if($session_name)
+ {
+ $GLOBALS['phpgw_info']['flags']['session_name'] = $session_name;
+ }
$header = dirname(realpath(__FILE__)) . '/../../../header.inc.php';
if ( !file_exists($header) )
Modified: branches/dev-syncromind-2/phpgwapi/templates/base/datatable_jquery.xsl
===================================================================
--- branches/dev-syncromind-2/phpgwapi/templates/base/datatable_jquery.xsl
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/phpgwapi/templates/base/datatable_jquery.xsl
2017-01-25 08:38:31 UTC (rev 16188)
@@ -154,6 +154,8 @@
$(document).ready(function() {
var app = "<xsl:value-of select="app"/>";
app = app || 'booking';
+
var FunctionName = "<xsl:value-of select="function"/>";
+
FunctionName = FunctionName || 'index';
var label_attr = "<xsl:value-of select="label_attr"/>";
label_attr = label_attr || 'name';
var show_id = false;
@@ -179,7 +181,7 @@
if (filter_select != filter_selected){
if (filter_depends) {
<![CDATA[
-
JqueryPortico.autocompleteHelper('index.php?menuaction=' + app +
'.ui'+ui+'.index&filter_'+depends+'_id='+filter_depends+'&',
+
JqueryPortico.autocompleteHelper('index.php?menuaction=' + app + '.ui'+ui+'.' +
FunctionName + '&filter_'+depends+'_id='+filter_depends+'&',
'filter_'+name+'_name',
'filter_'+name+'_id', 'filter_'+name+'_container', label_attr, show_id,
requestGenerator);
]]>
}
@@ -194,7 +196,7 @@
filter_depends = false;
if (!filter_depends) {
<![CDATA[
-
JqueryPortico.autocompleteHelper('index.php?menuaction=' + app +
'.ui'+ui+'.index&',
+
JqueryPortico.autocompleteHelper('index.php?menuaction=' + app + '.ui'+ ui +
'.' + FunctionName +'&',
'filter_'+name+'_name',
'filter_'+name+'_id', 'filter_'+name+'_container', label_attr, show_id,
requestGenerator);
]]>
}
@@ -207,12 +209,12 @@
</xsl:if>
if (filter_depends) {
<![CDATA[
-
JqueryPortico.autocompleteHelper('index.php?menuaction=' + app +
'.ui'+ui+'.index&filter_'+depends+'_id='+filter_depends+'&',
+
JqueryPortico.autocompleteHelper('index.php?menuaction=' + app + '.ui'+ui+'.' +
FunctionName + '&filter_'+depends+'_id='+filter_depends+'&',
'filter_'+name+'_name', 'filter_'+name+'_id',
'filter_'+name+'_container', label_attr, show_id, requestGenerator);
]]>
}else{
<![CDATA[
-
JqueryPortico.autocompleteHelper('index.php?menuaction=' + app +
'.ui'+ui+'.index&',
+
JqueryPortico.autocompleteHelper('index.php?menuaction=' + app + '.ui'+ui+'.' +
FunctionName + '&',
'filter_'+name+'_name', 'filter_'+name+'_id',
'filter_'+name+'_container', label_attr, show_id, requestGenerator);
]]>
}
@@ -982,8 +984,16 @@
* For namespacing the state
*/
var table_url =
JqueryPortico.parseURL(window.location.href);
- var menuaction =
table_url.searchObject.menuaction.replace(/\./g, '_');
+ var menuaction = 'dummy';
+ try
+ {
+ menuaction =
table_url.searchObject.menuaction.replace(/\./g, '_');
+ }
+ catch (e)
+ {
+ }
+
//clear state
var clear_state = false;
if(typeof(table_url.searchObject.clear_state) !=
'undefined' && table_url.searchObject.clear_state == 1)
@@ -1055,13 +1065,14 @@
var retrievedObject =
localStorage.getItem('state_' + menuaction);
if(typeof(retrievedObject) !=
'undefined')
{
+ var params = {};
+
try
{
- var params =
JSON.parse(retrievedObject);
+ params =
JSON.parse(retrievedObject);
}
catch(err)
{
- params = {}
}
}
// console.log(oData);
Modified:
branches/dev-syncromind-2/phpgwapi/templates/bookingfrontend/head.inc.php
===================================================================
--- branches/dev-syncromind-2/phpgwapi/templates/bookingfrontend/head.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/phpgwapi/templates/bookingfrontend/head.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -10,7 +10,7 @@
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
- $config_frontend =
CreateObject('phpgwapi.config','bookingfrontend')->read();
+ $config_frontend = CreateObject('phpgwapi.config',$app)->read();
$tracker_id = !empty($config_frontend['tracker_id']) ?
$config_frontend['tracker_id'] : '';
$tracker_code1 = <<<JS
@@ -51,7 +51,7 @@
$stylesheets[] =
"/phpgwapi/templates/pure/css/grids-responsive-min.css";
$stylesheets[] =
"/phpgwapi/js/DataTables/extensions/Responsive/css/responsive.dataTables.min.css";
$stylesheets[] = "/{$app}/templates/base/css/base.css";
- $stylesheets[] = "/bookingfrontend/css/bookingfrontend.css";
+ $stylesheets[] = "/{$app}/css/bookingfrontend.css";
$stylesheets[] = "/phpgwapi/templates/bookingfrontend/css/frontend.css";
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['theme']))
@@ -173,7 +173,7 @@
$test = $GLOBALS['phpgw']->common->get_on_events();
$test = str_replace('window.onload =
function()','$(document).ready(function()',$test);
$test = str_replace("\n}\n","\n})\n",$test);
- $app = lang($app);
+
$tpl_vars = array
(
'css' => $GLOBALS['phpgw']->common->get_css(),
@@ -181,7 +181,7 @@
'img_icon' =>
$GLOBALS['phpgw']->common->find_image('phpgwapi', 'favicon.ico'),
'site_title' => $site_title,
'str_base_url' => $GLOBALS['phpgw']->link('/', array(), true),
- 'site_url' => $GLOBALS['phpgw']->link('/bookingfrontend/',
array()),
+ 'site_url' => $GLOBALS['phpgw']->link("/{$app}/", array()),
'webserver_url' =>
$GLOBALS['phpgw_info']['server']['webserver_url'],
'win_on_events' => $test,
'metainfo_author' => $author,
@@ -197,6 +197,9 @@
$tpl_vars['manual_text'] = lang('manual');
$tpl_vars['manual_url'] = $manual;
}
+// $user = $GLOBALS['phpgw']->accounts->get(
$GLOBALS['phpgw_info']['user']['id'] );
+// _debug_array($user);
+
$bouser = CreateObject('bookingfrontend.bouser');
$org = CreateObject('bookingfrontend.uiorganization');
$orgid = $org->get_orgid($bouser->orgnr);
Modified:
branches/dev-syncromind-2/phpgwapi/templates/pure/css/pure-extension.css
===================================================================
--- branches/dev-syncromind-2/phpgwapi/templates/pure/css/pure-extension.css
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/phpgwapi/templates/pure/css/pure-extension.css
2017-01-25 08:38:31 UTC (rev 16188)
@@ -328,4 +328,10 @@
ul#audience {list-style: none;padding-left: 10px;}
/* AUTOCOMPLETE */
-.ui-widget.ui-autocomplete {max-height: 224px;overflow-x: hidden;overflow-y:
auto;}
\ No newline at end of file
+.ui-widget.ui-autocomplete {max-height: 224px;overflow-x: hidden;overflow-y:
auto;}
+
+
+.pure-form input[type="text"][disabled], .pure-form
input[type="password"][disabled], .pure-form input[type="email"][disabled],
.pure-form input[type="url"][disabled], .pure-form
input[type="date"][disabled], .pure-form input[type="month"][disabled],
.pure-form input[type="time"][disabled], .pure-form
input[type="datetime"][disabled], .pure-form
input[type="datetime-local"][disabled], .pure-form
input[type="week"][disabled], .pure-form input[type="number"][disabled],
.pure-form input[type="search"][disabled], .pure-form
input[type="tel"][disabled], .pure-form input[type="color"][disabled],
.pure-form select[disabled], .pure-form textarea[disabled]
+{
+ color: #050000;
+}
\ No newline at end of file
Modified:
branches/dev-syncromind-2/property/inc/class.bocondition_survey.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.bocondition_survey.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/property/inc/class.bocondition_survey.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -441,4 +441,11 @@
}
}
}
+
+ function get_export_data($id)
+ {
+ $condition_survey = $this->read_single(array('id' =>
(int)$id));
+ $values = $this->so->get_export_data($id);
+ return array('condition_survey' => $condition_survey,
'values' => $values);
+ }
}
\ No newline at end of file
Modified:
branches/dev-syncromind-2/property/inc/class.socondition_survey.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.socondition_survey.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/property/inc/class.socondition_survey.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -574,7 +574,7 @@
);
}
- $lang_operation = lang('operation');
+ $lang_operation = lang('O&M');//Operations and
Maintenance
$lang_investment = lang('investment');
$return = array();
@@ -689,4 +689,58 @@
$this->_db->transaction_commit();
}
}
+
+ function get_export_data($id)
+ {
+ $condition_survey_id = (int) $id;
+
+ $sql = "SELECT DISTINCT
fm_request.location_code,fm_request.id as request_id,fm_request_status.descr as
status,"
+ .
"fm_request.building_part,fm_building_part.descr as building_part_text,
fm_request.start_date,fm_request.entry_date,fm_request.closed_date,"
+ .
"fm_request.in_progress_date,fm_request.delivered_date,fm_request.title as
title,fm_request.descr,"
+ . "max(fm_request_condition.degree) as
condition_degree,"
+ . "max(fm_request_condition.consequence) as
consequence,"
+ . "max(fm_request_condition.probability) as
probability,"
+ . "fm_request_condition_type.name as
condition_type_name,"
+ . "fm_request_condition_type.priority_key as
priority_key,"
+ . "(fm_request.amount_investment * multiplier)
as amount_investment,"
+ . "(fm_request.amount_operation * multiplier)
as amount_operation,"
+ . "(fm_request.amount_potential_grants *
multiplier) as amount_potential_grants,fm_request.score,"
+ . "recommended_year,start_date AS
planned_year,fm_request.coordinator,"
+ .
"fm_location1.loc1_name,loc1_name,loc2_name,loc3_name,fm_request.address "
+ . "FROM (((((((((( fm_request LEFT JOIN
fm_request_status ON fm_request.status = fm_request_status.id) "
+ . "LEFT JOIN fm_request_planning ON
fm_request.id = fm_request_planning.request_id) "
+ . "LEFT JOIN fm_request_consume ON
fm_request.id = fm_request_consume.request_id) "
+ . "LEFT JOIN fm_request_condition ON
fm_request.id = fm_request_condition.request_id) "
+ . "JOIN fm_location1 ON (fm_request.loc1 =
fm_location1.loc1)) "
+ . "JOIN fm_request_condition_type ON
(fm_request_condition.condition_type = fm_request_condition_type.id) "
+ . "JOIN fm_building_part ON
(fm_request.building_part = fm_building_part.id)) "
+ . "JOIN fm_part_of_town ON
(fm_location1.part_of_town_id = fm_part_of_town.id)) "
+ . "JOIN fm_owner ON (fm_location1.owner_id =
fm_owner.id)) "
+ . "LEFT JOIN fm_location2 ON
(fm_location2.loc1 = fm_location1.loc1 AND fm_location2.loc2 =
fm_request.loc2)) "
+ . "LEFT JOIN fm_location3 ON
(fm_location3.loc2 = fm_location2.loc2 AND fm_location3.loc3 =
fm_request.loc3) AND (fm_location3.loc1 = fm_location2.loc1 AND
fm_location3.loc3 = fm_request.loc3)) "
+ . "WHERE fm_request.condition_survey_id =
{$condition_survey_id} "
+ . "GROUP BY
fm_request.location_code,fm_location1.loc1_name,fm_request_status.descr,building_part,fm_building_part.descr,"
+ .
"fm_request_condition_type.name,fm_request.entry_date,fm_request.closed_date,fm_request.in_progress_date,"
+ .
"fm_request.delivered_date,title,priority_key,"
+ .
"fm_request.descr,amount_investment,amount_operation,amount_potential_grants,score,recommended_year,start_date,coordinator,fm_location2.loc2_name,fm_location3.loc3_name,fm_request.multiplier,fm_request.id,fm_request_status.descr,fm_request.address"
+ . " ORDER BY fm_request.building_part ASC";
+// _debug_array($sql);die();
+ $this->_db->query($sql);
+ $values = array();
+ while ($this->_db->next_record())
+ {
+ $values[] = $this->_db->Record;
+ }
+ foreach ($values as &$value)
+ {
+ $value['risk'] = $value['consequence'] *
$value['probability'];
+ $value['score'] = $value['risk'] *
$value['priority_key'];
+ $value['amount_total'] =
$value['amount_investment'] + $value['amount_operation'];
+ $value['percentage_investment'] =
($value['amount_investment'] / $value['amount_total']) * 100;
+ $value['percentage_grants'] =
($value['amount_potential_grants'] / $value['amount_investment']) * 100;
+ }
+
+ return $values;
+ }
+
}
\ No newline at end of file
Modified: branches/dev-syncromind-2/property/inc/class.soentity.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.soentity.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/property/inc/class.soentity.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -350,7 +350,7 @@
$j = 0;
while ($this->db->next_record())
{
- $jsondata =
json_decode($this->db->f('json_representation'), true);
+ $jsondata =
json_decode($this->db->f('json_representation', true), true);
// $xml = new DOMDocument('1.0', 'utf-8');
// $xml->loadXML($xmldata);
@@ -1056,7 +1056,7 @@
// $xmldata = $this->db->f('xml_representation');
// $xml = new DOMDocument('1.0', 'utf-8');
// $xml->loadXML($xmldata);
- $jsondata =
json_decode($this->db->f('json_representation'), true);
+ $jsondata =
json_decode($this->db->f('json_representation', true), true);
foreach ($cols_return as $key => $field)
{
@@ -2062,7 +2062,7 @@
{
foreach ($values['attributes'] as
&$attr)
{
- $attr['value'] =
$this->db->f($attr['column_name']);
+ $attr['value'] =
$this->db->f($attr['column_name'], true);
}
}
}
@@ -2119,7 +2119,7 @@
// $xml = new DOMDocument('1.0', 'utf-8');
// $xml->loadXML($xmldata);
- $jsondata =
json_decode($this->db->f('json_representation'), true);
+ $jsondata =
json_decode($this->db->f('json_representation', true), true);
if (isset($values['attributes']) &&
is_array($values['attributes']))
{
@@ -2621,7 +2621,7 @@
// $xml = new
DOMDocument('1.0', 'utf-8');
// $xml->loadXML($xmldata);
// $old_value =
$xml->getElementsByTagName($entry['name'])->item(0)->nodeValue;
- $jsondata =
json_decode($this->db->f('json_representation'), true);
+ $jsondata =
json_decode($this->db->f('json_representation', true), true);
$old_value =
$jsondata[$entry['name']];
}
Modified: branches/dev-syncromind-2/property/inc/class.sogeneric_.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.sogeneric_.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/property/inc/class.sogeneric_.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -531,13 +531,15 @@
$data[$field['name']] = ',' .
implode(',', $data[$field['name']]) . ',';
}
}
+ if ($field['type'] == 'varchar')
+ {
+ $data[$field['name']] =
$this->_db->db_addslashes(html_entity_decode($data[$field['name']]));
+ }
}
$cols = array();
$vals = array();
- $data['descr'] =
$this->_db->db_addslashes(html_entity_decode($value));
-
if (isset($data['extra']))
{
foreach ($data['extra'] as $input_name =>
$value)
Modified: branches/dev-syncromind-2/property/inc/class.soproject.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.soproject.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/property/inc/class.soproject.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -879,7 +879,8 @@
{
$project = array
(
- 'project_id' => $this->db->f('id'),
+ 'id' => $project_id,
+ 'project_id' =>
$this->db->f('id'),//consider this one
'project_type_id' =>
$this->db->f('project_type_id'),
'title' => $this->db->f('title'),
'name' => $this->db->f('name'),
Modified: branches/dev-syncromind-2/property/inc/class.sorequest.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.sorequest.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/property/inc/class.sorequest.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -458,7 +458,7 @@
$cols_group[] = 'amount_operation';
$uicols['input_type'][] = 'text';
$uicols['name'][] = 'amount_operation';
- $uicols['descr'][] = lang('operation');
+ $uicols['descr'][] = lang('O&M');//Operations and
Maintenance
$uicols['statustext'][] = lang('cost estimate');
$uicols['exchange'][] = '';
$uicols['align'][] = '';
Modified: branches/dev-syncromind-2/property/inc/class.uibudget.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.uibudget.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/property/inc/class.uibudget.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -967,7 +967,7 @@
'submit_search'
=> true))),
'diff_ex' =>
$entry['budget_cost'] - $entry['actual_cost'] - $entry['obligation'],
'diff' =>
number_format($entry['budget_cost'] - $entry['actual_cost'] -
$entry['obligation'], 0, ',', ' '),
- 'percent' => $entry['percent'],
+ 'percent' =>
(int)$entry['percent'],
'year' => $this->year,
'month' => $this->month
);
Modified:
branches/dev-syncromind-2/property/inc/class.uicondition_survey.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.uicondition_survey.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/property/inc/class.uicondition_survey.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -52,6 +52,7 @@
'get_summation' => true,
'view_file' => true,
'import' => true,
+ 'export' => true,
'download' => true,
'summation' => true,
'handle_multi_upload_file' => true,
@@ -306,7 +307,18 @@
'parameters' => json_encode($parameters)
);
+ $data['datatable']['actions'][] = array
+ (
+ 'my_name' => 'export_survey',
+ 'text' => lang('export'),
+ 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
+ (
+ 'menuaction' =>
'property.uicondition_survey.export'
+ )),
+ 'parameters' => json_encode($parameters)
+ );
+
if ($GLOBALS['phpgw']->acl->check('.admin',
PHPGW_ACL_DELETE, 'property'))
{
$data['datatable']['actions'][] = array
@@ -913,6 +925,260 @@
}
}
+
+ public function export()
+ {
+ $id = phpgw::get_var('id', 'int', 'REQUEST');
+ $data = $this->bo->get_export_data($id);
+
+ $filename = 'tilstandsanalyse';
+
+ $names = array(
+ 'request_id',
+ 'building_part',
+ 'building_part_text',
+ 'title',
+ 'descr',
+ 'Bilde nr',
+ 'Hjemmel',
+ 'condition_degree',
+ 'condition_type_name',
+ 'consequence',
+ 'probability',
+ 'risk',
+ 'score',
+ 'recommended_year',
+ 'amount_total',
+ 'percentage_investment',
+ 'percentage_grants',
+ 'amount_operation',
+ 'amount_investment',
+ 'amount_potential_grants'
+ );
+
+ $descr = array(
+ 'ID',
+ 'Bygningsdel',
+ 'Bygningsdel tekst',
+ 'Tilstandbeskrivelse',
+ 'Tiltak',
+ 'Bildenummer fotoserie',
+ 'Hjemmel/ krav',
+ 'Tilstandsgrad 0-3',
+ 'Konsekvenstype',
+ 'Konsekvensgrad 0-3',
+ 'Sannsynlighet 0-3',
+ 'Risiko=KGXS',
+ 'Score=TGxKTxR',
+ 'Anbefales utført innen',
+ 'Kalkyle netto TOTALT (V+U)',
+ 'Andel U',
+ 'Andel off. tilskudd av U',
+ 'Andel Vedlikeholds-kostnad (V)',
+ 'Andel Utviklings- kostnad (U)',
+ 'Andel off. tilskudd potensiale (av U)'
+ );
+ $this->excel_out($data, $names, $descr, $input_type =
array(), $filename);
+ }
+
+ function excel_out( $data, $names, $descr, $input_type =
array(), $filename = '' )
+ {
+ $condition_survey = $data['condition_survey'];
+// _debug_array($condition_survey);die();
+
+ phpgw::import_class('phpgwapi.phpexcel');
+ if ($filename)
+ {
+ $filename_arr = explode('.', str_replace(' ',
'_', basename($filename)));
+ $filename = $filename_arr[0] . '.xlsx';
+ }
+ else
+ {
+ $filename = str_replace(' ', '_',
$GLOBALS['phpgw_info']['user']['account_lid']) . '.xlsx';
+ }
+
+ $browser = CreateObject('phpgwapi.browser');
+ $browser->content_header($filename,
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
+
+ $cacheMethod =
PHPExcel_CachedObjectStorageFactory::cache_to_phpTemp;
+ $cacheSettings = array('memoryCacheSize' => '32MB');
+ PHPExcel_Settings::setCacheStorageMethod($cacheMethod,
$cacheSettings);
+
+ $objPHPExcel = new PHPExcel();
+
+
+
$objPHPExcel->getProperties()->setCreator($GLOBALS['phpgw_info']['user']['fullname'])
+
->setLastModifiedBy($GLOBALS['phpgw_info']['user']['fullname'])
+ ->setTitle("Download from
{$GLOBALS['phpgw_info']['server']['system_name']}")
+ ->setSubject("Office 2007 XLSX Document")
+ ->setDescription("document for Office 2007
XLSX, generated using PHP classes.")
+ ->setKeywords("office 2007 openxml php")
+ ->setCategory("downloaded file");
+
+ // Set active sheet index to the first sheet, so Excel
opens this as the first sheet
+ $objPHPExcel->setActiveSheetIndex(0);
+// $sheet = $objPHPExcel->getActiveSheet();
+// $sheet->getRowDimension('1');
+
+
$objPHPExcel->getActiveSheet()->getStyle('A1:T14')->getFill()->applyFromArray(array(
+ 'type' => PHPExcel_Style_Fill::FILL_SOLID,
+ 'startcolor' => array(
+ 'rgb' => '99cc33'
+ )
+ ));
+
$objPHPExcel->getActiveSheet()->getStyle('A15:T15')->getFill()->applyFromArray(array(
+ 'type' => PHPExcel_Style_Fill::FILL_SOLID,
+ 'startcolor' => array(
+ 'rgb' => 'ffff66'
+ )
+ ));
+
+ $i = 0;
+ $row = 1;
+ //heading
+ $lang = array
+ (
+ 'id' => 'Tilstandsanalyse #',
+ 'title' => 'Navn',
+ 'descr' => 'Beskrivelse',
+ 'location_code' => 'Objekt',
+ // 'status_id' => 'Status',
+ // 'cat_id' => 'Kategori',
+ 'vendor_id' => 'Leverandør ID',
+ 'vendor_name' => 'Utført av',
+ // 'coordinator_id' =>
'Koordinator',
+ 'report_date' => 'Analyse dato',
+ 'multiplier' => 'Multiplikator',
+ );
+
PHPExcel_Shared_Font::setAutoSizeMethod(PHPExcel_Shared_Font::AUTOSIZE_METHOD_EXACT);
+// _debug_array($condition_survey);die();
+ foreach ($lang as $key => $translation)
+ {
+ if (isset($condition_survey[$key]))
+ {
+
$objPHPExcel->setActiveSheetIndex(0)->setCellValueByColumnAndRow(1, $row,
$translation);
+
$objPHPExcel->setActiveSheetIndex(0)->setCellValueByColumnAndRow(2, $row,
$condition_survey[$key]);
+
$objPHPExcel->getActiveSheet()->getStyle("B{$row}")->getAlignment()->applyFromArray(
+ array(
+ 'horizontal' =>
PHPExcel_Style_Alignment::HORIZONTAL_LEFT,
+ 'vertical' =>
PHPExcel_Style_Alignment::VERTICAL_CENTER,
+ // 'justify' =>
PHPExcel_Style_Alignment::VERTICAL_JUSTIFY,
+ 'rotation' => 0,
+ 'wrap' => false
+ )
+ );
+
$objPHPExcel->getActiveSheet()->getStyle("C{$row}")->getAlignment()->applyFromArray(
+ array(
+ 'horizontal' =>
PHPExcel_Style_Alignment::HORIZONTAL_LEFT,
+ 'vertical' =>
PHPExcel_Style_Alignment::VERTICAL_CENTER,
+ // 'justify' =>
PHPExcel_Style_Alignment::VERTICAL_JUSTIFY,
+ 'rotation' => 0,
+ 'wrap' => false
+ )
+ );
+ $row++;
+ }
+ }
+ foreach (range('B', 'C', 'D') as $columnID)
+ {
+
$objPHPExcel->getActiveSheet()->getColumnDimension($columnID)->setAutoSize(true);
+ }
+
+ $count_uicols_name = count($names);
+ $_first_row = 15;
+
+ $text_format = array();
+ //overskrifter
+ $m = 0;
+ $col = 'A';
+
$objPHPExcel->getActiveSheet()->getRowDimension($_first_row)->setRowHeight(210);
+ for ($k = 0; $k < $count_uicols_name; $k++)
+ {
+ if (!isset($input_type[$k]) || $input_type[$k]
!= 'hidden')
+ {
+ if (preg_match('/^loc/i', $names[$k]))
+ {
+ $text_format[$m] = true;
+ }
+
$objPHPExcel->setActiveSheetIndex(0)->setCellValueByColumnAndRow($m,
$_first_row, $descr[$k]);
+ if ($m > 0)
+ {
+
$objPHPExcel->getActiveSheet()->getStyle("{$col}{$_first_row}")->getAlignment()->setTextRotation(90);
+ }
+ $m++;
+ $col++;
+ /*
+
$objPHPExcel->getActiveSheet()->getStyle("D{$_first_row}")->getAlignment()->applyFromArray(
+ array(
+ 'horizontal' =>
PHPExcel_Style_Alignment::HORIZONTAL_CENTER,
+ 'vertical' =>
PHPExcel_Style_Alignment::VERTICAL_CENTER,
+ // 'justify' =>
PHPExcel_Style_Alignment::VERTICAL_JUSTIFY,
+ 'rotation' => 90,
+ 'wrap' => false
+ )
+ );
+ */
+ }
+ }
+ //data
+ $j = 0;
+ if (isset($data['values']) && is_array($data['values']))
+ {
+ foreach ($data['values'] as $entry)
+ {
+ $m = 0;
+ foreach ($names as $name)
+ {
+ $content[$j][$m] =
str_replace("\r\n", " ", $entry[$name]);
+ $m++;
+ }
+ $j++;
+ }
+
+ $line = $_first_row;
+
+ foreach ($content as $row)
+ {
+ $col = 'A';
+
+ $line++;
+ $rows = count($row);
+ for ($i = 0; $i < $rows; $i++)
+ {
+ if (isset($text_format[$i]))
+ {
+
$objPHPExcel->setActiveSheetIndex(0)->setCellValueExplicitByColumnAndRow($i,
$line, $row[$i], PHPExcel_Cell_DataType::TYPE_STRING);
+ }
+ else
+ {
+
$objPHPExcel->setActiveSheetIndex(0)->setCellValueByColumnAndRow($i, $line,
$row[$i]);
+ }
+
$objPHPExcel->getActiveSheet()->getStyle("{$col}{$line}")->getAlignment()->applyFromArray(
+ array(
+ 'horizontal' =>
PHPExcel_Style_Alignment::HORIZONTAL_LEFT,
+ 'vertical' =>
PHPExcel_Style_Alignment::VERTICAL_CENTER,
+ 'rotation' => 0,
+ 'wrap' => true
+ )
+ );
+
$objPHPExcel->getActiveSheet()->getRowDimension($line)->setRowHeight(100);
+
+
+ $col++;
+ }
+ }
+ }
+
+ // Save Excel 2007 file
+// $objWriter =
PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+ $objWriter =
PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+ $objWriter->setUseDiskCaching(true,
$GLOBALS['phpgw_info']['server']['temp_dir']);
+ $objWriter->setOffice2003Compatibility(true);
+// echo "Peak memory usage: " .
(memory_get_peak_usage(true) / 1024 / 1024) . " MB";
+// die();
+
+ $objWriter->save('php://output');
+ }
public function import()
{
$id = phpgw::get_var('id', 'int', 'REQUEST');
Modified: branches/dev-syncromind-2/property/inc/class.uientity.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.uientity.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/property/inc/class.uientity.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -2117,7 +2117,6 @@
{
$location_id =
$GLOBALS['phpgw']->locations->get_id($this->type_app[$this->type],
$this->acl_location);
- $get_docs = false;
$check_doc =
$this->bocommon->get_lookup_entity('document');
foreach ($check_doc as $_check)
{
@@ -2130,6 +2129,8 @@
if ($get_docs ||
!empty($entity['documentation']))
{
+ $get_docs = true;
+
$tabs['document'] = array('label' =>
lang('document'), 'link' => '#document', 'disable' => 0);
$cats =
CreateObject('phpgwapi.categories', -1, 'property', '.document');
Modified: branches/dev-syncromind-2/property/inc/class.uiinvoice2.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.uiinvoice2.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/property/inc/class.uiinvoice2.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -734,11 +734,43 @@
$sign_orig = '';
$my_initials =
$GLOBALS['phpgw_info']['user']['account_lid'];
+ $default_tax_code = 22;
+
if (count($voucher))
{
//---------start forward
+ //temporary hardcoded for NLSH
+ switch ($voucher[0]['b_account_id'])
+ {
+ case '5900':
+ case '5930':
+ case '6300':
+ case '6420':
+ case '6490':
+ case '6840':
+ case '6841':
+ case '7040':
+ case '7140':
+ case '7149':
+ case '7400':
+ case '7500':
+ case '7710':
+ case '7794':
+ $default_tax_code = 0;
+ break;
+ case '4100':
+ $default_tax_code = 23;
+ break;
+
+ default:
+ $default_tax_code = 22;
+ break;
+ }
+
+ $selected_tax_code =
!empty($voucher[0]['tax_code']) ? $voucher[0]['tax_code'] : $default_tax_code;
+
if
(isset($this->config->config_data['invoice_acl']) &&
$this->config->config_data['invoice_acl'] == 'dimb')
{
$janitor_list =
$this->bo->get_dimb_role_user(1, $voucher[0]['dim_b'],
isset($voucher[0]['janitor']) ? $voucher[0]['janitor'] : '');
@@ -850,7 +882,7 @@
$voucher_info['generic']['approved_amount'] =
number_format($voucher_info['generic']['approved_amount'], 2, ',', ' ');
$voucher_info['generic']['amount'] =
number_format($voucher_info['generic']['amount'], 2, ',', ' ');
$voucher_info['generic']['dimb_list']['options'] =
$this->bo->select_dimb_list($voucher[0]['dim_b']);
-
$voucher_info['generic']['tax_code_list']['options'] =
$this->bo->tax_code_list($voucher[0]['tax_code']);
+
$voucher_info['generic']['tax_code_list']['options'] =
$this->bo->tax_code_list($selected_tax_code);
$voucher_info['generic']['periodization_list']['options'] =
execMethod('property.bogeneric.get_list', array(
'type' => 'periodization', 'selected'
=> $voucher[0]['periodization']));
@@ -890,7 +922,7 @@
else
{
$voucher_info['generic']['dimb_list']['options'] =
$this->bo->select_dimb_list();
-
$voucher_info['generic']['tax_code_list']['options'] =
$this->bo->tax_code_list();
+
$voucher_info['generic']['tax_code_list']['options'] =
$this->bo->tax_code_list($default_tax_code);
$voucher_info['generic']['periodization_list']['options'] =
execMethod('property.bogeneric.get_list', array(
'type' => 'periodization'));
Modified: branches/dev-syncromind-2/property/inc/class.uitts.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.uitts.inc.php 2017-01-24
15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/property/inc/class.uitts.inc.php 2017-01-25
08:38:31 UTC (rev 16188)
@@ -122,11 +122,7 @@
$this->_category_acl =
isset($this->bo->config->config_data['acl_at_tts_category']) ?
$this->bo->config->config_data['acl_at_tts_category'] : false;
}
- /**
- * Fetch data from $this->bo based on parametres
- * @return array
- */
- public function query()
+ function get_params()
{
$search = phpgw::get_var('search');
$order = phpgw::get_var('order');
@@ -163,6 +159,16 @@
'check_date_type' =>
phpgw::get_var('check_date_type', 'int'),
);
+ return $params;
+ }
+ /**
+ * Fetch data from $this->bo based on parametres
+ * @return array
+ */
+ public function query()
+ {
+ $params = $this->get_params();
+
$values = $this->bo->read($params);
if ($values)
@@ -196,7 +202,7 @@
$result_data['sum_budget'] = $this->bo->sum_budget;
$result_data['sum_actual_cost'] =
$this->bo->sum_actual_cost;
$result_data['sum_difference'] =
$this->bo->sum_difference;
- $result_data['draw'] = $draw;
+ $result_data['draw'] = phpgw::get_var('draw', 'int');
$link_data = array
(
@@ -274,43 +280,14 @@
function download( $external = '' )
{
- $start_date = urldecode($this->start_date);
- $end_date = urldecode($this->end_date);
-
- $search = phpgw::get_var('search');
- $order = phpgw::get_var('order');
- $draw = phpgw::get_var('draw', 'int');
- $columns = phpgw::get_var('columns');
-
- $params = array(
- 'start' => 0,
- 'results' => -1,
- 'query' => $search['value'],
- 'order' =>
$columns[$order[0]['column']]['data'],
- 'sort' => $order[0]['dir'],
- 'dir' => $order[0]['dir'],
- 'cat_id' => phpgw::get_var('cat_id', 'int',
'REQUEST', 0),
- 'allrows' => phpgw::get_var('length', 'int') ==
-1 ? true : false,
- 'status_id' => $this->bo->status_id,
- 'user_id' => $this->bo->user_id,
- 'reported_by' => $this->bo->reported_by,
- 'cat_id' => $this->bo->cat_id,
- 'vendor_id' => $this->bo->vendor_id,
- 'district_id' => $this->bo->district_id,
- 'part_of_town_id' => $this->bo->part_of_town_id,
- 'allrows' => true,
- 'start_date' => $start_date,
- 'end_date' => $end_date,
- 'location_code' => $this->bo->location_code,
- 'p_num' => $this->bo->p_num,
- 'building_part' => $this->bo->building_part,
- 'b_account' => $this->bo->b_account,
- 'ecodimb' => $this->bo->ecodimb,
- 'branch_id' => phpgw::get_var('branch_id'),
- 'order_dim1' => phpgw::get_var('order_dim1'),
- 'external' => $external,
- 'download' => true
- );
+ $params = $this->get_params();
+ $params['start'] = 0;
+ $params['results'] = -1;
+ $params['start_date'] = urldecode($this->start_date);
+ $params['end_date'] = urldecode($this->end_date);
+ $params['download'] = true;
+ $params['allrows'] = true;
+ $params['external'] = $external;
// _debug_array($params); die();
$list = $this->bo->read($params);
Modified: branches/dev-syncromind-2/property/inc/class.uiwo_hour.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.uiwo_hour.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/property/inc/class.uiwo_hour.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -59,6 +59,7 @@
'edit_deviation' => true,
'pdf_order' => true,
'import_calculation' => true,
+ // 'send_all_orders' => true
);
function __construct()
@@ -1332,7 +1333,7 @@
}
else
{
-
if(!$this->_validate_purchase_grant($workorder_id, $project['ecodimb'] ?
$project['ecodimb'] : $workorder['ecodimb']))
+
if(!$this->_validate_purchase_grant($workorder_id, $project['ecodimb'] ?
$project['ecodimb'] : $workorder['ecodimb'], $project['id']))
{
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' =>
'property.uiwo_hour.view',
'workorder_id' =>
$workorder_id, 'from' => phpgw::get_var('from')));
@@ -3341,12 +3342,85 @@
return $result;
}
+
+ function send_all_orders( )
+ {
+ if(!$this->acl->check('.admin', PHPGW_ACL_ADD,
'property'))
+ {
+ phpgw::no_access();
+ }
+
+ $start_from = 45000000;
+ $sql = "SELECT id, status FROM fm_workorder WHERE id >=
$start_from";
+ $db = & $GLOBALS['phpgw']->db;
+ $db->query($sql, __LINE__, __FILE__);
+ $ids = array();
+
+ while ($db->next_record())
+ {
+ $status = $db->f('status');
+ if($status == 'Avbrutt' || $status ==
'Dublisert')
+ {
+ phpgwapi_cache::message_set("Hopper
over [{$status}]: " . $db->f('id') , 'error');
+ }
+ else
+ {
+ $ids[] = $db->f('id');
+ }
+ }
+
+ foreach ($ids as $workorder_id)
+ {
+ try
+ {
+ $this->send_order( $workorder_id );
+ }
+ catch (Exception $e)
+ {
+
phpgwapi_cache::message_set($e->getMessage(), 'error');
+ }
+ }
+ }
+
function send_order( $workorder_id )
{
$workorder =
$this->boworkorder->read_single($workorder_id);
$show_cost = false;
$email_receipt = true;
- $pdfcode = $this->pdf_order($workorder_id, $show_cost);
+
+ try
+ {
+ $pdfcode = $this->pdf_order($workorder_id,
$show_cost);
+ }
+ catch (Exception $e)
+ {
+ phpgwapi_cache::message_set($e->getMessage(),
'error');
+ }
+
+ $criteria = array
+ (
+ 'appname' => 'property',
+ 'location' => '.project.workorder.transfer',
+ 'allrows' => true
+ );
+
+ $custom_functions =
$GLOBALS['phpgw']->custom_functions->find($criteria);
+
+ foreach ($custom_functions as $entry)
+ {
+ // prevent path traversal
+ if (preg_match('/\.\./', $entry['file_name']))
+ {
+ continue;
+ }
+
+ $file = PHPGW_SERVER_ROOT .
"/property/inc/custom/{$GLOBALS['phpgw_info']['user']['domain']}/{$entry['file_name']}";
+ if ($entry['active'] && is_file($file) &&
!$entry['client_side'] && !$entry['pre_commit'])
+ {
+ require $file;
+ }
+ }
+
$dir =
"{$GLOBALS['phpgw_info']['server']['temp_dir']}/pdf_files";
$attachments = array();
Modified: branches/dev-syncromind-2/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.uiworkorder.inc.php
2017-01-24 15:09:10 UTC (rev 16187)
+++ branches/dev-syncromind-2/property/inc/class.uiworkorder.inc.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -1484,7 +1484,8 @@
'lookup_type' =>
$location_template_type,
'lookup_entity' =>
$this->bocommon->get_lookup_entity('project'),
'entity_data' => (isset($values['p']) ?
$values['p'] : ''),
- 'filter_location' =>
$project['inherit_location'] ? $project['location_data']['location_code'] :
false
+ 'filter_location' =>
$project['inherit_location'] ? $project['location_data']['location_code'] :
false,
+ 'required_level' => 1
));
}
else
Modified:
branches/dev-syncromind-2/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
===================================================================
---
branches/dev-syncromind-2/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
2017-01-24 15:09:10 UTC (rev 16187)
+++
branches/dev-syncromind-2/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
2017-01-25 08:38:31 UTC (rev 16188)
@@ -37,434 +37,439 @@
*
* @author Sigurd Nes
*/
- class BkBygg_exporter_data_til_Agresso
+ if (!class_exists("BkBygg_exporter_data_til_Agresso"))
{
+ class BkBygg_exporter_data_til_Agresso
+ {
- var $dim0; // Art
- var $dim1; // Ansvar
- var $dim2; // Tjeneste
- var $dim3; // Objekt
- var $dim4; // Kontrakt - frivillig
- var $dim5; // Prosjekt
- var $dim6; // Aktivitet - frivillig
- var $transfer_xml;
- var $connection;
- var $order_id;
- var $voucher_type;
- var $batchid;
+ var $dim0; // Art
+ var $dim1; // Ansvar
+ var $dim2; // Tjeneste
+ var $dim3; // Objekt
+ var $dim4; // Kontrakt - frivillig
+ var $dim5; // Prosjekt
+ var $dim6; // Aktivitet - frivillig
+ var $transfer_xml;
+ var $connection;
+ var $order_id;
+ var $voucher_type;
+ var $batchid;
- public function __construct( $param )
- {
- $this->db = & $GLOBALS['phpgw']->db;
- $this->soXport = CreateObject('property.soXport');
- $this->config = CreateObject('admin.soconfig',
$GLOBALS['phpgw']->locations->get_id('property', '.invoice'));
@@ Diff output truncated at 153600 characters. @@
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16188] Syncromind: Merge 16130:16187 from trunk,
sigurdne <=