Working on invoice delete restore refactor
This commit is contained in:
parent
fceaab9e40
commit
02c810633a
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Reference in a new issue