[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
Ivan,,,
ivan at wavetail.420.am
Tue Feb 19 17:10:34 PST 2008
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv19916/process
Modified Files:
cust_main_county-expand.cgi invoice_logo.html reg_code.cgi
Log Message:
process/part_pkg_taxclass.html
Index: invoice_logo.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/invoice_logo.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- invoice_logo.html 1 Aug 2007 22:25:05 -0000 1.1
+++ invoice_logo.html 20 Feb 2008 01:10:32 -0000 1.2
@@ -23,4 +23,3 @@
$cgi->redirect(popurl(3). "edit/invoice_logo.html?type=$type;name=$name;msg=Logo%20changed");
</%init>
-
Index: cust_main_county-expand.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/cust_main_county-expand.cgi,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cust_main_county-expand.cgi 13 Jan 2008 21:35:53 -0000 1.10
+++ cust_main_county-expand.cgi 20 Feb 2008 01:10:32 -0000 1.11
@@ -16,18 +16,29 @@
my $cust_main_county = qsearchs('cust_main_county',{'taxnum'=>$taxnum})
or die ("Unknown taxnum!");
-my @expansion = split /[\n\r]{1,2}/, $cgi->param('expansion');
-#warn scalar(@expansion);
-#warn "$_: $expansion[$_]\n" foreach (0..$#expansion);
+my @expansion;
+if ( $cgi->param('taxclass') ) {
+ my $sth = dbh->prepare('SELECT taxclass FROM part_pkg_taxclass')
+ or die dbh->errstr;
+ $sth->execute or die $sth->errstr;
+ @expansion = map $_->[0], @{$sth->fetchall_arrayref};
+ die "no taxclasses - add one first" unless @expansion;#XXX better err handling
+} else {
+ @expansion = split /[\n\r]{1,2}/, $cgi->param('expansion');
- at expansion=map {
- unless ( /^\s*([\w\- ]+)\s*$/ ) {
- $cgi->param('error', "Illegal item in expansion: $_");
- print $cgi->redirect(popurl(2). "cust_main_county-expand.cgi?". $cgi->query_string );
- myexit();
- }
- $1;
-} @expansion;
+ #warn scalar(@expansion);
+ #warn "$_: $expansion[$_]\n" foreach (0..$#expansion);
+
+ @expansion=map {
+ unless ( /^\s*([\w\- ]+)\s*$/ ) {
+ $cgi->param('error', "Illegal item in expansion: $_");
+ print $cgi->redirect(popurl(2). "cust_main_county-expand.cgi?". $cgi->query_string );
+ myexit();
+ }
+ $1;
+ } @expansion;
+
+}
foreach ( @expansion) {
my(%hash)=$cust_main_county->hash;
@@ -55,4 +66,13 @@
die $error if $error;
}
+if ( $cgi->param('taxclass') ) {
+ print $cgi->redirect(popurl(3). "browse/cust_main_county.cgi?".
+ 'state='. uri_escape($cust_main_county->state ).';'.
+ 'county='. uri_escape($cust_main_county->county ).';'.
+ 'country='. uri_escape($cust_main_county->country)
+ );
+ myexit;
+}
+
</%init>
Index: reg_code.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/reg_code.cgi,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- reg_code.cgi 13 Jan 2008 21:35:53 -0000 1.6
+++ reg_code.cgi 20 Feb 2008 01:10:32 -0000 1.7
@@ -43,4 +43,3 @@
$error ||= $agent->generate_reg_codes($num, \@pkgparts);
</%init>
-
More information about the freeside-commits
mailing list