mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Fixes for credit sent events
This commit is contained in:
parent
e3729525db
commit
7e9dde9513
@ -644,8 +644,6 @@ class CreditController extends BaseController
|
||||
EmailEntity::dispatch($invitation, $credit->company, 'credit');
|
||||
});
|
||||
|
||||
// $credit->sendEvent(Webhook::EVENT_SENT_CREDIT, "client");
|
||||
|
||||
if (! $bulk) {
|
||||
return response()->json(['message' => 'email sent'], 200);
|
||||
}
|
||||
|
@ -152,9 +152,9 @@ class CreditService
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function markSent()
|
||||
public function markSent($fire_event = false)
|
||||
{
|
||||
$this->credit = (new MarkSent($this->credit->client, $this->credit))->run();
|
||||
$this->credit = (new MarkSent($this->credit->client, $this->credit))->run($fire_event);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class TriggeredActions extends AbstractService
|
||||
}
|
||||
|
||||
if ($this->request->has('mark_sent') && $this->request->input('mark_sent') == 'true') {
|
||||
$this->credit = $this->credit->service()->markSent()->save();
|
||||
$this->credit = $this->credit->service()->markSent(true)->save();
|
||||
}
|
||||
|
||||
if ($this->request->has('save_default_footer') && $this->request->input('save_default_footer') == 'true') {
|
||||
|
Loading…
Reference in New Issue
Block a user