Revision f2354cab
Von Sven Schöling vor etwa 15 Jahren hinzugefügt
bin/mozilla/is.pl | ||
---|---|---|
45 | 45 |
use strict; |
46 | 46 |
|
47 | 47 |
my $edit; |
48 |
my $payment; |
|
48 |
#my $payment;
|
|
49 | 49 |
my $print_post; |
50 | 50 |
|
51 | 51 |
1; |
... | ... | |
289 | 289 |
$form->{defaultcurrency} = $form->get_default_currency(\%myconfig); |
290 | 290 |
$form->{radier} = ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0; |
291 | 291 |
|
292 |
$payment = qq|<option value=""></option>|; |
|
293 |
foreach my $item (@{ $form->{payment_terms} }) { |
|
294 |
if ($form->{payment_id} eq $item->{id}) { |
|
295 |
$payment .= qq|<option value="$item->{id}" selected>$item->{description}</option>|; |
|
296 |
} else { |
|
297 |
$payment .= qq|<option value="$item->{id}">$item->{description}</option>|; |
|
298 |
} |
|
299 |
} |
|
300 |
|
|
301 | 292 |
my $set_duedate_url = "$form->{script}?action=set_duedate"; |
302 | 293 |
|
303 | 294 |
push @ { $form->{AJAX} }, new CGI::Ajax( 'set_duedate' => $set_duedate_url ); |
templates/webpages/is/form_footer_de.html | ||
---|---|---|
19 | 19 |
<textarea name="intnotes" rows="[% rows %]" cols="35" wrap="soft">[% intnotes %]</textarea> |
20 | 20 |
</td> |
21 | 21 |
<td> |
22 |
<select id='payment_id' name="payment_id"> |
|
23 |
|
|
24 |
$payment |
|
25 |
|
|
26 |
</select> |
|
27 |
<script type='text/javascript'>$('#payment_id').onchange(function(){ |
|
22 |
[%- INCLUDE 'generic/multibox.html' |
|
23 |
name = 'payment_id', |
|
24 |
style = 'width: 250px', |
|
25 |
DATA = payment_terms, |
|
26 |
id_key = 'id', |
|
27 |
label_key = 'description', |
|
28 |
show_empty = 1 |
|
29 |
allow_textbox = 0 -%] |
|
30 |
<script type='text/javascript'>$('#payment_id').change(function(){ |
|
28 | 31 |
if (this.value) set_duedate(['payment_id__' + this.value, 'invdate__' + invdate.value],['duedate'])}) |
29 | 32 |
</script> |
30 | 33 |
</td> |
templates/webpages/is/form_footer_master.html | ||
---|---|---|
19 | 19 |
<textarea name="intnotes" rows="[% rows %]" cols="35" wrap="soft">[% intnotes %]</textarea> |
20 | 20 |
</td> |
21 | 21 |
<td> |
22 |
<select id='payment_id' name="payment_id"> |
|
23 |
|
|
24 |
$payment |
|
25 |
|
|
26 |
</select> |
|
27 |
<script type='text/javascript'>$('#payment_id').onchange(function(){ |
|
22 |
[%- INCLUDE 'generic/multibox.html' |
|
23 |
name = 'payment_id', |
|
24 |
style = 'width: 250px', |
|
25 |
DATA = payment_terms, |
|
26 |
id_key = 'id', |
|
27 |
label_key = 'description', |
|
28 |
show_empty = 1 |
|
29 |
allow_textbox = 0 -%] |
|
30 |
<script type='text/javascript'>$('#payment_id').change(function(){ |
|
28 | 31 |
if (this.value) set_duedate(['payment_id__' + this.value, 'invdate__' + invdate.value],['duedate'])}) |
29 | 32 |
</script> |
30 | 33 |
</td> |
Auch abrufbar als: Unified diff
is: Payment_terms und duedate ajax gefixt.