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/is.pl
281 281
}
282 282

  
283 283
sub setup_is_action_bar {
284
  my $closedto  = $::locale->parse_date_to_object($::instance_conf->get_closedto);
285
  my $transdate = $::locale->parse_date_to_object($::form->{transdate});
286
  my $is_closed = ( ref $closedto && $transdate <= $closedto ? 1 : 0  );
287

  
284 288
  my $form                    = $::form;
285 289
  my $change_never            = $::instance_conf->get_is_changeable == 0;
286 290
  my $change_on_same_day_only = $::instance_conf->get_is_changeable == 2 && ($form->current_date(\%::myconfig) ne $form->{gldate});
......
330 334

  
331 335
      combobox => [
332 336
        action => [ t8('Storno'),
333
          call     => [ 'kivi.SalesPurchase.stornoDialog', $form->{gldate}, $form->current_date(\%::myconfig), t8('Invoice #1 storno', $::form->{invnumber}) ],
334
          confirm  => t8('Do you really want to cancel this invoice?'),
337
          call     => [ 'kivi.SalesPurchase.stornoDialog', $transdate->to_kivitendo, $closedto ? $closedto->to_kivitendo : '', t8('Invoice #1 storno', $::form->{invnumber}) ],
335 338
          checks   => [ 'kivi.validate_form' ],
336 339
          disabled => !$form->{id}        ? t8('This invoice has not been posted yet.')
337 340
                    : !$payments_balanced ? t8('Cancelling is disallowed. Either undo or balance the current payments until the open amount matches the invoice amount')

Also available in: Unified diff