summaryrefslogtreecommitdiff
path: root/httemplate/elements/select-taxproduct.html
blob: 37a428960b656c898d33eaa0d11d0babec4887f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<% $opt{'prefix'} %><INPUT NAME    = "<% $name %>"
                           ID      = "<% $name %>"
                           TYPE    = "hidden"
                           VALUE   = "<% $value |h %>"
                    >
                    <INPUT NAME    = "<% $name %>_description"
                           ID      = "<% $name %>_description"
                           TYPE    = "text"
                           VALUE   = "<% $description %>"
                           SIZE    = "12"
                           onclick = "overlib( OLiframeContent('<% $p %>/browse/part_pkg_taxproduct.cgi?_type=select&id=<% $name %>&taxproductnum='+document.getElementById('<% $name %>').value, 1000, 400, 'tax_product_popup'), CAPTION, 'Select product', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK); return false;"><% $opt{'postfix'} %>
<%init>

my %opt = @_;
my $name = $opt{element_name} || $opt{field} || 'taxproductnum';
my $value = length($opt{curr_value}) ? $opt{curr_value} : $opt{value};
my $description = $opt{'taxproduct_description'};
  
unless ( $description || ! $value ) {
    my $part_pkg_taxproduct =
      qsearchs( 'part_pkg_taxproduct', { 'taxproductnum'=> $value } );
    $description = $part_pkg_taxproduct->description
      if $part_pkg_taxproduct;
}

</%init>