Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a11d7a85

Von Jan Büren vor mehr als 11 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
1313 1313

  
1314 1314
  my $dbh = $form->dbconnect($myconfig);
1315 1315

  
1316
  my $query = qq|SELECT closedto, revtrans FROM defaults|;
1316
  my $query = qq|SELECT closedto, max_future_booking_interval, revtrans FROM defaults|;
1317 1317
  my $sth   = $dbh->prepare($query);
1318 1318
  $sth->execute || $form->dberror($query);
1319 1319

  
1320
  ($form->{closedto}, $form->{revtrans}) = $sth->fetchrow_array;
1320
  ($form->{closedto}, $form->{max_future_booking_interval}, $form->{revtrans}) = $sth->fetchrow_array;
1321 1321

  
1322 1322
  $sth->finish;
1323 1323

  
......
1339 1339
    $query = qq|UPDATE defaults SET closedto = NULL, revtrans = '1'|;
1340 1340

  
1341 1341
  } elsif ($form->{closedto}) {
1342
    $query = qq|UPDATE defaults SET closedto = ?, revtrans = '0'|;
1343
    @values = (conv_date($form->{closedto}));
1342
    $query = qq|UPDATE defaults SET closedto = ?, max_future_booking_interval = ?, revtrans = '0'|;
1343
    @values = (conv_date($form->{closedto}), conv_date($form->{max_future_booking_interval}));
1344 1344

  
1345 1345
  } else {
1346 1346
    $query = qq|UPDATE defaults SET closedto = NULL, revtrans = '0'|;
bin/mozilla/ap.pl
621 621

  
622 622
  my $closedto  = $form->datetonum($form->{closedto},  \%myconfig);
623 623
  my $transdate = $form->datetonum($form->{transdate}, \%myconfig);
624

  
625
  $form->error($locale->text('Cannot post transaction above the maximum future booking date!'))
626
    if ($form->date_max_future($form->{"transdate"}, \%myconfig));
624 627
  $form->error($locale->text('Cannot post transaction for a closed period!')) if ($form->date_closed($form->{"transdate"}, \%myconfig));
625 628

  
626 629
  my $zero_amount_posting = 1;
bin/mozilla/ar.pl
669 669

  
670 670
  my $closedto  = $form->datetonum($form->{closedto},  \%myconfig);
671 671
  my $transdate = $form->datetonum($form->{transdate}, \%myconfig);
672

  
673
  $form->error($locale->text('Cannot post transaction above the maximum future booking date!'))
674
    if ($form->date_max_future($transdate, \%myconfig));
672 675
  $form->error($locale->text('Cannot post transaction for a closed period!')) if ($form->date_closed($form->{"transdate"}, \%myconfig));
673 676

  
674 677
  $form->error($locale->text('Zero amount posting!'))
bin/mozilla/gl.pl
1115 1115
  $form->{taxincluded} = 0 if !$taxtotal;
1116 1116

  
1117 1117
  # this is just for the wise guys
1118

  
1119
  $form->error($locale->text('Cannot post transaction above the maximum future booking date!'))
1120
    if ($form->date_max_future($form->{"transdate"}, \%myconfig));
1118 1121
  $form->error($locale->text('Cannot post transaction for a closed period!'))
1119 1122
    if ($form->date_closed($form->{"transdate"}, \%myconfig));
1120 1123
  if ($form->round_amount($debit, 2) != $form->round_amount($credit, 2)) {
bin/mozilla/ir.pl
722 722
  my $invdate      = $form->datetonum($form->{invdate},  \%myconfig);
723 723
  my $max_datepaid = _max_datepaid();
724 724

  
725
  $form->error($locale->text('Cannot post transaction above the maximum future booking date!'))
726
    if ($form->date_max_future($invdate, \%myconfig));
725 727
  $form->error($locale->text('Cannot post invoice for a closed period!')) if $max_datepaid && $form->date_closed($max_datepaid, \%myconfig);
726 728

  
727 729
  $form->isblank("exchangerate", $locale->text('Exchangerate missing!'))
bin/mozilla/is.pl
716 716
  my $closedto = $form->datetonum($form->{closedto}, \%myconfig);
717 717
  my $invdate  = $form->datetonum($form->{invdate},  \%myconfig);
718 718

  
719
  $form->error($locale->text('Cannot post transaction above the maximum future booking date!'))
720
    if ($form->date_max_future($invdate, \%myconfig));
719 721
  $form->error($locale->text('Cannot post invoice for a closed period!'))
720 722
    if ($invdate <= $closedto);
721 723

  

Auch abrufbar als: Unified diff