Prevent emailing recurring invoice through API

This commit is contained in:
Hillel Coren 2016-11-06 15:57:33 +02:00
parent fbf5e726fb
commit 905593b525

View File

@ -176,7 +176,7 @@ class InvoiceApiController extends BaseAPIController
if (isset($data['email_invoice']) && $data['email_invoice']) {
if ($payment) {
$this->mailer->sendPaymentConfirmation($payment);
} else {
} elseif ( ! $invoice->is_recurring) {
$this->mailer->sendInvoice($invoice);
}
}