mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
fix loading indicator and send invoice status error
This commit is contained in:
@ -460,14 +460,14 @@ class Invoice extends Model implements HasMedia
|
||||
{
|
||||
$data = $this->sendInvoiceData($data);
|
||||
|
||||
\Mail::to($data['to'])->send(new SendInvoiceMail($data));
|
||||
|
||||
if ($this->status == Invoice::STATUS_DRAFT) {
|
||||
$this->status = Invoice::STATUS_SENT;
|
||||
$this->sent = true;
|
||||
$this->save();
|
||||
}
|
||||
|
||||
\Mail::to($data['to'])->send(new SendInvoiceMail($data));
|
||||
|
||||
return [
|
||||
'success' => true,
|
||||
'type' => 'send',
|
||||
|
||||
@ -369,6 +369,7 @@ class RecurringInvoice extends Model
|
||||
'customer' => $invoice->customer->toArray(),
|
||||
'company' => Company::find($invoice->company_id)
|
||||
];
|
||||
|
||||
$invoice->send($data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user