X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fdid_order_item.html;h=d1f90f33898c720d2e75fa5ed28aee285dfba4fd;hp=263826ecc462bd75fdef8be02dc309ffa0c95d46;hb=7b0bbc4117a7959b9f7b7b2cf999b8188ba34160;hpb=31f2e890b5b3e1b0ad29a877ff67bc641ea1fc40 diff --git a/httemplate/elements/did_order_item.html b/httemplate/elements/did_order_item.html index 263826ecc..d1f90f338 100644 --- a/httemplate/elements/did_order_item.html +++ b/httemplate/elements/did_order_item.html @@ -4,23 +4,112 @@ -% foreach my $field ( @fields ) { -% -% my $value = ''; -% $value = $item->get($field); +% 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', + 'table' => 'lata', + 'disable_empty' => 0, + 'empty_label' => ' ', + 'label_showkey' => 1, + 'field' => "${name}_latanum", + 'curr_value' => scalar($cgi->param("${name}_latanum")) + || $value, + ) + %> +
LATA # +
<% include('/elements/select-state.html', + 'disable_empty' => 0, + 'empty_label' => ' ', + 'country' => 'US', + 'prefix' => "${name}_", + 'state' => scalar($cgi->param("${name}_state")) + || $value, + ) + %> +
State +
" + <% $onchange %> + > +
Customer # +
@@ -40,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; @@ -50,20 +139,4 @@ if ( $curr_value ) { $item = new FS::did_order_item {}; } -my %size = ( 'npa' => 3, - 'latanum' => 3, - 'state' => 2, - 'quantity' => 3,); - -tie my %label, 'Tie::IxHash', - 'msa' => 'MSA', - 'npa' => 'NPA', - 'latanum' => 'LATA #', - 'rate_center' => 'Rate Center', - 'state' => 'State', - 'quantity' => 'Quantity', -; - -my @fields = keys %label; -