'name' => 'Bulk DID Order',
'field_callback' => $field_callback,
'html_bottom' => $javascript,
+ 'body_etc' => 'onLoad="stockcust_changed()"',
)
%>
<%init>
custnum_select.disabled = false;
}
custnum.value = '';
- custnum_search.value = '';
}
/* o2m or something else is broken, can't put this in the actual
SIZE = "3"
VALUE = "<% scalar($cgi->param($name."_quantity"))
|| $value |h %>"
+ <% $onchange %>
>
<BR><FONT SIZE="-1">Quantity</FONT>
</TD>
SIZE = "3"
VALUE = "<% scalar($cgi->param($name."_npa"))
|| $value |h %>"
+ <% $onchange %>
>
<BR><FONT SIZE="-1">NPA</FONT>
</TD>
my $curr_value = $opt{'curr_value'} || $opt{'value'};
+my $onchange = '';
+if ( $opt{'onchange'} ) {
+ $onchange = $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. '"';
+}
+
my $item;
if ( $curr_value ) {
$item = qsearchs('did_order_item', { 'orderitemnum' => $curr_value } );
<TD><% $format %><INPUT TYPE="hidden" NAME="format" VALUE="<% $format %>"></TD>
</TR>
+% if ( scalar(@exports) == 1 ) {
+% my $export = $exports[0];
+ <TR>
+ <TD>Export</TD>
+ <TD>
+ <INPUT TYPE="hidden" name="exportnum" value="<%$export->exportnum%>">
+ <% $export->exportname %>
+ </TD>
+ </TR>
+% } else {
<% include( '/elements/tr-select-table.html',
'table' => 'part_export',
'name_col' => 'label',
#'label_callback' =>
)
%>
+% }
<TR>
<TH ALIGN="right">Country code</TH>
my $availbatch =
time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);
+
+my @exports = qsearch('part_export', { 'exporttype' => 'internal_diddb', });
</%init>