Finished Invoice Email Delivery
This commit is contained in:
@@ -143,7 +143,7 @@ XINON GmbH";
|
||||
|
||||
|
||||
if(!$subject || !$from || !$from_name || !$to) {
|
||||
$this->log->warn("Invoice ".$this->invoice_number." could not be sent. Values missing. (subject: '$subject', from: '$from_name', from_email: '$from', to: '$to')");
|
||||
$this->log->warn(__METHOD__.": Invoice ".$this->invoice_number." could not be sent. Values missing. (subject: '$subject', from: '$from_name', from_email: '$from', to: '$to')");
|
||||
return false;
|
||||
} else {
|
||||
$email = new Emailnotification();
|
||||
|
||||
@@ -725,7 +725,12 @@ class InvoiceController extends mfBaseController {
|
||||
continue;
|
||||
}
|
||||
|
||||
$invoice->sendByEmail();
|
||||
if(!$invoice->sendByEmail()) {
|
||||
echo "Error sending ".$invoice->invoice_number." to ".$invoice->email."\n";
|
||||
continue;
|
||||
}
|
||||
$invoice->date_delivered = date("U");
|
||||
$invoice->save();
|
||||
|
||||
if($invoice->total < 0) {
|
||||
// Gutschriften auch an Xinon
|
||||
@@ -734,6 +739,8 @@ class InvoiceController extends mfBaseController {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user