mirror of https://github.com/itflow-org/itflow
Minor Fixups
This commit is contained in:
parent
bb1dfef2e4
commit
6866addeee
Binary file not shown.
18
post.php
18
post.php
|
|
@ -3483,6 +3483,24 @@ if(isset($_POST['edit_recurring'])){
|
|||
|
||||
}
|
||||
|
||||
if(isset($_POST['edit_recurring_next_date'])){
|
||||
|
||||
$recurring_id = intval($_POST['recurring_id']);
|
||||
$next_date = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['next_date'])));
|
||||
|
||||
mysqli_query($mysqli,"UPDATE recurring SET recurring_next_date = '$next_date', recurring_updated_at = NOW() WHERE recurring_id = $recurring_id AND company_id = $session_company_id");
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO history SET history_status = '$status', history_description = 'Recurring next date modified', history_created_at = NOW(), history_recurring_id = $recurring_id, company_id = $session_company_id");
|
||||
|
||||
//Logging
|
||||
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Recurring', log_action = 'Modify', log_description = '$recurring_id next date modified', log_created_at = NOW(), company_id = $session_company_id, log_user_id = $session_user_id");
|
||||
|
||||
$_SESSION['alert_message'] = "Recurring Invoice next date modified";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
|
||||
}
|
||||
|
||||
if(isset($_GET['delete_recurring'])){
|
||||
$recurring_id = intval($_GET['delete_recurring']);
|
||||
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ if(isset($_GET['recurring_id'])){
|
|||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editRecurringModal<?php echo $recurring_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editNextDateRecurringModal<?php echo $recurring_id; ?>">Set Next Date</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="post.php?force_recurring=<?php echo $recurring_id; ?>">Force Send</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
|
@ -355,6 +356,7 @@ if(isset($_GET['recurring_id'])){
|
|||
<?php
|
||||
|
||||
include("recurring_invoice_edit_modal.php");
|
||||
include("recurring_invoice_edit_next_date_modal.php");
|
||||
include("recurring_invoice_note_modal.php");
|
||||
include("category_quick_add_modal.php");
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label>Income Category <strong class="text-danger">*</strong></label>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
<div class="modal" id="editNextDateRecurringModal<?php echo $recurring_id; ?>" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content bg-dark">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-sync-alt"></i> <?php echo "$recurring_prefix$recurring_number"; ?></h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="recurring_id" value="<?php echo $recurring_id; ?>">
|
||||
|
||||
<div class="modal-body bg-white">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Next Date <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||
</div>
|
||||
<input type="date" class="form-control" name="next_date" value="<?php echo $recurring_next_date; ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer bg-white">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
||||
<button type="submit" name="edit_recurring_next_date" class="btn btn-primary">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue