Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0d34a0c3

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID 0d34a0c3c93b63745560f167e816e9c2617f05bf
  • Vorgänger dab9021b
  • Nachfolger 9b8a38b3

ImportPurchaseInvoiceEmails: Funktion zum Einlesen von ZUGFeRD-Rechnungen

Unterschiede anzeigen:

SL/BackgroundJob/ImportPurchaseInvoiceEmails.pm
52 52
  return "Cleaned imported emails";
53 53
}
54 54

  
55
sub process_imported_purchase_invoice_emails {
56
  my ($self) = @_;
57
  return unless $self->{email_import};
58

  
59
  my $emails = $self->{email_import}->email_journals;
60

  
61
  foreach my $email (@$emails) {
62
    $email->process_attachments_as_purchase_invoices();
63
  }
64

  
65
  return "Processed imported emails";
66
}
67

  
55 68
sub run {
56 69
  my ($self, $job_obj) = @_;
57 70
  $self->{job_obj} = $job_obj;
......
64 77
  if ($self->{job_obj}->data_as_hash->{clean_up_imported_emails}) {
65 78
    push @results, $self->clean_up_imported_emails();
66 79
  }
80
  if ($self->{job_obj}->data_as_hash->{process_imported_purchase_invoice_emails}) {
81
    push @results, $self->process_imported_purchase_invoice_emails();
82
  }
67 83

  
68 84
  return join(". ", grep { $_ ne ''} @results);
69 85
}

Auch abrufbar als: Unified diff