[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8396] bkbooking: nsf update application + minor bugf
From: |
Kjell Arne Espedal |
Subject: |
[Fmsystem-commits] [8396] bkbooking: nsf update application + minor bugfix search |
Date: |
Tue, 20 Dec 2011 13:07:34 +0000 |
Revision: 8396
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8396
Author: kjell
Date: 2011-12-20 13:07:33 +0000 (Tue, 20 Dec 2011)
Log Message:
-----------
bkbooking: nsf update application + minor bugfix search
Modified Paths:
--------------
branches/dev-thomasez/booking/inc/class.customer_identifier.inc.php
branches/dev-thomasez/booking/inc/class.soapplication.inc.php
branches/dev-thomasez/booking/setup/phpgw_no.lang
branches/dev-thomasez/booking/setup/setup.inc.php
branches/dev-thomasez/booking/setup/tables_current.inc.php
branches/dev-thomasez/booking/setup/tables_update.inc.php
branches/dev-thomasez/booking/templates/base/customer_identifier.xsl
branches/dev-thomasez/bookingfrontend/inc/class.bosearch.inc.php
Modified: branches/dev-thomasez/booking/inc/class.customer_identifier.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.customer_identifier.inc.php
2011-12-20 12:05:09 UTC (rev 8395)
+++ branches/dev-thomasez/booking/inc/class.customer_identifier.inc.php
2011-12-20 13:07:33 UTC (rev 8396)
@@ -4,6 +4,7 @@
class booking_customer_identifier {
const TYPE_SSN = 'ssn';
const TYPE_ORGANIZATION_NUMBER = 'organization_number';
+ const TYPE_ADDRESS = 'address';
protected $field_prefix='customer_';
protected $identifier_type_field;
@@ -11,6 +12,7 @@
protected static $valid_types = array(
self::TYPE_SSN,
self::TYPE_ORGANIZATION_NUMBER,
+ self::TYPE_ADDRESS,
);
function __construct() {
@@ -156,6 +158,10 @@
all_cust_fields[field_type].value = '6 siffer (DDMMÅÅ) eller 11 siffer';
} else if
(all_cust_fields[field_type].name == 'customer_organization_number') {
all_cust_fields[field_type].value = '9 siffer';
+ } else if
(all_cust_fields[field_type].name == 'customer_address') {
+
YAHOO.util.Dom.get('field_customer_street').value = 'Street';
+
YAHOO.util.Dom.get('field_customer_zipcode').value = 'Zipcode';
+
YAHOO.util.Dom.get('field_customer_city').value = 'City';
}
all_cust_fields[field_type].focus();
all_cust_fields[field_type].select();
Modified: branches/dev-thomasez/booking/inc/class.soapplication.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.soapplication.inc.php
2011-12-20 12:05:09 UTC (rev 8395)
+++ branches/dev-thomasez/booking/inc/class.soapplication.inc.php
2011-12-20 13:07:33 UTC (rev 8396)
@@ -22,6 +22,10 @@
'case_officer_id' => array('type'
=> 'int', 'required' => false),
'activity_id' => array('type' =>
'int', 'required' => true),
'status' => array('type' =>
'string', 'required' => true),
+ 'customer_street' =>
array('type' => 'string', 'required' => false),
+ 'customer_zipcode' =>
array('type' => 'string', 'required' => false),
+ 'customer_district' =>
array('type' => 'string', 'required' => false),
+ 'customer_city' =>
array('type' => 'string', 'required' => false),
'customer_identifier_type'
=> array('type' => 'string', 'required' => true),
'customer_ssn'
=> array('type' => 'string', 'query' => true, 'sf_validator' =>
createObject('booking.sfValidatorNorwegianSSN', array('full_required'=>false)),
'required' => false),
'customer_organization_number' =>
array('type' => 'string', 'query' => true, 'sf_validator' =>
createObject('booking.sfValidatorNorwegianOrganizationNumber', array(),
array('invalid' => '%field% is invalid'))),
Modified: branches/dev-thomasez/booking/setup/phpgw_no.lang
===================================================================
--- branches/dev-thomasez/booking/setup/phpgw_no.lang 2011-12-20 12:05:09 UTC
(rev 8395)
+++ branches/dev-thomasez/booking/setup/phpgw_no.lang 2011-12-20 13:07:33 UTC
(rev 8396)
@@ -561,3 +561,4 @@
vestfold booking no Vestfold
ostfold booking no Østfold
You must choose a county booking no Du må velge et fylke
+Address booking no Adresse
Modified: branches/dev-thomasez/booking/setup/setup.inc.php
===================================================================
--- branches/dev-thomasez/booking/setup/setup.inc.php 2011-12-20 12:05:09 UTC
(rev 8395)
+++ branches/dev-thomasez/booking/setup/setup.inc.php 2011-12-20 13:07:33 UTC
(rev 8396)
@@ -1,5 +1,5 @@
<?php
- $setup_info['booking']['version'] = '0.2.11';
+ $setup_info['booking']['version'] = '0.2.12';
$setup_info['booking']['name'] = 'booking';
$setup_info['booking']['app_order'] = 9;
$setup_info['booking']['enable'] = 1;
Modified: branches/dev-thomasez/booking/setup/tables_current.inc.php
===================================================================
--- branches/dev-thomasez/booking/setup/tables_current.inc.php 2011-12-20
12:05:09 UTC (rev 8395)
+++ branches/dev-thomasez/booking/setup/tables_current.inc.php 2011-12-20
13:07:33 UTC (rev 8396)
@@ -216,6 +216,10 @@
'secret' => array('type' => 'text', 'nullable'
=> False),
'owner_id' => array('type' => 'int',
'precision' => '4', 'nullable' => False),
'case_officer_id' => array('type' => 'int',
'precision' => '4', 'nullable' => True),
+ 'customer_street' => array('type' =>
'varchar','precision' => '255', 'nullable' => True),
+ 'customer_zip_code' => array('type' =>
'varchar','precision' => '255', 'nullable' => True),
+ 'customer_district' => array('type' =>
'varchar','precision' => '255', 'nullable' => True),
+ 'customer_city' => array('type' =>
'varchar','precision' => '255', 'nullable' => True),
'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),
Modified: branches/dev-thomasez/booking/setup/tables_update.inc.php
===================================================================
--- branches/dev-thomasez/booking/setup/tables_update.inc.php 2011-12-20
12:05:09 UTC (rev 8395)
+++ branches/dev-thomasez/booking/setup/tables_update.inc.php 2011-12-20
13:07:33 UTC (rev 8396)
@@ -2686,7 +2686,7 @@
$GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN external_cost integer DEFAULT NULL");
$GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN cost_type varchar(50) DEFAULT NULL");
$GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN map_url varchar(250) DEFAULT NULL");
- $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN weather_url varchar(250) DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN weather_url varchar(250) DEFAULT ''");
if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
{
@@ -2694,4 +2694,24 @@
return $GLOBALS['setup_info']['booking']['currentver'];
}
}
+ /**
+ * Update booking version from 0.2.11 to 0.2.12
+ * Update bb_building with som new fields.
+ *
+ */
+ $test[] = '0.2.11';
+ function booking_upgrade0_2_11()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_application ADD COLUMN customer_street varchar(50) DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_application ADD COLUMN customer_zipcode varchar(50) DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_application ADD COLUMN customer_district varchar(50) DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_application ADD COLUMN customer_city varchar(50) DEFAULT NULL");
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['booking']['currentver'] =
'0.2.12';
+ return $GLOBALS['setup_info']['booking']['currentver'];
+ }
+ }
+
Modified: branches/dev-thomasez/booking/templates/base/customer_identifier.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/customer_identifier.xsl
2011-12-20 12:05:09 UTC (rev 8395)
+++ branches/dev-thomasez/booking/templates/base/customer_identifier.xsl
2011-12-20 13:07:33 UTC (rev 8396)
@@ -25,6 +25,11 @@
</select>
<input name="customer_ssn" type="text"
id="field_customer_ssn" value="{$entity/customer_ssn}"/>
<input name="customer_organization_number" type="text"
id="field_customer_organization_number"
value="{$entity/customer_organization_number}"/>
+ <div id="field_customer_address">
+ Adresse:<input id="field_customer_street"
name="customer_street" type="text" value="{$entity/customer_street}"/>
+ Postnr:<input id="field_customer_zipcode"
name="customer_zipcode" type="text" value="{$entity/customer_zipcode}"/>
+ Poststed:<input id="field_customer_city"
name="customer_city" type="text" value="{$entity/customer_city}"/>
+ </div>
</dd>
</func:result>
</func:function>
@@ -48,4 +53,4 @@
</xsl:if>
</func:result>
-</func:function>
\ No newline at end of file
+</func:function>
Modified: branches/dev-thomasez/bookingfrontend/inc/class.bosearch.inc.php
===================================================================
--- branches/dev-thomasez/bookingfrontend/inc/class.bosearch.inc.php
2011-12-20 12:05:09 UTC (rev 8395)
+++ branches/dev-thomasez/bookingfrontend/inc/class.bosearch.inc.php
2011-12-20 13:07:33 UTC (rev 8396)
@@ -16,7 +16,7 @@
$type = phpgw::get_var('type', 'GET');
$bui_result = $org_result = $res_result = array();
- if ((!$type || $type == "building") &&
in_array($resource['res'],array('House','Boat','Location'))) {
+ if ((!$type || $type == "building") &&
in_array($resource['res'],array('House','Location','Campsite',''))) {
if ($resource['region'] == 'east') {
@@ -90,9 +90,6 @@
if($fylke != '') {
$wclause .= " AND district =
'".$fylke."'";
}
-# if($ressurs != '') {
-# $wclause .= " AND type =
'".$ressurs."'";
-# }
if($teltplasser != '') {
$wclause .= ' AND
'.$teltplasser;
}
@@ -100,8 +97,6 @@
$wclause .= ' AND
'.$sengeplasser;
}
-# echo "<pre>";print_r($wclause);exit;
-
$bui_result =
$this->sobuilding->read(array("query"=>$searchterm, "filters" => array('where'
=> $wclause)));
foreach($bui_result['results'] as &$bui)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8396] bkbooking: nsf update application + minor bugfix search,
Kjell Arne Espedal <=