2016-07-05 19:07:50 +02:00
|
|
|
<div class="modal-header">
|
|
|
|
<img ng-src="{{logoBlack.custom_asset_file_attributes.attachment_url}}" alt="{{logo.custom_asset_file_attributes.attachment}}" class="modal-logo"/>
|
2019-12-17 12:40:36 +01:00
|
|
|
<h1 translate>{{ 'app.shared.wallet.credit_title' }}</h1>
|
2016-07-05 19:07:50 +02:00
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
2016-12-12 14:20:26 +01:00
|
|
|
|
|
|
|
<div class="alert alert-warning m-b-md m-b-sm">
|
2020-11-02 13:22:32 +01:00
|
|
|
<i class="fa fa-warning" aria-hidden="true"></i>
|
|
|
|
<span translate>{{ 'app.shared.wallet.warning_uneditable_credit' }}</span>
|
2016-12-12 14:20:26 +01:00
|
|
|
</div>
|
|
|
|
|
2016-07-05 19:07:50 +02:00
|
|
|
<form name="walletForm" ng-class="{'has-error': walletForm.amount.$dirty && walletForm.amount.$invalid}">
|
2016-09-29 13:02:24 +02:00
|
|
|
<div class="text-right amountGroup m-r-md">
|
2019-12-17 12:40:36 +01:00
|
|
|
<label for="amount" class="beforeAmount" translate>{{ 'app.shared.wallet.credit_label' }}</label>
|
2016-09-29 13:02:24 +02:00
|
|
|
<input class="form-control m-l"
|
|
|
|
type="number"
|
2016-12-12 14:20:26 +01:00
|
|
|
id="amount"
|
2016-09-29 13:02:24 +02:00
|
|
|
name="amount"
|
|
|
|
ng-model="amount"
|
|
|
|
required min="1"
|
|
|
|
step="any">
|
2016-07-05 19:07:50 +02:00
|
|
|
<span class="afterAmount">{{currencySymbol}}</span>
|
2019-12-17 12:40:36 +01:00
|
|
|
<span class="help-block" ng-show="walletForm.amount.$dirty && walletForm.amount.$error.required" translate>{{'app.shared.wallet.amount_is_required'}}</span>
|
|
|
|
<span class="help-block" ng-show="walletForm.amount.$dirty && walletForm.amount.$error.min">{{ 'app.shared.wallet.amount_minimum_1' | translate }} {{currencySymbol}}.</span>
|
2016-09-29 13:02:24 +02:00
|
|
|
</div>
|
2016-12-12 14:20:26 +01:00
|
|
|
<div class="text-right amountGroup m-t m-r-md" ng-class="{'has-error': walletForm.amount_confirm.$dirty && walletForm.amount_confirm.$invalid }">
|
2019-12-17 12:40:36 +01:00
|
|
|
<label for="amount_confirm" class="beforeAmount" translate>{{ 'app.shared.wallet.confirm_credit_label' }}</label>
|
2016-09-29 13:02:24 +02:00
|
|
|
<input class="form-control m-l"
|
|
|
|
type="number"
|
2016-12-12 14:20:26 +01:00
|
|
|
id="amount_confirm"
|
2016-09-29 13:02:24 +02:00
|
|
|
name="amount_confirm"
|
|
|
|
ng-model="amount_confirm"
|
|
|
|
required
|
|
|
|
min="1"
|
|
|
|
step="any"
|
2019-09-11 13:05:10 +02:00
|
|
|
match="amount">
|
2016-09-29 13:02:24 +02:00
|
|
|
<span class="afterAmount">{{currencySymbol}}</span>
|
2019-12-17 12:40:36 +01:00
|
|
|
<span class="help-block" ng-show="walletForm.amount_confirm.$dirty && walletForm.amount_confirm.$error.required" translate>{{'app.shared.wallet.amount_confirm_is_required'}}</span>
|
|
|
|
<span class="help-block" ng-show="walletForm.amount_confirm.$dirty && walletForm.amount_confirm.$error.match">{{ 'app.shared.wallet.amount_confirm_does_not_match' | translate }}</span>
|
2016-07-05 19:07:50 +02:00
|
|
|
</div>
|
|
|
|
|
2016-12-12 14:20:26 +01:00
|
|
|
<hr/>
|
2020-11-02 13:36:17 +01:00
|
|
|
<div class="text-right m-t" ng-show="$root.modules.invoicing">
|
2019-12-17 12:40:36 +01:00
|
|
|
<label for="generate_avoir" translate>{{ 'app.shared.wallet.generate_a_refund_invoice' }}</label>
|
2016-12-12 14:20:26 +01:00
|
|
|
<div class="inline m-l">
|
|
|
|
<input bs-switch
|
|
|
|
ng-model="generate_avoir"
|
|
|
|
id="generate_avoir"
|
|
|
|
name="generate_avoir"
|
|
|
|
type="checkbox"
|
2019-12-17 12:40:36 +01:00
|
|
|
switch-on-text="{{ 'app.shared.buttons.yes' | translate }}"
|
|
|
|
switch-off-text="{{ 'app.shared.buttons.no' | translate }}"
|
2016-12-12 14:20:26 +01:00
|
|
|
switch-animate="true"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div ng-show="generate_avoir">
|
|
|
|
<div class="m-t">
|
2019-12-17 12:40:36 +01:00
|
|
|
<label for="description" translate>{{ 'app.shared.wallet.description_optional' }}</label>
|
|
|
|
<p translate>{{ 'app.shared.wallet.will_appear_on_the_refund_invoice' }}</p>
|
2016-12-12 14:20:26 +01:00
|
|
|
<textarea class="form-control m-t-sm"
|
|
|
|
id="description"
|
|
|
|
name="description"
|
|
|
|
ng-model="description">
|
|
|
|
</textarea>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
2016-09-29 13:02:24 +02:00
|
|
|
|
2016-07-05 19:07:50 +02:00
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2019-12-17 12:40:36 +01:00
|
|
|
<button class="btn btn-info" ng-click="ok()" ng-disabled="walletForm.$invalid || attempting" translate>{{ 'app.shared.buttons.confirm' }}</button>
|
|
|
|
<button class="btn btn-default" ng-click="cancel()" translate>{{ 'app.shared.buttons.cancel' }}</button>
|
2016-07-05 19:07:50 +02:00
|
|
|
</div>
|