mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Working on invoice delete restore refactor
This commit is contained in:
parent
fceaab9e40
commit
02c810633a
@ -76,9 +76,9 @@ class MarkInvoiceDeleted extends AbstractService
|
||||
//if total payments = adjustment amount - that means we need to delete the payments as well.
|
||||
|
||||
if($this->adjustment_amount == $this->total_payments) {
|
||||
|
||||
|
||||
$this->invoice->payments()->update(['payments.deleted_at' => now(), 'payments.is_deleted' => true]);
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
//adjust payments down by the amount applied to the invoice payment.
|
||||
|
Loading…
Reference in New Issue
Block a user