use strict;
my $edit;
-my $payment;
+#my $payment;
my $print_post;
1;
$form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
$form->{radier} = ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0;
- $payment = qq|<option value=""></option>|;
- foreach my $item (@{ $form->{payment_terms} }) {
- if ($form->{payment_id} eq $item->{id}) {
- $payment .= qq|<option value="$item->{id}" selected>$item->{description}</option>|;
- } else {
- $payment .= qq|<option value="$item->{id}">$item->{description}</option>|;
- }
- }
-
my $set_duedate_url = "$form->{script}?action=set_duedate";
push @ { $form->{AJAX} }, new CGI::Ajax( 'set_duedate' => $set_duedate_url );
<textarea name="intnotes" rows="[% rows %]" cols="35" wrap="soft">[% intnotes %]</textarea>
</td>
<td>
- <select id='payment_id' name="payment_id">
-
- $payment
-
- </select>
- <script type='text/javascript'>$('#payment_id').onchange(function(){
+ [%- INCLUDE 'generic/multibox.html'
+ name = 'payment_id',
+ style = 'width: 250px',
+ DATA = payment_terms,
+ id_key = 'id',
+ label_key = 'description',
+ show_empty = 1
+ allow_textbox = 0 -%]
+ <script type='text/javascript'>$('#payment_id').change(function(){
if (this.value) set_duedate(['payment_id__' + this.value, 'invdate__' + invdate.value],['duedate'])})
</script>
</td>
<textarea name="intnotes" rows="[% rows %]" cols="35" wrap="soft">[% intnotes %]</textarea>
</td>
<td>
- <select id='payment_id' name="payment_id">
-
- $payment
-
- </select>
- <script type='text/javascript'>$('#payment_id').onchange(function(){
+ [%- INCLUDE 'generic/multibox.html'
+ name = 'payment_id',
+ style = 'width: 250px',
+ DATA = payment_terms,
+ id_key = 'id',
+ label_key = 'description',
+ show_empty = 1
+ allow_textbox = 0 -%]
+ <script type='text/javascript'>$('#payment_id').change(function(){
if (this.value) set_duedate(['payment_id__' + this.value, 'invdate__' + invdate.value],['duedate'])})
</script>
</td>