[freeside-commits] freeside/httemplate/edit/process did_order.html, 1.3, 1.4
Erik Levinson
levinse at wavetail.420.am
Thu Apr 14 20:04:15 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv14560/httemplate/edit/process
Modified Files:
did_order.html
Log Message:
FS/FS/msa.pm
Index: did_order.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/did_order.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- did_order.html 11 Apr 2011 23:00:03 -0000 1.3
+++ did_order.html 15 Apr 2011 03:04:13 -0000 1.4
@@ -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