Skip to content

Commit

Permalink
Merge branch '2024.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlabci committed Nov 27, 2024
2 parents 1889a5e + 861f328 commit b77cf96
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tine20/Sales/Controller/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -1546,8 +1546,10 @@ public function createXRechnungsAttachment(Sales_Model_Invoice $invoice): void
}
rewind($stream); // redundant, but cheap and good for readability
} else {
if (Tinebase_Core::isLogLevel(Zend_Log::WARN)) Tinebase_Core::getLogger()->warn(__METHOD__ . '::' . __LINE__
. ' edocument validation service not configured, skipping! created xrechnung is not validated!');
if (Tinebase_Core::isLogLevel(Zend_Log::WARN)) {
Tinebase_Core::getLogger()->warn(__METHOD__ . '::' . __LINE__
. ' edocument validation service not configured, skipping! created xrechnung is not validated!');
}
}

$attachmentName = str_replace('/', '-', $customer->getTitle() . '_' . $invoice->number . '-xrechnung.xml');
Expand All @@ -1558,7 +1560,14 @@ public function createXRechnungsAttachment(Sales_Model_Invoice $invoice): void
Tinebase_FileSystem_RecordAttachments::getInstance()->addRecordAttachment($invoice, $attachmentName, $stream);
Tinebase_FileSystem_RecordAttachments::getInstance()->getRecordAttachments($invoice);
} catch (Exception $e) {
Tinebase_Exception::log($e, additionalData: ['invoice id: ' . $invoice->getId()]);
if ($e instanceof Tinebase_Exception_ProgramFlow) {
if (Tinebase_Core::isLogLevel(Zend_Log::NOTICE)) {
Tinebase_Core::getLogger()->notice(__METHOD__ . '::' . __LINE__
. ' ' . $e->getMessage());
}
} else {
Tinebase_Exception::log($e, additionalData: ['invoice id: ' . $invoice->getId()]);
}
}
}

Expand Down

0 comments on commit b77cf96

Please sign in to comment.