$main::lxdebug->leave_sub();
}
+sub get_duedate {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig) = @_;
+
+ my $dbh = $self->dbconnect($myconfig);
+ my $query = qq|SELECT current_date+terms_netto FROM payment_terms
+ WHERE id = '$self->{payment_id}'|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ ($self->{duedate}) = $sth->fetchrow_array;
+
+ $sth->finish;
+
+ $main::lxdebug->leave_sub();
+}
+
# get other contact for transaction and form - html/tex
sub get_contact {
$main::lxdebug->enter_sub();
#######################################################################
use SL::IC;
+use CGI::Ajax;
+use CGI;
require "$form->{path}/common.pl";
$lxdebug->leave_sub();
}
+
+
+sub set_duedate {
+ $lxdebug->enter_sub();
+
+ $form->get_duedate(\%myconfig);
+
+ my $q = new CGI;
+ $result = "$form->{duedate}";
+ print $q->header();
+ print $result;
+ $lxdebug->leave_sub();
+
+}
+
}
}
+ my $set_duedate_url =
+ "$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=set_duedate";
+
+ my $pjx = new CGI::Ajax( 'set_duedate' => $set_duedate_url );
+ push(@ { $form->{AJAX} }, $pjx);
if (@{ $form->{TAXZONE} }) {
$form->{selecttaxzone} = "";
<tr valign=top>
<td>$notes</td>
<td>$intnotes</td>
- <td><select name=payment_id tabindex=24>$payment
+ <td><select name=payment_id onChange="set_duedate(['payment_id__' + this.value],['duedate'])">$payment
</select></td>
</tr>
</table>
'The database update/creation did not succeed. The file <TMPL_VAR file ESCAPE=HTML> contained the following error:' => 'Die Datenbankaktualisierung/erstellung schlug fehl. Die Datei <TMPL_VAR file ESCAPE=HTML> enthielt den folgenden Fehler:',
'The database upgrade for the introduction of Buchungsgruppen is now complete.' => 'Das Datenbankupgrade für die Einführung von Buchungsgruppen ist jetzt beendet.',
'The database upgrade for the introduction of units is now complete.' => 'Das Datenbankupgrade zwecks Einführung von Einheiten ist nun beendet.',
+ 'The dunning process is started' => '',
'The dunning process started' => 'Der Mahnprozess ist gestartet.',
'The factor is missing in row %d.' => 'Der Faktor fehlt in Zeile %d.',
'The factor is missing.' => 'Der Faktor fehlt.',
'select_part_internal' => 'select_part_internal',
'select_project' => 'select_project',
'send_email' => 'send_email',
+ 'set_duedate' => 'set_duedate',
'set_longdescription' => 'set_longdescription',
'set_pricegroup' => 'set_pricegroup',
'ship_to' => 'ship_to',
'select_part_internal' => 'select_part_internal',
'select_project' => 'select_project',
'send_email' => 'send_email',
+ 'set_duedate' => 'set_duedate',
'set_email' => 'set_email',
'set_longdescription' => 'set_longdescription',
'set_pricegroup' => 'set_pricegroup',
'select_part' => 'select_part',
'select_part_internal' => 'select_part_internal',
'send_email' => 'send_email',
+ 'set_duedate' => 'set_duedate',
'set_longdescription' => 'set_longdescription',
'set_pricegroup' => 'set_pricegroup',
'ship_to' => 'ship_to',
'select_part' => 'select_part',
'select_part_internal' => 'select_part_internal',
'send_email' => 'send_email',
+ 'set_duedate' => 'set_duedate',
'set_longdescription' => 'set_longdescription',
'set_pricegroup' => 'set_pricegroup',
'ship_to' => 'ship_to',
'select_part_internal' => 'select_part_internal',
'select_project' => 'select_project',
'send_email' => 'send_email',
+ 'set_duedate' => 'set_duedate',
'set_longdescription' => 'set_longdescription',
'set_pricegroup' => 'set_pricegroup',
'ship_to' => 'ship_to',
'select_part_internal' => 'select_part_internal',
'select_project' => 'select_project',
'send_email' => 'send_email',
+ 'set_duedate' => 'set_duedate',
'set_longdescription' => 'set_longdescription',
'set_pricegroup' => 'set_pricegroup',
'ship_to' => 'ship_to',
'select_part_internal' => 'select_part_internal',
'select_project' => 'select_project',
'send_email' => 'send_email',
+ 'set_duedate' => 'set_duedate',
'set_headings' => 'set_headings',
'set_longdescription' => 'set_longdescription',
'set_pricegroup' => 'set_pricegroup',