<div class="">
  <h3 class="modalTitle">
    Nouvel élément de facturation
  </h3>
  <div class="modalBody">
    <div class="row spbrow">
      <div class="col-xs-12">
        <label class="control-label">Période</label>
        <select
          class="form-control"
          ng-model="currentPeriodeFacturation.periode"
          ng-options="o.key as ((o.nom)+' - du '+(o.debut|date)+' au '+(o.fin|date)) for o in periodesCfg.periodes"
        ></select>
      </div>
    </div>

    <div class="row spbrow">
      <div class="col-xs-6">
        <label class="control-label">Type Controle</label>
        <select
          class="form-control"
          ng-options="controleCfg.type as controleCfg.label_court for controleCfg in controletype"
          ng-model="currentPeriodeFacturation.type"
        ></select>
      </div>
      <div class="col-xs-6">
        <label class="control-label">Prix HT</label>
        <input
          type="number"
          min="0"
          class="form-control"
          ng-model="currentPeriodeFacturation.prix"
        />
      </div>
    </div>
    <div class="row spbrow">
      <div class="col-xs-6">
        <label class="control-label">Débiteur</label>
        <select
          class="form-control"
          ng-model="currentPeriodeFacturation.debiteur"
          ng-options="o.value as o.label for o in choixDebiteur"
        ></select>
      </div>

      <div
        class="col-xs-6"
        ng-class="{'has-error': !currentPeriodeFacturation.tva && currentPeriodeFacturation.tva!=0}"
      >
        <label class="control-label">Taux TVA</label>
        <div class="input-group">
          <input
            type="number"
            min="0"
            max="100"
            class="form-control"
            ng-model="currentPeriodeFacturation.tva"
          />
          <span class="input-group-addon" id="basic-addon2"> % </span>
        </div>
      </div>
    </div>

    <!-- <div class="row spbrow">
            <div class="col-xs-12">
                <div class="checkbox">
                    <label>
                        <input type="checkbox" ng-model="currentPeriodeFacturation.subvention"> Éligible à subvention
                    </label>
                </div>
            </div>
        </div> -->

    <hr />
    <div class="row">
      <div class="col-xs-12">
        <button
          type="button"
          class="btn btn-default pull-right"
          ng-disabled="!currentPeriodeFacturation.tva && currentPeriodeFacturation.tva!=0"
          ng-click="savePeriodeFacturation()"
        >
          Ajouter
        </button>
      </div>
    </div>
  </div>
</div>
