X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fdid_order_item.html;h=d1f90f33898c720d2e75fa5ed28aee285dfba4fd;hp=0f5a7651683266a71eff845ea55f1db4bf8daaf7;hb=7b0bbc4117a7959b9f7b7b2cf999b8188ba34160;hpb=2579dce95f2a41d7a162404f193545e9601c374d diff --git a/httemplate/elements/did_order_item.html b/httemplate/elements/did_order_item.html index 0f5a76516..d1f90f338 100644 --- a/httemplate/elements/did_order_item.html +++ b/httemplate/elements/did_order_item.html @@ -4,24 +4,72 @@ -% foreach my $field ( @textfields ) { -% -% my $value = ''; -% $value = $item->get($field); +% my $value = ''; - -% } -% my $value = ''; +
Quantity + + +% $value = $item->get('npa'); + + +% $value = $item->get('ratecenternum'); + + +% $value = $item->get('msanum'); + + % $value = $item->get('latanum'); + % $value = $item->get('state'); + +% $value = $item->get('custnum'); + +
+% $value = $item->get('quantity'); + " <% $onchange %> > -
<% $label{$field} %> -
+ " + <% $onchange %> + > +
NPA +
+ <% include('/elements/select-table.html', + 'name_col' => 'description', + 'table' => 'rate_center', + 'disable_empty' => 0, + 'empty_label' => ' ', + 'field' => "${name}_ratecenternum", + 'id' => "${id}_ratecenternum", + 'curr_value' => scalar($cgi->param("${name}_ratecenternum")) + || $value, + 'post_options' => [ 0 => 'Add new...' ], + onchange => 'ratecenter_changed', + ) + %> +
Rate Center + +
+ <% include('/elements/select-table.html', + 'name_col' => 'description', + 'table' => 'msa', + 'disable_empty' => 0, + 'empty_label' => ' ', + 'field' => "${name}_msanum", + 'curr_value' => scalar($cgi->param("${name}_msanum")) + || $value, + ) + %> +
MSA +
<% include('/elements/select-table.html', 'name_col' => 'description', @@ -32,10 +80,11 @@ 'field' => "${name}_latanum", 'curr_value' => scalar($cgi->param("${name}_latanum")) || $value, - ) + ) %>
LATA #
<% include('/elements/select-state.html', 'disable_empty' => 0, @@ -44,10 +93,23 @@ 'prefix' => "${name}_", 'state' => scalar($cgi->param("${name}_state")) || $value, - ) + ) %>
State
" + <% $onchange %> + > +
Customer # +
@@ -67,7 +129,7 @@ if ( $opt{'onchange'} ) { $onchange .= '(this)' unless $onchange =~ /\(\w*\);?$/; $onchange =~ s/\(what\);/\(this\);/g; #ugh, terrible hack. all onchange #callbacks should act the same - $onchange = 'onChange="'. $onchange. '"'; + $onchange = 'onChange="'. $onchange. '"'; } my $item; @@ -77,15 +139,4 @@ if ( $curr_value ) { $item = new FS::did_order_item {}; } -my %size = ( 'npa' => 3, - 'quantity' => 3,); - -tie my %label, 'Tie::IxHash', - 'quantity' => 'Quantity', - 'npa' => 'NPA', - 'ratecenter' => 'Rate Center', - 'msa' => 'MSA', -; -my @textfields = keys %label; -