mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Prevent marking delete invoice as sent
This commit is contained in:
parent
b8e3b7e579
commit
c2d2c05c81
@ -448,6 +448,10 @@ class Invoice extends EntityModel implements BalanceAffecting
|
||||
|
||||
public function markSent()
|
||||
{
|
||||
if ($this->is_deleted) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (! $this->isSent()) {
|
||||
$this->invoice_status_id = INVOICE_STATUS_SENT;
|
||||
}
|
||||
@ -464,6 +468,10 @@ class Invoice extends EntityModel implements BalanceAffecting
|
||||
*/
|
||||
public function markInvitationsSent($notify = false, $reminder = false)
|
||||
{
|
||||
if ($this->is_deleted) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (! $this->relationLoaded('invitations')) {
|
||||
$this->load('invitations');
|
||||
}
|
||||
@ -496,6 +504,10 @@ class Invoice extends EntityModel implements BalanceAffecting
|
||||
*/
|
||||
public function markInvitationSent($invitation, $messageId = false, $notify = true, $notes = false)
|
||||
{
|
||||
if ($this->is_deleted) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (! $this->isSent()) {
|
||||
$this->is_public = true;
|
||||
$this->invoice_status_id = INVOICE_STATUS_SENT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user