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

This commit is contained in:
diego-ramos
2025-05-22 15:34:39 -05:00
committed by GitHub
parent 7ba60ba58b
commit 85120fa4be
2 changed files with 3 additions and 3 deletions

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
}

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 } ?>