<div class='bg-utama'> 
  <div  style="margin-bottom: 10px">
    <div style="margin-center: 2px;margin-right: 10px;margin-left: 5px">
      <?php if ($faktur->keter == null) { ?>
	   <div class="col-md-6">
          <div style="background-color: #FF4500; border:1px white;width:95%px;height:75px;">
            <div align='center'>
                <div  style="background-color: red; border:5px white;width:95%px;overflow-y:hidden;overflow-x:scroll;border-radius:10px;">
				<table  class='table table-responsive'>
				<tbody>
					<tr class='buttons'>
						<td  align='center'>
							
								<form  action="<?php echo base_url('kasir/kode-harga/') ?>" method="post">
								<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
								<input type="hidden" name="kdharga" id="kdharga" value="KH01">          
								<input type="hidden" name="layanan" id="layanan" value="1">                  
								<input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
								<input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
								<button class="btn-hover color-1" style="width:100px;height:50px;" type="submit" >Reguler</button>
								</form>
						</td>	
						
					
						<td align='center'>
							
								<form class="form-inline" action="<?php echo base_url('kasir/kode-harga/') ?>" method="post">
								<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
								<input type="hidden" name="kdharga" id="kdharga" value="KH02">  
								<input type="hidden" name="layanan" id="layanan" value="2">                  
								<input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
								<input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
								<button class="btn-hover color-3" style="width:100px;height:50px;" type="submit" >Gofood</button>
								</form>
						</td>	
						<td align='center'>
						
								<form class="form-inline" action="<?php echo base_url('kasir/kode-harga/') ?>" method="post">
								<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
								<input type="hidden" name="kdharga" id="kdharga" value="KH03"> 
								<input type="hidden" name="layanan" id="layanan" value="2">                  
								<input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
								<input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
								<button class="btn-hover color-5" style="width:105px;height:50px;" type="submit" >Grabfood</button>
								</form>
						
						</td>
					
						<td align='center'>
							
								<form class="form-inline" action="<?php echo base_url('kasir/kode-harga/') ?>" method="post">
								<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
								<input type="hidden" name="kdharga" id="kdharga" value="KH04"> 
								<input type="hidden" name="layanan" id="layanan" value="2">                  
								<input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
								<input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
								<button class="btn-hover color-4" style="width:105px;height:50px;" type="submit" >Shopeefood</button>
								</form>
							
						</td>	
						<td align='center'>
								<form  action="<?php echo base_url('kasir/penjualan-pending/') ?>" method="post">
								<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
								<input type="hidden" name="kdharga" id="kdharga" value="KH05"> 
								<input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
								<input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
								<button class="btn-hover color-8" style="width:105px;height:50px;" type="submit" >Pending</button>
								</form>
						</td>
					</tr>
					
				</tbody>
				</table>
				</div>
				 <?php if($faktur->keter != null) { ?>
				 <div style="margin-center: 1px;margin-right: 1px;margin-left: 1px">
				<form action="<?php echo base_url('kasir/kode_harga_layan/') ?>" method="post">
					<table style="width:95%;height:40px; background-color: #e6e6fa" class="table table-bordered table-responsive"  >
						<thead>
							<th style="width:110px;"></th>
							<th style="width:90px;"></th>
							<th style="width:90px;"></th>
							<th style="width:90px;"></th>
						</thead>
						<tbody>	
							
							<tr>
								<td align='left'><b>Type Penjualan</b></td>
								<td style="text-align: left;"><input  align='center' type="radio" name="promo" value="1" <?php if($faktur->promo =='1') echo 'checked'?>> Biasa</td>	
								<td align='left'><input align='center' type="radio" name="promo" id="promo" value="2" <?php if($faktur->promo =='2') echo 'checked'?>> Promosi</td>
								<td style="text-align: left;" >
									<select style="width:210px;height:30px;" name="idpromo" id="idpromo"  >
									<option value='<?php  echo $faktur->idpromo ?>'>Promosi</option>
									<?php foreach ($promosi->result() as $pgw): ?>		
									<option value="<?php echo $pgw->idprogram ?>"><?php echo $pgw->namapromo ?></option>
									<?php endforeach?>
									</select>
								</td>
							</tr>
							<tr>
							    <td align='left'><b>Type Pelanggan</b></td>
								<td style="text-align: left;"><input  align='center' type="radio" name="typecust" id="typecust" value="1" <?php if($faktur->typecust =='1') echo 'checked'?>> Cash</td>	
								<td style="text-align: left;"><input  align='center' type="radio" name="typecust" id="typecust" value="2" <?php if($faktur->typecust =='2') echo 'checked'?>>
								 <span style="height:35px;" type="button"  data-id="<?php echo $faktur->no_faktur_penjualan ?>" data-toggle="modal" data-target=".modallistmember">Member</span>
								</td>	
								    
								<?php if($faktur->kdharga !='KH01') {?>
									<td align='left'><input style="width:210px;height:25px;" type='text' name='npelanggan' id='npelanggan'  placeholder="a/n Pelanggan "  value='<?php  echo $faktur->npelanggan ?>' required></td>
								<?php }?>
								<?php if($faktur->kdharga =='KH01') {?>
									   	<td align='left'><input style="width:210px;height:25px;" type='text' name='npelanggan' id='npelanggan'  placeholder="a/n Pelanggan "  value='<?php  echo $faktur->npelanggan ?>'</td>
								
								<?php }?>	
								
							</tr>
							
							<tr>
								<td align='left'><b>Struk</b></td>
								<td align="left"><input type="radio" name="struk" id="struk" value="0" <?php if($faktur->struk =='0') echo 'checked'?>> Print</td>   
								<td align='left'><input type="radio" name="struk" id="struk" value="1" <?php if($faktur->struk =='1') echo 'checked'?>> WA</td>
								<td align='left'><input style="width:210px;height:30px;" type='number' name='notelp' id='notelp' onkeypress="return isNumber(event)" value='<?php  echo $faktur->notelp ?>' placeholder="No HP/WA"></td>									
							</tr>
							<tr>
								<td align='left'><b>Pin Ojol</b></td>
								<?php if($faktur->kdharga !='KH02') {?>
									<td align='left'><input  style="width:80px;height:25px;" type='text' name='pinojol' id='pinojol' onkeypress="return isNumber(event)"  value='<?php  echo $faktur->pinojol ?>'></td>
								<?php }?>
								<?php if($faktur->kdharga =='KH02') {?>
									<td align='left'><input  style="width:80px;height:25px;" type='text' name='pinojol' id='pinojol' onkeypress="return isNumber(event)"  value='<?php  echo $faktur->pinojol ?>' required></td>
								<?php }?>	
								<td align='left'><b>Waiter/Kurir</b></td>
								<td align='left'>
									<select style="width:210px;height:30px;" name="waiter1" id="waiter1" required >
										<option  value='<?php  echo $faktur->waiter1 ?>' placeholder="Waiter 1"> Waiter/Kurir </option> 
										<?php foreach ($pegawai->result() as $pgw): ?>		
										<option value="<?php echo $pgw->nip ?>"><?php echo $pgw->nama ?></option>
										<?php endforeach?>
									</select>
								</td>	
							</tr>
						</tbody>
						<tfoot>
						<?php if ( $faktur->posting =='0' or $faktur->posting =='5'  ) {?>
							<td colspan='4' align='center'>
								<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
								<button  style="width:125px;height:25px; text-align: center;"  class="btn btn-success pull-center" type='summit' >Lanjutkan1</button>
							</td>
						<?php }?>
						</tfoot>
					</table>
				</form>	
				</div>
				<?php } ?>
				
				
				
				
			  
		</div>	  
		</div>
		</div>
	  
	  <?php }
	  else {?>
	 <!--  <div class="row-fluid">
      <div class="span8">
        <div class="widget-box span12">
          <div class="widget-title bg_lg"><span class="icon"><i class="icon-th-large"></i></span>
            <h5>Menu Makanan</h5>
          </div>
          <div class="widget-content" >
            <ul class="thumbnails">
              <div class="btn-icon-pg">
			  
		
        <div class="col-md-1" >
            <div style="text-align: left;background-color: #ffcccc">
				<div style="width:85px;height:45px;">
					<form class="form-inline" action="<?php echo base_url('kasir/kode-harga1/') ?>" method="post">
						<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
						<input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
						<input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
						<input type="hidden" name="posting" id="posting" value="<?php echo $faktur->posting ?>"> 
						<input type="hidden" name="kdharga" id="kdharga" value="KH01">    
					    <?php if ($faktur->kdharga == 'KH01') {?>
					    <button class="btn btn-success" type="submit" style="width:84px;height:45px;text-align: full-left;"   ><img  style="width:70px;height:35px;text-align: full-left;" src="<?php echo base_url() ?>/assets/img/reguler.png" /></button>
					    <?php } else { ?>
					    <button  type="submit"  type="submit" style="width:84px;height:45px;text-align: full-left;"   ><img  style="width:70px;height:35px;text-align: full-left;" src="<?php echo base_url() ?>/assets/img/reguler.png" /></button>
					    <?php }?>
					</form>
				</div>
			    
				<div style="width:80px;height:45px;">
					<form class="form-inline" action="<?php echo base_url('kasir/kode-harga1/') ?>" method="post">
						<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
						<input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
						<input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
						<input type="hidden" name="posting" id="posting" value="<?php echo $faktur->posting ?>"> 
						<input type="hidden" name="kdharga" id="kdharga" value="KH01">                
						<?php if ($faktur->kdharga == 'KH01') {?>
						<button class="btn btn-success" type="submit" type="submit" style="width:84px;height:45px;text-align: full-left;"   ><img  style="width:70px;height:35px;text-align: full-left;" src="<?php echo base_url() ?>/assets/img/regmandiri.png" /></button>
						<?php } else { ?>
						<button type="submit" type="submit" style="width:84px;height:45px;text-align: full-left;"   ><img  style="width:70px;height:35px;text-align: full-left;" src="<?php echo base_url() ?>/assets/img/regmandiri.png" /></button>
						<?php }?>
					</form>
				</div>
			
				<div style="width:80px;height:45px;">
					<form class="form-inline" action="<?php echo base_url('kasir/kode-harga1/') ?>" method="post">
						<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
						<input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
						<input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
						<input type="hidden" name="posting" id="posting" value="<?php echo $faktur->posting ?>"> 
						<input type="hidden" name="kdharga" id="kdharga" value="KH02">                
						<?php if ($faktur->kdharga == 'KH02') {?>
						<button class="btn btn-success" type="submit" type="submit" style="width:84px;height:45px;text-align: full-left;"   ><img  style="width:70px;height:35px;text-align: full-left;" src="<?php echo base_url() ?>/assets/img/gofood.png" /></button>
						<?php } else { ?>
						<button type="submit" type="submit" style="width:84px;height:45px;text-align: full-left;"   ><img  style="width:70px;height:35px;text-align: full-left;" src="<?php echo base_url() ?>/assets/img/gofood.png" /></button>
						<?php }?>
					</form>
				
				</div>			
			
				<div style="width:80px;height:45px;">
					<form class="form-inline" action="<?php echo base_url('kasir/kode-harga1/') ?>" method="post">
						<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
						<input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
						<input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
						<input type="hidden" name="posting" id="posting" value="<?php echo $faktur->posting ?>"> 
						<input type="hidden" name="kdharga" id="kdharga" value="KH03">                
						<?php if ($faktur->kdharga == 'KH03') {?>
						<button class="btn btn-success" type="submit" type="submit" style="width:84px;height:45px;text-align: full-left;"   ><img  style="width:70px;height:35px;text-align: full-left;" src="<?php echo base_url() ?>/assets/img/grab.jpg" /></button>
						<?php } else { ?>
						<button type="submit" type="submit" style="width:84px;height:45px;text-align: full-left;"   ><img  style="width:70px;height:35px;text-align: full-left;" src="<?php echo base_url() ?>/assets/img/grab.jpg" /></button>
						<?php }?>
					</form>
				</div>			
			
				<div style="width:80px;height:45px;">
				    
					<form class="form-inline" action="<?php echo base_url('kasir/kode-harga1/') ?>" method="post">
						<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
						<input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
						<input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
						<input type="hidden" name="posting" id="posting" value="<?php echo $faktur->posting ?>"> 
						<input type="hidden" name="kdharga" id="kdharga" value="KH04">                
						<?php if ($faktur->kdharga == 'KH04') {?>
						<button class="btn btn-success" type="submit" type="submit" style="width:84px;height:45px;text-align: full-left;"   ><img  style="width:70px;height:35px;text-align: full-left;" src="<?php echo base_url() ?>/assets/img/shopee.png" /></button>
						<?php } else { ?>
						<button type="submit" type="submit" style="width:84px;height:45px;text-align: full-left;"   ><img  style="width:70px;height:35px;text-align: full-left;" src="<?php echo base_url() ?>/assets/img/shopee.png" /></button>
						<?php }?>
					</form>
				</div>
			<br>
			</div>
			-->
	
 <div class="col-md-6" >
   <?php if($faktur->posting == 0) { ?>	
   <table  class='table table-responsive'>
				<tbody>
					<tr class='buttons'>
						<td  align='center'>
							
								<form  action="<?php echo base_url('kasir/kode-harga1/') ?>" method="post">
								    <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
						            <input type="hidden" name="posting" id="posting" value="<?php echo $faktur->posting ?>"> 
								    <input type="hidden" name="kdharga" id="kdharga" value="KH01">          
								    <input type="hidden" name="layanan" id="layanan" value="1">                  
								    <input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
								    <input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
								    <button class="btn-hover color-1" style="width:100px;height:50px;" type="submit" >Reguler</button>
								</form>
						</td>	
						
					
						<td align='center'>
							
								<form class="form-inline" action="<?php echo base_url('kasir/kode-harga1/') ?>" method="post">
								<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
								<input type="hidden" name="posting" id="posting" value="<?php echo $faktur->posting ?>"> 
								<input type="hidden" name="kdharga" id="kdharga" value="KH02">  
								<input type="hidden" name="layanan" id="layanan" value="2">                  
								<input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
								<input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
								<input type="hidden" name="posting" id="posting" value="<?php echo $faktur->posting ?>"> 
								<button class="btn-hover color-3" style="width:100px;height:50px;" type="submit" >Gofood</button>
								</form>
						</td>	
						<td align='center'>
						
								<form class="form-inline" action="<?php echo base_url('kasir/kode-harga1/') ?>" method="post">
								<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
								<input type="hidden" name="kdharga" id="kdharga" value="KH03"> 
								<input type="hidden" name="layanan" id="layanan" value="2">                  
								<input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
								<input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
								<input type="hidden" name="posting" id="posting" value="<?php echo $faktur->posting ?>"> 
								<button class="btn-hover color-5" style="width:105px;height:50px;" type="submit" >Grabfood</button>
								</form>
						
						</td>
					
						<td align='center'>
							
								<form class="form-inline" action="<?php echo base_url('kasir/kode-harga1/') ?>" method="post">
								<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
								<input type="hidden" name="kdharga" id="kdharga" value="KH04"> 
								<input type="hidden" name="layanan" id="layanan" value="2">                  
								<input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
								<input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
								<input type="hidden" name="posting" id="posting" value="<?php echo $faktur->posting ?>"> 
								<button class="btn-hover color-4" style="width:105px;height:50px;" type="submit" >Shopeefood</button>
								</form>
							
						</td>	
						<td align='center'>
								<form  action="<?php echo base_url('kasir/penjualan-pending/') ?>" method="post">
								<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
								<input type="hidden" name="kdharga" id="kdharga" value="KH05"> 
								<input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
								<input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
								<input type="hidden" name="posting" id="posting" value="<?php echo $faktur->posting ?>"> 
								<button class="btn-hover color-8" style="width:105px;height:50px;" type="submit" >Pending</button>
								</form>
						</td>
					</tr>
					
				</tbody>
				</table>
				<div class="panel-heading">
				<?php if($faktur->kdharga !='KH05') {?>    
				<form action="<?php echo base_url('kasir/kode_harga_layan/') ?>" method="post">
					<table style="width:100%;height:40px; background-color: #e6e6fa " class="table table-bordered table-responsive"  >
						<thead>
							<th style="width:110px;"></th>
							<th style="width:90px;"></th>
							<th style="width:90px;"></th>
							<th style="width:90px;"></th>
						</thead>
						<tbody>	
							<tr>
								<td align='left'><b>Jenis Layanan</b></td>
								<?php if($faktur->kdharga !='KH01' and  $faktur->kdharga !='KH05'  ) {?>
									<td  align='left'><input align='center' type="radio" name="layan" value="1" disabled > DineIn</td> 									
									<td style="text-align: left;"><input align='center' type="radio" name="layan" value="2" <?php if($faktur->layanan =='2') echo 'checked'?> required> T.Away</td>
									<td style="text-align: left;"><input  align='center' type="radio" name="layan" value="3" disabled > DO</td>
								<?php }?>
								<?php if($faktur->kdharga =='KH01' or $faktur->kdharga =='KH05' ) {?>
									<td style="text-align: left;"><input align='center' type="radio" name="layan" value="1" <?php if($faktur->layanan =='1') echo 'checked'?> > DineIn</td> 
									<td style="text-align: left;"><input align='center' type="radio" name="layan" value="2" <?php if($faktur->layanan =='2') echo 'checked'?>> T.Away</td>
									<td style="text-align: left;"><input  align='center' type="radio" name="layan" value="3" <?php if($faktur->layanan =='3') echo 'checked'?>> DO</td>
								<?php }?>	
							
							</tr>
							<tr>
								<td align='left'><b>Type Penjualan</b></td>
								<td style="text-align: left;"><input  align='center' type="radio" name="promo" value="1" <?php if($faktur->promo =='1') echo 'checked'?>> Biasa</td>	
								<td align='left'><input align='center' type="radio" name="promo" value="2" <?php if($faktur->promo =='2') echo 'checked'?>> Promosi</td>
								<td style="text-align: left;" >
									<select style="width:210px;height:30px;" name="idpromo" id="idpromo"  >
									<option value='<?php  echo $faktur->idpromo ?>'>Promosi</option>
									<?php foreach ($promosi->result() as $pgw): ?>		
									<option value="<?php echo $pgw->idprogram ?>"><?php echo $pgw->namapromo ?></option>
									<?php endforeach?>
									</select>
								</td>
							</tr>
							<tr>
								<td align='left'><b>No Meja / Tamu</b></td>
								<td align='left'><input style="width:80px;height:25px;" type='number' name='nomeja' id='nomeja'  value='<?php  echo $faktur->nomeja ?>' required></td>
								<td align='left'><input  style="width:80px;height:25px;" type='number' name='tamu' id='tamu' onkeypress="return isNumber(event)"  value='<?php  echo $faktur->tamu ?>' required></td>	
								<?php if($faktur->kdharga !='KH01') {?>
									<td align='left'><input style="width:210px;height:25px;" type='text' name='npelanggan' id='npelanggan'  placeholder="a/n Pelanggan "  value='<?php  echo $faktur->npelanggan ?>' required></td>
								<?php }?>
								<?php if($faktur->kdharga =='KH01') {?>
									<?php if($faktur->layanan=='1') {?>
										<td align='left'><input style="width:210px;height:30px;" type='text' name='npelanggan' id='npelanggan'  placeholder="a/n Pelanggan "  value='<?php  echo $faktur->npelanggan ?>'></td>
									<?php } if($faktur->layanan !='1') {?>
										<td align='left'><input style="width:210px;height:30px;" type='text' name='npelanggan' id='npelanggan'  placeholder="a/n Pelanggan "  value='<?php  echo $faktur->npelanggan ?>' required></td>
									<?php }?>	
								<?php }?>	
								
							</tr>
							
							<tr>
								<td align='left'><b>Struk</b></td>
								<td align="left"><input type="radio" name="struk" value="0" <?php if($faktur->struk =='0') echo 'checked'?>> Print</td>   
								<td align='left'><input type="radio" name="struk" value="1" <?php if($faktur->struk =='1') echo 'checked'?>> WA</td>
								<td align='left'><input style="width:210px;height:30px;" type='number' name='notelp' id='notelp' onkeypress="return isNumber(event)" value='<?php  echo $faktur->notelp ?>' placeholder="No HP/WA"></td>									
							</tr>
							<tr>
								<td align='left'><b>Pin Ojol</b></td>
								<?php if($faktur->kdharga !='KH02') {?>
									<td align='left'><input  style="width:80px;height:25px;" type='text' name='pinojol' id='pinojol' onkeypress="return isNumber(event)"  value='<?php  echo $faktur->pinojol ?>'></td>
								<?php }?>
								<?php if($faktur->kdharga =='KH02') {?>
									<td align='left'><input  style="width:80px;height:25px;" type='text' name='pinojol' id='pinojol' onkeypress="return isNumber(event)"  value='<?php  echo $faktur->pinojol ?>' required></td>
								<?php }?>	
								<td align='left'><b>Waiter/Kurir</b></td>
								<td align='left'>
									<select style="width:210px;height:30px;" name="waiter1" id="waiter1" required >
										<option  value='<?php  echo $faktur->waiter1 ?>' placeholder="Waiter 1"> Waiter/Kurir </option> 
										<?php foreach ($pegawai->result() as $pgw): ?>		
										<option value="<?php echo $pgw->nip ?>"><?php echo $pgw->nama ?></option>
										<?php endforeach?>
									</select>
								</td>	
							</tr>
						</tbody>
						<tfoot>
						<?php if ( $faktur->posting =='0' or $faktur->posting =='5') {?>
							<td colspan='4' align='center'>
								<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
								<button  style="width:125px;height:25px; text-align: center;"  class="btn btn-success pull-center" type='summit' >Lanjutkan2</button>
							</td>
						<?php }?>
						</tfoot>
					</table>
				</form>	
				<?php }?>
				<?php if($faktur->kdharga =='KH05') {?>    
				<table style="width:100%;height:40px; background-color: #e6e6fa " class="table table-bordered table-responsive"  >
						<thead>
							<th style="width:110px;"></th>
							<th style="width:90px;"></th>
							<th style="width:90px;"></th>
							<th style="width:90px;"></th>
						</thead>
						<tbody>	
							<form action="<?php echo base_url('kasir/kode_harga_layan1/') ?>" method="post">
							    <tr>
							        <td></td>       
							        <td>No Order</td>
							        <td style="text-align: left;"><input  type='text' name='noorder' id='noorder'  value='<?php  echo $faktur->noorder ?>' required ></td>
							    </tr>
							    <tr>
								    <td align='left'><b>Jenis Layanan</b></td>
								    <?php if($faktur->kdharga !='KH01' and  $faktur->kdharga !='KH05'  ) {?>
									    <td  align='left'><input align='center' type="radio" name="layan" value="1" disabled > DineIn</td> 									
									    <td style="text-align: left;"><input align='center' type="radio" name="layan" value="2" <?php if($faktur->layanan =='2') echo 'checked'?> required> T.Away</td>
									    <td style="text-align: left;"><input  align='center' type="radio" name="layan" value="3" disabled > DO</td>
								    <?php }?>
								    <?php if($faktur->kdharga =='KH01' or $faktur->kdharga =='KH05' ) {?>
									    <td style="text-align: left;"><input align='center' type="radio" name="layan" value="1" <?php if($faktur->layanan =='1') echo 'checked'?> > DineIn</td> 
									    <td style="text-align: left;"><input align='center' type="radio" name="layan" value="2" <?php if($faktur->layanan =='2') echo 'checked'?>> T.Away</td>
									    <td style="text-align: left;"><input  align='center' type="radio" name="layan" value="3" <?php if($faktur->layanan =='3') echo 'checked'?>> DO</td>
								    <?php }?>	
							    </tr>
							    <tr>
							    	<td align='left'><b>Type Penjualan</b></td>
    								<td style="text-align: left;"><input  align='center' type="radio" name="promo" value="1" <?php if($faktur->promo =='1') echo 'checked'?>> Biasa</td>	
	    							<td align='left'><input align='center' type="radio" name="promo" value="2" <?php if($faktur->promo =='2') echo 'checked'?>> Promosi</td>
								    <td style="text-align: left;" >
									    <select style="width:210px;height:30px;" name="idpromo" id="idpromo"  >
									    <option value='<?php  echo $faktur->idpromo ?>'>Promosi</option>
									    <?php foreach ($promosi->result() as $pgw): ?>		
									    <option value="<?php echo $pgw->idprogram ?>"><?php echo $pgw->namapromo ?></option>
									    <?php endforeach?>
									    </select>
								    </td>
							    </tr>
								<tr>
							    	<td align='left'><b>No Meja / Tamu</b></td>
    								<td align='left'><input style="width:80px;height:25px;" type='number' name='nomeja' id='nomeja'  value='<?php  echo $faktur->nomeja ?>' required></td>
								    <td align='left'><input  style="width:80px;height:25px;" type='number' name='tamu' id='tamu' onkeypress="return isNumber(event)"  value='<?php  echo $faktur->tamu ?>' required></td>	
								    <?php if($faktur->kdharga !='KH01') {?>
									    <td align='left'><input style="width:210px;height:25px;" type='text' name='npelanggan' id='npelanggan'  placeholder="a/n Pelanggan "  value='<?php  echo $faktur->npelanggan ?>' required></td>
    								<?php }?>
								    <?php if($faktur->kdharga =='KH01') {?>
									<?php if($faktur->layanan=='1') {?>
										    <td align='left'><input style="width:210px;height:30px;" type='text' name='npelanggan' id='npelanggan'  placeholder="a/n Pelanggan "  value='<?php  echo $faktur->npelanggan ?>'></td>
									    <?php } if($faktur->layanan !='1') {?>
										    <td align='left'><input style="width:210px;height:30px;" type='text' name='npelanggan' id='npelanggan'  placeholder="a/n Pelanggan "  value='<?php  echo $faktur->npelanggan ?>' required></td>
									    <?php }?>	
								    <?php }?>	
							    </tr>
							    <tr>
								    <td align='left'><b>Struk</b></td>
								    <td align="left"><input type="radio" name="struk" value="0" <?php if($faktur->struk =='0') echo 'checked'?>> Print</td>   
								    <td align='left'><input type="radio" name="struk" value="1" <?php if($faktur->struk =='1') echo 'checked'?>> WA</td>
								    <td align='left'><input style="width:210px;height:30px;" type='number' name='notelp' id='notelp' onkeypress="return isNumber(event)" value='<?php  echo $faktur->notelp ?>' placeholder="No HP/WA"></td>									
							    </tr>
							    <tr>
								    <td align='left'><b>Pin Ojol</b></td>
								    <?php if($faktur->kdharga !='KH02') {?>
									    <td align='left'><input  style="width:80px;height:25px;" type='text' name='pinojol' id='pinojol' onkeypress="return isNumber(event)"  value='<?php  echo $faktur->pinojol ?>'></td>
								    <?php }?>
								    <?php if($faktur->kdharga =='KH02') {?>
									    <td align='left'><input  style="width:80px;height:25px;" type='text' name='pinojol' id='pinojol' onkeypress="return isNumber(event)"  value='<?php  echo $faktur->pinojol ?>' required></td>
    								<?php }?>	
								    <td align='left'><b>Waiter/Kurir</b></td>
								    <td align='left'>
									<select style="width:210px;height:30px;" name="waiter1" id="waiter1" required >
										<option  value='<?php  echo $faktur->waiter1 ?>' placeholder="Waiter 1"> Waiter/Kurir </option> 
										<?php foreach ($pegawai->result() as $pgw): ?>		
										<option value="<?php echo $pgw->nip ?>"><?php echo $pgw->nama ?></option>
										<?php endforeach?>
									</select>
							    	</td>	
							</tr>
						</tbody>
						<tfoot>
						    <?php if ( $faktur->posting =='0' or $faktur->posting =='5') {?>
							    <td colspan='4' align='center'>
								    <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
								    <button  style="width:125px;height:25px; text-align: center;"  class="btn btn-success pull-center" type='summit' >Lanjutkan3</button>
							    </td>
						    <?php }?>
					   </tfoot>
				</form>	
			</table>
			<?php }?>
				</div>
   <?php }?>
  
 <?php if($faktur->jnsmenu == "K"  ) { ?>
        <?php if($faktur->waiter1 != NULL  ) { ?>
    <div>
		<form class="lookup lookup-md text-left text-search" style="width: 100%;display:block;border-radius:10px;" onsubmit="return false;">
            <input type="text" id="nm_barang" name="nm_barang" placeholder="Cari Nama Menu" style="width: 100%;display:block;border-radius:10px;">
            <input type="hidden" name="nofak" id="nofak" value="<?php echo $faktur->no_faktur_penjualan ?>">
        </form>
    </div>
    <div style="background-color: red; border:5px white;width:95%px;height:45px;overflow-y:hidden;overflow-x:scroll;border-radius:10px;">
                    <table>
                        <tr>
				            <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
					                <input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
					                <input type='hidden' name="jenis"  id="jenis" value="J01">
					                <?php if ($faktur->jnsmenu == 'J01') {?>
					                <button class="btn-hover color-1"  style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Mie Ori</button>
					                <?php } else {?>	
					                <button   type="submit" class="btn-hover color-7" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Mie Ori</button>
					                <?php }?>	
					            </form>
				            </td>
				            <td class='buttons' style="width:80px;height:40px;">
					           <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
					                <input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
					                <input type='hidden' name="jenis"  id="jenis" value="J08">
					                <?php if ($faktur->jnsmenu == 'J08') {?>
					                <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Ori + Topping</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-7" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Ori + Topping</button>
					                <?php }?>	
					            </form>
				            </td>
				            <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type='hidden' name="jenis"  id="jenis" value="J07">
					                <?php if ($faktur->jnsmenu == 'J07') {?>
					                 <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Mie Gokil</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-7" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Mie Gokil</button>
					                <?php }?>	
					            </form>
				            </td>
					        <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type='hidden' name="jenis"  id="jenis" value="J09">
					                <?php if ($faktur->jnsmenu == 'J09') {?>
					                 <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Gokil + Topping</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-7" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Gokil + Topping</button>
					                <?php }?>	
					            </form>
				            </td>
				            <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
					                <input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
					                <input type='hidden' name="jenis"  id="jenis" value="J02">
					                <?php if ($faktur->jnsmenu == 'J02') {?>
					                 <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Snack</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-7" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Snack</button>
					                <?php }?>	
					            </form>
				            </td>
				           <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
					                <input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
					                <input type='hidden' name="jenis"  id="jenis" value="J03">
					                <?php if ($faktur->jnsmenu == 'J03') {?>
					                <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Topping</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-7" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Topping</button>
					                <?php }?>	
					            </form>
				            </td>
				            <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type='hidden' name="jenis"  id="jenis" value="J04">
					                <?php if ($faktur->jnsmenu == 'J04') {?>
					                 <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Beverages</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-7" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Beverages</button>
					                <?php }?>	
					            </form>
				            </td>
				            <!--
				            <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
					                <input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
					                <input type='hidden' name="jenis"  id="jenis" value="J05">
					                <?php if ($faktur->jnsmenu == 'J05') {?>
					                <button class="btn-hover color-2" style="width:100px;height:30px;" type="submit" >Cutlery</button>
					                <?php } else {?>	
					                <button  type="submit" class="btn-hover color-1" style="width:100px;height:30px;" ><font color='black' ><b>Cutlery</b></font></button>
					                <?php }?>	
					            </form>
				            </td> -->
				            <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
					                <input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
					                <input type='hidden' name="jenis"  id="jenis" value="J06">
					                <?php if ($faktur->jnsmenu == 'J06') {?>
					                 <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >TakeAway</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-7" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">TakeAway</button>
					                <?php }?>	
					            </form>
				            </td>
			            </tr>
			        </table>       
		        </div>
    <?php if($faktur->cari !='') {?> 
    <div id="gradient2" style="background-color: #e6e6fa; overflow:scroll; width:95%px; height:510px; padding:5px; ">
	<?php
	    $kdtoko = $this->session->userdata('kd_toko');
		$url=base_url('/gambar/');
		$url1=base_url("kasir/cekbarang/");
		$nofaktur= $faktur->no_faktur_penjualan;
		$cari=$faktur->cari;
		$i=0;    
			echo '<table align="center"> <tr>';
		
		foreach ($menu1->result() as $brg) {
			$foto=$brg->foto ;
			$nama=$brg->nama_menu;
			$harga=$brg->hargajual;
			$kode=$brg->kode_menu; 
			$bahan=$brg->bahan; 
			$cekstok=$brg->cekstok;
			$saldostok=1;
			$isistok=1;
			
			$ck=$this->db->query("select stok,stok_min from tabel_stok_toko where kd_barang='$bahan' and kd_toko='$kdtoko';");
			$ckd=$ck->row_array();
			if(isset($ckd)) {
			    $saldostok=$ckd['stok'];
			    }
			$rb=$this->db->query("select * from tabel_rinci_menu where kode_menu='$kode' and kode_bahan='$bahan';");  
			$rbd=$rb->row_array();
			if(isset($rbd)) {
			    $isistok=$rbd['qty'];
			    }
			
			$i++;			
			if($cekstok=='1') {
			    if($saldostok>=$isistok) {	
			        echo    '<div class="container"><td  align="center" style="border-radius:15px;background-color: red;">
			                <a href="'.$url1.$nofaktur.'/'.$kode.'">
			                <img class="img-thumbnail" style="border-radius:15px;" src="'.$url.$foto.'" ></a>
			                
			                <a href="'.$url1.$nofaktur.'/'.$kode.'">
			                <span style="font-size:11px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold">'.$nama.'</span></a>
			                <a href="'.$url1.$nofaktur.'/'.$kode.'">
			                <span style="font-size:16px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold">Rp.'.number_format($harga).'</span></a>
			                </td></div>';
			    } if($saldostok< $isistok) {
			        echo    '<div class="container"><td  align="center" style="border-radius:15px;background-color: red;">
			                <img  class="img-thumbnail " style="border-radius:15px;" src="'.$url.$foto.'" >
			                <div class="centered"><strong><h2><b>HABIS</b></h2></strong></div>
			                <span style="font-size:11px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold">'.$nama.'</span></a>
			                <span style="font-size:16px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold">Rp.'.number_format($harga).'</span></a>
			                </td></div>';
			    }
			} else  {
			     echo    '<div class="container"><td  align="center" style="border-radius:15px;background-color: red;">
			                <a href="'.$url1.$nofaktur.'/'.$kode.'">
			                <img class="img-thumbnail" style="border-radius:15px;" src="'.$url.$foto.'" ></a>
			                
			                <a href="'.$url1.$nofaktur.'/'.$kode.'">
			                <span style="font-size:11px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold">'.$nama.'</span></a>
			                <a href="'.$url1.$nofaktur.'/'.$kode.'"><p/>
			                <span style="font-size:16px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold">Rp.'.number_format($harga).'</span></a>
			                </td></div>';
			}       
			if ($i == 4)	{
					  
			echo'</tr><tr>';        			
				$i=0;
			}
		}
		
		echo '</tr></table>';
    ?>
	</div>
    
    
    
 <?php } } } if($faktur->jnsmenu != "K") { ?>
    
    <div>
		<form class="lookup lookup-md text-left text-search" style="width: 100%;display:block;border-radius:10px;" onsubmit="return false;">
            <input type="text" id="nm_barang" name="nm_barang" placeholder="Cari Nama Menu 1" style="width: 100%;display:block;border-radius:10px;">
            <input type="hidden" name="nofak" id="nofak" value="<?php echo $faktur->no_faktur_penjualan ?>">
        </form>
    </div>
    	<?php if ($faktur->waiter1 != null) {?>    
                <div style="background-color: red; border:5px white;width:95%px;height:45px;overflow-y:hidden;overflow-x:scroll;border-radius:10px;">
                    <table>
                        <tr>
				            <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
					                <input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
					                <input type='hidden' name="jenis"  id="jenis" value="J01">
					                <?php if ($faktur->jnsmenu == 'J01') {?>
					                <button class="btn-hover color-1"  style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Mie Ori</button>
					                <?php } else {?>	
					                <button   type="submit" class="btn-hover color-7" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Mie Ori</button>
					                <?php }?>	
					            </form>
				            </td>
				            <td class='buttons' style="width:80px;height:40px;">
					           <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
					                <input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
					                <input type='hidden' name="jenis"  id="jenis" value="J08">
					                <?php if ($faktur->jnsmenu == 'J08') {?>
					                <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Ori + Topping</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-7" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Ori + Topping</button>
					                <?php }?>	
					            </form>
				            </td>
				            <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type='hidden' name="jenis"  id="jenis" value="J07">
					                <?php if ($faktur->jnsmenu == 'J07') {?>
					                 <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Mie Gokil</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-7" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Mie Gokil</button>
					                <?php }?>	
					            </form>
				            </td>
					        <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type='hidden' name="jenis"  id="jenis" value="J09">
					                <?php if ($faktur->jnsmenu == 'J09') {?>
					                 <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Gokil + Topping</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-7" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Gokil + Topping</button>
					                <?php }?>	
					            </form>
				            </td>
				            <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
					                <input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
					                <input type='hidden' name="jenis"  id="jenis" value="J02">
					                <?php if ($faktur->jnsmenu == 'J02') {?>
					                 <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Snack</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-7" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Snack</button>
					                <?php }?>	
					            </form>
				            </td>
				           <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
					                <input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
					                <input type='hidden' name="jenis"  id="jenis" value="J03">
					                <?php if ($faktur->jnsmenu == 'J03') {?>
					                <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Topping</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-7" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Topping</button>
					                <?php }?>	
					            </form>
				            </td>
				            <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type='hidden' name="jenis"  id="jenis" value="J04">
					                <?php if ($faktur->jnsmenu == 'J04') {?>
					                 <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Beverages</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-7" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Beverages</button>
					                <?php }?>	
					            </form>
				            </td>
				            <!--
				            <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
					                <input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
					                <input type='hidden' name="jenis"  id="jenis" value="J05">
					                <?php if ($faktur->jnsmenu == 'J05') {?>
					                <button class="btn-hover color-2" style="width:100px;height:30px;" type="submit" >Cutlery</button>
					                <?php } else {?>	
					                <button  type="submit" class="btn-hover color-1" style="width:100px;height:30px;" ><font color='black' ><b>Cutlery</b></font></button>
					                <?php }?>	
					            </form>
				            </td> -->
				            <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
					                <input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
					                <input type='hidden' name="jenis"  id="jenis" value="J06">
					                <?php if ($faktur->jnsmenu == 'J06') {?>
					                 <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >TakeAway</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-7" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">TakeAway</button>
					                <?php }?>	
					            </form>
				            </td>
			            </tr>
			        </table>       
		        </div>
		        <?php if ($faktur->jnsmenu == 'J08') {?>    
		        <div style="background-color: green; border:5px white;width:95%px;height:45px;overflow-y:hidden;overflow-x:scroll;border-radius:10px;">
                    <table>
                        <tr>
				            <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
					                <input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
					                <input type='hidden' name="jenis"  id="jenis" value="J08">
					                <input type='hidden' name="jenisbrg"  id="jenisbrg" value="J81">
					                <?php if ($faktur->jenisbrg == 'J81') {?>
					                <button class="btn-hover color-1"  style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Ayam</button>
					                <?php } else {?>	
					                <button   type="submit" class="btn-hover color-12" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Ayam</button>
					                <?php }?>	
					            </form>
				            </td>
				            <td class='buttons' style="width:80px;height:40px;">
					           <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
					                <input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
					                <input type='hidden' name="jenis"  id="jenis" value="J08">
					                <input type='hidden' name="jenisbrg"  id="jenisbrg" value="J82">
					                <?php if ($faktur->jenisbrg == 'J82') {?>
					                <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Jamur</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-12" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Jamur</button>
					                <?php }?>	
					            </form>
				            </td>
				            <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type='hidden' name="jenis"  id="jenis" value="J08">
					                <input type='hidden' name="jenisbrg"  id="jenisbrg" value="J83">
					                <?php if ($faktur->jenisbrg == 'J83') {?>
					                 <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Blackpapper</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-12" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Blackpapper</button>
					                <?php }?>	
					            </form>
				            </td>
					        <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type='hidden' name="jenis"  id="jenis" value="J08">
					                <input type='hidden' name="jenisbrg"  id="jenisbrg" value="J84">
					                <?php if ($faktur->jenisbrg == 'J84') {?>
					                 <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Teriyaki</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-12" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Teriyaki</button>
					                <?php }?>	
					            </form>
				            </td>
				            
			            </tr>
			        </table>       
		        </div>
		        
		         <?php } if ($faktur->jnsmenu == 'J09') {?>    
		        <div style="background-color: green; border:5px white;width:95%px;height:45px;overflow-y:hidden;overflow-x:scroll;border-radius:10px;">
                    <table>
                        <tr>
				            <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
					                <input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
					                <input type='hidden' name="jenis"  id="jenis" value="J09">
					                <input type='hidden' name="jenisbrg"  id="jenisbrg" value="J91">
					                <?php if ($faktur->jenisbrg == 'J91') {?>
					                <button class="btn-hover color-1"  style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Ayam</button>
					                <?php } else {?>	
					                <button   type="submit" class="btn-hover color-12" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Ayam</button>
					                <?php }?>	
					            </form>
				            </td>
				            <td class='buttons' style="width:80px;height:40px;">
					           <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type="hidden" name="tgl" id="tgl" value="<?php echo $faktur->tgl_penjualan ?>"> 
					                <input type="hidden" name="kdcabang" id="kdcabang" value="<?php echo $faktur->kdcabang ?>"> 
					                <input type='hidden' name="jenis"  id="jenis" value="J09">
					                <input type='hidden' name="jenisbrg"  id="jenisbrg" value="J92">
					                <?php if ($faktur->jenisbrg == 'J92') {?>
					                <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Jamur</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-12" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Jamur</button>
					                <?php }?>	
					            </form>
				            </td>
				            <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type='hidden' name="jenis"  id="jenis" value="J09">
					                <input type='hidden' name="jenisbrg"  id="jenisbrg" value="J93">
					                <?php if ($faktur->jenisbrg == 'J93') {?>
					                 <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Blackpapper</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-12" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Blackpapper</button>
					                <?php }?>	
					            </form>
				            </td>
					        <td class='buttons' style="width:80px;height:40px;">
					            <form class="form-inline" action="<?php echo base_url('kasir/kode-harga2/') ?>" method="post">
					                <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
					                <input type='hidden' name="jenis"  id="jenis" value="J09">
					                <input type='hidden' name="jenisbrg"  id="jenisbrg" value="J94">
					                <?php if ($faktur->jenisbrg == 'J94') {?>
					                 <button class="btn-hover color-1" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;" type="submit" >Teriyaki</button>
					                <?php } else {?>	
					                <button type="submit" class="btn-hover color-12" style="font-size:14px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold;width:100px;height:30px;">Teriyaki</button>
					                <?php }?>	
					            </form>
				            </td>
				            
			            </tr>
			        </table>       
		        </div>
		        
		    
        <?php } }?>
<div id="gradient2" style="overflow:scroll; width:95%px; height:510px; padding:5px;border-radius:10px; ">
	<?php
	    $kdtoko = $this->session->userdata('kd_toko');
		$url=base_url('/gambar/');
		$url1=base_url("kasir/cekbarang/");
		$nofaktur= $faktur->no_faktur_penjualan;
		$cari=$faktur->cari;
		$i=0;    
			echo '<table align="center"> <tr>';
		if($cari=="") {	
		foreach ($menu->result() as $brg) {
			$foto=$brg->foto ;
			$nama=$brg->nama_menu;
			$harga=$brg->hargajual;
			$kode=$brg->kode_menu; 
			$bahan=$brg->bahan; 
			$cekstok=$brg->cekstok;
			$saldostok=1;
			$isistok=1;
			
			$ck=$this->db->query("select stok,stok_min from tabel_stok_toko where kd_barang='$bahan' and kd_toko='$kdtoko';");
			$ckd=$ck->row_array();
			if(isset($ckd)) {
			    $saldostok=$ckd['stok'];
			    }
			$rb=$this->db->query("select * from tabel_rinci_menu where kode_menu='$kode' and kode_bahan='$bahan';");  
			$rbd=$rb->row_array();
			if(isset($rbd)) {
			    $isistok=$rbd['qty'];
			    }
			
			$i++;			
			if($cekstok=='1') {
			    if($saldostok>=$isistok) {	
			        echo    '<div class="container"><td  align="center" style="border-radius:15px;background-color: red;">
			                <a href="'.$url1.$nofaktur.'/'.$kode.'/'.'">
			                <img class="img-thumbnail" style="border-radius:15px;" src="'.$url.$foto.'" ></a>
			                
			                <a href="'.$url1.$nofaktur.'/'.$kode.'">
			                <span style="font-size:11px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold">'.$nama.'</span></a>
			                <a href="'.$url1.$nofaktur.'/'.$kode.'">
			                <span style="font-size:16px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold">Rp.'.number_format($harga).'</span></a>
			                </td></div>';
			    } if($saldostok< $isistok) {
			        echo    '<div class="container"><td  align="center" style="border-radius:15px;background-color: red;">
			                <img  class="img-thumbnail " style="border-radius:15px;" src="'.$url.$foto.'" >
			                <div class="centered"><strong><h2><b>HABIS</b></h2></strong></div>
			                <span style="font-size:11px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold">'.$nama.'</span></a>
			                <span style="font-size:16px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold">Rp.'.number_format($harga).'</span></a>
			                </td></div>';
			    }
			} else  {
			     echo    '<div class="container"><td  align="center" style="border-radius:15px;background-color: red;">
			                <a href="'.$url1.$nofaktur.'/'.$kode.'">
			                <img class="img-thumbnail" style="border-radius:15px;" src="'.$url.$foto.'" ></a>
			                
			                <a href="'.$url1.$nofaktur.'/'.$kode.'">
			                <span style="font-size:11px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold">'.$nama.'</span></a>
			                <a href="'.$url1.$nofaktur.'/'.$kode.'"><p/>
			                <span style="font-size:16px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold">Rp.'.number_format($harga).'</span></a>
			                </td></div>';
			}       
			if ($i == 4)	{
					  
			echo'</tr><tr>';        			
				$i=0;
			}
		}
		}
		if($cari !="") {	
		foreach ($menu1->result() as $brg) {
			$foto=$brg->foto ;
			$nama=$brg->nama_menu;
			$harga=$brg->hargajual;
			$kode=$brg->kode_menu; 
			$bahan=$brg->bahan; 
			$cekstok=$brg->cekstok;
			$saldostok=1;
			$isistok=1;
			
			$ck=$this->db->query("select stok,stok_min from tabel_stok_toko where kd_barang='$bahan' and kd_toko='$kdtoko';");
			$ckd=$ck->row_array();
			if(isset($ckd)) {
			    $saldostok=$ckd['stok'];
			    }
			$rb=$this->db->query("select * from tabel_rinci_menu where kode_menu='$kode' and kode_bahan='$bahan';");  
			$rbd=$rb->row_array();
			if(isset($rbd)) {
			    $isistok=$rbd['qty'];
			    }
			
			$i++;			
			if($cekstok=='1') {
			    if($saldostok>=$isistok) {	
			        echo    '<div class="container"><td  align="center" style="border-radius:15px;background-color: red;">
			                <a href="'.$url1.$nofaktur.'/'.$kode.'">
			                <img class="img-thumbnail" style="border-radius:15px;" src="'.$url.$foto.'" ></a>
			                
			                <a href="'.$url1.$nofaktur.'/'.$kode.'">
			                <span style="font-size:11px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold">'.$nama.'</span></a>
			                <a href="'.$url1.$nofaktur.'/'.$kode.'">
			                <span style="font-size:16px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold">Rp.'.number_format($harga).'</span></a>
			                </td></div>';
			    } if($saldostok< $isistok) {
			        echo    '<div class="container"><td  align="center" style="border-radius:15px;background-color: red;">
			                <img  class="img-thumbnail " style="border-radius:15px;" src="'.$url.$foto.'" >
			                <div class="centered"><strong><h2><b>HABIS</b></h2></strong></div>
			                <span style="font-size:11px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold">'.$nama.'</span></a>
			                <span style="font-size:16px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold">Rp.'.number_format($harga).'</span></a>
			                </td></div>';
			    }
			} else  {
			     echo    '<div class="container"><td  align="center" style="border-radius:15px;background-color: red;">
			                <a href="'.$url1.$nofaktur.'/'.$kode.'">
			                <img class="img-thumbnail" style="border-radius:15px;" src="'.$url.$foto.'" ></a>
			                
			                <a href="'.$url1.$nofaktur.'/'.$kode.'">
			                <span style="font-size:11px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold">'.$nama.'</span></a>
			                <a href="'.$url1.$nofaktur.'/'.$kode.'"><p/>
			                <span style="font-size:16px;color:white;font-family: Segoe UI, Arial, sans-serif;font-weight:bold">Rp.'.number_format($harga).'</span></a>
			                </td></div>';
			}       
			if ($i == 4)	{
					  
			echo'</tr><tr>';        			
				$i=0;
			}
		}
		}
		echo '</tr></table>';
    ?>
	</div>	
 <?php } ?>	
</div>
</div> 
<?php  }?>
		<!-- smp sini yg kiri -->
		
        <div class="col-md-6">
			  <div class="panel panel-default">
		<div id="gradient3">
			<table style="width:95%;height:40px;">
					<tr>
							<td align="left" style="font-size: 12pt;color:red;" >
								<b>
									<?php echo $faktur->keter ?>/
									<?php if($faktur->layanan=='1') echo 'Dine In'; ?>
									<?php if($faktur->layanan=='2') echo 'TakeAway'; ?>
									<?php if($faktur->layanan=='3') echo 'DO'; ?>/
									<?php if($faktur->idpromo !=null) {?> 
										Promosi-> <?php echo $faktur->idpromo ?>
									<?php } else {?>
										Biasa
									<?php } ?>
								</b>
							</td>
						<?php if ($faktur->diskon > 0): ?>
						<td align="right" style="font-size: 20pt;color:white;font-weight: bold;"><strong><?php echo number_format($faktur->total_penjualan_sdiskon, 0, ',', '.') ?></strong></td>
						<?php else: ?>
						<td align="right" style="font-size: 20pt;color:white;font-weight: bold;"><strong>Rp. <?php echo number_format($belanja->tot_belppn, 0, ',', '.') ?></strong></td>
						<?php endif?>
					</tr>                
			</table>	  
		</div>
	</div> 
          <div class="panel panel-default">
            <div class="panel-heading">
                <tr>
					<td align='left'>Faktur : <?php echo $faktur->no_faktur_penjualan ?></td>
					<td align='left'>/<?php echo $faktur->npelanggan ?></td>
					<td align='left'>/<?php echo $faktur->notelp ?>/</td>
					<td align='right'><span><?php echo date_indo($tgl) ?> <span id="waktu"></span></span></td>
                </tr>
                
            </div>
            <div class="panel-body">
            <table id="tbUser" class="table table-bordered table-responsive">
              <thead>
                <tr>
                  <td align="center">Aksi</td>
                  <td>Nama Menu</td>
                  <td align="right">Harga</td>
                  <td align="center">Qty</td>                
                  <td align="center">Disc.</td>                
                  <td align="right">Subtotal</td>
                </tr>
              </thead>
             <tbody>
					<?php foreach ($list->result() as $key): ?>
					<tr>
						<?php if ( $faktur->posting =='0' or $faktur->posting =='5' or $faktur->posting =='2') {?>				 
							<td align="center"><a href="javascript:void(0);" class="edit_record" 
								data-id="<?php echo $key->kd_barang ?>" 
								data-nama="<?php echo $key->nm_barang ?>"
								data-akses="<?php echo $key->no_faktur_penjualan ?>"
								data-ta="<?php echo $key->takeaway?>"
								data-jenis="<?php echo $key->jenis?>"
								data-note="<?php echo $key->note?>"
								data-kajen="<?php echo $key->jnsbarang?>"
								data-idmenu="<?php echo $key->idmenu?>"
								data-qtytakeaway="<?php echo $key->qtytakeaway?>"
								data-qtypanas="<?php echo $key->qtypanas?>"
								data-qtypanasta="<?php echo $key->qtypanasta?>"
								data-qtydingin="<?php echo $key->qtydingin?>"
								data-qtydinginta="<?php echo $key->qtydinginta?>"
								data-jumlah="<?php echo $key->jumlah?>"
								data-kdharga="<?php echo $faktur->kdharga?>"
								data-harga="<?php echo $key->harga?>"
								data-harga1="<?php echo $key->harga1?>"
								data-qtyregu="<?php echo $key->qty?>"
								>Edit</a> | 
								<a href="javascript:void(0);" class="hapus_record" 
								data-akses="<?php echo $key->no_faktur_penjualan ?>"
								data-nama="<?php echo $key->nm_barang ?>"
								data-id="<?php echo $key->kd_barang?>"
								data-harga="<?php echo $key->harga?>">
								<font color='red' size='1'>Hapus</font></a>
							</td>
							<?php if($key->jenis =='2') {?>
								<td align='left'><?php echo substr($key->nm_barang, 0, 40).' : Panas' ?></td>
							<?php } ?>
							<?php if($key->jenis =='3') {?>
								<td align='left'><?php echo substr($key->nm_barang, 0, 40).' : Dingin' ?></td>
							<?php } ?>
							<?php if($key->jenis =='1') { ?>
								<?php if ($key->nourut>50) {?>
									<td align='left'><font color='blue'><?php echo substr($key->nm_barang, 0, 40) ?></font></td>
								<?php } else { ?>
										<?php if($key->idmenu<>6)  { ?>
												<?php if($key->qtytakeaway>0){ ?>
													<?php if($key->note != 'NA'){ ?>
														<td align='left'><?php echo substr($key->nm_barang, 0, 40) ?> <font color='blue'>Ta= <?php echo  $key->qtytakeaway ?></font><font color='red'> ( <?php echo  $key->note ?> ) </font></td>
													<?php } if($key->note == 'NA'){ ?>
														<td align='left'><?php echo substr($key->nm_barang, 0, 40) ?> <font color='red'>Ta= <?php echo  $key->qtytakeaway ?></font></td>
													<?php } ?>		
												<?php } if($key->qtytakeaway==0) { ?>																							
													<?php if($key->note == 'NA'){ ?>
														<td align='left' ><?php echo substr($key->nm_barang, 0, 40) ?></td>				
													<?php } if($key->note != 'NA') { ?>
														<td align='left' ><?php echo substr($key->nm_barang, 0, 40) ?><font color='red'> ( <?php echo  $key->note ?> ) </font></td>				
													<?php } ?>
												<?php } ?>	
										<?php } if($key->idmenu==6) { ?>
												<?php if($key->qtypanas>0){ ?>
														<?php if($key->note == 'NA'){ ?>
															<td align='left'><?php echo substr($key->nm_barang, 0, 40) ?> <font color='blue'>Pns= <?php echo  $key->qtypanas  ?></font></td>
														<?php } if($key->note != 'NA'){ ?>		
															<td align='left'><?php echo substr($key->nm_barang, 0, 40) ?> <font color='blue'>Pns= <?php echo  $key->qtypanas  ?></font><font color='red'> ( <?php echo  $key->note ?> ) </font></td>
														<?php } ?>	
												<?php } if($key->qtypanasta>0) { ?>		
													<?php if($key->note == 'NA'){ ?>
														<td align='left'><?php echo substr($key->nm_barang, 0, 40) ?> <font color='blue'>PnsTa= <?php echo  $key->qtypanasta  ?></font></td>
													<?php } if($key->note != 'NA'){ ?>		
														<td align='left'><?php echo substr($key->nm_barang, 0, 40) ?> <font color='blue'>PnsTa= <?php echo  $key->qtypanasta  ?></font><font color='red'> ( <?php echo  $key->note ?> ) </font></td>
													<?php } ?>	
												<?php } if($key->qtydinginta>0) { ?>
													<?php if($key->note == 'NA'){ ?>												
														<td align='left'><?php echo substr($key->nm_barang, 0, 40) ?> <font color='blue'>Ta= <?php echo  $key->qtydinginta  ?></font></td>
													<?php } if($key->note != 'NA'){ ?>			
														<td align='left'><?php echo substr($key->nm_barang, 0, 40) ?> <font color='blue'>Ta= <?php echo  $key->qtydinginta  ?></font><font color='red'> ( <?php echo  $key->note ?> ) </font></td>
													<?php } ?>	
												<?php } if($key->qtypanas==0) {
															if($key->qtypanasta==0) {
																	if($key->qtydinginta==0) { ?>	
																		<?php if($key->note == 'NA'){ ?>	
																			<td align='left'><?php echo substr($key->nm_barang, 0, 40) ?></td>		
																		<?php } if($key->note != 'NA'){ ?>	
																			<td align='left'><?php echo substr($key->nm_barang, 0, 40) ?><font color='red'> ( <?php echo  $key->note ?> ) </font></td>																				
																		<?php } ?>	
												<?php } } } ?>		
										<?php } ?>	
									<?php }	?>
							<?php }
							if ($key->qty>0 ) {  ?>	
							<td align="right"><?php echo number_format($key->harga1, 0, ',', '.') ?></td>
							<?php } else { ?>
							<td align="right"><?php echo number_format($key->harga, 0, ',', '.') ?></td>
							<?php } ?>
							<td align="center">				  
								<form action="<?php echo base_url('kasir/edit_jumlah_beli/') ?>" method="post">
									<input name="kd_barang_e" type="hidden" id="kd_barang_e" value="<?php echo $key->kd_barang ?>"/>
									<input name="nofak_e" type="hidden" id="nofak_e" value="<?php echo $key->no_faktur_penjualan ?>"/>
									<input name="harga" type="hidden" id="harga" value="<?php echo $key->harga ?>"/>
									<input name="kdpromo" type="hidden" id="kdpromo" value="<?php echo $key->kdpromo ?>"/>
									<input name="maxbonus" type="hidden" id="maxbonus" value="<?php echo $faktur->maxbonus ?>"/>
									<input style="text-align: center; width:40px;" name="jml" type="number" id="jml" size="3" onkeypress="return isNumber(event)" value="<?php echo $key->jumlah ?>"  />
								</form>
							</td>
							  <?php  if ($key->qty>0 ) {  ?>	
							        <td><input style="text-align: center; width:40px;" name="disc1" type="text" id="disc1" size="3" onkeypress="return isNumber(event)" value="<?php echo number_format($key->npromo) ?>" readonly /></td>
							   <?php } else { ?>
							         <td><input style="text-align: center; width:40px;" name="disc1" type="text" id="disc1" size="3" onkeypress="return isNumber(event)" value="<?php echo number_format($key->diskonrp) ?>" readonly /></td>
							    <?php } ?>
							<td align="right"><?php echo number_format($key->sub_total_jual, 0, ',', '.') ?></td>
						<?php } else {?>	
							<td align="center" >Edit | <font size='1' color='red'>Hapus</font></td>
							<?php if($key->jenis =='2') {?>
								<td  align='left'><?php echo substr($key->nm_barang, 0, 40).' : Panas' ?></td>
							<?php } ?>
							<?php if($key->jenis =='3') {?>
								<td  align='left'><?php echo substr($key->nm_barang, 0, 40).' : Dingin' ?></td>
							<?php } ?>
							<?php if($key->jenis =='1') { ?>
								<?php if ($key->nourut>50) {?>
									<td align='left'><font color='blue'><?php echo substr($key->nm_barang, 0, 40) ?></font></td>
								<?php } else { ?>
										<?php if($key->idmenu<>6)  { ?>
												<?php if($key->qtytakeaway>0){ ?>
													<td align='left'><?php echo substr($key->nm_barang, 0, 40) ?> <font color='blue'>Ta= <?php echo  $key->qtytakeaway  ?></font></td>
												<?php } if($key->qtytakeaway==0) { ?>																							
													<td align='left' ><?php echo substr($key->nm_barang, 0, 40) ?></td>			
												<?php } ?>	
										<?php } if($key->idmenu==6) { ?>
												<?php if($key->qtypanas>0){ ?>
													<td align='left'><?php echo substr($key->nm_barang, 0, 40) ?> <font color='blue'>Pns= <?php echo  $key->qtypanas  ?></font></td>
												<?php } if($key->qtypanasta>0) { ?>																							
													<td align='left'><?php echo substr($key->nm_barang, 0, 40) ?> <font color='blue'>PnsTa= <?php echo  $key->qtypanasta  ?></font></td>
												<?php } if($key->qtydinginta>0) { ?>																							
													<td align='left'><?php echo substr($key->nm_barang, 0, 40) ?> <font color='blue'>Ta= <?php echo  $key->qtydinginta  ?></font></td>
												<?php } if($key->qtypanas==0) {
															if($key->qtypanasta==0) {
																	if($key->qtydinginta==0) { ?>																							
																		<td align='left'><?php echo substr($key->nm_barang, 0, 40) ?></td>		
												<?php } } } ?>		
										<?php } ?>	
									<?php }	?>
							<?php }?>	
							<td align="right"><?php echo number_format($key->harga, 0, ',', '.') ?></td>
							<td align="center">				  
								<form action="<?php echo base_url('kasir/edit_jumlah_beli/') ?>" method="post">
									<input name="kd_barang_e" type="hidden" id="kd_barang_e" value="<?php echo $key->kd_barang ?>"/>
									<input name="nofak_e" type="hidden" id="nofak_e" value="<?php echo $key->no_faktur_penjualan ?>"/>
									<input style="text-align: center;width:40px;" name="jml" type="text" id="jml"  onkeypress="return isNumber(event)" value="<?php echo $key->jumlah ?>" readonly />
								</form>
							</td>
							<td><input style="text-align: center;width:40px; " name="disc1" type="text" id="disc1"  onkeypress="return isNumber(event)" value="<?php echo number_format($key->diskonrp) ?>" readonly /></td>
							<td align="right"><?php echo number_format($key->sub_total_jual, 0, ',', '.') ?></td>
						<?php }?>
					</tr>
					<?php
						$tot_item += $key->jumlah;	
						$tot_belanja += $key->sub_total_jual;
						$tot_nppn += $key->nppn;
						$tot_diskon += $key->diskonrp;
						?>
					<?php endforeach?>
				</tbody>
<?php 
$ongkir=$faktur->ongkir;
$netto=($tot_belanja-$tot_diskon)+$tot_nppn;
?>
			  
				<tr>
					<td colspan="3" align="right"><strong>Total</strong></td>
					<td align="center"><strong><?php echo $tot_item ?> Items</strong></td>
					<td align="right"><strong>Bruto</strong></td>
					<td  align="right"><strong>Rp. <?php echo number_format($tot_belanja, 0, ',', '.') ?></strong></td>
				</tr>
				<tr>
					<td colspan="5" align="right"><i>Diskon</i></td>
					<td  align="right"><strong>Rp. <?php echo number_format($tot_diskon, 0, ',', '.') ?></strong></td>
				</tr>
				<tr>
					<td colspan="5" align="right"><i>PPn</i></td>
					<td  align="right"><strong>Rp. <?php echo number_format($tot_nppn, 0, ',', '.') ?></strong></td>
				</tr>
				<tr>
					<td colspan="5" align="right"><strong>Netto</strong></td>
					<td  align="right"><strong>Rp. <?php echo number_format($netto, 0, ',', '.') ?></strong></td>
				</tr>
            </table>
				<?php if($belanja->tot_bel == 0) { ?>
						<?php if($faktur->posting ==2) { ?>
							<div>
								<form class="form-inline" action="<?php echo base_url('kasir/penjualan-edit/')  ?>"  method="post">
									<input type="hidden" name="nofaktur" id="nofaktur" value="<?php echo $faktur->no_faktur_penjualan ?>">
									<button type="submit" class="btn-hover color-3 pull-left" style="height:35px;"><font size='2'>Edit Order</font></button>
								</form>	
							<div>			
				<?php } } if($belanja->tot_bel>0) { ?>
				<div>
					<?php if ( $faktur->posting =='2' or $faktur->posting =='5' or $faktur->posting =='0') {?>
							<form class="form-inline" action="<?php echo base_url('kasir/penjualan-pending/')  ?>"  method="post">
								<input type="hidden" name="nofak_bayar" id="nofak_bayar" value="<?php echo $faktur->no_faktur_penjualan ?>">
								<button type="submit" class="btn-hover color-4 pull-left" style="height:35px;"><font size='2'>Pending</font></button>
							</form>
							<form class="form-inline" action="<?php echo base_url('kasir/penjualan-edit/')  ?>"  method="post">
								<input type="hidden" name="nofaktur" id="nofaktur" value="<?php echo $faktur->no_faktur_penjualan ?>">
								<button type="submit" class="btn-hover color-3 pull-left" style="height:35px;"><font size='2'>Edit Order</font></button>
							</form>	
					<?php } else {?>	
							 <button type="button" class="btn-hover color-3 pull-left" style="height:35px;" data-id="<?php echo $key->no_faktur_penjualan ?>" data-toggle="modal" data-target=".modalKecil"><font size='2'>Edit Order</font></button>
					<?php }?>
					
				</div>
				<?php }?>
				<div>
						<form class="form-inline" action="<?php echo base_url('kasir/go_to_bayar/') ?>" method="post">
							<input type="hidden" name="nofak_bayar" id="nofak_bayar" value="<?php echo $faktur->no_faktur_penjualan ?>">
							<input type="hidden" name="total_belanja" id="total_belanja" value="<?php echo $belanja->tot_bel ?>">
							<input type="hidden" name="diskon_belanja" id="diskon_belanja" value="<?php echo $faktur->diskon ?>">
							<input type="hidden" name="diskon_ket" id="diskon_ket" value="<?php echo $faktur->ket_diskon ?>">
							<input type="hidden" name="layan" id="layan" value="<?php echo $faktur->layanan ?>">
							<input type="hidden" name="kdharga" id="kdharga" value="<?php echo $faktur->kdharga ?>">
							<input type="hidden" name="ongkir" id="ongkir" value="<?php echo $faktur->ongkir ?>">
							<input type="hidden" name="netto" id="netto" value="<?php echo $faktur->netto ?>">
							<input type="hidden" name="disc" id="disc" value="<?php echo $faktur->disc ?>">
							<input type="hidden" name="idpromo" id="idpromo" value="<?php echo $faktur->idpromo ?>">
							<input type="hidden" name="ndisc" id="ndisc" value="<?php echo $faktur->ndisc ?>">
							<input type="hidden" name="ndisc" id="ndisc" value="<?php echo $faktur->layanan ?>">
							<input type="hidden" name="nppn" id="nppn" value="<?php echo $tot_nppn ?>">
							<input type="hidden" name="netto" id="netto" value="<?php echo $netto ?>">
							
							<button type="submit" class="btn-hover color-1 pull-right" style="height:35px;"><font size='2'>Bayar</font></button>    
						</form>
                </div>
				
            </div>
          </div>
        </div>
    </div>
</div>	
  <div class="modal fade" id="modalEdit" role="dialog">
    <div class="modal-dialog">
      <!-- Modal content-->
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal">&times;</button>
          <h4 class="modal-title">Edit Pesanan</h4>
        </div>
        <div class="modal-body" >
          <form class="form-horizontal" id="myForm" action="<?php echo base_url('kasir/simpan_edit') ?>" method="post">
            <div  class="form-group">
              <label  class="control-label col-sm-3" for="kdbrg">Kode</label>
              <div class="col-sm-3">
                <input  type="text" class="form-control" id="kdbrg" name="kdbrg" readonly>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-sm-3" for="nbrg">Nama Menu</label>
              <div class="col-sm-5">
                <input type="text" class="form-control" id="nbrg" name="nbrg" readonly>
              </div>
            </div>
			<div class="form-group">
              <label class="control-label col-sm-3" for="nbrg">Order</label>
              <div class="col-sm-3">
                <input type="text" class="form-control" id="qty" name="qty" readonly>
              </div>
            </div>
			
            <div class="form-group">
              <label class="control-label col-sm-2" for="takeaway">Reguler</label>
              <div class="col-sm-2">  
                <input type="number" class="form-control" id="qtyregu"  name="qtyregu" onkeypress="return isNumber(event)"  >
              </div>
            </div>
			
            <div class="form-group">
              <label class="control-label col-sm-2" for="takeaway">Take Away</label>
              <div class="col-sm-2">  
                <input type="number" class="form-control" id="qtytakeaway"  name="qtytakeaway" onkeypress="return isNumber(event)"  >
              </div>
            </div>
            
			<div class="form-group">
				<label class="control-label col-sm-3" for="jenis">Minuman Dingin</label>
				<div class="col-sm-2">
			    	<td>Take Away<input type="number" class="form-control" id="qtydinginta"  name="qtydinginta"></td>
				</div>   
			</div>
			
			<div class="form-group">
				<label class="control-label col-sm-3" for="jenis">Minuman Panas</label>
				<div class="col-sm-2">
			    	<td>Dine In<input type="number" class="form-control" id="qtypanas"  name="qtypanas"></td>
			    </div>
				<div class="col-sm-2">
			    	<td>Take Away<input type="number" class="form-control" id="qtypanasta"  name="qtypanasta"></td>
				</div>   
			</div>
			
			<div class="form-group">
              <label class="control-label col-sm-3" for="note">Note</label>
              <div class="col-sm-6">
                <input type="text" class="form-control" id="note"  name="note" >
              </div>
            </div>
        </div>
        <div class="modal-footer">
		   <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
		   <input type="hidden" name="nofak" id="nofak" >
		   <input type="hidden" name="idmenu" id="idmenu" >
		   <input type="hidden" name="kdharga" id="kdharga" >
		   <input type="hidden" name="qty" id="qty" >
		   <input type="hidden" name="harga" id="harga" >
		   <input type="hidden" name="harga1" id="harga1" >
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
          <button type="submit" id="btnSimpan" class="btn btn-primary">Simpan</button>
        </div>
        </form>
      </div>
    </div>
  </div>
<div class="modal fade modalKecil" tabindex="-1" role="dialog" aria-hidden="true">
  <div class="modal-dialog modal-sm">
 
    <div class="modal-content">
      <div class="modal-header">
        <h4><font color='red'><b>Input Validasi Token</b></font></h4>
		<?php 
			$tgl=date('j');
			$jam=date('G');
			$detik=date('s');
			if ($detik==0)  $token=((($tgl*$jam*1)*1305));
			if ($detik>0) $token=((($tgl*$jam*$detik)*1305));
		?>
		
      </div>
        <div class="modal-body" align='center' >
          <form class="form-horizontal" action="<?php echo base_url('kasir/kode_harga_token/')?>" method="post">
            <div  class="form-group">
              <label  class="control-label " for="id_fak">Kode Token</label>
              <div class="col-sm-10">
                <input  type="text" class="form-control" id="token" name="token"  value='<?php echo $token ?>' readonly>
              </div>
            </div>
            <div class="form-group" >
              <label class="control-label " for="idtoken">Password</label>
              <div class="col-sm-10">
                <input type="number" class="form-control" id="idtoken" name="idtoken" required >
              </div>
            </div>
			<div class="form-group" >
              <label class="control-label " for="note">Note</label>
              <div class="col-sm-10">
                <input type="text" class="form-control" id="note" name="note" required >
              </div>
            </div>
        </div>
        <div class="modal-footer">
		 <input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur->no_faktur_penjualan ?>">
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
          <button type="submit" id="btnSimpan" class="btn btn-primary">Simpan</button>
        </div>
        </form>
    </div>
 
  </div>
</div>

    <!-- FOOTER SECTION END-->
    <!-- JAVASCRIPT FILES PLACED AT THE BOTTOM TO REDUCE THE LOADING TIME  -->
    <script src="<?php echo base_url() ?>/assets/js/jquery-3.3.1.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/jquery.dataTables.min.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/bootstrap.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/custom.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/sweetalert.min.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/toastr.min.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/jquery-ui.min.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/jquery.price_format.min.js"></script>

	
    <script>
      $('form').attr('autocomplete', 'off');
      $('input').attr('autocomplete', 'off');
      $("ul.nav li.dropdown").hover(function(){$(this).find(".dropdown-menu").stop(!0,!0).delay(100).fadeIn(500)},function(){$(this).find(".dropdown-menu").stop(!0,!0).delay(100).fadeOut(500)});
      var pesan="<?php echo $this->session->flashdata('msg'); ?>",error="<?php echo $this->session->flashdata('error'); ?>";pesan?(toastr.options={positionClass:"toast-top-right"},toastr.success(pesan)):error&&swal(error,"","error");

      function startTime() {
        var today = new Date();
        var h = today.getHours();
        var m = today.getMinutes();
        var s = today.getSeconds();
        m = checkTime(m);
        s = checkTime(s);
        document.getElementById('waktu').innerHTML = h + ":" + m + ":" + s;
        var t = setTimeout(startTime, 500);
      }

      function checkTime(i) {
          if (i < 10) {i = "0" + i};
          return i;
      }

    $(document).ready(function() {
        startTime();
        $('#kd_barang').focus();
        $('#nm_barang').autocomplete({
          source: "<?php echo base_url('kasir/get_autocomplete/?'); ?>",
          select: function (event, ui) {
            $('[name="nm_barang"]').val(ui.item.label);
            $('[name="kd_barang"]').val(ui.item.kode);
            $('#kd_barang').focus();
           
          }
        });
    });

    $("#qty").keypress(function(e){
        var kd_barang= $('#kd_barang').val();
        var nofak = $('#nofak').val();
        if(e.which==13){
          if (kd_barang) {
            window.top.location.href = "<?php echo base_url('kasir/cekbarang/') ?>"+nofak+"/"+kd_barang;
          }
          return false;
        }
    });

$("#kd_barang").keypress(function(e){
        var kd_barang= $('#kd_barang').val();
        var nofak = $('#nofak').val();
        if(e.which==13){
          if (kd_barang) {
            window.top.location.href = "<?php echo base_url('kasir/cekbarang/') ?>"+nofak+"/"+kd_barang;
          }
          return false;
        }
    });
$("#nm_barang").keypress(function(e){
        var nm_barang= $('#nm_barang').val();
        var nofak = $('#nofak').val();
        if(e.which==13){
          if (nm_barang) {
            window.top.location.href = "<?php echo base_url('kasir/updatecari/') ?>"+nofak+"/"+nm_barang;
          }
          return false;
        }
    });        

    function isNumber(evt) {
        evt = (evt) ? evt : window.event;
        var charCode = (evt.which) ? evt.which : evt.keyCode;
        if (charCode > 31 && (charCode < 48 || charCode > 57)) {
            return false;
        }
      return true;
    }

    $(function(){
        $('#diskon').priceFormat({
                prefix: '',
                centsLimit: 0,
                thousandsSeparator: '.'
        });
    });
    

	$(document).ready(function() {
          $('#tbUser').on('click','.edit_record',function(){
			  var nofak = $(this).data('akses');
              var kdbrg=$(this).data('id');
              var nbrg=$(this).data('nama');
			  var ta=$(this).data('ta');
			  var jenis=$(this).data('jenis');
			  var note=$(this).data('note');
			  var kajen=$(this).data('kajen');
			  var idmenu=$(this).data('idmenu');
			  var qtytakeaway=$(this).data('qtytakeaway');
			  var qtydingin=$(this).data('qtydingin');
			  var qtydinginta=$(this).data('qtydinginta');
			  var qtypanas=$(this).data('qtypanas');
			  var qtypanasta=$(this).data('qtypanasta');
			  var qty=$(this).data('jumlah');
			  var kdharga=$(this).data('kdharga');
			  var harga=$(this).data('harga');
			  var harga1=$(this).data('harga1');
			  var qtyregu=$(this).data('qtyregu');
			  
              $('#modalEdit').modal('show').val(idmenu);
              $('[name="kdbrg"]').val(kdbrg);
              $('[name="nbrg"]').val(nbrg);
			  $('[name="jenis"]').val(jenis);
			  $('[name="takeaway"]').val(ta);
			  $('[name="note"]').val(note);
			  $('[name="nofak"]').val(nofak);
			  $('[name="idmenu"]').val(idmenu);
			  $('[name="qtytakeaway"]').val(qtytakeaway);
			  $('[name="qtypanas"]').val(qtypanas);
			  $('[name="qtypanasta"]').val(qtypanasta);
			  $('[name="qtydingin"]').val(qtydingin);
			  $('[name="qtydinginta"]').val(qtydinginta);
			  $('[name="qty"]').val(qty);
			  $('[name="kdharga"]').val(kdharga);
			  $('[name="harga"]').val(harga);
			  $('[name="harga1"]').val(harga1);
			  $('[name="qtyregu"]').val(qtyregu);
			  
	
			  
          });
		  
       
          $('#tbUser').on('click','.hapus_record',function(){
              var id=$(this).data('id');
			  var nofak = $(this).data('akses');
			  var harga = $(this).data('harga');
              var result = confirm("Apakah yakin akan menghapus kode "+id+" ini?");
              var akses = "<?php echo $this->session->userdata('akses') ?>";
                  if (result) {
                    window.location.href = "<?php echo base_url('kasir/hapus-barang-beli/') ?>"+nofak+"/"+id+"/"+harga;
					  
                  }
          });
          
       
		  
      });
	 </script>
<
	 
	 <script>
$(function() { //keep tab
 // for bootstrap 3 use 'shown.bs.tab', for bootstrap 2 use 'shown' in the next line
 $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
 // save the latest tab; use cookies if you like 'em better:
 localStorage.setItem('lastTab', $(this).attr('href'));
 });
 
// go to the latest tab, if it exists:
 var lastTab = localStorage.getItem('lastTab');
 if (lastTab) {
 $('[href="' + lastTab + '"]').tab('show');
 }
});
</script>
	 
<style>
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.buttons {
    margin: 10%;
    text-align: center;
}

.btn-hover {
    width: 80px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    margin: 5px;
    height: 55px;
    text-align:center;
    border: none;
    background-size: 300% 100%;

    border-radius: 25px;
    moz-transition: all .4s ease-in-out;
    -o-transition: all .4s ease-in-out;
    -webkit-transition: all .4s ease-in-out;
    transition: all .4s ease-in-out;
}

.btn-hover:hover {
    background-position: 100% 0;
    moz-transition: all .4s ease-in-out;
    -o-transition: all .4s ease-in-out;
    -webkit-transition: all .4s ease-in-out;
    transition: all .4s ease-in-out;
}

.btn-hover:focus {
    outline: none;
}

.btn-hover.color-1 {
    background-image: linear-gradient(to right, #25aae1, #40e495, #30dd8a, #2bb673);
    box-shadow: 0 4px 15px 0 rgba(49, 196, 190, 0.75);
}
.btn-hover.color-2 {
    background-image: linear-gradient(to right, #f5ce62, #e43603, #fa7199, #e85a19);
    box-shadow: 0 4px 15px 0 rgba(229, 66, 10, 0.75);
}
.btn-hover.color-3 {
    background-image: linear-gradient(to right, #667eea, #764ba2, #6B8DD6, #8E37D7);
    box-shadow: 0 4px 15px 0 rgba(116, 79, 168, 0.75);
}
.btn-hover.color-4 {
    background-image: linear-gradient(to right, #fc6076, #ff9a44, #ef9d43, #e75516);
    box-shadow: 0 4px 15px 0 rgba(252, 104, 110, 0.75);
}
.btn-hover.color-5 {
    background-image: linear-gradient(to right, #0ba360, #3cba92, #30dd8a, #2bb673);
    box-shadow: 0 4px 15px 0 rgba(23, 168, 108, 0.75);
}
.btn-hover.color-6 {
    background-image: linear-gradient(to right, #009245, #FCEE21, #00A8C5, #D9E021);
    box-shadow: 0 4px 15px 0 rgba(83, 176, 57, 0.75);
}
.btn-hover.color-7 {
    background-image: linear-gradient(to right, #6253e1, #852D91, #A3A1FF, #F24645);
    box-shadow: 0 4px 15px 0 rgba(126, 52, 161, 0.75);
}
.btn-hover.color-8 {
    background-image: linear-gradient(to right, #29323c, #485563, #2b5876, #4e4376);
    box-shadow: 0 4px 15px 0 rgba(45, 54, 65, 0.75);
}
.btn-hover.color-9 {
    background-image: linear-gradient(to right, #25aae1, #4481eb, #04befe, #3f86ed);
    box-shadow: 0 4px 15px 0 rgba(65, 132, 234, 0.75);
}
.btn-hover.color-10 {
        background-image: linear-gradient(to right, #ed6ea0, #ec8c69, #f7186a , #FBB03B);
    box-shadow: 0 4px 15px 0 rgba(236, 116, 149, 0.75);
}
.btn-hover.color-11 {
       background-image: linear-gradient(to right, #eb3941, #f15e64, #e14e53, #e2373f);  box-shadow: 0 5px 15px rgba(242, 97, 103, .4);
}

.btn-hover.color-12 {
        background-image: linear-gradient(to right, red, yellow);
    box-shadow: 0 4px 15px 0 rgba(236, 116, 149, 0.75);
}


</style>	 
<style>
.container {
  position: relative;
  text-align: center;
  color: white;
}

.bottom-left {
  position: absolute;
  bottom: 8px;
  left: 16px;
}

.top-left {
  position: absolute;
  top: 8px;
  left: 16px;
}

.top-right {
  position: absolute;
  top: 8px;
  right: 16px;
}

.bottom-right {
  position: absolute;
  bottom: 8px;
  right: 16px;
}

.centered {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
</style>


<style type="text/css">
	#gradient2 {
	  background-image: linear-gradient(to right, #4682B4, #00FFFF, #00FA9A);
	}
	#gradient3 {
	  background-image: linear-gradient(to right, #E3FF73, #00FFFF, #E27C39);
	}
	#warna {
  -webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
        filter: grayscale(100%);
    }
    .centered {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

</style>	
</body>
</html>