[freeside-commits] freeside/httemplate/edit/process did_order.html, 1.4, 1.5

Erik Levinson levinse at wavetail.420.am
Tue Jun 7 22:37:41 PDT 2011


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

Modified Files:
	did_order.html 
Log Message:
DID inventory/import / bulk DID orders - phase 2, RT12754

Index: did_order.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/did_order.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -d -r1.4 -r1.5
--- did_order.html	15 Apr 2011 03:04:13 -0000	1.4
+++ did_order.html	8 Jun 2011 05:37:39 -0000	1.5
@@ -5,7 +5,7 @@
                'process_o2m' => {
                     'table'  => 'did_order_item',
                     'fields' => [ qw( msanum npa latanum ratecenternum state
-                                  quantity ) ],
+                                  quantity custnum ) ],
                 },
            )
 %>
@@ -25,14 +25,23 @@
 
 my @params = $cgi->param;
 foreach my $param ( @params ) {
-    next unless $param =~ /^(orderitemnum[0-9]+)_rc_new$/;
+    if ( $param =~ /^(orderitemnum[0-9]+)_rc_new$/ ) {
     my $prefix = $1;
     my $value = $cgi->param($param);
-    next unless $value =~ /^[A-Za-z0-9\- ]+$/;
+        if( $value =~ /^[A-Za-z0-9\- ]+$/ ) {
     my $rc = new FS::rate_center({ description => $value });
     my $error = $rc->insert;
     die "error inserting new rate center: $error" if $error;
     $cgi->param("${prefix}_ratecenternum",$rc->ratecenternum);
 }
+    }
+    elsif ( $param =~ /^(orderitemnum[0-9]+)_custnum$/ ) {
+        my $prefix = $1;
+        my $value = $cgi->param($param);
+        if ( $value =~ /^\d+$/ ) {
+            $cgi->param("custnum",'');
+        }
+    }
+}
 
 </%init>



More information about the freeside-commits mailing list