Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a11d7a85

Von Jan Büren vor fast 12 Jahren hinzugefügt

  • ID a11d7a85a9b73798acb3a11b6ba4251ba331b19c
  • Vorgänger 2accdcbd
  • Nachfolger 13fc241e

Implementiert Ticket 1897 Zukunftsbuchungen vermeiden
Die Prüfungen für den Zeitraum in allen Belegmasken umgesetzt.
Zusammen mit Commit f552f878c85828a408d7f32afbbc1e714270b85f wird
das Ticket 1897 geschlossen

Unterschiede anzeigen:

SL/AM.pm
my $dbh = $form->dbconnect($myconfig);
my $query = qq|SELECT closedto, revtrans FROM defaults|;
my $query = qq|SELECT closedto, max_future_booking_interval, revtrans FROM defaults|;
my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
($form->{closedto}, $form->{revtrans}) = $sth->fetchrow_array;
($form->{closedto}, $form->{max_future_booking_interval}, $form->{revtrans}) = $sth->fetchrow_array;
$sth->finish;
......
$query = qq|UPDATE defaults SET closedto = NULL, revtrans = '1'|;
} elsif ($form->{closedto}) {
$query = qq|UPDATE defaults SET closedto = ?, revtrans = '0'|;
@values = (conv_date($form->{closedto}));
$query = qq|UPDATE defaults SET closedto = ?, max_future_booking_interval = ?, revtrans = '0'|;
@values = (conv_date($form->{closedto}), conv_date($form->{max_future_booking_interval}));
} else {
$query = qq|UPDATE defaults SET closedto = NULL, revtrans = '0'|;
bin/mozilla/ap.pl
my $closedto = $form->datetonum($form->{closedto}, \%myconfig);
my $transdate = $form->datetonum($form->{transdate}, \%myconfig);
$form->error($locale->text('Cannot post transaction above the maximum future booking date!'))
if ($form->date_max_future($form->{"transdate"}, \%myconfig));
$form->error($locale->text('Cannot post transaction for a closed period!')) if ($form->date_closed($form->{"transdate"}, \%myconfig));
my $zero_amount_posting = 1;
bin/mozilla/ar.pl
my $closedto = $form->datetonum($form->{closedto}, \%myconfig);
my $transdate = $form->datetonum($form->{transdate}, \%myconfig);
$form->error($locale->text('Cannot post transaction above the maximum future booking date!'))
if ($form->date_max_future($transdate, \%myconfig));
$form->error($locale->text('Cannot post transaction for a closed period!')) if ($form->date_closed($form->{"transdate"}, \%myconfig));
$form->error($locale->text('Zero amount posting!'))
bin/mozilla/gl.pl
$form->{taxincluded} = 0 if !$taxtotal;
# this is just for the wise guys
$form->error($locale->text('Cannot post transaction above the maximum future booking date!'))
if ($form->date_max_future($form->{"transdate"}, \%myconfig));
$form->error($locale->text('Cannot post transaction for a closed period!'))
if ($form->date_closed($form->{"transdate"}, \%myconfig));
if ($form->round_amount($debit, 2) != $form->round_amount($credit, 2)) {
bin/mozilla/ir.pl
my $invdate = $form->datetonum($form->{invdate}, \%myconfig);
my $max_datepaid = _max_datepaid();
$form->error($locale->text('Cannot post transaction above the maximum future booking date!'))
if ($form->date_max_future($invdate, \%myconfig));
$form->error($locale->text('Cannot post invoice for a closed period!')) if $max_datepaid && $form->date_closed($max_datepaid, \%myconfig);
$form->isblank("exchangerate", $locale->text('Exchangerate missing!'))
bin/mozilla/is.pl
my $closedto = $form->datetonum($form->{closedto}, \%myconfig);
my $invdate = $form->datetonum($form->{invdate}, \%myconfig);
$form->error($locale->text('Cannot post transaction above the maximum future booking date!'))
if ($form->date_max_future($invdate, \%myconfig));
$form->error($locale->text('Cannot post invoice for a closed period!'))
if ($invdate <= $closedto);

Auch abrufbar als: Unified diff