diff --git a/post/invoice.php b/post/invoice.php index 965b3cff..c93191f6 100644 --- a/post/invoice.php +++ b/post/invoice.php @@ -1407,6 +1407,24 @@ if (isset($_POST['update_invoice_item_order'])) { header("Location: " . $_SERVER["HTTP_REFERER"]); } +if (isset($_GET['recurring_invoice_email_notify'])) { + $recurring_invoice_email_notify = intval($_GET['recurring_invoice_email_notify']); + $recurring_id = intval($_GET['recurring_id']); + + mysqli_query($mysqli,"UPDATE recurring SET recurring_invoice_email_notify = $recurring_invoice_email_notify WHERE recurring_id = $recurring_id"); + + if ($recurring_invoice_email_notify) { + $_SESSION['alert_message'] = "EMail Notifications On"; + } else { + $_SESSION['alert_type'] = "error"; + $_SESSION['alert_message'] = "EMail Notifications Off"; + } + + + + header("Location: " . $_SERVER["HTTP_REFERER"]); +} + if (isset($_POST['link_invoice_to_ticket'])) { $invoice_id = intval($_POST['invoice_id']); $ticket_id = intval($_POST['ticket_id']); diff --git a/recurring_invoice.php b/recurring_invoice.php index f578e314..39ccbf94 100644 --- a/recurring_invoice.php +++ b/recurring_invoice.php @@ -31,6 +31,7 @@ if (isset($_GET['recurring_id'])) { $recurring_discount = floatval($row['recurring_discount_amount']); $recurring_currency_code = nullable_htmlentities($row['recurring_currency_code']); $recurring_note = nullable_htmlentities($row['recurring_note']); + $recurring_invoice_email_notify = intval($row['recurring_invoice_email_notify']); $category_id = intval($row['recurring_category_id']); $client_id = intval($row['client_id']); $client_name = nullable_htmlentities($row['client_name']); @@ -98,6 +99,11 @@ if (isset($_GET['recurring_id'])) {
+ + Email Notify + + Email Notify +