                     <div dir=ltr style='display:none'>{{JSON.stringify(cart)}}</div>
		
            <h3 class="no-print"><?=lang('books_iara')?> </h3>
            
            
					<?=$this->view('front/fatoora_print_header','',true)?>


<div uk-grid class="uk-grid-small uk-text-small">
					<div class="uk-width-auto">
						<strong><?=lang('mustair')?> / </strong>
					</div>
					<div class="uk-width-expand">
					
					 <strong>{{ cart.member['name']}}</strong><span v-if="cart.payd==false">
					 
					 <a class="uk-icon-link no-print fa fa-search uk-link-reset" ></a>
					 
   <div id="cart_select_member" uk-dropdown="mode: click; pos: left-center" class="no-print">
<ul class="uk-subnav uk-subnav-pill">
    <li><a href="#" uk-toggle="target: .member_select" class="uk-link-reset"><span class="fa fa-search"></span> <?=lang('search')?> </a></li>
    <li><a href="#" uk-toggle="target: .member_select"><span class="fa fa-plus"></span> <?=lang('new')?></a></li>

</ul>
    <div class="member_select">
<h5> <?=lang('search_user')?> </h5>
				<input autofocus v-model="cart_member_qry" class=" uk-input uk-form-width-medium uk-form-small" type="text" v-on:keyup="cart_members_listing()" placeholder="<?=lang('type_name_or_phone_no')?>">	
	<ul class="uk-list uk-list-divider uk-list-small">
					<li v-for="m in cart_members_list" ><a @click="select_member(m)" class="uk-link-reset">{{m.name}}<div class="uk-float-left uk-margin-right">{{m.contact_no}}</div></a></li>
					
				</ul><div v-if="cart_members_list.length==0 && cart_member_qry!=''" class="uk-text-warning">
				<?=lang('search_not_found')?>
				<div class="uk-margin"> <a v-on:click='new_member_name=cart_member_qry;'  uk-toggle="target: .member_select" class="uk-button uk-button-primary ">
				<?=sprintf(lang('add_the_name_to_members'),'{{cart_member_qry}}')?> </a></div>
				</div>
	
	</div>
    <div class="member_select" hidden>
	
	<h5> <?=lang('add_new_member')?> </h5>	
			<input v-model="new_member_name" class=" uk-input uk-form-width-medium uk-form-small" type="text"  placeholder="<?=lang('new_member_name')?>">
			<div class="uk-margin"><input v-model="new_member_contact_no" class="uk-input uk-form-width-medium uk-form-small" type="text" placeholder="<?=lang('contact_no')?>"></div>
			<div class="uk-margin"><input v-model="new_member_email"  type="email" class="uk-input uk-form-width-medium uk-form-small"  placeholder="<?=lang('email_adrs')?>"></div>

			<div class="uk-margin"><input v-model="new_member_adrs" class="uk-input uk-form-width-medium uk-form-small" type="text" placeholder="<?=lang('adrs')?>"></div>
			<div class="uk-margin"> <button v-on:click='add_cart_member()' class="uk-button uk-button-primary"><?=lang('add_and_select')?> </button></div>
	</div>
	
			
</div> 
  
  </span>
              <div class="print">
		
		</div>   
                    <span class="no-print"><br> <?=lang('contact_no')?>: <strong> {{  cart.member['contact_no'] }} </strong></span>
                    
                  
                    
					
					</div>
					<div class="uk-width-auto">
						<?=lang('ist_date')?>: <span><input v-model="cart.date" class=" uk-input uk-form-width-medium uk-form-small" type="date"  ></span>
						
						<br />
					<?=lang('amin_maktaba')?>: {{ fatoora.user['name']}}
					<?php if(right('ist_swith_amin')):?>
					<a class="uk-icon-link no-print fa fa-search uk-link-reset" ></a>
					  <div id="cart_select_user" uk-dropdown="mode: click; pos: left-center" class="no-print">
							<div class="member_select">
<h5> <?=lang('search_user')?> </h5>
					
	<ul class="uk-list uk-list-divider uk-list-small">
					<li v-for="m in users" ><a @click="select_user(m)" class="uk-link-reset">{{m.name}}<div class="uk-float-left uk-margin-right">{{m.id}}</div></a></li>
					
				</ul>
	
	</div>
					  </div>
					  <?php endif;?>
					 
					</div>
				</div>			
                    
					
                    <table class="uk-table uk-table-hover uk-table-small uk-table-divider">
                        <thead>
                            <tr>
                                <th>#</th>
                                <th><?=lang('book_id')?></th>
                                <th><?=lang('book_title')?></th>
                                <th><?=lang('publisher')?></th>
                                <th><?=lang('mujallad_no')?></th>
                                <th><?=lang('days')?></th>
                               
                                <th class="no-print" v-if="cart.payd==false"><?=lang('cancel')?></th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="i,index in cart.items">
                                <td>{{ index+1 }}</td>
                                <td>{{ i.id }}</td>
                                <td><strong>{{ i.title }}</strong> ({{i.muallif_name}})</td>
                                <td>{{ i.nashir_name }}</td>
                                <td>{{ i.mujallad }}</td>
                               <td> <a v-if="cart.payd==false" @click="removeOneDay(i)" type="button" title="<?=lang('minus_1_day')?>"
                                        class="uk-icon-link no-print"><i class="fa fa-minus"></i></a> <span>{{ i.days_limit }}								
										</span>
										   
										   
										   
										   </div>

                                    <a v-if="cart.payd==false" @click="addOneDay( i )" type="button" title="<?=lang('add_1_day')?>"  class="uk-icon-link no-print" ><i class="fa fa-plus"></i></a>

                                </td>
                                

                                
                                <td class="no-print" v-if="cart.payd==false">
                                    <a @click="delFromCart(i.id,index); " class="uk-icon-link " ><i class="fa fa-close"></i></a>                                </td>
                            </tr>
                            

                        </tbody>
                    </table>
					<div  uk-grid class="uk-grid-small">
					<div class="uk-width-auto">
						
					</div>
					<div class="uk-width-expand">
					</div>
					<div class="uk-width-auto">
						<strong><?=lang('total_ist_books')?>: <span dir="ltr">{{cart.items.length}} </span></strong><br />
					</div>
				</div>

                    <p class="uk-text-left no-print">
                        
                        <a href="#/" v-if="cart.items.length>=1" @click="cartClear()" class="uk-button uk-button-default" ><i class="fa fa-trash"></i> <?=lang('empty_list')?></a>
                        <button @click="print()" v-if="cart.items.length>=1" class="uk-button uk-button-default" type="button"><i class="fa fa-print"></i> <?=lang('print')?></button>
                        <span v-if="cart.payd==false">
          
			<?php
$ist_num=dbNum('id','istiarah');
				if(APP_TYPE=='f' and $ist_num >= sett('free_ist_limit')): ?>
	<button class="uk-button uk-button-primary "  disabled><i class="fa fa-save"></i><?=lang('save')?>
						</button>			
	<div class="uk-alert-warning" uk-alert >
	<?= sprintf(lang('free_ist_limit_msg'),sett('free_ist_limit'),SHIRA_URL);?>
	</div>
	
<?php else: ?>
                        <button v-if="cart.items.length!=0 && cart.member.length!=0" @click="cartFinel()" class="uk-button uk-button-primary" ><i class="fa fa-save"></i> <?=lang('save')?> </button><button v-else class="uk-button uk-button-primary "  disabled><i class="fa fa-save"></i><?=lang('save')?>
						(<?=lang('enter_mustair_name_frist')?>)</button>
<?php endif; ?>

                        </span>
                    </p>
                

       