diff --git a/app/Listeners/ActivityListener.php b/app/Listeners/ActivityListener.php index ee016cbff39b..6c7b1d125ce9 100644 --- a/app/Listeners/ActivityListener.php +++ b/app/Listeners/ActivityListener.php @@ -127,10 +127,6 @@ class ActivityListener */ public function updatedInvoice(InvoiceWasUpdated $event) { - if (! $event->invoice->isChanged()) { - return; - } - $backupInvoice = Invoice::with('invoice_items', 'client.account', 'client.contacts') ->withArchived() ->find($event->invoice->id); diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 2e7b9287f23f..61fea0efdbd9 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -189,33 +189,6 @@ class Invoice extends EntityModel implements BalanceAffecting return floatval($this->amount) - floatval($this->getOriginal('amount')); } - /** - * @return bool - */ - public function isChanged() - { - if ($this->getRawAdjustment() != 0) { - return true; - } - - foreach ([ - 'invoice_number', - 'po_number', - 'invoice_date', - 'due_date', - 'terms', - 'public_notes', - 'invoice_footer', - 'partial', - ] as $field) { - if ($this->$field != $this->getOriginal($field)) { - return true; - } - } - - return false; - } - /** * @param bool $calculate * @return int|mixed @@ -597,7 +570,7 @@ class Invoice extends EntityModel implements BalanceAffecting return false; } - // it isn't considered overdue until the end of the day + // it isn't considered overdue until the end of the day return time() > (strtotime($dueDate) + (60*60*24)); }