diff --git a/app/Services/Invoice/MarkInvoiceDeleted.php b/app/Services/Invoice/MarkInvoiceDeleted.php index 7fdf0ee3f8c2..137bce5bb924 100644 --- a/app/Services/Invoice/MarkInvoiceDeleted.php +++ b/app/Services/Invoice/MarkInvoiceDeleted.php @@ -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.