From 9acbac74026f038310a646415394a621c7c7ef09 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 18 Jun 2020 09:43:28 +1000 Subject: [PATCH] Add invoice id to credit --- app/Services/Invoice/HandleReversal.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Services/Invoice/HandleReversal.php b/app/Services/Invoice/HandleReversal.php index 00989431d425..0e66f3020044 100644 --- a/app/Services/Invoice/HandleReversal.php +++ b/app/Services/Invoice/HandleReversal.php @@ -71,7 +71,8 @@ class HandleReversal extends AbstractService if ($total_paid > 0) { $credit = CreditFactory::create($this->invoice->company_id, $this->invoice->user_id); $credit->client_id = $this->invoice->client_id; - + $credit->invoice_id = $this->invoice->id; + $item = InvoiceItemFactory::create(); $item->quantity = 1; $item->cost = (float)$total_paid;