[freeside-commits] freeside/httemplate/browse rate_region.html, 1.1.2.3, 1.1.2.4
Ivan,,,
ivan at wavetail.420.am
Tue Aug 19 03:06:48 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/browse
In directory wavetail.420.am:/tmp/cvs-serv2381/httemplate/browse
Modified Files:
Tag: FREESIDE_1_7_BRANCH
rate_region.html
Log Message:
more consistent prefix display, and don't forget nxx'
Index: rate_region.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/browse/rate_region.html,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -d -r1.1.2.3 -r1.1.2.4
--- rate_region.html 4 Mar 2008 02:27:41 -0000 1.1.2.3
+++ rate_region.html 19 Aug 2008 10:06:45 -0000 1.1.2.4
@@ -33,8 +33,13 @@
if ( driver_name =~ /^Pg/ ) {
my $fromwhere = 'FROM rate_prefix'.
' WHERE rate_prefix.regionnum = rate_region.regionnum';
+ my $prefix_sql = " CASE WHEN nxx IS NULL OR nxx = '' ".
+ " THEN npa ".
+ " ELSE npa || '-' || nxx ".
+ " END";
+ my $prefixes_sql = "SELECT $prefix_sql $fromwhere AND npa IS NOT NULL";
$select .= "( SELECT countrycode $fromwhere LIMIT 1 ) AS ccode,
- ARRAY_TO_STRING( ARRAY(SELECT npa $fromwhere AND npa IS NOT NULL), ',' ) AS prefixes";
+ ARRAY_TO_STRING( ARRAY($prefixes_sql), ',' ) AS prefixes";
} elsif ( driver_name =~ /^mysql/i ) {
$join = 'LEFT JOIN rate_prefix USING ( regionnum )';
$select .= "GROUP_CONCAT( DISTINCT countrycode ) AS ccode,
More information about the freeside-commits
mailing list