mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 00:44:34 -04:00
Fix for doubling client balance erroneously on emailing"
This commit is contained in:
parent
666966c8bd
commit
d440d4421d
@ -132,8 +132,6 @@ class EmailController extends BaseController
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$entity_obj = $entity_obj->service()->markSent()->save();
|
|
||||||
|
|
||||||
$entity_obj->last_sent_date = now();
|
$entity_obj->last_sent_date = now();
|
||||||
$entity_obj->save();
|
$entity_obj->save();
|
||||||
|
|
||||||
|
@ -37,6 +37,9 @@ class MarkSent extends AbstractService
|
|||||||
return $this->invoice;
|
return $this->invoice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info("in mark sent");
|
||||||
|
info($this->invoice->balance);
|
||||||
|
|
||||||
$this->invoice->markInvitationsSent();
|
$this->invoice->markInvitationsSent();
|
||||||
|
|
||||||
$this->invoice->setReminder();
|
$this->invoice->setReminder();
|
||||||
@ -49,8 +52,12 @@ class MarkSent extends AbstractService
|
|||||||
->updateBalance($this->invoice->amount)
|
->updateBalance($this->invoice->amount)
|
||||||
->save();
|
->save();
|
||||||
|
|
||||||
|
info($this->invoice->balance);
|
||||||
|
|
||||||
$this->client->service()->updateBalance($this->invoice->balance)->save();
|
$this->client->service()->updateBalance($this->invoice->balance)->save();
|
||||||
|
|
||||||
|
info($this->client->balance);
|
||||||
|
|
||||||
$this->invoice->ledger()->updateInvoiceBalance($this->invoice->balance);
|
$this->invoice->ledger()->updateInvoiceBalance($this->invoice->balance);
|
||||||
|
|
||||||
event(new InvoiceWasUpdated($this->invoice, $this->invoice->company, Ninja::eventVars()));
|
event(new InvoiceWasUpdated($this->invoice, $this->invoice->company, Ninja::eventVars()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user