[open-ils-commits] r9243 - in trunk/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:02:07 EDT 2008
Author: miker
Date: 2008-04-07 10:25:02 -0400 (Mon, 07 Apr 2008)
New Revision: 9243
Modified:
trunk/Open-ILS/src/sql/Pg/005.schema.actors.sql
trunk/Open-ILS/web/reports/oils_rpt_tforms.js
trunk/Open-ILS/web/reports/xul/transforms.js
Log:
adding "first5" function to trim zip codes
Modified: trunk/Open-ILS/src/sql/Pg/005.schema.actors.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/005.schema.actors.sql 2008-04-07 14:24:03 UTC (rev 9242)
+++ trunk/Open-ILS/src/sql/Pg/005.schema.actors.sql 2008-04-07 14:25:02 UTC (rev 9243)
@@ -510,4 +510,8 @@
CREATE INDEX actor_org_address_org_unit_idx ON actor.org_address (org_unit);
+CREATE OR REPLACE FUNCTION public.first5 ( TEXT ) RETURNS TEXT AS $$
+ SELECT SUBSTRING( $1, 1, 5);
+$$ LANGUAGE SQL;
+
COMMIT;
Modified: trunk/Open-ILS/web/reports/oils_rpt_tforms.js
===================================================================
--- trunk/Open-ILS/web/reports/oils_rpt_tforms.js 2008-04-07 14:24:03 UTC (rev 9242)
+++ trunk/Open-ILS/web/reports/oils_rpt_tforms.js 2008-04-07 14:25:02 UTC (rev 9243)
@@ -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: trunk/Open-ILS/web/reports/xul/transforms.js
===================================================================
--- trunk/Open-ILS/web/reports/xul/transforms.js 2008-04-07 14:24:03 UTC (rev 9242)
+++ trunk/Open-ILS/web/reports/xul/transforms.js 2008-04-07 14:25:02 UTC (rev 9243)
@@ -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