X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/59b1c4c2f5f09f6cffa9b9240ee31ca56b80bb7e..5da10e0193a990f94c50252738f33f42d0e7e567:/bin/mozilla/io.pl diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index c6439af7c..27aab1826 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -2134,11 +2134,14 @@ sub send_sales_purchase_email { sub _maybe_attach_zugferd_data { my ($form) = @_; - return if !$::instance_conf->get_create_zugferd_invoices; - my $record = _make_record(); - return if !$record || !$record->can('create_pdf_a_print_options') || !$record->can('create_zugferd_data'); + return if !$record + || !$record->can('customer') + || !$record->customer + || !$record->can('create_pdf_a_print_options') + || !$record->can('create_zugferd_data') + || !$record->customer->create_zugferd_invoices_for_this_customer; eval { my $xmlfile = File::Temp->new;