- Stripe wasn't showing as an option in the modal
- Show the current payment method at the top of the recurring invoice
This commit is contained in:
wrongecho 2025-01-28 11:19:56 +00:00
parent 39adab734b
commit 071352e32f
4 changed files with 11 additions and 5 deletions

View File

@ -2,6 +2,11 @@
This file documents all notable changes made to ITFlow. This file documents all notable changes made to ITFlow.
## [UNRELEASED]
### Fixed
- Stripe now shows as a payment option in the add recurring payment modal
## [25.01] ## [25.01]
### Added / Changed ### Added / Changed

View File

@ -48,6 +48,9 @@
</div> </div>
<select class="form-control select2" name="payment_method" required> <select class="form-control select2" name="payment_method" required>
<option value="">- Method of Payment -</option> <option value="">- Method of Payment -</option>
<?php if ($config_stripe_enable) { ?>
<option value="Stripe">Stripe</option>
<?php } ?>
<?php <?php
$sql_payment_method_select = mysqli_query($mysqli, "SELECT * FROM categories WHERE category_type = 'Payment Method' AND category_archived_at IS NULL ORDER BY category_name ASC"); $sql_payment_method_select = mysqli_query($mysqli, "SELECT * FROM categories WHERE category_type = 'Payment Method' AND category_archived_at IS NULL ORDER BY category_name ASC");

View File

@ -1430,9 +1430,6 @@ if (isset($_GET['delete_recurring_payment'])) {
$_SESSION['alert_type'] = "error"; $_SESSION['alert_type'] = "error";
$_SESSION['alert_message'] = "Auto Payment Removed for Recurring Invoice <strong>$recurring_prefix$recurring_number</strong>"; $_SESSION['alert_message'] = "Auto Payment Removed for Recurring Invoice <strong>$recurring_prefix$recurring_number</strong>";
if ($config_stripe_enable) {
$_SESSION['alert_message'] = "Auto Payment Removed - Stripe Auto payments must be manually removed in Stripe";
}
header("Location: " . $_SERVER["HTTP_REFERER"]); header("Location: " . $_SERVER["HTTP_REFERER"]);

View File

@ -62,8 +62,9 @@ if (isset($_GET['recurring_id'])) {
} }
$recurring_payment_id = intval($row['recurring_payment_id']); $recurring_payment_id = intval($row['recurring_payment_id']);
$recurring_payment_recurring_invoice_id = intval($row['recurring_payment_recurring_invoice_id']); $recurring_payment_recurring_invoice_id = intval($row['recurring_payment_recurring_invoice_id']);
$recurring_payment_method = nullable_htmlentities($row['recurring_payment_method']);
// Override Tab Title // No Sanitizing needed as this var will opnly be used in the tab title // Override Tab Title // No Sanitizing needed as this var will only be used in the tab title
$tab_title = $row['client_name']; $tab_title = $row['client_name'];
$page_title = "{$row['recurring_prefix']}{$row['recurring_number']}"; $page_title = "{$row['recurring_prefix']}{$row['recurring_number']}";
@ -131,7 +132,7 @@ if (isset($_GET['recurring_id'])) {
<?php if ($recurring_payment_recurring_invoice_id) { ?> <?php if ($recurring_payment_recurring_invoice_id) { ?>
<a class="btn btn-outline-secondary" href="post.php?delete_recurring_payment=<?php echo $recurring_payment_id; ?>"> <a class="btn btn-outline-secondary" href="post.php?delete_recurring_payment=<?php echo $recurring_payment_id; ?>">
<i class="fas fa-fw fa-times-circle mr-2"></i>Disable AutoPay <i class="fas fa-fw fa-times-circle mr-2"></i>Disable AutoPay (<?php echo $recurring_payment_method ?>)
</a> </a>
<?php } else { ?> <?php } else { ?>
<a class="btn btn-secondary" href='#' data-toggle="modal" data-target="#addRecurringPaymentModal<?php echo $recurring_id; ?>"> <a class="btn btn-secondary" href='#' data-toggle="modal" data-target="#addRecurringPaymentModal<?php echo $recurring_id; ?>">