diff --git a/agent/modals/payment/payment_add.php b/agent/modals/payment/payment_add.php index 914f515fb..184142abf 100644 --- a/agent/modals/payment/payment_add.php +++ b/agent/modals/payment/payment_add.php @@ -6,8 +6,8 @@ $invoice_id = intval($_GET['id']); $sql = mysqli_query( $mysqli, - "SELECT client_currency_code, client_id, client_name, contact_email, contact_name, invoice_amount, - invoice_id, invoice_number, invoice_prefix FROM invoices + "SELECT client_id, client_name, contact_email, contact_name, invoice_amount, + invoice_id, invoice_number, invoice_prefix, invoice_currency_code FROM invoices LEFT JOIN clients ON invoice_client_id = client_id LEFT JOIN contacts ON client_id = contact_client_id AND contact_primary = 1 WHERE invoice_id = $invoice_id @@ -21,7 +21,7 @@ $invoice_number = intval($row['invoice_number']); $invoice_amount = floatval($row['invoice_amount']); $client_id = intval($row['client_id']); $client_name = escapeHtml($row['client_name']); -$client_currency_code = escapeHtml($row['client_currency_code']); +$client_currency_code = escapeHtml($row['invoice_currency_code']); $contact_name = escapeHtml($row['contact_name']); $contact_email = escapeHtml($row['contact_email']); diff --git a/agent/post/payment.php b/agent/post/payment.php index 46df6fbc9..46b6fa881 100644 --- a/agent/post/payment.php +++ b/agent/post/payment.php @@ -682,9 +682,6 @@ if (isset($_GET['delete_payment'])) { logAudit("Invoice", "Edit", "$session_name deleted Payment on Invoice $invoice_prefix$invoice_number", $client_id, $invoice_id); flashAlert("Payment deleted", 'error'); - if ($config_stripe_enable) { - flashAlert("Payment deleted - Stripe payments must be manually refunded in Stripe", 'error'); - } redirect(); @@ -775,12 +772,7 @@ if (isset($_GET['refund_payment_stripe'])) { $invoice_status = updateInvoiceStatusFromPayments($invoice_id); mysqli_query($mysqli,"INSERT INTO history SET history_status = '$invoice_status', history_description = 'Payment $stripe_payment_intent_id deleted and refunded', history_invoice_id = $invoice_id"); - - // Log info - $extended_log_desc = ''; - if (!$pi_livemode) { - $extended_log_desc = '(DEV MODE)'; - } + logAudit("Invoice", "Edit", "$session_name refunded and deleted Payment $stripe_payment_intent_id on Invoice $invoice_prefix$invoice_number", $client_id, $invoice_id); flashAlert("Payment deleted and refunded in Stripe", 'error');