Invoice: Changed sending credit invoice to xinon

This commit is contained in:
Frank Schubert
2025-08-05 15:09:24 +02:00
parent ef1db750da
commit a8bdbae21f

View File

@@ -926,6 +926,11 @@ class InvoiceController extends mfBaseController {
continue;
}
if($invoice->total < 0) {
// Gutschriften auch an Xinon
$invoice->sendByEmail("billing@xinon.at");
}
if(!$invoice->sendByEmail()) {
$this->log->warning(__METHOD__.": Error sending ".$invoice->invoice_number." to ".$invoice->email);
$invoice->date_delivered = date("U");
@@ -936,11 +941,6 @@ class InvoiceController extends mfBaseController {
$invoice->date_delivered = date("U");
$invoice->save();
if($invoice->total < 0) {
// Gutschriften auch an Xinon
$invoice->sendByEmail("billing@xinon.at");
}
$sent++;
}
@@ -987,6 +987,13 @@ class InvoiceController extends mfBaseController {
}
$pdf_files[] = $pdf_file;
// send gutschriften to billing@xinon.at
if($invoice->total < 0) {
// Gutschriften auch an Xinon
$invoice->sendByEmail("billing@xinon.at");
}
}
//var_dump($pdf_files);exit;