X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Frate_region.html;h=bbe213693da8817bb5eb62a7ef3555d24da4ca91;hb=29d80a8582103ead0b5910391cabc45cb85fa836;hp=b0ce467c01f07f0f83e8358cc1470612dc496872;hpb=f3e0ac2b009c4edd5692cb587ff709dac2223ebe;p=freeside.git diff --git a/httemplate/browse/rate_region.html b/httemplate/browse/rate_region.html index b0ce467c0..bbe213693 100644 --- a/httemplate/browse/rate_region.html +++ b/httemplate/browse/rate_region.html @@ -40,7 +40,7 @@ if ( driver_name =~ /^Pg/ ) { " THEN npa ". " ELSE npa || '-' || nxx ". " END"; - my $prefixes_sql = "SELECT $prefix_sql $fromwhere AND npa IS NOT NULL"; + my $prefixes_sql = "SELECT $prefix_sql $fromwhere AND npa IS NOT NULL ORDER BY npa"; $select .= "( SELECT '+'||countrycode $fromwhere LIMIT 1 ) AS ccode, ARRAY_TO_STRING( ARRAY($prefixes_sql), ', ' ) AS prefixes"; } elsif ( driver_name =~ /^mysql/i ) { @@ -96,8 +96,9 @@ sub _rate_detail_factory { my( $rate, $field ) = @_; return sub { my $rate_detail = $rate->dest_detail(shift) - || new FS::rate_region { 'min_included' => 0, + || new FS::rate_detail { 'min_included' => 0, 'min_charge' => 0, + 'min_cost' => 0, 'sec_granularity' => 0, }; my $value = $rate_detail->$field();