summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/did_order.html
diff options
context:
space:
mode:
authorlevinse <levinse>2011-06-08 05:38:55 +0000
committerlevinse <levinse>2011-06-08 05:38:55 +0000
commit9a59cc9d51350d7eefb25697cd0d99188f686ea5 (patch)
tree76323a99701f5bd702663b228813c7b1b6a79c3b /httemplate/edit/process/did_order.html
parentc647fbae23dc64cdecb1c6fa6fee671cca7e8e7a (diff)
DID inventory/import / bulk DID orders - phase 2, RT12754
Diffstat (limited to 'httemplate/edit/process/did_order.html')
-rw-r--r--httemplate/edit/process/did_order.html27
1 files changed, 18 insertions, 9 deletions
diff --git a/httemplate/edit/process/did_order.html b/httemplate/edit/process/did_order.html
index a7d30c36c..6a2884413 100644
--- a/httemplate/edit/process/did_order.html
+++ b/httemplate/edit/process/did_order.html
@@ -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 $value_callback = sub {
my @params = $cgi->param;
foreach my $param ( @params ) {
- next unless $param =~ /^(orderitemnum[0-9]+)_rc_new$/;
- my $prefix = $1;
- my $value = $cgi->param($param);
- next unless $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);
+ if ( $param =~ /^(orderitemnum[0-9]+)_rc_new$/ ) {
+ my $prefix = $1;
+ my $value = $cgi->param($param);
+ 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>