mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 11:14:31 -04:00
Fixes for deleting a payment
This commit is contained in:
parent
3c23d5e31f
commit
ac2c7b2bbe
@ -69,7 +69,7 @@ class DeletePayment
|
|||||||
|
|
||||||
private function updateClient()
|
private function updateClient()
|
||||||
{
|
{
|
||||||
$this->payment->client->service()->updatePaidToDate(-1 * $this->payment->amount)->save();
|
//$this->payment->client->service()->updatePaidToDate(-1 * $this->payment->amount)->save();
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -92,6 +92,7 @@ class DeletePayment
|
|||||||
$paymentable_invoice->client
|
$paymentable_invoice->client
|
||||||
->service()
|
->service()
|
||||||
->updateBalance($paymentable_invoice->pivot->amount)
|
->updateBalance($paymentable_invoice->pivot->amount)
|
||||||
|
->updatePaidToDate($paymentable_invoice->pivot->amount * -1)
|
||||||
->save();
|
->save();
|
||||||
|
|
||||||
if ($paymentable_invoice->balance == $paymentable_invoice->amount) {
|
if ($paymentable_invoice->balance == $paymentable_invoice->amount) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user