mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Changes to product description aren't logged in invoice history #1219
This commit is contained in:
parent
3dc83ee481
commit
396db1dec4
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user