<ion-modal-view>
  <ion-content>


    <div class="row order-header"><b class="col text-left">{{ masa.hall }}</b><b class="col text-center">MS: {{ masa.name }}</b><b class="col text-right">{{ masa.waiter }}</b></div>

    <div class="table-detail-body">
      <div class="total list">
        <div class="item">
          Adisyon Numarası
          <span class="item-note" style="color:#a52a2b; font-weight:bold">{{ masa.addition_no ? masa.addition_no : 'YOK' }}</span>
        </div>
        <div class="item">
          Cari
          <span class="item-note" ng-click="cari()">{{ masa.customer ? masa.customer : 'SEÇİLİ CARİ YOK' }}</span>
        </div>
        <div class="item">
          Masa Açılış
          <span class="item-note">{{ masa.time }}</span>
        </div>
        <div class="item">
          Genel Toplam
          <span class="item-note"><b style="color: #000">{{ masa.subtotal | number:2 }} ₺</b></span>
        </div>
      </div>

      <div class="products list">
        <div class="item item-divider">
         Ürünler
        </div>

        <div class="item product item-text-wrap" ng-repeat="urun in urunler">
          {{ urun.name }}
          <span class="item-note">
            {{ urun.time }}
          </span><br>
          <span style="padding-left: 10px" ng-if="urun.extra">
            <a>*</a> {{ urun.extra }}
          </span>
          <span class="item-note">
            {{ urun.quantity | number }} Adet
          </span><br>
          <span style="color: #f00; font-size: .9em; font-weight: bold">{{ urun.waiter }}</span>
          <span class="item-note">
          {{ urun.total | number:2 }} ₺
          </span>
        </div>
      </div>

    </div>
  </ion-content>

    <div class="detail-footer">
      <button type="button" style="left: 0%" class="button button-assertive" ng-click="printAddition()" ng-disabled="adisyon || masa.status!=2 || masa.subtotal<=0"><i class="ion ion-printer"></i><br>Adisyon</button>
      <button type="button" style="left: 25%" class="button button-calm" ng-click="cari()"><i class="ion ion-person"></i><br>Cari Seç</button>
      <button type="button" style="left: 50%" ng-click="order()" class="table-transfer button button-balanced"><i class="ion ion-android-restaurant"></i><br>Ekle</button>
      <button type="button" style="left: 75%" ng-click="goHome()" class="button button-energized"><i class="ion ion-close"></i><br>Kapat</button>
    </div>
</ion-modal-view>
