2016-03-23 18:39:41 +01:00
< div class = "modal-header" >
2019-12-17 12:40:36 +01:00
< h3 class = "text-center red" translate > {{ 'app.admin.invoices.create_a_refund_on_this_invoice' }}< / h3 >
2016-03-23 18:39:41 +01:00
< / div >
< div class = "modal-body" >
< form name = "avoirForm" novalidate = "novalidate" >
< div class = "form-group" ng-class = "{'has-error': avoirForm.avoir_date.$dirty && avoirForm.avoir_date.$invalid }" >
2019-12-17 12:40:36 +01:00
< label translate > {{ 'app.admin.invoices.creation_date_for_the_refund' }}< / label >
2016-03-23 18:39:41 +01:00
< div class = "input-group" >
< span class = "input-group-addon" > < i class = "fa fa-calendar" > < / i > < / span >
< input type = "text"
class="form-control"
name="avoir_date"
ng-model="avoir.avoir_date"
uib-datepicker-popup="{{datePicker.format}}"
datepicker-options="datePicker.options"
is-open="datePicker.opened"
2019-03-27 16:46:08 +01:00
min-date="lastClosingEnd"
2016-03-23 18:39:41 +01:00
placeholder="{{datePicker.format}}"
ng-click="openDatePicker($event)"
required/>
< / div >
2019-12-17 12:40:36 +01:00
< span class = "help-block" ng-show = "avoirForm.avoir_date.$dirty && avoirForm.avoir_date.$error.required" translate > {{ 'app.admin.invoices.creation_date_is_required' }}< / span >
2016-03-23 18:39:41 +01:00
< / div >
< div class = "form-group" >
2019-12-17 12:40:36 +01:00
< label translate > {{ 'app.admin.invoices.refund_mode' }}< / label >
2019-09-17 14:48:06 +02:00
< select class = "form-control m-t-sm" name = "payment_method" ng-model = "avoir.payment_method" ng-options = "mode.value as mode.name for mode in avoirModes" required > < / select >
2016-03-23 18:39:41 +01:00
< / div >
< div class = "form-group" ng-if = "invoice.is_subscription_invoice" >
2019-12-17 12:40:36 +01:00
< label translate > {{ 'app.admin.invoices.do_you_want_to_disable_the_user_s_subscription' }}< / label >
2016-03-23 18:39:41 +01:00
< select class = "form-control m-t-sm" name = "subscription_to_expire" ng-model = "avoir.subscription_to_expire" ng-options = "value as key for (key, value) in subscriptionExpireOptions" required > < / select >
< / div >
< div ng-show = "!invoice.is_subscription_invoice && invoice.items.length > 1" class = "form-group" >
2019-12-17 12:40:36 +01:00
< label translate > {{ 'app.admin.invoices.elements_to_refund' }}< / label >
2016-03-23 18:39:41 +01:00
< table class = "table partial-avoir-table" >
< thead >
< tr >
< th class = "input-col" > < / th >
2019-12-17 12:40:36 +01:00
< th class = "label-col" translate > {{ 'app.admin.invoices.description' }}< / th >
< th class = "amount-col" translate > {{ 'app.admin.invoices.price' }}< / th >
2016-03-23 18:39:41 +01:00
< / tr >
< / thead >
< tbody >
< tr ng-repeat = "item in invoice.items" ng-class = "{'partial-avoir-selected-item': partial[item.id]}" >
< td class = "input-col" > < input type = "checkbox" ng-model = "partial[item.id]" id = "partial_{{item.id}}" ng-disabled = "item.avoir_item_id" > < / td >
< td class = "label-col" > < label for = "partial_{{item.id}}" > {{item.description}}< / label > < / td >
< td class = "amount-col" > {{item.amount | currency}}< / td >
< / tr >
< / tbody >
< / table >
< / div >
< div >
2019-12-17 12:40:36 +01:00
< label for = "description" translate > {{ 'app.admin.invoices.description_optional' }}< / label >
< p translate > {{ 'app.admin.invoices.will_appear_on_the_refund_invoice' }}< / p >
2016-03-23 18:39:41 +01:00
< textarea class = "form-control m-t-sm" name = "description" ng-model = "avoir.description" > < / textarea >
< / div >
< / form >
< / div >
< div class = "modal-footer" >
2019-12-17 12:40:36 +01:00
< button class = "btn btn-warning" ng-click = "ok()" ng-disabled = "avoirForm.$invalid" translate > {{ 'app.shared.buttons.confirm' }}< / button >
< button class = "btn btn-default" ng-click = "cancel()" translate > {{ 'app.shared.buttons.cancel' }}< / button >
2019-01-03 17:39:50 +01:00
< / div >