[freeside-commits] freeside/httemplate/edit cust_main_county-expand.cgi, 1.13, 1.14
Ivan,,,
ivan at wavetail.420.am
Tue Feb 19 17:10:34 PST 2008
- Previous message: [freeside-commits] freeside/FS FS.pm, 1.32.2.5, 1.32.2.6 MANIFEST, 1.111.2.1, 1.111.2.2
- Next message: [freeside-commits] freeside/httemplate/edit/process cust_main_county-expand.cgi, 1.10, 1.11 invoice_logo.html, 1.1, 1.2 reg_code.cgi, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail.420.am:/tmp/cvs-serv19916
Modified Files:
cust_main_county-expand.cgi
Log Message:
process/part_pkg_taxclass.html
Index: cust_main_county-expand.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_main_county-expand.cgi,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- cust_main_county-expand.cgi 13 Jan 2008 21:35:52 -0000 1.13
+++ cust_main_county-expand.cgi 20 Feb 2008 01:10:31 -0000 1.14
@@ -5,7 +5,6 @@
<FORM ACTION="<% $p1 %>process/cust_main_county-expand.cgi" METHOD=POST>
<INPUT TYPE="hidden" NAME="taxnum" VALUE="<% $taxnum %>">
-<INPUT TYPE="hidden" NAME="taxclass" VALUE="<% $taxclass |h %>">
<TEXTAREA NAME="expansion" COLS="50" ROWS="16"><% $expansion |h %></TEXTAREA>
@@ -21,17 +20,15 @@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
-my($taxnum, $expansion, $taxclass);
+my($taxnum, $expansion);
my($query) = $cgi->keywords;
if ( $cgi->param('error') ) {
$taxnum = $cgi->param('taxnum');
$expansion = $cgi->param('expansion');
- $taxclass = $cgi->param('taxclass');
} else {
- $query =~ /^(taxclass)?(\d+)$/
+ $query =~ /^(\d+)$/
or die "Illegal taxnum (query $query)";
- $taxclass = $1 ? 'taxclass' : '';
- $taxnum = $2;
+ $taxnum = $1;
$expansion = '';
}
@@ -39,28 +36,13 @@
or die "cust_main_county.taxnum $taxnum not found";
my $title;
-if ( $taxclass ) {
- die "Can't expand entry!" if $cust_main_county->taxclass;
- $title = 'Tax Classes';
+die "Can't expand entry!" if $cust_main_county->county;
- # prepopuplate with other tax classes... which should really have a primary
- # key of their own... also this could be more efficient in the error case...
- my $sth = dbh->prepare("SELECT DISTINCT taxclass FROM cust_main_county")
- or die dbh->errstr;
- $sth->execute or die $sth->errstr;
- my %taxclasses = map { $_->[0] => 1 } @{$sth->fetchall_arrayref};
- $expansion ||= join("\n", grep $_, keys %taxclasses );
-
+if ( $cust_main_county->state ) {
+ $title = 'Counties';
} else {
- die "Can't expand entry!" if $cust_main_county->county;
-
- if ( $cust_main_county->state ) {
- $title = 'Counties';
- } else {
- $title = 'States/Provinces';
- }
-
+ $title = 'States/Provinces';
}
my $p1 = popurl(1);
- Previous message: [freeside-commits] freeside/FS FS.pm, 1.32.2.5, 1.32.2.6 MANIFEST, 1.111.2.1, 1.111.2.2
- Next message: [freeside-commits] freeside/httemplate/edit/process cust_main_county-expand.cgi, 1.10, 1.11 invoice_logo.html, 1.1, 1.2 reg_code.cgi, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list