Fix authorized overdraft input field.

This commit is contained in:
Alexis Lahouze 2017-07-04 21:50:34 +02:00
parent e90f4d21e8
commit a3e9ba02ac
2 changed files with 7 additions and 1 deletions

View File

@ -41,7 +41,8 @@
<div class="input-group-addon">-</div>
<input class="form-control" id="authorized-overdraft"
name="authorized_overdraft"
ng-model="$ctrl.account.authorized_overdraft"
ng-model="$ctrl.authorized_overdraft"
ng-change="$ctrl.authorizedOverdraftChange()"
type="number" placeholder="Authorized overdraft"
required min="0"/>
<div class="input-group-addon">.00€</div>

View File

@ -206,6 +206,11 @@ var accountModule = angular.module('accountant.accounts', [
vm.$onInit = function() {
vm.account = vm.resolve.account;
vm.authorized_overdraft = - vm.account.authorized_overdraft;
};
vm.authorizedOverdraftChange = function() {
vm.account.authorized_overdraft = - vm.authorized_overdraft;
};
vm.ok = function() {