mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 23:44:35 -04: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 total payments = adjustment amount - that means we need to delete the payments as well.
|
||||||
|
|
||||||
if($this->adjustment_amount == $this->total_payments) {
|
if($this->adjustment_amount == $this->total_payments) {
|
||||||
|
|
||||||
$this->invoice->payments()->update(['payments.deleted_at' => now(), 'payments.is_deleted' => true]);
|
$this->invoice->payments()->update(['payments.deleted_at' => now(), 'payments.is_deleted' => true]);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//adjust payments down by the amount applied to the invoice payment.
|
//adjust payments down by the amount applied to the invoice payment.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user