X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fbrowse%2Frate_region.html;h=bbe213693da8817bb5eb62a7ef3555d24da4ca91;hp=b0ce467c01f07f0f83e8358cc1470612dc496872;hb=ac8410cdb67639afeb84c84e975fffadf3e6cce1;hpb=3d0a1bb06b895c5be6e3f0517d355442a6b1e125 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();