diff --git a/app/Ninja/Datatables/PaymentDatatable.php b/app/Ninja/Datatables/PaymentDatatable.php index 193207f9d82a..e0be4b78c86d 100644 --- a/app/Ninja/Datatables/PaymentDatatable.php +++ b/app/Ninja/Datatables/PaymentDatatable.php @@ -146,8 +146,9 @@ class PaymentDatatable extends EntityDatatable $max_refund = number_format($model->amount - $model->refunded, 2); $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; - return "javascript:showRefundModal({$model->public_id}, '{$max_refund}', '{$formatted}', '{$symbol}')"; + return "javascript:showRefundModal({$model->public_id}, '{$max_refund}', '{$formatted}', '{$symbol}', {$local})"; }, function ($model) { return Auth::user()->can('editByOwner', [ENTITY_PAYMENT, $model->user_id]) diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 376846dc203e..a0185f4a1db7 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -2741,6 +2741,7 @@ $LANG = array( 'taxes_are_not_included_help' => 'Taxes are excluded from the cost.', 'change_requires_purge' => 'Changing this setting requires :link the account data.', 'purging' => 'purging', + 'warning_local_refund' => 'The refund will be recorded in the app but will NOT be processed by the payment gateway.', ); diff --git a/resources/views/partials/refund_payment.blade.php b/resources/views/partials/refund_payment.blade.php index aef759b32160..5547bc1010e3 100644 --- a/resources/views/partials/refund_payment.blade.php +++ b/resources/views/partials/refund_payment.blade.php @@ -1,83 +1,86 @@