Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision d8d90989

Von Moritz Bunkus vor mehr als 2 Jahren hinzugefügt

  • ID d8d909892ba302d142df9430786242502fa437fe
  • Vorgänger c2e12394
  • Nachfolger 42a10479

Verkaufsrechnungen direkt als Factur-X/ZUGFeRD-XML exportieren können

Unterschiede anzeigen:

bin/mozilla/is.pl
276 276
}
277 277

  
278 278
sub setup_is_action_bar {
279
  my ($tmpl_var)              = @_;
279 280
  my $form                    = $::form;
280 281
  my $change_never            = $::instance_conf->get_is_changeable == 0;
281 282
  my $change_on_same_day_only = $::instance_conf->get_is_changeable == 2 && ($form->current_date(\%::myconfig) ne $form->{gldate});
282 283
  my $payments_balanced       = ($::form->{oldtotalpaid} == 0);
283 284
  my $has_storno              = ($::form->{storno} && !$::form->{storno_id});
284 285
  my $may_edit_create         = $::auth->assert('invoice_edit', 1);
286
  my $factur_x_enabled        = $tmpl_var->{invoice_obj} && $tmpl_var->{invoice_obj}->customer->create_zugferd_invoices_for_this_customer;
285 287
  my ($is_linked_bank_transaction, $warn_unlinked_delivery_order);
286 288
    if ($::form->{id}
287 289
        && SL::DB::Default->get->payments_changeable != 0
......
423 425
                    : $form->{postal_invoice} ? t8('This customer wants a postal invoices.')
424 426
                    :                     undef,
425 427
        ],
428
        action => [ t8('Factur-X/ZUGFeRD'),
429
          submit   => [ '#form', { action => "download_factur_x_xml" } ],
430
          checks   => [ 'kivi.validate_form' ],
431
          disabled => !$may_edit_create  ? t8('You must not print this invoice.')
432
                    : !$form->{id}       ? t8('This invoice has not been posted yet.')
433
                    : !$factur_x_enabled ? t8('Creating Factur-X/ZUGFeRD invoices is not enabled for this customer.')
434
                    :                      undef,
435
        ],
426 436
      ], # end of combobox "Export"
427 437

  
428 438
      combobox => [
......
562 572
  $TMPL_VAR{payment_terms_obj} = get_payment_terms_for_invoice();
563 573
  $form->{duedate}             = $TMPL_VAR{payment_terms_obj}->calc_date(reference_date => $form->{invdate}, due_date => $form->{duedate})->to_kivitendo if $TMPL_VAR{payment_terms_obj};
564 574

  
565
  setup_is_action_bar();
575
  setup_is_action_bar(\%TMPL_VAR);
566 576

  
567 577
  $form->header();
568 578

  

Auch abrufbar als: Unified diff