mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Merge pull request #4489 from turbo124/v5-develop
Fix for doubling client balance erroneously on emailing"
This commit is contained in:
commit
5a66069833
@ -132,8 +132,6 @@ class EmailController extends BaseController
|
||||
}
|
||||
});
|
||||
|
||||
$entity_obj = $entity_obj->service()->markSent()->save();
|
||||
|
||||
$entity_obj->last_sent_date = now();
|
||||
$entity_obj->save();
|
||||
|
||||
|
@ -37,6 +37,9 @@ class MarkSent extends AbstractService
|
||||
return $this->invoice;
|
||||
}
|
||||
|
||||
info("in mark sent");
|
||||
info($this->invoice->balance);
|
||||
|
||||
$this->invoice->markInvitationsSent();
|
||||
|
||||
$this->invoice->setReminder();
|
||||
@ -49,8 +52,12 @@ class MarkSent extends AbstractService
|
||||
->updateBalance($this->invoice->amount)
|
||||
->save();
|
||||
|
||||
info($this->invoice->balance);
|
||||
|
||||
$this->client->service()->updateBalance($this->invoice->balance)->save();
|
||||
|
||||
info($this->client->balance);
|
||||
|
||||
$this->invoice->ledger()->updateInvoiceBalance($this->invoice->balance);
|
||||
|
||||
event(new InvoiceWasUpdated($this->invoice, $this->invoice->company, Ninja::eventVars()));
|
||||
|
Loading…
Reference in New Issue
Block a user