1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-19 16:01:34 +02:00

Refund payment fixes

This commit is contained in:
Hillel Coren 2018-03-23 14:21:21 +03:00
parent 677224e7e9
commit d5924bc523
2 changed files with 2 additions and 1 deletions

View File

@ -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;

View File

@ -861,6 +861,7 @@ class BasePaymentDriver
return [
'amount' => $amount,
'transactionReference' => $payment->transaction_reference,
'currency' => $payment->client->getCurrencyCode(),
];
}