Fixes for delete payment
This commit is contained in:
parent
3eeed5e135
commit
b9073c4276
1 changed files with 4 additions and 0 deletions
|
|
@ -90,6 +90,8 @@ class DeletePayment
|
|||
|
||||
if(!$paymentable_invoice->is_deleted)
|
||||
{
|
||||
$paymentable_invoice->restore();
|
||||
|
||||
$paymentable_invoice->service()
|
||||
->updateBalance($net_deletable)
|
||||
->updatePaidToDate($net_deletable * -1)
|
||||
|
|
@ -112,6 +114,8 @@ class DeletePayment
|
|||
}
|
||||
else {
|
||||
|
||||
$paymentable_invoice->restore();
|
||||
|
||||
//If the invoice is deleted we only update the meta data on the invoice
|
||||
//and reduce the clients paid to date
|
||||
$paymentable_invoice->service()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue