Fix encoding issue for payment types with special characters (#4232)

This commit is contained in:
diego-ramos authored and GitHub committed 2025-05-22 22:34:39 +02:00
1 parent 7ba60ba58b
commit 85120fa4be
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -466,7 +466,7 @@ class Sales extends Secure_Controller
*/
public function getDeletePayment(string $payment_id): void
{
$this->sale_lib->delete_payment($payment_id);
$this->sale_lib->delete_payment(base64_decode($payment_id));
$this->_reload(); // TODO: Hungarian notation
}
+2 -2
View File
@@ -478,8 +478,8 @@ if (isset($success)) {
<tbody id="payment_contents">
<?php foreach ($payments as $payment_id => $payment) { ?>
<tr>
<td><?= anchor("$controller_name/deletePayment/$payment_id", '<span class="glyphicon glyphicon-trash"></span>') ?></td>
<td><?= esc($payment['payment_type']) ?></td>
<td><?= anchor("$controller_name/deletePayment/". base64_encode($payment_id), '<span class="glyphicon glyphicon-trash"></span>') ?></td>
<td><?= $payment['payment_type'] ?></td>
<td style="text-align: right;"><?= to_currency($payment['payment_amount']) ?></td>
</tr>
<?php } ?>