@@ -65,7 +65,7 @@ class InvoiceController extends DocumentController | |||
$invoice = $invoiceManager->findOneInvoiceById($idInvoice); | |||
if ($invoice && $invoice->isStatusDraft()) { | |||
if ($invoice && $invoiceManager->isStatusDraft($invoice)) { | |||
Order::updateAll([ | |||
'id_invoice' => null | |||
], [ |