Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 8046541b

Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt

  • ID 8046541b7e3b2c84c8e0213d16214919d594c8b3
  • Vorgänger 85cb7686
  • Nachfolger a833f755

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