Revision 0d34a0c3
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
| SL/BackgroundJob/ImportPurchaseInvoiceEmails.pm | ||
|---|---|---|
|
return "Cleaned imported emails";
|
||
|
}
|
||
|
|
||
|
sub process_imported_purchase_invoice_emails {
|
||
|
my ($self) = @_;
|
||
|
return unless $self->{email_import};
|
||
|
|
||
|
my $emails = $self->{email_import}->email_journals;
|
||
|
|
||
|
foreach my $email (@$emails) {
|
||
|
$email->process_attachments_as_purchase_invoices();
|
||
|
}
|
||
|
|
||
|
return "Processed imported emails";
|
||
|
}
|
||
|
|
||
|
sub run {
|
||
|
my ($self, $job_obj) = @_;
|
||
|
$self->{job_obj} = $job_obj;
|
||
| ... | ... | |
|
if ($self->{job_obj}->data_as_hash->{clean_up_imported_emails}) {
|
||
|
push @results, $self->clean_up_imported_emails();
|
||
|
}
|
||
|
if ($self->{job_obj}->data_as_hash->{process_imported_purchase_invoice_emails}) {
|
||
|
push @results, $self->process_imported_purchase_invoice_emails();
|
||
|
}
|
||
|
|
||
|
return join(". ", grep { $_ ne ''} @results);
|
||
|
}
|
||
Auch abrufbar als: Unified diff
ImportPurchaseInvoiceEmails: Funktion zum Einlesen von ZUGFeRD-Rechnungen