Files
interblue.pl/modules/przelewy24/views/templates/hook/transactionRefund.tpl
2024-10-25 14:16:28 +02:00

122 lines
5.3 KiB
Smarty
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{*
*
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*
*}
<div class="tab-content panel przelewy-24">
<div class="panel-heading">
{l s='Refunds to Przelewy24' mod='przelewy24'}
</div>
{if '' !== $refundError}
<div class="alert alert-danger"><button type="button" class="close" data-dismiss="alert">×</button>
{foreach from=$refundError item=singleError}
<p>{l s=$singleError mod='przelewy24'}</p>
{/foreach}
</div>
{/if}
{if $amount > 0}
{assign var="amountToRefund" value=$amount/100}
<p>
{l s='Here you can send a refund to the customer. The amount of the refund may not exceed the value of the transaction and the amount of funds available in your account.' mod='przelewy24'}
</p>
<p>{l s='Amount to refund' mod='przelewy24'}: {$amountToRefund} {$sign}</p>
<form class="form-horizontal hidden-print refundAmount" method="post" id="p24-refund-form">
<div class="form-group">
<div class="col-lg-12">
<table class="table">
<tbody>
{foreach $productsPossibleToRefund as $i => $oneProduct}
<tr>
<td>{$oneProduct.name}</td>
<td>
<div class="input-group">
<input type="number"
name="refundProductQuantity[{$oneProduct.productId}]"
class="form-control js-line"
min="0"
max="{$oneProduct.quantity}"
value="{$oneProduct.quantity}"
data-unit-price="{$oneProduct.price}"
>
<div class="input-group-addon">/ {$oneProduct.quantity}</div>
</td>
<td>{$oneProduct.priceFormatted}</td>
<td><!-- empty --></td>
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<th>
<label for="p24-amount-to-refund">{l s='Amount' mod='przelewy24'}</label>
</th>
<td colspan="2">
<input class="form-control" id="p24-amount-to-refund" type="number"
data-maximum="{$amountToRefund}"
name="amountToRefund" value="{$amountToRefund}" step="0.01">
</td>
<td>
<input class="btn btn-primary pull-right" type="submit" name="submitRefund"
value="{l s='Send' mod='przelewy24'}">
<input type="hidden" id="refundAmountText"
value="{l s='This will generate outgoing transfer. Can you confirm the operation?' mod='przelewy24'}">
<input type="hidden" name="refundMaximum" value="{$amountToRefund}">
<input type="hidden" name="refundToken" value="{$refundToken}">
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</form>
{else}
<p>{l s='The payment has already been fully refunded - no funds to make further returns.' mod='przelewy24'}</p>
{/if}
{if $refunds}
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>
<span class="title_box">
{l s='Amount refunded' mod='przelewy24'}
</span>
</th>
<th>
<span class="title_box">
{l s='Date of refund' mod='przelewy24'}
</span>
</th>
<th>
<span class="title_box">
Status
</span>
</th>
</tr>
</thead>
<tbody>
{foreach from=$refunds item=refund}
<tr>
<td>
{$refund['amount_refunded']/100} {$sign}
</td>
<td>
{$refund['created']}
</td>
<td>
{l s=$refund['status'] mod='przelewy24'}
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{/if}
<span id="p24-need-reload-refund" data-need="{$p24NeedReloadRefund}"></span>
</div>