Apply discount credits to account balance (#1312)

This commit is contained in:
Belle Aerni authored and GitHub committed 2023-06-12 06:29:09 +02:00
1 parent b95f92554e
commit 64d60e254a
1 file changed
-3
@@ -228,9 +228,6 @@ class ServiceInvoiceItem implements InjectionAwareInterface
public function creditInvoiceItem(\Model_InvoiceItem $item)
{
$total = $this->getTotalWithTax($item);
if ($total <= 0) {
return true;
}
$invoice = $this->di['db']->getExistingModelById('Invoice', $item->invoice_id, 'Invoice not found');
$client = $this->di['db']->getExistingModelById('Client', $invoice->client_id, 'Client not found');