Revision 2a0a1717
Von Thomas Heck vor mehr als 12 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
1995 | 1995 |
$reference_date = $reference_date ? conv_dateq($reference_date) . '::DATE' : 'current_date'; |
1996 | 1996 |
|
1997 | 1997 |
my $dbh = $self->get_standard_dbh($myconfig); |
1998 |
my $payment_id; |
|
1999 |
|
|
2000 |
if($self->{payment_id}) { |
|
2001 |
$payment_id = $self->{payment_id}; |
|
2002 |
} elsif($self->{vendor_id}) { |
|
2003 |
my $query = 'SELECT payment_id FROM vendor WHERE id = ?'; |
|
2004 |
($payment_id) = selectrow_query($self, $dbh, $query, $self->{vendor_id}); |
|
2005 |
} |
|
2006 |
|
|
1998 | 2007 |
my $query = qq|SELECT ${reference_date} + terms_netto FROM payment_terms WHERE id = ?|; |
1999 |
my ($duedate) = selectrow_query($self, $dbh, $query, $self->{payment_id});
|
|
2008 |
my ($duedate) = selectrow_query($self, $dbh, $query, $payment_id);
|
|
2000 | 2009 |
|
2001 | 2010 |
$main::lxdebug->leave_sub(); |
2002 | 2011 |
|
bin/mozilla/ap.pl | ||
---|---|---|
371 | 371 |
|
372 | 372 |
# with JavaScript Calendar |
373 | 373 |
$button1 = qq| |
374 |
<td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value="$form->{transdate}" onBlur=\"check_right_date_format(this)\" $readonly></td> |
|
374 |
<td><input name=transdate onchange="set_duedate()" id=transdate size=11 title="$myconfig{dateformat}" value="$form->{transdate}" onBlur=\"check_right_date_format(this)\" $readonly></td>
|
|
375 | 375 |
<td><input type=button name=transdate id="trigger1" value=| |
376 | 376 |
. $locale->text('button') . qq|></td> |
377 | 377 |
|; |
... | ... | |
389 | 389 |
|
390 | 390 |
# without JavaScript Calendar |
391 | 391 |
$button1 = |
392 |
qq|<td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value="$form->{transdate}" onBlur=\"check_right_date_format(this)\" $readonly></td>|; |
|
392 |
qq|<td><input name=transdate onchange="set_duedate()" id=transdate size=11 title="$myconfig{dateformat}" value="$form->{transdate}" onBlur=\"check_right_date_format(this)\" $readonly></td>|;
|
|
393 | 393 |
$button2 = |
394 | 394 |
qq|<td><input name=duedate id=duedate size=11 title="$myconfig{dateformat}" value="$form->{duedate}" onBlur=\"check_right_date_format(this)\" $readonly></td>|; |
395 | 395 |
} |
... | ... | |
855 | 855 |
|
856 | 856 |
$follow_ups_block |
857 | 857 |
|
858 |
<script type="text/javascript"> |
|
859 |
<!-- |
|
860 |
function set_duedate() { |
|
861 |
\$.ajax({ |
|
862 |
url: 'is.pl?action=set_duedate', |
|
863 |
data: { |
|
864 |
invdate: \$('#transdate').val(), |
|
865 |
vendor_id: \$('[name=vendor_id]').val(), |
|
866 |
}, |
|
867 |
dataType: 'text', |
|
868 |
success: function(data) { |
|
869 |
\$('#duedate').val(data); |
|
870 |
} |
|
871 |
}); |
|
872 |
} |
|
873 |
//--> |
|
874 |
</script> |
|
875 |
|
|
858 | 876 |
<input name=callback type=hidden value="$form->{callback}"> |
859 | 877 |
<input name="gldate" type="hidden" value="| . Q($form->{gldate}) . qq|"> |
860 | 878 |
| |
Auch abrufbar als: Unified diff
Autom. Update des Faelligkeitsdatums bei Kreditorenbuchungen
behebt #1936