mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Patches for inbound emails
This commit is contained in:
parent
93c382eae1
commit
f117e79d43
@ -300,11 +300,11 @@ class PostMarkController extends BaseController
|
|||||||
// prepare data for ingresEngine
|
// prepare data for ingresEngine
|
||||||
$inboundMail = new InboundMail();
|
$inboundMail = new InboundMail();
|
||||||
|
|
||||||
$inboundMail->from = $input["From"];
|
$inboundMail->from = $input["From"] ?? '';
|
||||||
$inboundMail->to = $input["To"]; // usage of data-input, because we need a single email here
|
$inboundMail->to = $input["To"] ; // usage of data-input, because we need a single email here
|
||||||
$inboundMail->subject = $input["Subject"];
|
$inboundMail->subject = $input["Subject"] ?? '';
|
||||||
$inboundMail->body = $input["HtmlBody"];
|
$inboundMail->body = $input["HtmlBody"] ?? '';
|
||||||
$inboundMail->text_body = $input["TextBody"];
|
$inboundMail->text_body = $input["TextBody"] ?? '';
|
||||||
$inboundMail->date = Carbon::createFromTimeString($input["Date"]);
|
$inboundMail->date = Carbon::createFromTimeString($input["Date"]);
|
||||||
|
|
||||||
// parse documents as UploadedFile from webhook-data
|
// parse documents as UploadedFile from webhook-data
|
||||||
|
@ -57,6 +57,7 @@ class ParseEDocument extends AbstractService
|
|||||||
try {
|
try {
|
||||||
return (new ZugferdEDocument($this->file, $this->company))->run();
|
return (new ZugferdEDocument($this->file, $this->company))->run();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
nlog($this->file->get());
|
||||||
nlog("Zugferd Exception: " . $e->getMessage());
|
nlog("Zugferd Exception: " . $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ class ZugferdEDocument extends AbstractService
|
|||||||
}
|
}
|
||||||
|
|
||||||
$vendor = Vendor::query()
|
$vendor = Vendor::query()
|
||||||
->where("company_id", $user->company()->id)
|
->where("company_id", $this->company->id)
|
||||||
->where(function ($q) use($taxid, $person_name, $contact_email){
|
->where(function ($q) use($taxid, $person_name, $contact_email){
|
||||||
$q->when(!is_null($taxid), function ($when_query) use($taxid){
|
$q->when(!is_null($taxid), function ($when_query) use($taxid){
|
||||||
$when_query->orWhere('vat_number', $taxid);
|
$when_query->orWhere('vat_number', $taxid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user