diff --git a/app/Ninja/Datatables/PaymentDatatable.php b/app/Ninja/Datatables/PaymentDatatable.php index e0be4b78c8..b20610cb0d 100644 --- a/app/Ninja/Datatables/PaymentDatatable.php +++ b/app/Ninja/Datatables/PaymentDatatable.php @@ -143,7 +143,7 @@ class PaymentDatatable extends EntityDatatable [ trans('texts.refund_payment'), function ($model) { - $max_refund = number_format($model->amount - $model->refunded, 2); + $max_refund = $model->amount - $model->refunded; $formatted = Utils::formatMoney($max_refund, $model->currency_id, $model->country_id); $symbol = Utils::getFromCache($model->currency_id ? $model->currency_id : 1, 'currencies')->symbol; $local = in_array($model->gateway_id, [GATEWAY_BRAINTREE, GATEWAY_STRIPE, GATEWAY_WEPAY]) || ! $model->gateway_id ? 0 : 1; diff --git a/app/Ninja/PaymentDrivers/BasePaymentDriver.php b/app/Ninja/PaymentDrivers/BasePaymentDriver.php index a3fc9cbeae..35d7f088eb 100644 --- a/app/Ninja/PaymentDrivers/BasePaymentDriver.php +++ b/app/Ninja/PaymentDrivers/BasePaymentDriver.php @@ -861,6 +861,7 @@ class BasePaymentDriver return [ 'amount' => $amount, 'transactionReference' => $payment->transaction_reference, + 'currency' => $payment->client->getCurrencyCode(), ]; }