Project

General

Profile

Revision cb3e6027

Added by Martin Helmling martin.helmling@octosoft.eu over 1 year ago

Kreditorenbuchung: kein Storno möglich

Actionbar - Aufruf angepasst

fix #7269

View differences:

bin/mozilla/ar.pl
1441 1441
}
1442 1442

  
1443 1443
sub setup_ar_form_header_action_bar {
1444
  my $transdate               = $::form->datetonum($::form->{transdate}, \%::myconfig);
1445
  my $closedto                = $::form->datetonum($::form->{closedto},  \%::myconfig);
1446
  my $is_closed               = $transdate <= $closedto;
1444
  my $closedto  = $::locale->parse_date_to_object($::instance_conf->get_closedto);
1445
  my $transdate = $::locale->parse_date_to_object($::form->{transdate});
1446
  my $is_closed = ( ref $closedto && $transdate <= $closedto ? 1 : 0  );
1447 1447

  
1448 1448
  my $change_never            = $::instance_conf->get_ar_changeable == 0;
1449 1449
  my $change_on_same_day_only = $::instance_conf->get_ar_changeable == 2 && ($::form->current_date(\%::myconfig) ne $::form->{gldate});
......
1491 1491

  
1492 1492
      combobox => [
1493 1493
        action => [ t8('Storno'),
1494
          call     => [ 'kivi.SalesPurchase.stornoDialog', $transdate, $closedto, t8('AR Transaction #1 storno', $::form->{invnumber}) ],
1494
          call     => [ 'kivi.SalesPurchase.stornoDialog', $transdate->to_kivitendo, $closedto ? $closedto->to_kivitendo : '', t8('AR Transaction #1 storno', $::form->{invnumber}) ],
1495 1495
          checks   => [ 'kivi.validate_form', 'kivi.AR.check_fields_before_posting' ],
1496
          confirm  => t8('Do you really want to cancel this invoice?'),
1497 1496
          disabled => !$::form->{id}         ? t8('This invoice has not been posted yet.')
1498 1497
                      : $has_storno          ? t8('This invoice has been canceled already.')
1499 1498
                      : $is_storno           ? t8('Reversal invoices cannot be canceled.')

Also available in: Unified diff