[freeside-commits] freeside/httemplate/edit/process did_order.html, 1.1.2.4, 1.1.2.5
Erik Levinson
levinse at wavetail.420.am
Thu Apr 14 20:09:54 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv15204/httemplate/edit/process
Modified Files:
Tag: FREESIDE_2_1_BRANCH
did_order.html
Log Message:
bulk DID orders/inventory enhancements, RT11291
Index: did_order.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/did_order.html,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -w -d -r1.1.2.4 -r1.1.2.5
--- did_order.html 11 Apr 2011 23:03:32 -0000 1.1.2.4
+++ did_order.html 15 Apr 2011 03:09:51 -0000 1.1.2.5
@@ -4,7 +4,8 @@
'value_callback' => $value_callback,
'process_o2m' => {
'table' => 'did_order_item',
- 'fields' => \@item_fields,
+ 'fields' => [ qw( msanum npa latanum ratecenternum state
+ quantity ) ],
},
)
%>
@@ -22,6 +23,16 @@
($field =~ /ed$/ && $value !~ /^\d+$/) ? parse_datetime($value) : $value;
};
-my @item_fields = qw( msa npa latanum ratecenter state quantity );
+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);
+}
</%init>
More information about the freeside-commits
mailing list