mirror of https://github.com/itflow-org/itflow
Added button to turn Email Notifications off or on on Recurring Invoices
This commit is contained in:
parent
ba66dbf887
commit
29a83b1e8e
|
|
@ -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']);
|
||||
|
|
|
|||
|
|
@ -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'])) {
|
|||
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<?php if($recurring_invoice_email_notify) { ?>
|
||||
<a href="post.php?recurring_invoice_email_notify=0&recurring_id=<?php echo $recurring_id; ?>" class="btn btn-primary"><i class="fas fa-fw fa-bell mr-2"></i>Email Notify</a>
|
||||
<?php } else { ?>
|
||||
<a href="post.php?recurring_invoice_email_notify=1&recurring_id=<?php echo $recurring_id; ?>" class="btn btn-outline-danger"><i class="fas fa-fw fa-bell-slash mr-2"></i>Email Notify</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="dropdown dropleft text-center float-right">
|
||||
|
|
|
|||
Loading…
Reference in New Issue