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 Dec 10, 2024
2 parents fd9a0c8 + c4f24e1 commit f691d5b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tine20/Sales/Controller/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -897,13 +897,15 @@ public function checkForRecreation(array $ids, $contract)
$oldPositions[$invoice->getId()] = $invoicePositionController->search($filter);

try {
$this->delete(array($invoice));
} catch (Sales_Exception_DeletePreviousInvoice $sedpi) {
$this->delete([$invoice]);
} catch (Sales_Exception_DeletePreviousInvoice | Sales_Exception_InvoiceAlreadyClearedDelete $se) {
$failed = true;
Tinebase_Core::getLogger()->err(__METHOD__ . '::' . __LINE__ . ' could not delete invoice with id: ' . $id);
Tinebase_Core::getLogger()->err(__METHOD__ . '::' . __LINE__
. ' Could not delete invoice with id: ' . $id
. ' Error: ' . $se->getMessage());
break;
}
//is $invoice still valid?!?!?
// is $invoice still valid?!?!?
}

if (true === $failed) {
Expand Down

0 comments on commit f691d5b

Please sign in to comment.