1
0
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:
David Bomba 2020-12-03 21:46:49 +11:00
parent fceaab9e40
commit 02c810633a

View File

@ -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.