Skip to content
Code-Schnipsel Gruppen Projekte
Bestätigt Commit 532d0ae7 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix: add comment to temporary invoice

Übergeordneter 50b9d252
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -13,21 +13,11 @@
QUI::$Ajax->registerFunction(
'package_quiqqer_invoice_ajax_invoices_addComment',
function ($invoiceId, $comment) {
$Invoices = QUI\ERP\Accounting\Invoice\Handler::getInstance();
$Invoice = null;
try {
$Invoice = $Invoices->getInvoice($invoiceId);
$Invoice = QUI\ERP\Accounting\Invoice\Utils\Invoice::getInvoiceByString($invoiceId);
} catch (\Exception $Exception) {
QUI\System\Log::addDebug($Exception->getMessage());
}
if ($Invoice === null) {
try {
$Invoice = $Invoices->getTemporaryInvoice($invoiceId);
} catch (\Exception $Exception) {
QUI\System\Log::addDebug($Exception->getMessage());
}
throw $Exception;
}
$Invoice->addComment($comment);
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren