[open-ils-commits] r9242 - in branches/rel_1_2/Open-ILS: src/sql/Pg
web/reports web/reports/xul
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Apr 7 11:01:05 EDT 2008
Author: miker
Date: 2008-04-07 10:24:03 -0400 (Mon, 07 Apr 2008)
New Revision: 9242
Modified:
branches/rel_1_2/Open-ILS/src/sql/Pg/005.schema.actors.sql
branches/rel_1_2/Open-ILS/web/reports/oils_rpt_tforms.js
branches/rel_1_2/Open-ILS/web/reports/xul/transforms.js
Log:
adding "first5" function to trim zip codes
Modified: branches/rel_1_2/Open-ILS/src/sql/Pg/005.schema.actors.sql
===================================================================
--- branches/rel_1_2/Open-ILS/src/sql/Pg/005.schema.actors.sql 2008-04-07 02:28:05 UTC (rev 9241)
+++ branches/rel_1_2/Open-ILS/src/sql/Pg/005.schema.actors.sql 2008-04-07 14:24:03 UTC (rev 9242)
@@ -524,4 +524,8 @@
INSERT INTO actor.org_address VALUES (DEFAULT,DEFAULT,DEFAULT,1,'123 Main St.',NULL,'Anywhere',NULL,'GA','US','30303');
UPDATE actor.org_unit SET holds_address = 1, ill_address = 1, billing_address = 1, mailing_address = 1;
+CREATE OR REPLACE FUNCTION public.first5 ( TEXT ) RETURNS TEXT AS $$
+ SELECT SUBSTRING( $1, 1, 5);
+$$ LANGUAGE SQL;
+
COMMIT;
Modified: branches/rel_1_2/Open-ILS/web/reports/oils_rpt_tforms.js
===================================================================
--- branches/rel_1_2/Open-ILS/web/reports/oils_rpt_tforms.js 2008-04-07 02:28:05 UTC (rev 9241)
+++ branches/rel_1_2/Open-ILS/web/reports/oils_rpt_tforms.js 2008-04-07 14:24:03 UTC (rev 9242)
@@ -51,6 +51,11 @@
label : 'Upper case'
},
+ first5 : {
+ datatype : [OILS_RPT_DTYPE_STRING, 'text'],
+ label : 'First 5 characters (for US ZIP code)'
+ },
+
/* timestamp transforms ----------------------- */
dow : {
datatype : OILS_RPT_DTYPE_TIMESTAMP,
Modified: branches/rel_1_2/Open-ILS/web/reports/xul/transforms.js
===================================================================
--- branches/rel_1_2/Open-ILS/web/reports/xul/transforms.js 2008-04-07 02:28:05 UTC (rev 9241)
+++ branches/rel_1_2/Open-ILS/web/reports/xul/transforms.js 2008-04-07 14:24:03 UTC (rev 9242)
@@ -88,6 +88,11 @@
label : 'Upper case'
},
+ firt5 : {
+ datatype : [ OILS_RPT_DTYPE_STRING ],
+ label : 'First 5 characters (for US ZIP code)'
+ },
+
/* timestamp transforms ----------------------- */
dow : {
datatype : [ OILS_RPT_DTYPE_TIMESTAMP ],
More information about the open-ils-commits
mailing list