1 % unless ( $opt{'js_only'} ) {
3 <INPUT TYPE="hidden" NAME="<%$name%>" ID="<%$id%>" VALUE="<% $curr_value %>">
9 % $value = $item->get('quantity');
12 NAME = "<%$name%>_quantity"
13 ID = "<%$id%>_quantity"
15 VALUE = "<% scalar($cgi->param($name."_quantity"))
18 <BR><FONT SIZE="-1">Quantity</FONT>
21 % $value = $item->get('npa');
24 NAME = "<%$name%>_npa"
27 VALUE = "<% scalar($cgi->param($name."_npa"))
30 <BR><FONT SIZE="-1">NPA</FONT>
33 % $value = $item->get('ratecenternum');
35 <% include('/elements/select-table.html',
36 'name_col' => 'description',
37 'table' => 'rate_center',
40 'field' => "${name}_ratecenternum",
41 'id' => "${id}_ratecenternum",
42 'curr_value' => scalar($cgi->param("${name}_ratecenternum"))
44 'post_options' => [ 0 => 'Add new...' ],
45 onchange => 'ratecenter_changed',
48 <BR><FONT SIZE="-1">Rate Center</FONT>
49 <div style="display:none; font-size: 80%" id="<%$id%>_rc_div">
50 - add new: <INPUT TYPE = "text"
51 NAME = "<%$name%>_rc_new"
52 ID = "<%$id%>_rc_new">
56 % $value = $item->get('msanum');
58 <% include('/elements/select-table.html',
59 'name_col' => 'description',
63 'field' => "${name}_msanum",
64 'curr_value' => scalar($cgi->param("${name}_msanum"))
68 <BR><FONT SIZE="-1">MSA</FONT>
71 % $value = $item->get('latanum');
72 <TD><% include('/elements/select-table.html',
73 'name_col' => 'description',
78 'field' => "${name}_latanum",
79 'curr_value' => scalar($cgi->param("${name}_latanum"))
83 <BR><FONT SIZE="-1">LATA #</FONT>
86 % $value = $item->get('state');
87 <TD><% include('/elements/select-state.html',
91 'prefix' => "${name}_",
92 'state' => scalar($cgi->param("${name}_state"))
96 <BR><FONT SIZE="-1">State</FONT>
107 my $name = $opt{'element_name'} || $opt{'field'} || 'orderitemnum';
108 my $id = $opt{'id'} || 'orderitemnum';
110 my $curr_value = $opt{'curr_value'} || $opt{'value'};
114 $item = qsearchs('did_order_item', { 'orderitemnum' => $curr_value } );
116 $item = new FS::did_order_item {};