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