<div class='utama' >
            <div class="hdd1">
                <p align='center'><span> <?php echo $namatoko ?></span><span>,</span> </span><span id="tanggalwaktu"></span><span></span> <span id='tanggalku'></span></p>
            </div>

<?php if($n==0) {?>
    <meta http-equiv="refresh" content="10" />
    <?php }?>
<?php if($n1==0) {?>
    <meta http-equiv="refresh" content="60" />
    <?php }?>    
<?php if($n2==0) {?>
    <meta http-equiv="refresh" content="60" />
    <?php }?>    
<?php if($n3==0) {?>
    <meta http-equiv="refresh" content="60" />
    <?php }?>  
    <?php if($n4==0) {?>
    <meta http-equiv="refresh" content="60" />
    <?php }?>    
<?php if($n5==0) {?>
    <meta http-equiv="refresh" content="60" />
    <?php }?>    

    
    

    <div class="content-wrapper">
        
            <div style="margin-left: 0px;margin-right: 0px;width:100%px">
                <div class="row">
                    <div class="col-xl-12" >   
                
                
			        <div class="col-sm-2">
			            <div style="margin-left: 10px;margin-right: 0px;width:155px;height:100%px;">
                        <div class="panel">
                            <div  class="hdd" align='center'>
				                <strong><font><b>Rekapan Order</b></font></strong>
                            </div>
            
		                    
                                 <div class='empat'>
                                        <table class="table table-bordered table-responsive">
                                    <thead>
                                        <tr>
                                            <td align='center'><font size='1'><b>MENU</b></font></td>
                                            <td align="center"><b>Porsi</b></td>
                                        </tr>
                                    </thead>
                                <?php if($n==1)  { ?>    
                                <tbody>
                                    <tr><td colspan='2' align='center' class='hdd3'><label><font size='1'>MIE</font></label></td></tr>
                                    <?php foreach ($listall->result() as $key): ?>
                                        <tr>
                                            <td><font size='1'><?php echo substr($key->nm_barang, 0, 40) ?></font></td>
                                            <td align="center"><font size='1'><?php echo $key->jqty ?></font></td>
                                        </tr>
                                        <?php
                                            $tot_item += $key->jqty;
                                        ?>
                                    <?php endforeach?>
                                     <tr><td colspan='2' align='center' class='hdd3'><label><font size='1'>Topping</font></label></td></tr>
                                    <?php foreach ($listalld->result() as $key): ?>
                                        <tr>
                                            <td><font size='1'><?php echo substr($key->nm_barang, 0, 40) ?></font></td>
                                            <td align="center"><font size='1'><?php echo $key->jqty ?></font></td>
                                        </tr>
                                        <?php
                                            $tot_item += $key->jqty;
                                        ?>
                                    <?php endforeach?>
                                    <tr><td colspan='2' align='center' class='hdd3'><label><font size='1'>SNACK</font></label></td></tr>
                                    <?php foreach ($listalla->result() as $key): ?>
                                        <tr>
                                            <td><font size='1'><?php echo substr($key->nm_barang, 0, 40) ?></font></td>
                                            <td align="center"><font size='1'><?php echo $key->jqty ?></font></td>
                                        </tr>
                                        <?php
                                            $tot_item += $key->jqty;
                                        ?>
                                    <?php endforeach?>
                                    <tr><td colspan='2' align='center' class='hdd3'><label><font size='1'>MINUMAN</font></label></td></tr>
                                    <?php foreach ($listallb->result() as $key): ?>
                                        <tr>
                                            <td><font size='1'><?php echo substr($key->nm_barang, 0, 40) ?></font></td>
                                            <td align="center"><font size='1'><?php echo $key->jqty ?></font></td>
                                        </tr>
                                        <?php
                                            $tot_item += $key->jqty;
                                        ?>
                                    <?php endforeach?>
                                    <tr><td colspan='2' align='center' class='hdd3'><label><font size='1'>LAIN LAIN</font></label></td></tr>
                                    <?php foreach ($listallc->result() as $key): ?>
                                        <tr>
                                            <td><font size='1'><?php echo substr($key->nm_barang, 0, 40) ?></font></td>
                                            <td align="center"><font size='1'><?php echo $key->jqty ?></font></td>
                                        </tr>
                                        <?php
                                            $tot_item += $key->jqty;
                                        ?>
                                    <?php endforeach?>
                                </tbody>
                                    <tr>
                                        <td align="right"><strong><font size='1'>Total</font></strong></td>
                                        <td align="center"><strong><font size='1'><?php echo $tot_item ?></font></strong></td>
                                    </tr>
									
                                </table>
                           
                        </div>
                </div>
            </div>   
            </div>
     <?php
	    }		
        $tot_item =0;
        $tot_belanja= 0;
        if($n1==1) {
            
        ?>
    		 <div class="col-sm-2" >
    		    <div style="margin-left: 0px;margin-right: 0px;width:163px;height:450px;">
                    <div>
                    <div class="hdd" align='center'>
                <?php if($faktur1->layanan==1) { ?>
			    	    No: <?php echo $faktur1->nofak . ' / ' . $faktur1->makan .' /Meja: '. $faktur1->meja ?>
			    	<?php } else {?>
			    	    No: <?php echo $faktur1->nofak . ' / ' . $faktur1->makan ?>
			    	<?php }?>  
			    	
            </div>
            
            <div class='empat'  >
            <table onload="ajax()" id="tbUser" class="table table-bordered table-responsive">
              <thead>
                <tr>
                  
                  <td align='center'><b>MENU</b></td>
				  <td align="center"><b>Porsi</b></td>
                  <td align="center">Act</td>
                  
                </tr>
              </thead>
              <tbody>
                       
                    <?php foreach ($list1->result() as $key):
                        $tot_item += $key->jqty;
                        $tot_belanja += $key->jml;
                    endforeach?>
                        <?php if ($n1a==2) {?>
                        <tr>
                             <td colspan='3' align='center' class='hdd3'><label>MIE</label></td>
                        </tr>
                        <?php }?>
                        <?php foreach ($list1a->result() as $key):?>
                            <tr>
                                <?php if($key->qtytakeaway>0){ ?>
									<?php if($key->note != 'NA'){ ?>
										<td align='left'><?php echo substr($key->nm_barang, 0, 40) ?> <font color='yellow'>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='yellow'>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 } ?>
                                <td align="center"><font size='1'><?php echo $key->jqty ?></font></td>
                                <td align="center"> <input class='ubox' type='checkbox' id='ck1' name='ck1' ></input></td> 
                            </tr>
                        <?php endforeach ?>    
                        <?php if ($n1d==2) {?>
                        <tr>
                             <td colspan='3' align='center' class='hdd3'><label>Topping <?php echo $n1d ?></label></td>
                        </tr>
                        
                        <?php } foreach ($list1d->result() as $key):?>
                            <tr>
                                <?php if($key->qtytakeaway>0){ ?>
									<?php if($key->note != 'NA'){ ?>
										<td align='left'><?php echo substr($key->nm_barang, 0, 40) ?> <font color='green'>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='green'>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 } ?>
                                <td align="center"><font size='1'><?php echo $key->jqty ?></font></td>
                                <td align="center"> <input class='ubox' type='checkbox' id='ck1' name='ck1' ></input></td> 
                            </tr>
                        <?php endforeach ?>    
                        <?php if ($n1b==2) {?>
                        <tr>
                             <td colspan='3' align='center' class='hdd3'><label>SNACK</label></td>
                        </tr>
                        
                        <?php } foreach ($list1b->result() as $key):?>
                            <tr>
                                <?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 } ?>	
                                <td align="center"><font size='1'><?php echo $key->jqty ?></font></td>
                                <td align="center"> <input class='ubox' type='checkbox' id='ck1' name='ck1' ></input></td> 
                            </tr>
                        <?php endforeach?>    
                        
                        <?php if ($n1c==2) {?>
                        <tr>
                             <td colspan='3' align='center' class='hdd3'><label>MINUMAN</label></td>
                        </tr>
                        
                        <?php } foreach ($list1c->result() as $key):?>
                            <tr>
                                <?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 } } } ?>	
                                <td align="center"><font size='1'><?php echo $key->jqty ?></font></td>
                                <td align="center"> <input class='ubox' type='checkbox' id='ck1' name='ck1' ></input></td> 
                            </tr>
                        <?php endforeach?>                            
                    
                
              </tbody>
              
              <tr>
                <td  align="center"><strong>Total</strong></td>
                <td align="center"><strong><font size='1'><?php echo $tot_item ?></font></strong></td>
				<form  class="form-horizontal" action="<?php echo base_url('kasir/masak/')?>" method="post">
					<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur1->no_faktur_penjualan ?>">
					<input type="hidden" name="tot1" id="tot1" value="<?php echo $tot_belanja ?>">
					<td align="center"><button type='summit' class='btn_style' id='ok1' name='ok1' disabled='' ><b>OK</b></button></td>
				</form>	
              </tr>
              <tr>
			  <td  class='hddw'>Order : <?php echo $faktur1->waktu ?></td>
			  <td colspan='2' class='hddw'> <span id='demo'></span></td>
			  </tr>
			  
			  
            </table>
            
            </div>
            
          </div>
          
        </div>
        </div>
			
<?php

// $tot_item =0;
$tot_belanja= 0;
} 
if($n2==1) {
        
?>
	 <div class="col-sm-2" >
    		    <div style="margin-left: 0px;margin-right: 0px;width:163px;height:450px;">
                    <div>
                    <div class="hdd" align='center'>
                <?php if($faktur2->layanan==1) { ?>
			    	    No: <?php echo $faktur2->nofak . ' / ' . $faktur2->makan .' /Meja: '. $faktur2->meja ?>
			    	<?php } else {?>
			    	    No: <?php echo $faktur2->nofak . ' / ' . $faktur2->makan ?>
			    	<?php }?>  
            </div>
            <div class='empat' >
            <table id="tbUser" class="table table-bordered table-responsive">
              <thead>
                <tr>
                  
                  <td align='center'><b>MENU</b></td>
				  <td align="center"><b>Porsi</b></td>
                  <td align="center">Act</td>
                  
                </tr>
              </thead>
              <tbody>
                <?php foreach ($list2->result() as $key): 
                        $tot_item += $key->jqty;
                        $tot_belanja += $key->jml;
                    ?>
                <?php endforeach?>
                <?php if ($n2a==2) {?>
                <tr>
                      <td colspan='3' align='center' class='hdd3'><label>MIE</label></td>
                </tr>
                        
                <?php } foreach ($list2a->result() as $key): ?>
                    <tr>
					<?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 } ?>
                        <td align="center"><font size='1'><?php echo $key->jqty ?></font></td>
                        <td align="center"> <input class='ubox' type='checkbox' id='ck2' name='ck2' ></input></td> 
                    </tr>
                <?php endforeach?>
                <?php if ($n2d==2) {?>
                <tr>
                      <td colspan='3' align='center' class='hdd3'><label>Topping</label></td>
                </tr>
                        
                <?php } foreach ($list2d->result() as $key): ?>
                    <tr>
					<?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 } ?>
                        <td align="center"><font size='1'><?php echo $key->jqty ?></font></td>
                        <td align="center"> <input class='ubox' type='checkbox' id='ck2' name='ck2' ></input></td> 
                    </tr>
                <?php endforeach?>
                <?php if ($n2b==2) {?>
                <tr>
                      <td colspan='3' align='center' class='hdd3'><label>SNACK</label></td>
                </tr>
                        
                <?php } foreach ($list2b->result() as $key): ?>
                    <tr>
					<?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 } ?>
                        <td align="center"><font size='1'><?php echo $key->jqty ?></font></td>
                        <td align="center"> <input class='ubox' type='checkbox' id='ck2' name='ck2' ></input></td> 
                    </tr>
                <?php endforeach?>
                <?php if ($n2c==2) {?>
                <tr>
                      <td colspan='3' align='center' class='hdd3'><label>MINUMAN</label></td>
                </tr>
                        
                <?php } foreach ($list2c->result() as $key): ?>
                    <tr>
                                <?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 } } } ?>	
                        <td align="center"><font size='1'><?php echo $key->jqty ?></font></td>
                        <td align="center"> <input class='ubox' type='checkbox' id='ck2' name='ck2' ></input></td> 
                    </tr>
                <?php endforeach?>
                
              </tbody>
              <tr>
                <td  align="center"><strong>Total</strong></td>
                <td align="center"><strong><font size='1'><?php echo $tot_item ?></font></strong></td>
				<form  class="form-horizontal" action="<?php echo base_url('kasir/masak/')?>" method="post">
					<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur2->no_faktur_penjualan ?>">
					<input type="hidden" name="tot2" id="tot2" value="<?php echo $tot_belanja ?>">
					<td align="center"><button type='summit' class='btn_style' id='ok2' name='ok2' disabled='' ><b>OK</b></button></td>
				</form>	
                
              </tr>
              <tr><td colspan='3' class='hddw'>Masuk : <?php echo $faktur2->waktu ?><span id="hasil"></span></td></tr>
            </table>
            </div>
          </div>
        </div>
        </div>
			
        
<?php
} 
$tot_item =0;
$tot_belanja= 0;
if($n3==1) {
    
?>		
	 <div class="col-sm-2" >
    		    <div style="margin-left: 0px;margin-right: 0px;width:162px;height:450px;">
                    <div >
                    <div class="hdd" align='center'>
                <?php if($faktur3->layanan==1) { ?>
			    	    No: <?php echo $faktur3->nofak . ' / ' . $faktur3->makan .' /Meja: '. $faktur3->meja ?>
			    	<?php } else {?>
			    	    No: <?php echo $faktur3->nofak . ' / ' . $faktur3->makan ?>
			    	<?php }?>  
            </div>
            <div class='empat' >
            <table id="tbUser" class="table table-bordered table-responsive">
              <thead>
                <tr>
                  
                  <td align='center'><b>MENU</b></td>
				  <td align="center"><b>Porsi</b></td>
                  <td align="center">Act</td>
                  
                </tr>
              </thead>
              <tbody>
                <?php foreach ($list3->result() as $key): 
                        $tot_item += $key->jqty;
                        $tot_belanja += $key->jml;
                ?>
                <?php endforeach?>
                <?php if ($n3a==2) {?>
                 <tr>
                    <td colspan='3' align='center' class='hdd3'><label>MIE</label></td>
                </tr>
                
                <?php } foreach ($list3a->result() as $key): ?>
                <tr>
					<?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 } ?>	
                  <td align="center"><font size='1'><?php echo $key->jqty ?></font></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck3' name='ck3' ></input></td> 
                </tr>
                <?php endforeach?>
                <?php if ($n3d==2) {?>
                 <tr>
                    <td colspan='3' align='center' class='hdd3'><label>Topping</label></td>
                </tr>
                
                <?php } foreach ($list3d->result() as $key): ?>
                <tr>
					<?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 } ?>	
                  <td align="center"><font size='1'><?php echo $key->jqty ?></font></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck3' name='ck3' ></input></td> 
                </tr>
                <?php endforeach?>
                <?php if ($n3b==2) {?>
                 <tr>
                    <td colspan='3' align='center' class='hdd3'><label>SNACK</label></td>
                </tr>
                
                <?php } foreach ($list3b->result() as $key): ?>
                <tr>
					<?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 } ?>
                  <td align="center"><font size='1'><?php echo $key->jqty ?></font></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck3' name='ck3' ></input></td> 
                </tr>
                <?php endforeach?>
                <?php if ($n3c==2) {?>
                 <tr>
                    <td colspan='3' align='center' class='hdd3'><label>MINUMAN</label></td>
                </tr>
                
                <?php } foreach ($list3c->result() as $key): ?>
                <tr>
                                <?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 } } } ?>
                  <td align="center"><font size='1'><?php echo $key->jqty ?></font></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck3' name='ck3' ></input></td> 
                </tr>
                <?php endforeach?>
                
              </tbody>
              <tr>
               <td  align="center"><strong>Total</strong></td>
                <td align="center"><strong><font size='1'><?php echo $tot_item ?></font></strong></td>
				<form  class="form-horizontal" action="<?php echo base_url('kasir/masak/')?>" method="post">
					<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur3->no_faktur_penjualan ?>">
					<input type="hidden" name="tot3" id="tot3" value="<?php echo $tot_belanja ?>">
					<td align="center"><button type='summit' class='btn_style' id='ok3' name='ok3' disabled='' ><b>OK</b></button></td>
				</form>	
                
              </tr>
               <tr><td colspan='3' class='hddw'>Masuk : <?php echo $faktur3->waktu ?><span id="hasil"></span></td></tr>
            </table>
            </div>
          </div>
        </div>
        </div>
			
<?php
} 
$tot_item =0;
$tot_belanja= 0;
if($n4==1){
?>		
		 <div class="col-sm-2" >
    		    <div style="margin-left: 0px;margin-right: 0px;width:162px;height:450px;">
                    <div >
                    <div class="hdd" align='center'>
                <?php if($faktur4->layanan==1) { ?>
			    	    No: <?php echo $faktur4->nofak . ' / ' . $faktur4->makan .' /Meja: '. $faktur4->meja ?>
			    	<?php } else {?>
			    	    No: <?php echo $faktur4->nofak . ' / ' . $faktur4->makan ?>
			    	<?php }?>  
            </div>
            <div class='empat' >
            <table id="tbUser" class="table table-bordered table-responsive">
              <thead>
                <tr>
                  
                  <td align='center'><b>MENU</b></td>
				  <td align="center"><b>Porsi</b></td>
                  <td align="center">Act</td>
                  
                </tr>
              </thead>
              <tbody>
                <?php foreach ($list4->result() as $key): 
                    $tot_item += $key->jumlah;
                    $tot_belanja += $key->jml;
                ?>
                <?php endforeach?>
                <?php if ($n4a==2) {?>
                <tr>
                    <td colspan='3' align='center' class='hdd3'><label>MIE</label></td>
                </tr>
                
                <?php } foreach ($list4a->result() as $key): ?>
                <tr>
					<?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 } ?>	
                  <td align="center"><font size='1'><?php echo $key->jumlah ?></font></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck4' name='ck4' ></input></td> 
                </tr>
                <?php endforeach?>
                <?php if ($n4d==2) {?>
                <tr>
                    <td colspan='3' align='center' class='hdd3'><label>Topping</label></td>
                </tr>
                
                <?php } foreach ($list4d->result() as $key): ?>
                <tr>
					<?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 } ?>	
                  <td align="center"><font size='1'><?php echo $key->jumlah ?></font></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck4' name='ck4' ></input></td> 
                </tr>
                <?php endforeach?>
                <?php if ($n4b==2) {?>
                <tr>
                    <td colspan='3' align='center' class='hdd3'><label>SNACK</label></td>
                </tr>
                
                <?php } foreach ($list4b->result() as $key): ?>
                <tr>
					<?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 } ?>	
                  <td align="center"><font size='1'><?php echo $key->jumlah ?></font></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck4' name='ck4' ></input></td> 
                </tr>
                <?php endforeach?>
                <?php if ($n4c==2) {?>
                <tr>
                    <td colspan='3' align='center' class='hdd3'><label>MINUMAN</label></td>
                </tr>
                
                <?php } foreach ($list4c->result() as $key): ?>
                <tr>
                                <?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 } } } ?>	
                  <td align="center"><font size='1'><?php echo $key->jumlah ?></font></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck4' name='ck4' ></input></td> 
                </tr>
                <?php endforeach?>
                
              </tbody>
              <tr>
                <td  align="center"><strong>Total</strong></td>
                <td align="center"><strong><font size='1'><?php echo $tot_item ?></font></strong></td>
				<form  class="form-horizontal" action="<?php echo base_url('kasir/masak/')?>" method="post">
					<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur4->no_faktur_penjualan ?>">
					<input type="hidden" name="tot4" id="tot4" value="<?php echo $tot_belanja ?>">
					<td align="center"><button type='summit' class='btn_style' id='ok4' name='ok4' disabled='' ><b>OK</b></button></td>
				</form>	
                
              </tr>
               <tr><td colspan='3' class='hddw'>Masuk : <?php echo $faktur4->waktu ?><span id="hasil"></span></td></tr>
            </table>
            </div>
          </div>
        </div>
        </div>
			
<?php
}
$tot_item =0;
$tot_belanja= 0;
if($n5==1) {
?>
	 <div class="col-sm-2" >
    		    <div style="margin-left: 0px;margin-right: 0px;width:162px;height:450px;">
                    <div>
                    <div class="hdd" align='center'>
                <?php if($faktur5->layanan==1) { ?>
			    	    No: <?php echo $faktur5->nofak . ' / ' . $faktur5->makan .' /Meja: '. $faktur5->meja ?>
			    	<?php } else {?>
			    	    No: <?php echo $faktur5->nofak . ' / ' . $faktur5->makan ?>
			    	<?php }?>  
            </div>
            <div class='empat' >
            <table id="tbUser" class="table table-bordered table-responsive">
              <thead>
                <tr>
                  
                  <td align='center'><b>MENU</b></td>
				  <td align="center"><b>Porsi</b></td>
                  <td align="center">Act</td>
                  
                </tr>
              </thead>
              <tbody>
                <?php foreach ($list5->result() as $key): 
                    $tot_item += $key->jumlah;
                    $tot_belanja += $key->jml;
                ?>
                <?php endforeach?>
                <?php if ($n5a==2) {?>
                <tr>
                    <td colspan='3' align='center' class='hdd3'><label>MIE</label></td>
                </tr>
                
                <?php } foreach ($list5a->result() as $key): ?>
                <tr>
					<?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 } ?>	
                  <td align="center"><font size='1'><?php echo $key->jumlah ?></font></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck5' name='ck5' ></input></td> 
                </tr>
                <?php endforeach?>
                <?php if ($n5d==2) {?>
                <tr>
                    <td colspan='3' align='center' class='hdd3'><label>Topping</label></td>
                </tr>
                
                <?php } foreach ($list5d->result() as $key): ?>
                <tr>
					<?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 } ?>	
                  <td align="center"><font size='1'><?php echo $key->jumlah ?></font></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck5' name='ck5' ></input></td> 
                </tr>
                <?php endforeach?>
                <?php if ($n5b==2) {?>
                <tr>
                    <td colspan='3' align='center' class='hdd3'><label>SNACK</label></td>
                </tr>
                
                <?php } foreach ($list5b->result() as $key): ?>
                <tr>
                  	<?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 } ?>	
                  <td align="center"><font size='1'><?php echo $key->jumlah ?></font></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck5' name='ck5' ></input></td> 
                </tr>
                <?php endforeach?>
                <?php if ($n5c==2) {?>
                <tr>
                    <td colspan='3' align='center' class='hdd3'><label>MINUMAN</label></td>
                </tr>
                
                <?php } foreach ($list5c->result() as $key): ?>
                <tr>
                                <?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 } } } ?>	
                  <td align="center"><font size='1'><?php echo $key->jumlah ?></font></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck5' name='ck5' ></input></td> 
                </tr>
                <?php endforeach?>
                
              </tbody>
              <tr>
                <td  align="center"><strong>Total</strong></td>
                <td align="center"><strong><font size='1'><?php echo $tot_item ?></font></strong></td>
				<form  class="form-horizontal" action="<?php echo base_url('kasir/masak/')?>" method="post">
					<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur5->no_faktur_penjualan ?>">
					<input type="hidden" name="tot5" id="tot5" value="<?php echo $tot_belanja ?>">
					<td align="center"><button type='summit' class='btn_style' id='ok5' name='ok5' disabled='' ><b>OK</b></button></td>
				</form>	
                
              </tr>
               <tr><td colspan='3' class='hddw'>Masuk : <?php echo $faktur5->waktu ?><span id="hasil"></span></td></tr>
            </table>
            </div>
          </div>
        </div>
        </div>
			
		
	
<?php
}
$tot_item =0;
$tot_belanja= 0;
if($n6==1) {
?>	
		 <div class="col-sm-2" >
    		    <div style="margin-left: 0px;margin-right: 0px;width:162px;height:450px;">
                    <div class="panel panel-default">
                    <div class="hdd" align='center'>
                <?php if($faktur6->layanan==1) { ?>
			    	    No: <?php echo $faktur6->nofak . ' / ' . $faktur6->makan .' /Meja: '. $faktur6->meja ?>
			    	<?php } else {?>
			    	    No: <?php echo $faktur6->nofak . ' / ' . $faktur6->makan ?>
			    	<?php }?>  
            </div>
            <div class='empat' >
            <table id="tbUser" class="table table-bordered table-responsive">
              <thead>
                <tr>
                  
                  <td align='center'><b>MENU</b></td>
				  <td align="center"><b>Porsi</b></td>
                  <td align="center">Act</td>
                  
                </tr>
              </thead>
              <tbody>
                <?php foreach ($list6->result() as $key): ?>
                <tr>
                  
                  <td><?php echo substr($key->nm_barang, 0, 40) ?></font></td>
                  
                  <td align="center"><?php echo $key->jumlah ?></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck6' name='ck6' ></input></td> 
                </tr>
<?php
$tot_item += $key->jumlah;
$tot_belanja += $key->jml;
?>
                <?php endforeach?>
              </tbody>
              <tr>
                <td  align="center"><strong>Total</strong></td>
                <td align="center"><strong><font size='1'><?php echo $tot_item ?></font></strong></td>
				<form  class="form-horizontal" action="<?php echo base_url('kasir/masak/')?>" method="post">
					<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur6->no_faktur_penjualan ?>">
					<input type="hidden" name="tot6" id="tot6" value="<?php echo $tot_belanja ?>">
					<td align="center"><button type='summit' class='btn_style' id='ok6' name='ok6' disabled='' ><b>OK</b></button></td>
				</form>	
                
              </tr>
            </table>
            </div>
          </div>
        </div>
        </div>
			
<?php
}
$tot_item =0;
$tot_belanja= 0;
if($n7==1) {
?>	

	 <div class="col-sm-2" >
    		    <div style="margin-left: 0px;margin-right: 0px;width:162px;height:450px;">
                    <div class="panel panel-default">
                    <div class="hdd" align='center'>
                <?php if($faktur7->layanan==1) { ?>
			    	    No: <?php echo $faktur7->nofak . ' / ' . $faktur7->makan .' /Meja: '. $faktur7->meja ?>
			    	<?php } else {?>
			    	    No: <?php echo $faktur7->nofak . ' / ' . $faktur7->makan ?>
			    	<?php }?>  
            </div>
            <div class='empat' >
            <table id="tbUser" class="table table-bordered table-responsive">
              <thead>
                <tr>
                  
                  <td align='center'><b>MENU</b></td>
				  <td align="center"><b>Porsi</b></td>
                  <td align="center">Act</td>
                  
                </tr>
              </thead>
              <tbody>
                <?php foreach ($list7->result() as $key): ?>
                <tr>
                  
                  <td><?php echo substr($key->nm_barang, 0, 40) ?></font></td>
                  
                  <td align="center"><?php echo $key->jumlah ?></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck7' name='ck7' ></input></td> 
                </tr>
<?php
$tot_item += $key->jumlah;
$tot_belanja += $key->jml;
?>
                <?php endforeach?>
              </tbody>
              <tr>
                <td  align="right"><strong>Total</strong></td>
                <td align="center"><strong><?php echo $tot_item ?></strong></td>
				<form  class="form-horizontal" action="<?php echo base_url('kasir/masak/')?>" method="post">
					<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur7->no_faktur_penjualan ?>">
					<input type="hidden" name="tot7" id="tot7" value="<?php echo $tot_belanja ?>">
					<td align="center"><button type='summit' class='btn_style' id='ok7' name='ok7' disabled='' ><b>OK</b></button></td>
				</form>	
                
              </tr>
            </table>
            </div>
          </div>
        </div>
        </div>
			
<?php
}
$tot_item =0;
$tot_belanja= 0;
if($n8==1){
?>		
	 <div class="col-sm-2" >
    		    <div style="margin-left: 0px;margin-right: 0px;width:162px;height:450px;">
                    <div class="panel panel-default">
                    <div class="hdd" align='center'>
                <?php if($faktur8->layanan==1) { ?>
			    	    No: <?php echo $faktur8->nofak . ' / ' . $faktur8->makan .' /Meja: '. $faktur8->meja ?>
			    	<?php } else {?>
			    	    No: <?php echo $faktur8->nofak . ' / ' . $faktur8->makan ?>
			    	<?php }?>  
            </div>
            <div class='empat' >
            <table id="tbUser" class="table table-bordered table-responsive">
              <thead>
                <tr>
                  
                  <td align='center'><b>MENU</b></td>
				  <td align="center"><b>Porsi</b></td>
                  <td align="center">Act</td>
                  
                </tr>
              </thead>
              <tbody>
                <?php foreach ($list8->result() as $key): ?>
                <tr>
                  
                  <td><?php echo substr($key->nm_barang, 0, 40) ?></font></td>
                  
                  <td align="center"><?php echo $key->jumlah ?></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck8' name='ck8' ></input></td> 
                </tr>
<?php
$tot_item += $key->jumlah;
$tot_belanja += $key->jml;
?>
                <?php endforeach?>
              </tbody>
              <tr>
                <td  align="right"><strong>Total</strong></td>
                <td align="center"><strong><?php echo $tot_item ?></strong></td>
				<form  class="form-horizontal" action="<?php echo base_url('kasir/masak/')?>" method="post">
					<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur8->no_faktur_penjualan ?>">
					<input type="hidden" name="tot8" id="tot8" value="<?php echo $tot_belanja ?>">
					<td align="center"><button type='summit' class='btn_style' id='ok8' name='ok8' disabled='' ><b>OK</b></button></td>
				</form>	
                
              </tr>
            </table>
            </div>
          </div>
        </div>
        </div>
	
<?php
		}		
$tot_item =0;
$tot_belanja= 0;
if($n9==1) {
?>
 <div class="col-sm-2" >
    		    <div style="margin-left: 0px;margin-right: 0px;width:162px;height:450px;">
                    <div class="panel panel-default">
                    <div class="hdd" align='center'>
                <?php if($faktur9->layanan==1) { ?>
			    	    No: <?php echo $faktur9->nofak . ' / ' . $faktur9->makan .' /Meja: '. $faktur9->meja ?>
			    	<?php } else {?>
			    	    No: <?php echo $faktur9->nofak . ' / ' . $faktur9->makan ?>
			    	<?php }?>  
            </div>
            <div class='empat' >
            <table id="tbUser" class="table table-bordered table-responsive">
              <thead>
                <tr>
                  
                  <td align='center'><b>MENU</b></td>
				  <td align="center"><b>Porsi</b></td>
                  <td align="center">Act</td>
                  
                </tr>
              </thead>
              <tbody>
                <?php foreach ($list9->result() as $key): ?>
                <tr>
                  
                  <td><?php echo substr($key->nm_barang, 0, 40) ?></font></td>
                  
                  <td align="center"><?php echo $key->jumlah ?></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck9' name='ck9' ></input></td> 
                </tr>
<?php
$tot_item += $key->jumlah;
$tot_belanja += $key->jml;
?>
                <?php endforeach?>
              </tbody>
              <tr>
                <td  align="right"><strong>Total</strong></td>
                <td align="center"><strong><?php echo $tot_item ?></strong></td>
				<form  class="form-horizontal" action="<?php echo base_url('kasir/masak/')?>" method="post">
					<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur9->no_faktur_penjualan ?>">
					<input type="hidden" name="tot9" id="tot9" value="<?php echo $tot_belanja ?>">
					<td align="center"><button type='summit' class='btn_style' id='ok9' name='ok9' disabled='' ><b>OK</b></button></td>
				</form>	
                
              </tr>
            </table>
            </div>
          </div>
        </div>
        </div>
	
<?php
$tot_item =0;
$tot_belanja= 0;
} 
if($n10==1) {
?>
		 <div class="col-sm-2" >
    		    <div style="margin-left: 0px;margin-right: 0px;width:162px;height:450px;">
                    <div class="panel panel-default">
                    <div class="hdd" align='center'>
                <?php if($faktur10->layanan==1) { ?>
			    	    No: <?php echo $faktur10->nofak . ' / ' . $faktur10->makan .' /Meja: '. $faktur10->meja ?>
			    	<?php } else {?>
			    	    No: <?php echo $faktur10->nofak . ' / ' . $faktur10->makan ?>
			    	<?php }?>  
            </div>
            <div class='empat' >
            <table id="tbUser" class="table table-bordered table-responsive">
              <thead>
                <tr>
                  
                  <td align='center'><b>MENU</b></td>
				  <td align="center"><b>Porsi</b></td>
                  <td align="center">Act</td>
                  
                </tr>
              </thead>
              <tbody>
                <?php foreach ($list10->result() as $key): ?>
                <tr>
                  
                  <td><?php echo substr($key->nm_barang, 0, 40) ?></font></td>
                  
                  <td align="center"><?php echo $key->jumlah ?></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck10' name='ck10' ></input></td> 
                </tr>
<?php
$tot_item += $key->jumlah;
$tot_belanja += $key->jml;
?>
                <?php endforeach?>
              </tbody>
              <tr>
                <td  align="right"><strong>Total</strong></td>
                <td align="center"><strong><?php echo $tot_item ?></strong></td>
				<form  class="form-horizontal" action="<?php echo base_url('kasir/masak/')?>" method="post">
					<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur10->no_faktur_penjualan ?>">
					<input type="hidden" name="tot10" id="tot10" value="<?php echo $tot_belanja ?>">
					<td align="center"><button type='summit' class='btn_style' id='ok10' name='ok10' disabled='' ><b>OK</b></button></td>
				</form>	
                
              </tr>
            </table>
            </div>
          </div>
        </div>
        </div>
	
<?php
}
$tot_item =0;
$tot_belanja= 0;
if($n11==1) {
?>		
	<div class="col-sm-2" >
    		    <div style="margin-left: 0px;margin-right: 0px;width:162px;height:450px;">
                    <div class="panel panel-default">
                    <div class="hdd" align='center'>
                <?php if($faktur11->layanan==1) { ?>
			    	    No: <?php echo $faktur11->nofak . ' / ' . $faktur11->makan .' /Meja: '. $faktur11->meja ?>
			    	<?php } else {?>
			    	    No: <?php echo $faktur11->nofak . ' / ' . $faktur11->makan ?>
			    	<?php }?>  
            </div>
            <div class='empat' >
            <table id="tbUser" class="table table-bordered table-responsive">
              <thead>
                <tr>
                  
                  <td align='center'><b>MENU</b></td>
				  <td align="center"><b>Porsi</b></td>
                  <td align="center">Act</td>
                  
                </tr>
              </thead>
              <tbody>
                <?php foreach ($list11->result() as $key): ?>
                <tr>
                  
                  <td><?php echo substr($key->nm_barang, 0, 40) ?></font></td>
                  
                  <td align="center"><?php echo $key->jumlah ?></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck11' name='ck11' ></input></td> 
                </tr>
<?php
$tot_item += $key->jumlah;
$tot_belanja += $key->jml;
?>
                <?php endforeach?>
              </tbody>
              <tr>
                <td  align="right"><strong>Total</strong></td>
                <td align="center"><strong><?php echo $tot_item ?></strong></td>
				<form  class="form-horizontal" action="<?php echo base_url('kasir/masak/')?>" method="post">
					<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur11->no_faktur_penjualan ?>">
					<input type="hidden" name="tot11" id="tot11" value="<?php echo $tot_belanja ?>">
					<td align="center"><button type='summit' class='btn_style' id='ok11' name='ok11' disabled='' ><b>OK</b></button></td>
				</form>	
              </tr>
              
            </table>
            </div>
          </div>
        </div>
        </div>
			
<?php
}
$tot_item =0;
$tot_belanja= 0;
if($n12==1){
?>	
<div class="col-sm-2" >
    		    <div style="margin-left: 0px;margin-right: 0px;width:162px;height:450px;">
                    <div class="panel panel-default">
                    <div class="hdd" align='center'>
                <?php if($faktur12->layanan==1) { ?>
			    	    No: <?php echo $faktur12->nofak . ' / ' . $faktur12->makan .' /Meja: '. $faktur12->meja ?>
			    	<?php } else {?>
			    	    No: <?php echo $faktur12->nofak . ' / ' . $faktur12->makan ?>
			    	<?php }?>  
            </div>
            <div class='empat' >
            <table id="tbUser" class="table table-bordered table-responsive">
              <thead>
                <tr>
                  
                  <td align='center'><b>MENU</b></td>
				  <td align="center"><b>Porsi</b></td>
                  <td align="center">Act</td>
                  
                </tr>
              </thead>
              <tbody>
                <?php foreach ($list12->result() as $key): ?>
                <tr>
                  
                  <td><?php echo substr($key->nm_barang, 0, 40) ?></font></td>
                  
                  <td align="center"><?php echo $key->jumlah ?></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck12' name='ck12' ></input></td> 
                </tr>
<?php
$tot_item += $key->jumlah;
$tot_belanja += $key->jml;
?>
                <?php endforeach?>
              </tbody>
              <tr>
                <td  align="right"><strong>Total</strong></td>
                <td align="center"><strong><?php echo $tot_item ?></strong></td>
				<form  class="form-horizontal" action="<?php echo base_url('kasir/masak/')?>" method="post">
					<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur12->no_faktur_penjualan ?>">
					<input type="hidden" name="tot12" id="tot12" value="<?php echo $tot_belanja ?>">
					<td align="center"><button type='summit' class='btn_style' id='ok12' name='ok12' disabled='' ><b>OK</b></button></td>
				</form>	
                
              </tr>
            </table>
            </div>
          </div>
        </div>
        </div>
	
<?php
}
$tot_item =0;
$tot_belanja= 0;
if($n13==1) {
?>		
		<div class="col-sm-2" >
    		    <div style="margin-left: 0px;margin-right: 0px;width:162px;height:450px;">
                    <div class="panel panel-default">
                    <div class="hdd" align='center'>
                <?php if($faktur13->layanan==1) { ?>
			    	    No: <?php echo $faktur13->nofak . ' / ' . $faktur13->makan .' /Meja: '. $faktur13->meja ?>
			    	<?php } else {?>
			    	    No: <?php echo $faktur13->nofak . ' / ' . $faktur13->makan ?>
			    	<?php }?>  
            </div>
            <div class='empat' >
            <table id="tbUser" class="table table-bordered table-responsive">
              <thead>
                <tr>
                  
                  <td align='center'><b>MENU</b></td>
				  <td align="center"><b>Porsi</b></td>
                  <td align="center">Act</td>
                  
                </tr>
              </thead>
              <tbody>
                <?php foreach ($list13->result() as $key): ?>
                <tr>
                  
                  <td><?php echo substr($key->nm_barang, 0, 40) ?></font></td>
                  
                  <td align="center"><?php echo $key->jumlah ?></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck13' name='ck13' ></input></td> 
                </tr>
<?php
$tot_item += $key->jumlah;
$tot_belanja += $key->jml;
?>
                <?php endforeach?>
              </tbody>
              <tr>
                <td  align="right"><strong>Total</strong></td>
                <td align="center"><strong><?php echo $tot_item ?></strong></td>
				<form  class="form-horizontal" action="<?php echo base_url('kasir/masak/')?>" method="post">
					<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur13->no_faktur_penjualan ?>">
					<input type="hidden" name="tot13" id="tot13" value="<?php echo $tot_belanja ?>">
					<td align="center"><button type='summit' class='btn_style' id='ok13' name='ok13' disabled='' ><b>OK</b></button></td>
				</form>	
                
              </tr>
            </table>
            </div>
          </div>
        </div>
        </div>
	
			
		
	
<?php
}
$tot_item =0;
$tot_belanja= 0;
if($n14==1) {
?>	
	<div class="col-sm-2" >
    		    <div style="margin-left: 0px;margin-right: 0px;width:162px;height:450px;">
                    <div class="panel panel-default">
                    <div class="hdd" align='center'>
                <?php if($faktur14->layanan==1) { ?>
			    	    No: <?php echo $faktur14->nofak . ' / ' . $faktur14->makan .' /Meja: '. $faktur14->meja ?>
			    	<?php } else {?>
			    	    No: <?php echo $faktur14->nofak . ' / ' . $faktur14->makan ?>
			    	<?php }?>  
            </div>
            <div class='empat' >
            <table id="tbUser" class="table table-bordered table-responsive">
              <thead>
                <tr>
                  
                  <td align='center'><b>MENU</b></td>
				  <td align="center"><b>Porsi</b></td>
                  <td align="center">Act</td>
                  
                </tr>
              </thead>
              <tbody>
                <?php foreach ($list14->result() as $key): ?>
                <tr>
                  
                  <td><?php echo substr($key->nm_barang, 0, 40) ?></font></td>
                  
                  <td align="center"><?php echo $key->jumlah ?></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck14' name='ck14' ></input></td> 
                </tr>
<?php
$tot_item += $key->jumlah;
$tot_belanja += $key->jml;
?>
                <?php endforeach?>
              </tbody>
              <tr>
                <td  align="right"><strong>Total</strong></td>
                <td align="center"><strong><?php echo $tot_item ?></strong></td>
				<form  class="form-horizontal" action="<?php echo base_url('kasir/masak/')?>" method="post">
					<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur14->no_faktur_penjualan ?>">
					<input type="hidden" name="tot14" id="tot14" value="<?php echo $tot_belanja ?>">
					<td align="center"><button type='summit' class='btn_style' id='ok14' name='ok14' disabled='' ><b>OK</b></button></td>
				</form>	
                
              </tr>
            </table>
            </div>
          </div>
        </div>
        </div>
	
<?php
}
$tot_item =0;
$tot_belanja= 0;
if($n15==1) {
?>	

		 <div class="col-sm-2" >
    		    <div style="margin-left: 0px;margin-right: 0px;width:162px;height:450px;">
                    <div class="panel panel-default">
                    <div class="hdd" align='center'>
                <?php if($faktur15->layanan==1) { ?>
			    	    No: <?php echo $faktur15->nofak . ' / ' . $faktur15->makan .' /Meja: '. $faktur15->meja ?>
			    	<?php } else {?>
			    	    No: <?php echo $faktur15->nofak . ' / ' . $faktur15->makan ?>
			    	<?php }?>  
            </div>
            <div class='empat' >
            <table id="tbUser" class="table table-bordered table-responsive">
              <thead>
                <tr>
                  
                  <td align='center'><b>MENU</b></td>
				  <td align="center"><b>Porsi</b></td>
                  <td align="center">Act</td>
                  
                </tr>
              </thead>
              <tbody>
                <?php foreach ($list15->result() as $key): ?>
                <tr>
                  
                  <td><?php echo substr($key->nm_barang, 0, 40) ?></font></td>
                  
                  <td align="center"><?php echo $key->jumlah ?></td>
                  <td align="center"> <input class='ubox' type='checkbox' id='ck15' name='ck15' ></input></td> 
                </tr>
<?php
$tot_item += $key->jumlah;
$tot_belanja += $key->jml;
?>
                <?php endforeach?>
              </tbody>
              <tr>
                <td  align="right"><strong>Total</strong></td>
                <td align="center"><strong><?php echo $tot_item ?></strong></td>
				<form  class="form-horizontal" action="<?php echo base_url('kasir/masak/')?>" method="post">
					<input type="hidden" name="nobuk" id="nobuk" value="<?php echo $faktur15->no_faktur_penjualan ?>">
					<input type="hidden" name="tot15" id="tot15" value="<?php echo $tot_belanja ?>">
					<td align="center"><button type='summit' class='btn_style' id='ok15' name='ok15' disabled='' ><b>OK</b></button></td>
				</form>	
                
              </tr>
            </table>
            </div>
          </div>
        </div>
        </div>
	
		
<?php }?>
		
		
		
	</div>	
    </div>
  </div>
 </div> 
 </div>


 
    <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 src="<?php echo base_url() ?>/assets/js/jquery-3.4.1.min.js" ></script>
	<script type="text/javascript">
// 1 detik = 1000
window.setTimeout("waktu()",1000);
function waktu() {
var tanggal = new Date();
var m =tanggal.getMinutes();
var s = tanggal.getSeconds();
 m = checkTime(m);
 s = checkTime(s);
setTimeout("waktu()",1000);
document.getElementById("tanggalku").innerHTML
= tanggal.getHours()+":"+ m +":"+ s;
}
 function checkTime(i) {
          if (i < 10) {i = "0" + i};
          return i;
      }
</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 convertToRupiah(angka){
          var rupiah = '';
          var angkarev = angka.toString().split('').reverse().join('');
          for(var i = 0; i < angkarev.length; i++) if(i%3 == 0) rupiah += angkarev.substr(i,3)+'.';
          return rupiah.split('',rupiah.length-1).reverse().join('');
    };

   
        $("input[type=checkbox]").on( "change", function(evt) {
        var hoby = $('input[id=ck1]:checked');
        var tot1 = $('#tot1').val();
        
        if(hoby.length == tot1 ){
	        $("button[name=ok1]").prop("disabled", false);
        }else{
	        $("button[name=ok1]").prop("disabled", true);
        }
        
        });
        
        $("input[type=checkbox]").on( "change", function(evt) {
        var hoby = $('input[id=ck2]:checked');
        var tot2 = $('#tot2').val();
        if(hoby.length == tot2){
	        $("button[name=ok2]").prop("disabled", false);
        }else{
	        $("button[name=ok2]").prop("disabled", true);
        }
        });
        
        $("input[type=checkbox]").on( "change", function(evt) {
        var hoby = $('input[id=ck3]:checked');
        var tot3 = $('#tot3').val();
        if(hoby.length == tot3){
	        $("button[name=ok3]").prop("disabled", false);
        }else{
	        $("button[name=ok3]").prop("disabled", true);
        }
        });
        
        $("input[type=checkbox]").on( "change", function(evt) {
        var hoby = $('input[id=ck4]:checked');
        var tot4 = $('#tot4').val();
        if(hoby.length == tot4){
	        $("button[name=ok4]").prop("disabled", false);
        }else{
	        $("button[name=ok4]").prop("disabled", true);
        }
        });
        
        $("input[type=checkbox]").on( "change", function(evt) {
        var hoby = $('input[id=ck5]:checked');
        var tot5 = $('#tot5').val();
        if(hoby.length == tot5){
	        $("button[name=ok5]").prop("disabled", false);
        }else{
	        $("button[name=ok5]").prop("disabled", true);
        }
        });
        
        $("input[type=checkbox]").on( "change", function(evt) {
        var hoby = $('input[id=ck6]:checked');
        var tot6 = $('#tot6').val();
        if(hoby.length == tot6){
	        $("button[name=ok6]").prop("disabled", false);
        }else{
	        $("button[name=ok6]").prop("disabled", true);
        }
        });
        
        $("input[type=checkbox]").on( "change", function(evt) {
        var hoby = $('input[id=ck7]:checked');
        var tot7 = $('#tot7').val();
        if(hoby.length == tot7){
	        $("button[name=ok7]").prop("disabled", false);
        }else{
	        $("button[name=ok7]").prop("disabled", true);
        }
        });
        
        $("input[type=checkbox]").on( "change", function(evt) {
        var hoby = $('input[id=ck8]:checked');
        var tot8 = $('#tot8').val();
        if(hoby.length == tot8){
	        $("button[name=ok8]").prop("disabled", false);
        }else{
	        $("button[name=ok8]").prop("disabled", true);
        }
        });
        $("input[type=checkbox]").on( "change", function(evt) {
        var hoby = $('input[id=ck9]:checked');
        var tot9 = $('#tot9').val();
        if(hoby.length == tot9){
	        $("button[name=ok9]").prop("disabled", false);
        }else{
	        $("button[name=ok9]").prop("disabled", true);
        }
        });
        
        $("input[type=checkbox]").on( "change", function(evt) {
        var hoby = $('input[id=ck10]:checked');
        var tot10 = $('#tot10').val();
        if(hoby.length == tot10){
	        $("button[name=ok10]").prop("disabled", false);
        }else{
	        $("button[name=ok10]").prop("disabled", true);
        }
        });
        
        $("input[type=checkbox]").on( "change", function(evt) {
        var hoby = $('input[id=ck11]:checked');
        var tot11 = $('#tot11').val();
        if(hoby.length == tot11){
	        $("button[name=ok11]").prop("disabled", false);
        }else{
	        $("button[name=ok11]").prop("disabled", true);
        }
        });
        
        $("input[type=checkbox]").on( "change", function(evt) {
        var hoby = $('input[id=ck12]:checked');
        var tot12 = $('#tot12').val();
        if(hoby.length == tot12){
	        $("button[name=ok12]").prop("disabled", false);
        }else{
	        $("button[name=ok12]").prop("disabled", true);
        }
        });
        
        $("input[type=checkbox]").on( "change", function(evt) {
        var hoby = $('input[id=ck13]:checked');
        var tot13 = $('#tot13').val();
        if(hoby.length == tot1){
	        $("button[name=ok13]").prop("disabled", false);
        }else{
	        $("button[name=ok13]").prop("disabled", true);
        }
        });
        
        $("input[type=checkbox]").on( "change", function(evt) {
        var hoby = $('input[id=ck14]:checked');
        var tot14 = $('#tot14').val();
        if(hoby.length == tot14){
	        $("button[name=ok14]").prop("disabled", false);
        }else{
	        $("button[name=ok14]").prop("disabled", true);
        }
        });
        
        $("input[type=checkbox]").on( "change", function(evt) {
        var hoby = $('input[id=ck15]:checked');
        var tot15 = $('#tot15').val();
        if(hoby.length == tot15){
	        $("button[name=ok15]").prop("disabled", false);
        }else{
	        $("button[name=ok15]").prop("disabled", true);
        }
        });
		
		

	

		
    </script>
   <?php
	$kdtoko = $this->session->userdata('kd_toko');
	$tgl=date('Y-m-d');
	$antri1=$this->db->query("select * from tabel_antri where kdcabang='$kdtoko' and stat='1' and tgl='$tgl' and jml>0 order by nourut asc limit 0,1;");
	$antri2=$this->db->query("select * from tabel_antri where kdcabang='$kdtoko' and stat='1' and tgl='$tgl' and jml>0  order by nourut asc limit 1,1;");
	$antri3=$this->db->query("select * from tabel_antri where kdcabang='$kdtoko' and stat='1' and tgl='$tgl' and jml>0  order by nourut asc limit 2,1;");
	$antri4=$this->db->query("select * from tabel_antri where kdcabang='$kdtoko' and stat='1' and tgl='$tgl' and jml>0  order by nourut asc limit 3,1;");
	$antri5=$this->db->query("select * from tabel_antri where kdcabang='$kdtoko' and stat='1' and tgl='$tgl' and jml>0  order by nourut asc limit 4,1;");
	$a1=$antri1->row_array();
	$a2=$antri2->row_array();
	$a3=$antri3->row_array();
	$a4=$antri4->row_array();
	$a5=$antri5->row_array();
	$waktu1= $a1['last'];
	$satu = [
	'waktu1' => $waktu1
	];
	
	?>
<script>
	
	var countDownDate = new Date("2022-04-11 15:27:52").getTime();
	var x = setInterval(function() {	
	var now = new Date().getTime();
	var distance = now-countDownDate;
	var days = Math.floor(distance / (1000 * 60 * 60 * 24));
	var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
	var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
	var seconds = Math.floor((distance % (1000 * 60)) / 1000);
	 minutes = checkTime(minutes);
     seconds = checkTime(seconds);
	document.getElementById("demo").innerHTML =  hours + ":" + minutes + ":" + seconds ;
	}, 1000);
	 function checkTime(i) {
          if (i < 10) {i = "0" + i};
          return i;
      }
</script>	
 
<style>
.btn_style{
border: 1px solid #cecece;
border-radius: 1px;
padding: 1px 5px;
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
color: white;
background-color: green;
}
.btn_style:hover{
border: 1px solid #b1b1b1;
box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.5);
}

.content {
     margin-top:1px;
}
.empat{
		font-size:0.7em;
	}
.ubox{
width: 12px; 
height: 12px;
}	

.hdd{
height: 25px;
background-color:red;
	color: black
}	
.hddw{
height: 15px;
background-color:white;
color: black;
font-size:1em;
}	

.hdd3{
height: 10px;
background-color:white;
	color: black
}	


.hdd1{
height: 35px;
background-color:green;
	color: white
}	
	
table{
	background: #1E90FF;
	color: black
}
.utama{
    background-image: url(http://enambelasapp.my.id/rest/gambar/batik.jpg); 
    }
}	
	
</style>
<script>
var tw = new Date();
if (tw.getTimezoneOffset() == 0) (a=tw.getTime() + ( 7 *60*60*1000))
else (a=tw.getTime());
tw.setTime(a);
var tahun= tw.getFullYear ();
var hari= tw.getDay ();
var bulan= tw.getMonth ();
var tanggal= tw.getDate ();
var hariarray=new Array("Minggu","Senin","Selasa","Rabu","Kamis","Jum'at","Sabtu");
var bulanarray=new Array("Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember");
document.getElementById("tanggalwaktu").innerHTML = hariarray[hari]+" "+tanggal+" "+bulanarray[bulan]+" "+tahun;
</script>
</body>


</html>