[freeside-commits] freeside/httemplate/edit/process cust_main_county-collapse.cgi, 1.6, 1.7

Ivan,,, ivan at wavetail.420.am
Thu Jul 23 06:25:12 PDT 2009


Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv30475/edit/process

Modified Files:
	cust_main_county-collapse.cgi 
Log Message:
add back remove ("collapse") links again.  on each line this time.  RT#2973

Index: cust_main_county-collapse.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/cust_main_county-collapse.cgi,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- cust_main_county-collapse.cgi	13 Jan 2008 21:35:53 -0000	1.6
+++ cust_main_county-collapse.cgi	23 Jul 2009 13:25:10 -0000	1.7
@@ -1,44 +1,37 @@
-%
-%
-%my($query) = $cgi->keywords;
-%$query =~ /^(\d+)$/ or die "Illegal taxnum!";
-%my $taxnum = $1;
-%my $cust_main_county = qsearchs('cust_main_county', { 'taxnum' => $taxnum } )
-%  or die "Unknown taxnum $taxnum";
-%
-%#really should do this in a .pm & start transaction
-%
-%foreach my $delete ( qsearch('cust_main_county', {
-%                    'country' => $cust_main_county->country,
-%                    'state' => $cust_main_county->state  
-%                 } ) ) {
-%#  unless ( qsearch('cust_main',{
-%#    'state'  => $cust_main_county->getfield('state'),
-%#    'county' => $cust_main_county->getfield('county'),
-%#    'country' =>  $cust_main_county->getfield('country'),
-%#  } ) ) {
-%    my $error = $delete->delete;
-%    die $error if $error;
-%#  } else {
-%    #should really fix the $cust_main record
-%#  }
-%
-%}
-%
-%$cust_main_county->taxnum('');
-%$cust_main_county->county('');
-%my $error = $cust_main_county->insert;
-%die $error if $error;
-%
-%print $cgi->redirect(popurl(3). "browse/cust_main_county.cgi");
-%
-%
+<% $cgi->redirect(popurl(3). "browse/cust_main_county.cgi") %>
 <%init>
 
-#this isn't actually linked from anywhere just now, but it will be again soon
-
 die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
 
+my($query) = $cgi->keywords;
+$query =~ /^(\d+)$/ or die "Illegal taxnum!";
+my $taxnum = $1;
+my $cust_main_county = qsearchs('cust_main_county', { 'taxnum' => $taxnum } )
+  or die "Unknown taxnum $taxnum";
+
+#really should do this in a .pm & start transaction
+
+foreach my $delete ( qsearch('cust_main_county', {
+                    'country' => $cust_main_county->country,
+                    'state' => $cust_main_county->state  
+                 } ) ) {
+#  unless ( qsearch('cust_main',{
+#    'state'  => $cust_main_county->getfield('state'),
+#    'county' => $cust_main_county->getfield('county'),
+#    'country' =>  $cust_main_county->getfield('country'),
+#  } ) ) {
+    my $error = $delete->delete;
+    die $error if $error;
+#  } else {
+    #should really fix the $cust_main record
+#  }
+
+}
+
+$cust_main_county->taxnum('');
+$cust_main_county->county('');
+my $error = $cust_main_county->insert;
+die $error if $error;
 
 </%init>



More information about the freeside-commits mailing list