  <div class="content-wrapper" style="margin-bottom: 20px">
    <div class="container">
      <div class="row pad-botm">
          <div class="col-md-12">
               <?php 
				    $akses = $this->session->userdata('akses');
				    if($akses !='kasir') { ?>
				        <form class="header-line" class="form-inline" action="<?php echo base_url('kasir/rekap1/') ?>" method="post">
					    <tr>
						    <td>Kedai</td>
						    <td>:</td>
						    <td>
							    <select  name="kedai" id="kedai" required>
	            					<option value="">Pilih Kedai</option>
    							<?php foreach ($cabang->result() as $key): ?>
							        <option value="<?php echo $key->kd_toko ?>"><?php echo $key->nm_toko ?></option>
							    <?php endforeach?>
					        </select>
						    </td>
					        <td>Dari Tgl</td>
					        <td>:</td>			
					        <td><input name='utgl' id='utgl' type='date' VALUE='<?php echo date("Y-m-d") ?>' ></input></td>
					        <td>Sampai Tgl</td>
					        <td>:</td>			
					        <td><input name='stgl' id='stgl' type='date' VALUE='<?php echo date("Y-m-d") ?>' ></input></td>
					        <td>Jenis Transaksi</td>
						    <td>:</td>
						    <td>
							    <select  name="jcetak" id="jcetak" required>
								    <option height='45px' value="">Jenis Transaksi</option>
								    <option <?php {echo 'selected';}?> value="TN">Cash</option>
								    <option <?php {echo 'selected';}?> value="SPAY">Shopeepay</option>
								    <option <?php {echo 'selected';}?> value="OVO">Ovo</option>
								    <option <?php {echo 'selected';}?> value="QR">Q-Ris</option>
								    <option <?php {echo 'selected';}?> value="GF">Gofood</option>
								    <option <?php {echo 'selected';}?> value="GR">Grabfood</option>
								    <option <?php {echo 'selected';}?> value="SP">Shopeefood</option>
								    <option <?php {echo 'selected';}?> value="SM">Semua</option>
							    </select>
						    </td>
					        
					        <button  class="btn" type="submit" ><font color='blue' ><b>GO</b></font></button>
					       
					    </tr>
					    
				        </form>	
				        
		        <?php } else { ?>
		            <form class="header-line" class="form-inline" action="<?php echo base_url('kasir/rekap/') ?>" method="post">
					    <tr>
					        <td>Tanggal</td>
					        <td>:</td>			
					        <td><input name='utgl' id='utgl' type='date' VALUE='<?php echo date("Y-m-d") ?>'  readonly></input></td>
					        <button  class="btn" type="submit" ><font color='blue' ><b>GO</b></font></button>
					    </tr>
				    </form>	
		  <?php } ?>
			<!-- <h5 >REKAP <?php echo date_indo($tanggal) ?> <span class="pull-right"><a id="btnRekap" class="btn btn-danger" href="<?php echo base_url('kasir/cetak-rekap') ?>">Cetak Rekap</a></span></h5>	-->
          </div>
      </div>
	 
       <div class="row">
        <div class="col-md-12">
                <h4><strong>Penjualan </strong><span class="pull-right"><a id="btnRekap" class="btn btn-success" href="<?php echo base_url('kasir/cetak-rekap1') ?>">Cetak Rekap</a></span>
                </h4> 
                
            <table id="tbPenjualan" class="table table-bordered table-striped table-responsive">
              <thead>
                <tr>
                  <th>No</th>
                  <th>Nomor Faktur</th>
				  <th>Tanggal</th>
                  <th>Waktu</th>
                  <th>Total</th>
                  <th>Diskon</th>
				  <th>PPn</th>
				  <th>Ongkir</th>
                  <th>Netto</th>
                  <th>Reguler</th>
				  <th>Reg. DO</th>
				  <th>Reg. TA</th>
				  <th>Gofood</th>
                  <th>Grabfood</th>
				  <th>Shopeefood</th>
                  <th>User</th>
                  <th>WaStatus</th>
                  <th>No Wa</th>
                  <th colspan='3'>Aksi</th>
                  
                </tr>
              </thead>
              <tbody>
                 
                <?php foreach ($penjualan->result() as $key): ?>
                <?php if($jcetak=='SM') {?> 
                <tr>
                  <td align="center"><?php echo $no++ ?></td>
                  <td><?php echo $key->no_faktur_penjualan ?></td>
				  <td><?php echo $key->tgl_penjualan ?></td>
                  <td><?php echo $key->waktu ?></td>
                  <td align="right"><?php echo number_format($key->total_penjualan, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->diskon, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->nppn, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->ongkir, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->total_penjualan_sdiskon, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->reg, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->regdo, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->regta, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->gofood, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->grab, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->shopee, 0, ',', '.') ?></td>
                  <td><?php echo $key->id_user ?></td>
                  
                  <td>  
                       <?php if($key->stwa=='Gagal') { ?>
                           <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editnomorwa" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                                data-stat="<?php echo $key->stwa ?>"
                                data-nowa="<?php echo $key->notelp ?>"
								><font color='red'><?php echo $key->stwa ?> </font></button>
                       
                            
                    <?php } if($key->stwa=='Terkirim') { ?>
                            <font color='blue'><?php echo $key->stwa ?> </font>
                    <?php } if($key->stwa=='Print') { ?>                       
                            <font ><?php echo $key->stwa ?> </font>
                    <?php } ?>        
                            
                    </td>
                    <td><?php echo $key->notelp ?></td>
                    <td>
                            	<form target="printstruk" id="formCetakStruk" class="form-inline" action="<?php echo base_url('kasir/cetak-struk1/') ?>" onsubmit="window.location('about:blank','printstruk','width=500,height=400');" method="post">
										<input type="hidden" name="sum_print" id="sum_print" value="<?php echo $key->total_penjualan_sdiskon ?>">
										<input type="hidden" name="diskon_print" id="diskon_print" value="<?php echo $key->diskon ?>">
										<input type="hidden" name="nofak_print" id="nofak_print" value="<?php echo $key->no_faktur_penjualan ?>">
										<input type="hidden" name="debet_print" id="debet_print" value="0">
										<input type="hidden" name="bank_print" id="bank_print">
										<button onclick="newTransaksi();" type="submit" id="btnCetakStruk"  style="width:75px;height:25px; text-align: center;" >PRINT</button>
									</form>
									
                  </td>
                     <td>
                        <?php if($key->kdharga =='KH01') { ?>
								 <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editbatalreg" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
								data-kdharga="<?php echo $key->kdharga ?>"
                                data-keter="<?php echo $key->keter ?>"
                                data-jnsbayar="<?php echo $key->jbayar ?>"
                                data-stat="<?php echo $key->selesai ?>"
                                data-note="<?php echo $key->jbayar ?>"
								><font color='green'>Batal</font></button>
						<?php } else  { ?>
						       <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editbatalojol" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
								data-kdharga="<?php echo $key->kdharga ?>"
                                data-keter="<?php echo $key->keter ?>"
                                data-jnsbayar="<?php echo $key->jbayar ?>"
                                data-stat="<?php echo $key->selesai ?>"
                                data-note="<?php echo $key->jbayar ?>"
								><font color='blue'>Batal</font></button>
						<?php } ?>			
                  </td>
                  <td>
                      <?php if($key->kdharga =='KH01') { ?>
                            <button style="width:75px;height:25px; text-align: center;"><a  href="javascript:void(0);" class="editbayar" 
                            data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                            data-kdharga="<?php echo $key->kdharga ?>"
                            data-keter="<?php echo $key->keter ?>"
                            data-jnsbayar="<?php echo $key->jbayar ?>"
                            >Edit</a></button>	
                    <?php } else  { ?>
						       <button style="width:75px;height:25px; text-align: center;"><a  href="javascript:void(0);" class="editbayarojol" 
                            data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                            data-kdharga="<?php echo $key->kdharga ?>"
                            data-keter="<?php echo $key->keter ?>"
                            data-jnsbayar="<?php echo $key->jbayar ?>"
                            ><font color='blue'>Edit</font></a></button>	
						<?php } ?>			        
                  </td>
                </tr>
                <?php 
                    $subtot += $key->total_penjualan;
$diskon += $key->diskon;
$grandtot += $key->total_penjualan_sdiskon;
$ongkir += $key->ongkir;
$rg += $key->reg;
$rgdo += $key->regdo;
$rgta += $key->regta;
$gofood += $key->gofood;
$grab += $key->grab;
$shopee += $key->shopee;
$nppn += $key->nppn;
                } if($jcetak=='GF') {
                    if($key->gofood>0) {
                ?>
                 <tr>
                  <td align="center"><?php echo $no++ ?></td>
                  <td><?php echo $key->no_faktur_penjualan ?></td>
				  <td><?php echo $key->tgl_penjualan ?></td>
                  <td><?php echo $key->waktu ?></td>
                  <td align="right"><?php echo number_format($key->total_penjualan, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->diskon, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->nppn, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->ongkir, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->total_penjualan_sdiskon, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->reg, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->regdo, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->regta, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->gofood, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->grab, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->shopee, 0, ',', '.') ?></td>
                  <td><?php echo $key->id_user ?></td>
                  
                  <td>  
                       <?php if($key->stwa=='Gagal') { ?>
                           <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editnomorwa" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                                data-stat="<?php echo $key->stwa ?>"
                                data-nowa="<?php echo $key->notelp ?>"
								><font color='red'><?php echo $key->stwa ?> </font></button>
                       
                            
                    <?php } if($key->stwa=='Terkirim') { ?>
                            <font color='blue'><?php echo $key->stwa ?> </font>
                    <?php } if($key->stwa=='Print') { ?>                       
                            <font ><?php echo $key->stwa ?> </font>
                    <?php } ?>        
                            
                    </td>
                    <td>
                            	<form target="printstruk" id="formCetakStruk" class="form-inline" action="<?php echo base_url('kasir/cetak-struk1/') ?>" onsubmit="window.location('about:blank','printstruk','width=500,height=400');" method="post">
										<input type="hidden" name="sum_print" id="sum_print" value="<?php echo $key->total_penjualan_sdiskon ?>">
										<input type="hidden" name="diskon_print" id="diskon_print" value="<?php echo $key->diskon ?>">
										<input type="hidden" name="nofak_print" id="nofak_print" value="<?php echo $key->no_faktur_penjualan ?>">
										<input type="hidden" name="debet_print" id="debet_print" value="0">
										<input type="hidden" name="bank_print" id="bank_print">
										<button onclick="newTransaksi();" type="submit" id="btnCetakStruk"  style="width:75px;height:25px; text-align: center;" >PRINT</button>
									</form>
									
                  </td>
                     <td>
                        <?php if($key->kdharga =='KH01') { ?>
								 <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editbatalreg" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
								data-kdharga="<?php echo $key->kdharga ?>"
                                data-keter="<?php echo $key->keter ?>"
                                data-jnsbayar="<?php echo $key->jbayar ?>"
                                data-stat="<?php echo $key->selesai ?>"
                                data-note="<?php echo $key->jbayar ?>"
								><font color='green'>Batal</font></button>
						<?php } else  { ?>
						       <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editbatalojol" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
								data-kdharga="<?php echo $key->kdharga ?>"
                                data-keter="<?php echo $key->keter ?>"
                                data-jnsbayar="<?php echo $key->jbayar ?>"
                                data-stat="<?php echo $key->selesai ?>"
                                data-note="<?php echo $key->jbayar ?>"
								><font color='blue'>Batal</font></button>
						<?php } ?>			
                  </td>
                  <td>
                      <?php if($key->kdharga =='KH01') { ?>
                            <button style="width:75px;height:25px; text-align: center;"><a  href="javascript:void(0);" class="editbayar" 
                            data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                            data-kdharga="<?php echo $key->kdharga ?>"
                            data-keter="<?php echo $key->keter ?>"
                            data-jnsbayar="<?php echo $key->jbayar ?>"
                            >Edit</a></button>	
                    <?php } else  { ?>
						       <button style="width:75px;height:25px; text-align: center;"><a  href="javascript:void(0);" class="editbayarojol" 
                            data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                            data-kdharga="<?php echo $key->kdharga ?>"
                            data-keter="<?php echo $key->keter ?>"
                            data-jnsbayar="<?php echo $key->jbayar ?>"
                            ><font color='blue'>Edit</font></a></button>	
						<?php } ?>			        
                  </td>
                 
                </tr>
                <?php 
                        $subtot += $key->total_penjualan;
$diskon += $key->diskon;
$grandtot += $key->total_penjualan_sdiskon;
$ongkir += $key->ongkir;
$rg += $key->reg;
$rgdo += $key->regdo;
$rgta += $key->regta;
$gofood += $key->gofood;
$grab += $key->grab;
$shopee += $key->shopee;
$nppn += $key->nppn;
                        
                    } } if($jcetak=='GR') {
                    if($key->grab>0) { ?>
                     <tr>
                  <td align="center"><?php echo $no++ ?></td>
                  <td><?php echo $key->no_faktur_penjualan ?></td>
				  <td><?php echo $key->tgl_penjualan ?></td>
                  <td><?php echo $key->waktu ?></td>
                  <td align="right"><?php echo number_format($key->total_penjualan, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->diskon, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->nppn, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->ongkir, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->total_penjualan_sdiskon, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->reg, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->regdo, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->regta, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->gofood, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->grab, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->shopee, 0, ',', '.') ?></td>
                  <td><?php echo $key->id_user ?></td>
                  
                  <td>  
                       <?php if($key->stwa=='Gagal') { ?>
                           <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editnomorwa" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                                data-stat="<?php echo $key->stwa ?>"
                                data-nowa="<?php echo $key->notelp ?>"
								><font color='red'><?php echo $key->stwa ?> </font></button>
                       
                            
                    <?php } if($key->stwa=='Terkirim') { ?>
                            <font color='blue'><?php echo $key->stwa ?> </font>
                    <?php } if($key->stwa=='Print') { ?>                       
                            <font ><?php echo $key->stwa ?> </font>
                    <?php } ?>        
                            
                    </td>
                    <td>
                            	<form target="printstruk" id="formCetakStruk" class="form-inline" action="<?php echo base_url('kasir/cetak-struk1/') ?>" onsubmit="window.location('about:blank','printstruk','width=500,height=400');" method="post">
										<input type="hidden" name="sum_print" id="sum_print" value="<?php echo $key->total_penjualan_sdiskon ?>">
										<input type="hidden" name="diskon_print" id="diskon_print" value="<?php echo $key->diskon ?>">
										<input type="hidden" name="nofak_print" id="nofak_print" value="<?php echo $key->no_faktur_penjualan ?>">
										<input type="hidden" name="debet_print" id="debet_print" value="0">
										<input type="hidden" name="bank_print" id="bank_print">
										<button onclick="newTransaksi();" type="submit" id="btnCetakStruk"  style="width:75px;height:25px; text-align: center;" >PRINT</button>
									</form>
									
                  </td>
                     <td>
                        <?php if($key->kdharga =='KH01') { ?>
								 <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editbatalreg" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
								data-kdharga="<?php echo $key->kdharga ?>"
                                data-keter="<?php echo $key->keter ?>"
                                data-jnsbayar="<?php echo $key->jbayar ?>"
                                data-stat="<?php echo $key->selesai ?>"
                                data-note="<?php echo $key->jbayar ?>"
								><font color='green'>Batal</font></button>
						<?php } else  { ?>
						       <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editbatalojol" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
								data-kdharga="<?php echo $key->kdharga ?>"
                                data-keter="<?php echo $key->keter ?>"
                                data-jnsbayar="<?php echo $key->jbayar ?>"
                                data-stat="<?php echo $key->selesai ?>"
                                data-note="<?php echo $key->jbayar ?>"
								><font color='blue'>Batal</font></button>
						<?php } ?>			
                  </td>
                  <td>
                      <?php if($key->kdharga =='KH01') { ?>
                            <button style="width:75px;height:25px; text-align: center;"><a  href="javascript:void(0);" class="editbayar" 
                            data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                            data-kdharga="<?php echo $key->kdharga ?>"
                            data-keter="<?php echo $key->keter ?>"
                            data-jnsbayar="<?php echo $key->jbayar ?>"
                            >Edit</a></button>	
                    <?php } else  { ?>
						       <button style="width:75px;height:25px; text-align: center;"><a  href="javascript:void(0);" class="editbayarojol" 
                            data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                            data-kdharga="<?php echo $key->kdharga ?>"
                            data-keter="<?php echo $key->keter ?>"
                            data-jnsbayar="<?php echo $key->jbayar ?>"
                            ><font color='blue'>Edit</font></a></button>	
						<?php } ?>			        
                  </td>
                </tr>
                <?php
                $subtot += $key->total_penjualan;
$diskon += $key->diskon;
$grandtot += $key->total_penjualan_sdiskon;
$ongkir += $key->ongkir;
$rg += $key->reg;
$rgdo += $key->regdo;
$rgta += $key->regta;
$gofood += $key->gofood;
$grab += $key->grab;
$shopee += $key->shopee;
$nppn += $key->nppn;
                        
                    } } if($jcetak=='SP') {
                    if($key->shopee>0) {    
                ?>
                   <tr>
                  <td align="center"><?php echo $no++ ?></td>
                  <td><?php echo $key->no_faktur_penjualan ?></td>
				  <td><?php echo $key->tgl_penjualan ?></td>
                  <td><?php echo $key->waktu ?></td>
                  <td align="right"><?php echo number_format($key->total_penjualan, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->diskon, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->nppn, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->ongkir, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->total_penjualan_sdiskon, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->reg, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->regdo, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->regta, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->gofood, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->grab, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->shopee, 0, ',', '.') ?></td>
                  <td><?php echo $key->id_user ?></td>
                  
                  <td>  
                       <?php if($key->stwa=='Gagal') { ?>
                           <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editnomorwa" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                                data-stat="<?php echo $key->stwa ?>"
                                data-nowa="<?php echo $key->notelp ?>"
								><font color='red'><?php echo $key->stwa ?> </font></button>
                       
                            
                    <?php } if($key->stwa=='Terkirim') { ?>
                            <font color='blue'><?php echo $key->stwa ?> </font>
                    <?php } if($key->stwa=='Print') { ?>                       
                            <font ><?php echo $key->stwa ?> </font>
                    <?php } ?>        
                            
                    </td>
                    <td>
                            	<form target="printstruk" id="formCetakStruk" class="form-inline" action="<?php echo base_url('kasir/cetak-struk1/') ?>" onsubmit="window.location('about:blank','printstruk','width=500,height=400');" method="post">
										<input type="hidden" name="sum_print" id="sum_print" value="<?php echo $key->total_penjualan_sdiskon ?>">
										<input type="hidden" name="diskon_print" id="diskon_print" value="<?php echo $key->diskon ?>">
										<input type="hidden" name="nofak_print" id="nofak_print" value="<?php echo $key->no_faktur_penjualan ?>">
										<input type="hidden" name="debet_print" id="debet_print" value="0">
										<input type="hidden" name="bank_print" id="bank_print">
										<button onclick="newTransaksi();" type="submit" id="btnCetakStruk"  style="width:75px;height:25px; text-align: center;" >PRINT</button>
									</form>
									
                  </td>
                     <td>
                        <?php if($key->kdharga =='KH01') { ?>
								 <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editbatalreg" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
								data-kdharga="<?php echo $key->kdharga ?>"
                                data-keter="<?php echo $key->keter ?>"
                                data-jnsbayar="<?php echo $key->jbayar ?>"
                                data-stat="<?php echo $key->selesai ?>"
                                data-note="<?php echo $key->jbayar ?>"
								><font color='green'>Batal</font></button>
						<?php } else  { ?>
						       <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editbatalojol" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
								data-kdharga="<?php echo $key->kdharga ?>"
                                data-keter="<?php echo $key->keter ?>"
                                data-jnsbayar="<?php echo $key->jbayar ?>"
                                data-stat="<?php echo $key->selesai ?>"
                                data-note="<?php echo $key->jbayar ?>"
								><font color='blue'>Batal</font></button>
						<?php } ?>			
                  </td>
                  <td>
                      <?php if($key->kdharga =='KH01') { ?>
                            <button style="width:75px;height:25px; text-align: center;"><a  href="javascript:void(0);" class="editbayar" 
                            data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                            data-kdharga="<?php echo $key->kdharga ?>"
                            data-keter="<?php echo $key->keter ?>"
                            data-jnsbayar="<?php echo $key->jbayar ?>"
                            >Edit</a></button>	
                    <?php } else  { ?>
						       <button style="width:75px;height:25px; text-align: center;"><a  href="javascript:void(0);" class="editbayarojol" 
                            data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                            data-kdharga="<?php echo $key->kdharga ?>"
                            data-keter="<?php echo $key->keter ?>"
                            data-jnsbayar="<?php echo $key->jbayar ?>"
                            ><font color='blue'>Edit</font></a></button>	
						<?php } ?>			        
                  </td>
                </tr>
                <?php 
                        $subtot += $key->total_penjualan;
$diskon += $key->diskon;
$grandtot += $key->total_penjualan_sdiskon;
$ongkir += $key->ongkir;
$rg += $key->reg;
$rgdo += $key->regdo;
$rgta += $key->regta;
$gofood += $key->gofood;
$grab += $key->grab;
$shopee += $key->shopee;
$nppn += $key->nppn;
                        
                    } } if($jcetak=='RG') {
                    if(($key->reg+$key->regdo+$key->regta)>0) { 
                ?>
                  <tr>
                  <td align="center"><?php echo $no++ ?></td>
                  <td><?php echo $key->no_faktur_penjualan ?></td>
				  <td><?php echo $key->tgl_penjualan ?></td>
                  <td><?php echo $key->waktu ?></td>
                  <td align="right"><?php echo number_format($key->total_penjualan, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->diskon, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->nppn, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->ongkir, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->total_penjualan_sdiskon, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->reg, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->regdo, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->regta, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->gofood, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->grab, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->shopee, 0, ',', '.') ?></td>
                  <td><?php echo $key->id_user ?></td>
                  
                  <td>  
                       <?php if($key->stwa=='Gagal') { ?>
                           <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editnomorwa" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                                data-stat="<?php echo $key->stwa ?>"
                                data-nowa="<?php echo $key->notelp ?>"
								><font color='red'><?php echo $key->stwa ?> </font></button>
                       
                            
                    <?php } if($key->stwa=='Terkirim') { ?>
                            <font color='blue'><?php echo $key->stwa ?> </font>
                    <?php } if($key->stwa=='Print') { ?>                       
                            <font ><?php echo $key->stwa ?> </font>
                    <?php } ?>        
                            
                    </td>
                    <td>
                            	<form target="printstruk" id="formCetakStruk" class="form-inline" action="<?php echo base_url('kasir/cetak-struk1/') ?>" onsubmit="window.location('about:blank','printstruk','width=500,height=400');" method="post">
										<input type="hidden" name="sum_print" id="sum_print" value="<?php echo $key->total_penjualan_sdiskon ?>">
										<input type="hidden" name="diskon_print" id="diskon_print" value="<?php echo $key->diskon ?>">
										<input type="hidden" name="nofak_print" id="nofak_print" value="<?php echo $key->no_faktur_penjualan ?>">
										<input type="hidden" name="debet_print" id="debet_print" value="0">
										<input type="hidden" name="bank_print" id="bank_print">
										<button onclick="newTransaksi();" type="submit" id="btnCetakStruk"  style="width:75px;height:25px; text-align: center;" >PRINT</button>
									</form>
									
                  </td>
                     <td>
                        <?php if($key->kdharga =='KH01') { ?>
								 <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editbatalreg" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
								data-kdharga="<?php echo $key->kdharga ?>"
                                data-keter="<?php echo $key->keter ?>"
                                data-jnsbayar="<?php echo $key->jbayar ?>"
                                data-stat="<?php echo $key->selesai ?>"
                                data-note="<?php echo $key->jbayar ?>"
								><font color='green'>Batal</font></button>
						<?php } else  { ?>
						       <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editbatalojol" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
								data-kdharga="<?php echo $key->kdharga ?>"
                                data-keter="<?php echo $key->keter ?>"
                                data-jnsbayar="<?php echo $key->jbayar ?>"
                                data-stat="<?php echo $key->selesai ?>"
                                data-note="<?php echo $key->jbayar ?>"
								><font color='blue'>Batal</font></button>
						<?php } ?>			
                  </td>
                  <td>
                      <?php if($key->kdharga =='KH01') { ?>
                            <button style="width:75px;height:25px; text-align: center;"><a  href="javascript:void(0);" class="editbayar" 
                            data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                            data-kdharga="<?php echo $key->kdharga ?>"
                            data-keter="<?php echo $key->keter ?>"
                            data-jnsbayar="<?php echo $key->jbayar ?>"
                            >Edit</a></button>	
                    <?php } else  { ?>
						       <button style="width:75px;height:25px; text-align: center;"><a  href="javascript:void(0);" class="editbayarojol" 
                            data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                            data-kdharga="<?php echo $key->kdharga ?>"
                            data-keter="<?php echo $key->keter ?>"
                            data-jnsbayar="<?php echo $key->jbayar ?>"
                            ><font color='blue'>Edit</font></a></button>	
						<?php } ?>			        
                  </td>
                </tr>
                <?php
                $subtot += $key->total_penjualan;
$diskon += $key->diskon;
$grandtot += $key->total_penjualan_sdiskon;
$ongkir += $key->ongkir;
$rg += $key->reg;
$rgdo += $key->regdo;
$rgta += $key->regta;
$gofood += $key->gofood;
$grab += $key->grab;
$shopee += $key->shopee;
$nppn += $key->nppn;
        
                } } if($jcetak=='TN') {
                    if($key->jnsbayar=='1') { 
                ?>
                  <tr>
                  <td align="center"><?php echo $no++ ?></td>
                  <td><?php echo $key->no_faktur_penjualan ?></td>
				  <td><?php echo $key->tgl_penjualan ?></td>
                  <td><?php echo $key->waktu ?></td>
                  <td align="right"><?php echo number_format($key->total_penjualan, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->diskon, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->nppn, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->ongkir, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->total_penjualan_sdiskon, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->reg, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->regdo, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->regta, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->gofood, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->grab, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->shopee, 0, ',', '.') ?></td>
                  <td><?php echo $key->id_user ?></td>
                  
                  <td>  
                       <?php if($key->stwa=='Gagal') { ?>
                           <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editnomorwa" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                                data-stat="<?php echo $key->stwa ?>"
                                data-nowa="<?php echo $key->notelp ?>"
								><font color='red'><?php echo $key->stwa ?> </font></button>
                       
                            
                    <?php } if($key->stwa=='Terkirim') { ?>
                            <font color='blue'><?php echo $key->stwa ?> </font>
                    <?php } if($key->stwa=='Print') { ?>                       
                            <font ><?php echo $key->stwa ?> </font>
                    <?php } ?>        
                            
                    </td>
                    <td>
                            	<form target="printstruk" id="formCetakStruk" class="form-inline" action="<?php echo base_url('kasir/cetak-struk1/') ?>" onsubmit="window.location('about:blank','printstruk','width=500,height=400');" method="post">
										<input type="hidden" name="sum_print" id="sum_print" value="<?php echo $key->total_penjualan_sdiskon ?>">
										<input type="hidden" name="diskon_print" id="diskon_print" value="<?php echo $key->diskon ?>">
										<input type="hidden" name="nofak_print" id="nofak_print" value="<?php echo $key->no_faktur_penjualan ?>">
										<input type="hidden" name="debet_print" id="debet_print" value="0">
										<input type="hidden" name="bank_print" id="bank_print">
										<button onclick="newTransaksi();" type="submit" id="btnCetakStruk"  style="width:75px;height:25px; text-align: center;" >PRINT</button>
									</form>
									
                  </td>
                     <td>
                        <?php if($key->kdharga =='KH01') { ?>
								 <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editbatalreg" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
								data-kdharga="<?php echo $key->kdharga ?>"
                                data-keter="<?php echo $key->keter ?>"
                                data-jnsbayar="<?php echo $key->jbayar ?>"
                                data-stat="<?php echo $key->selesai ?>"
                                data-note="<?php echo $key->jbayar ?>"
								><font color='green'>Batal</font></button>
						<?php } else  { ?>
						       <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editbatalojol" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
								data-kdharga="<?php echo $key->kdharga ?>"
                                data-keter="<?php echo $key->keter ?>"
                                data-jnsbayar="<?php echo $key->jbayar ?>"
                                data-stat="<?php echo $key->selesai ?>"
                                data-note="<?php echo $key->jbayar ?>"
								><font color='blue'>Batal</font></button>
						<?php } ?>			
                  </td>
                  <td>
                      <?php if($key->kdharga =='KH01') { ?>
                            <button style="width:75px;height:25px; text-align: center;"><a  href="javascript:void(0);" class="editbayar" 
                            data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                            data-kdharga="<?php echo $key->kdharga ?>"
                            data-keter="<?php echo $key->keter ?>"
                            data-jnsbayar="<?php echo $key->jbayar ?>"
                            >Edit</a></button>	
                    <?php } else  { ?>
						       <button style="width:75px;height:25px; text-align: center;"><a  href="javascript:void(0);" class="editbayarojol" 
                            data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                            data-kdharga="<?php echo $key->kdharga ?>"
                            data-keter="<?php echo $key->keter ?>"
                            data-jnsbayar="<?php echo $key->jbayar ?>"
                            ><font color='blue'>Edit</font></a></button>	
						<?php } ?>			        
                  </td>
                </tr>
                <?php
                $subtot += $key->total_penjualan;
$diskon += $key->diskon;
$grandtot += $key->total_penjualan_sdiskon;
$ongkir += $key->ongkir;
$rg += $key->reg;
$rgdo += $key->regdo;
$rgta += $key->regta;
$gofood += $key->gofood;
$grab += $key->grab;
$shopee += $key->shopee;
$nppn += $key->nppn;
                
                    } } if($jcetak=='SPAY') {
                    if($key->jnsbayar=='5') { 
                ?>
                  <tr>
                  <td align="center"><?php echo $no++ ?></td>
                  <td><?php echo $key->no_faktur_penjualan ?></td>
				  <td><?php echo $key->tgl_penjualan ?></td>
                  <td><?php echo $key->waktu ?></td>
                  <td align="right"><?php echo number_format($key->total_penjualan, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->diskon, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->nppn, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->ongkir, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->total_penjualan_sdiskon, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->reg, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->regdo, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->regta, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->gofood, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->grab, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->shopee, 0, ',', '.') ?></td>
                  <td><?php echo $key->id_user ?></td>
                  
                  <td>  
                       <?php if($key->stwa=='Gagal') { ?>
                           <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editnomorwa" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                                data-stat="<?php echo $key->stwa ?>"
                                data-nowa="<?php echo $key->notelp ?>"
								><font color='red'><?php echo $key->stwa ?> </font></button>
                       
                            
                    <?php } if($key->stwa=='Terkirim') { ?>
                            <font color='blue'><?php echo $key->stwa ?> </font>
                    <?php } if($key->stwa=='Print') { ?>                       
                            <font ><?php echo $key->stwa ?> </font>
                    <?php } ?>        
                            
                    </td>
                    <td>
                            	<form target="printstruk" id="formCetakStruk" class="form-inline" action="<?php echo base_url('kasir/cetak-struk1/') ?>" onsubmit="window.location('about:blank','printstruk','width=500,height=400');" method="post">
										<input type="hidden" name="sum_print" id="sum_print" value="<?php echo $key->total_penjualan_sdiskon ?>">
										<input type="hidden" name="diskon_print" id="diskon_print" value="<?php echo $key->diskon ?>">
										<input type="hidden" name="nofak_print" id="nofak_print" value="<?php echo $key->no_faktur_penjualan ?>">
										<input type="hidden" name="debet_print" id="debet_print" value="0">
										<input type="hidden" name="bank_print" id="bank_print">
										<button onclick="newTransaksi();" type="submit" id="btnCetakStruk"  style="width:75px;height:25px; text-align: center;" >PRINT</button>
									</form>
									
                  </td>
                     <td>
                        <?php if($key->kdharga =='KH01') { ?>
								 <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editbatalreg" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
								data-kdharga="<?php echo $key->kdharga ?>"
                                data-keter="<?php echo $key->keter ?>"
                                data-jnsbayar="<?php echo $key->jbayar ?>"
                                data-stat="<?php echo $key->selesai ?>"
                                data-note="<?php echo $key->jbayar ?>"
								><font color='green'>Batal</font></button>
						<?php } else  { ?>
						       <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editbatalojol" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
								data-kdharga="<?php echo $key->kdharga ?>"
                                data-keter="<?php echo $key->keter ?>"
                                data-jnsbayar="<?php echo $key->jbayar ?>"
                                data-stat="<?php echo $key->selesai ?>"
                                data-note="<?php echo $key->jbayar ?>"
								><font color='blue'>Batal</font></button>
						<?php } ?>			
                  </td>
                  <td>
                      <?php if($key->kdharga =='KH01') { ?>
                            <button style="width:75px;height:25px; text-align: center;"><a  href="javascript:void(0);" class="editbayar" 
                            data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                            data-kdharga="<?php echo $key->kdharga ?>"
                            data-keter="<?php echo $key->keter ?>"
                            data-jnsbayar="<?php echo $key->jbayar ?>"
                            >Edit</a></button>	
                    <?php } else  { ?>
						       <button style="width:75px;height:25px; text-align: center;"><a  href="javascript:void(0);" class="editbayarojol" 
                            data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                            data-kdharga="<?php echo $key->kdharga ?>"
                            data-keter="<?php echo $key->keter ?>"
                            data-jnsbayar="<?php echo $key->jbayar ?>"
                            ><font color='blue'>Edit</font></a></button>	
						<?php } ?>			        
                  </td>
                </tr>
                <?php
                $subtot += $key->total_penjualan;
$diskon += $key->diskon;
$grandtot += $key->total_penjualan_sdiskon;
$ongkir += $key->ongkir;
$rg += $key->reg;
$rgdo += $key->regdo;
$rgta += $key->regta;
$gofood += $key->gofood;
$grab += $key->grab;
$shopee += $key->shopee;
$nppn += $key->nppn;
                        
                
              } } if($jcetak=='OVO') {
                    if($key->jnsbayar=='7') { 
                ?>
                  <tr>
                  <td align="center"><?php echo $no++ ?></td>
                  <td><?php echo $key->no_faktur_penjualan ?></td>
				  <td><?php echo $key->tgl_penjualan ?></td>
                  <td><?php echo $key->waktu ?></td>
                  <td align="right"><?php echo number_format($key->total_penjualan, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->diskon, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->nppn, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->ongkir, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->total_penjualan_sdiskon, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->reg, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->regdo, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->regta, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->gofood, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->grab, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->shopee, 0, ',', '.') ?></td>
                  <td><?php echo $key->id_user ?></td>
                  
                  <td>  
                       <?php if($key->stwa=='Gagal') { ?>
                           <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editnomorwa" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                                data-stat="<?php echo $key->stwa ?>"
                                data-nowa="<?php echo $key->notelp ?>"
								><font color='red'><?php echo $key->stwa ?> </font></button>
                       
                            
                    <?php } if($key->stwa=='Terkirim') { ?>
                            <font color='blue'><?php echo $key->stwa ?> </font>
                    <?php } if($key->stwa=='Print') { ?>                       
                            <font ><?php echo $key->stwa ?> </font>
                    <?php } ?>        
                            
                    </td>
                    <td>
                            	<form target="printstruk" id="formCetakStruk" class="form-inline" action="<?php echo base_url('kasir/cetak-struk1/') ?>" onsubmit="window.location('about:blank','printstruk','width=500,height=400');" method="post">
										<input type="hidden" name="sum_print" id="sum_print" value="<?php echo $key->total_penjualan_sdiskon ?>">
										<input type="hidden" name="diskon_print" id="diskon_print" value="<?php echo $key->diskon ?>">
										<input type="hidden" name="nofak_print" id="nofak_print" value="<?php echo $key->no_faktur_penjualan ?>">
										<input type="hidden" name="debet_print" id="debet_print" value="0">
										<input type="hidden" name="bank_print" id="bank_print">
										<button onclick="newTransaksi();" type="submit" id="btnCetakStruk"  style="width:75px;height:25px; text-align: center;" >PRINT</button>
									</form>
									
                  </td>
                     <td>
                        <?php if($key->kdharga =='KH01') { ?>
								 <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editbatalreg" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
								data-kdharga="<?php echo $key->kdharga ?>"
                                data-keter="<?php echo $key->keter ?>"
                                data-jnsbayar="<?php echo $key->jbayar ?>"
                                data-stat="<?php echo $key->selesai ?>"
                                data-note="<?php echo $key->jbayar ?>"
								><font color='green'>Batal</font></button>
						<?php } else  { ?>
						       <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editbatalojol" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
								data-kdharga="<?php echo $key->kdharga ?>"
                                data-keter="<?php echo $key->keter ?>"
                                data-jnsbayar="<?php echo $key->jbayar ?>"
                                data-stat="<?php echo $key->selesai ?>"
                                data-note="<?php echo $key->jbayar ?>"
								><font color='blue'>Batal</font></button>
						<?php } ?>			
                  </td>
                  <td>
                      <?php if($key->kdharga =='KH01') { ?>
                            <button style="width:75px;height:25px; text-align: center;"><a  href="javascript:void(0);" class="editbayar" 
                            data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                            data-kdharga="<?php echo $key->kdharga ?>"
                            data-keter="<?php echo $key->keter ?>"
                            data-jnsbayar="<?php echo $key->jbayar ?>"
                            >Edit</a></button>	
                    <?php } else  { ?>
						       <button style="width:75px;height:25px; text-align: center;"><a  href="javascript:void(0);" class="editbayarojol" 
                            data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                            data-kdharga="<?php echo $key->kdharga ?>"
                            data-keter="<?php echo $key->keter ?>"
                            data-jnsbayar="<?php echo $key->jbayar ?>"
                            ><font color='blue'>Edit</font></a></button>	
						<?php } ?>			        
                  </td>
                </tr>
                <?php
                $subtot += $key->total_penjualan;
$diskon += $key->diskon;
$grandtot += $key->total_penjualan_sdiskon;
$ongkir += $key->ongkir;
$rg += $key->reg;
$rgdo += $key->regdo;
$rgta += $key->regta;
$gofood += $key->gofood;
$grab += $key->grab;
$shopee += $key->shopee;
$nppn += $key->nppn;
                    } } if($jcetak=='QR') {
                    if($key->jnsbayar=='8') { 
                ?>
                  <tr>
                  <td align="center"><?php echo $no++ ?></td>
                  <td><?php echo $key->no_faktur_penjualan ?></td>
				  <td><?php echo $key->tgl_penjualan ?></td>
                  <td><?php echo $key->waktu ?></td>
                  <td align="right"><?php echo number_format($key->total_penjualan, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->diskon, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->nppn, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->ongkir, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->total_penjualan_sdiskon, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->reg, 0, ',', '.') ?></td>
                  <td align="right"><?php echo number_format($key->regdo, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->regta, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->gofood, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->grab, 0, ',', '.') ?></td>
				  <td align="right"><?php echo number_format($key->shopee, 0, ',', '.') ?></td>
                  <td><?php echo $key->id_user ?></td>
                  
                  <td>  
                       <?php if($key->stwa=='Gagal') { ?>
                           <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editnomorwa" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                                data-stat="<?php echo $key->stwa ?>"
                                data-nowa="<?php echo $key->notelp ?>"
								><font color='red'><?php echo $key->stwa ?> </font></button>
                       
                            
                    <?php } if($key->stwa=='Terkirim') { ?>
                            <font color='blue'><?php echo $key->stwa ?> </font>
                    <?php } if($key->stwa=='Print') { ?>                       
                            <font ><?php echo $key->stwa ?> </font>
                    <?php } ?>        
                            
                    </td>
                    <td>
                            	<form target="printstruk" id="formCetakStruk" class="form-inline" action="<?php echo base_url('kasir/cetak-struk1/') ?>" onsubmit="window.location('about:blank','printstruk','width=500,height=400');" method="post">
										<input type="hidden" name="sum_print" id="sum_print" value="<?php echo $key->total_penjualan_sdiskon ?>">
										<input type="hidden" name="diskon_print" id="diskon_print" value="<?php echo $key->diskon ?>">
										<input type="hidden" name="nofak_print" id="nofak_print" value="<?php echo $key->no_faktur_penjualan ?>">
										<input type="hidden" name="debet_print" id="debet_print" value="0">
										<input type="hidden" name="bank_print" id="bank_print">
										<button onclick="newTransaksi();" type="submit" id="btnCetakStruk"  style="width:75px;height:25px; text-align: center;" >PRINT</button>
									</form>
									
                  </td>
                     <td>
                        <?php if($key->kdharga =='KH01') { ?>
								 <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editbatalreg" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
								data-kdharga="<?php echo $key->kdharga ?>"
                                data-keter="<?php echo $key->keter ?>"
                                data-jnsbayar="<?php echo $key->jbayar ?>"
                                data-stat="<?php echo $key->selesai ?>"
                                data-note="<?php echo $key->jbayar ?>"
								><font color='green'>Batal</font></button>
						<?php } else  { ?>
						       <button style="width:75px;height:25px; text-align: center;"   href="javascript:void(0);" class="editbatalojol" 
								data-faktur="<?php echo $key->no_faktur_penjualan ?>"
								data-kdharga="<?php echo $key->kdharga ?>"
                                data-keter="<?php echo $key->keter ?>"
                                data-jnsbayar="<?php echo $key->jbayar ?>"
                                data-stat="<?php echo $key->selesai ?>"
                                data-note="<?php echo $key->jbayar ?>"
								><font color='blue'>Batal</font></button>
						<?php } ?>			
                  </td>
                  <td>
                      <?php if($key->kdharga =='KH01') { ?>
                            <button style="width:75px;height:25px; text-align: center;"><a  href="javascript:void(0);" class="editbayar" 
                            data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                            data-kdharga="<?php echo $key->kdharga ?>"
                            data-keter="<?php echo $key->keter ?>"
                            data-jnsbayar="<?php echo $key->jbayar ?>"
                            >Edit</a></button>	
                    <?php } else  { ?>
						       <button style="width:75px;height:25px; text-align: center;"><a  href="javascript:void(0);" class="editbayarojol" 
                            data-faktur="<?php echo $key->no_faktur_penjualan ?>"
                            data-kdharga="<?php echo $key->kdharga ?>"
                            data-keter="<?php echo $key->keter ?>"
                            data-jnsbayar="<?php echo $key->jbayar ?>"
                            ><font color='blue'>Edit</font></a></button>	
						<?php } ?>			        
                  </td>
                </tr>
                <?php
                $subtot += $key->total_penjualan;
$diskon += $key->diskon;
$grandtot += $key->total_penjualan_sdiskon;
$ongkir += $key->ongkir;
$rg += $key->reg;
$rgdo += $key->regdo;
$rgta += $key->regta;
$gofood += $key->gofood;
$grab += $key->grab;
$shopee += $key->shopee;
$nppn += $key->nppn;
                } } ?>
                <?php endforeach?>
                
                
              </tbody>
                  <thead>
                    <tr>
						<td colspan="4" align="center">Total Penjualan</td>
						<td align="right"><?php echo number_format($subtot, 0, ',', '.') ?></td>
						<td align="right"><?php echo number_format($diskon, 0, ',', '.') ?></td>
						<td align="right"><?php echo number_format($nppn, 0, ',', '.') ?></td>
						<td align="right"><?php echo number_format($ongkir, 0, ',', '.') ?></td>
						<td align="right"><?php echo number_format($grandtot, 0, ',', '.') ?></td>
						<td align="right"><?php echo number_format($rg, 0, ',', '.') ?></td>
						<td align="right"><?php echo number_format($rgdo, 0, ',', '.') ?></td>
						<td align="right"><?php echo number_format($rgta, 0, ',', '.') ?></td>
						<td align="right"><?php echo number_format($gofood, 0, ',', '.') ?></td>
						<td align="right"><?php echo number_format($grab, 0, ',', '.') ?></td>
						<td align="right"><?php echo number_format($shopee, 0, ',', '.') ?></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                  </thead>
            </table>
        
     <!-- CONTENT-WRAPPER SECTION END-->
    <section id="gradient11" class="footer-section">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                   &copy; Copyright <?php echo date('Y') ?>, <a href="enambelasapp.my.id" target="_blank">Mandiri</a>
                </div>
            </div>
        </div>
    </section>
  
 
<div  class="modal fade modalKecil" tabindex="-1" role="dialog" id="modalEdit" aria-hidden="true">
  <div class="modal-dialog modal-sm">
 
    <div class="modal-content">
      <div class="modal-header" align='center'>
        <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_token1/')?>" method="post">
            <div class="form-group">
                <tr>
                    <td><label  class="control-label " for="token">Nota</label></td>
                    <td><input style="width:80%;height:45px;" type="text" class="form-control" id="nobuk" name="nobuk" readonly></td>
                </tr>
                <tr>
                    <td><label  class="control-label " for="token">Kode Token</label></td>
                    <td><input style="width:80%;height:45px;" type="text" class="form-control" id="token" name="token"  value='<?php echo $token ?>' readonly></td>
                </tr>
                <tr>
                    <td><label class="control-label " for="idtoken">Password</label></td>
                    <td><input style="width:80%;height:45px;"  type="number" class="form-control" id="idtoken" name="idtoken" required ></td>
                </tr>
                <tr>
                    <td><label class="control-label " for="note">Catatan</label></td>
                    <td><input style="width:80%;height:45px;" type="text" class="form-control" id="note" name="note" required ></td>
                </tr>    
                <tr><td></td></tr>
        </div>
        <div class="modal-footer">
		 <input type="hidden" name="nobuk" id="nobuk" >
          <button type="button" class="btn btn-default;text-align:'left';" data-dismiss="modal">Close</button>
          <button type="submit" id="btnSimpan" class="btn btn-primary ;text-align:'right';">Simpan</button>
        </div>
        </form>
    </div>
 
  </div>
</div> 
</div>    

<div  class="modal fade modalKecil" tabindex="-1" role="dialog" id="modalEditbayar" aria-hidden="true">
  <div class="modal-dialog modal-md">
 
    <div class="modal-content">
      <div class="modal-header" align='center'>
        <h4><font color='red'><b>EDIT TYPE PEMBAYARAN</b></font></h4>
		
      </div>
        <div class="modal-body" align='center' >
          <form  class="form-horizontal" action="<?php echo base_url('kasir/kode_editbayar/')?>" method="post">
            <div class="form-group">
                <tr>
                    <td ><label align='left' class="control-label;text-align:'left' " for="nobuk">Nota</label></td>
                    <td><input style="width:80%;height:45px;" type="text" class="form-control" id="nobuk" name="nobuk" readonly></td>
                </tr>
                <tr>
                    <td align='left'><label  align='left' class="control-label;text-align:'left' " for="keter">Jenis</label></td>
                    <td><input style="width:80%;height:45px;" type="text" class="form-control" id="keter" name="keter"  readonly></td>
                </tr>
                <tr>
                    <td align='left'><label align='left' class="control-label;text-align:'left' " for="bayar">Jenis Bayar</label></td>
                    <td><input style="width:80%;height:45px;"  type="text" class="form-control" id="bayar" name="bayar" readonly ></td>
                </tr>
                <tr>
                    <td align='left'><label align='left' class="control-label;text-align:'left' " for="bayarnew">Ganti Jenis Bayar</label></td>
                    <td>
							<select class="form-control" style="width:80%;height:45px;" name="bayarnew" id="bayarnew" required>
								<option height='45px' value="">Jenis Pembayaran</option>
								<option <?php {echo 'selected';}?> value="1">Cash</option>
								<option <?php {echo 'selected';}?> value="2">Debet</option>
								<option <?php {echo 'selected';}?> value="3">Gopay</option>
								<option <?php {echo 'selected';}?> value="7">OVO</option>
								<option <?php {echo 'selected';}?> value="5">Shopeepay</option>
								<option <?php {echo 'selected';}?> value="8">Q-Ris</option>
							</select>
						</td>
                </tr>    
                <tr><td></td></tr>
        </div>
        <div class="modal-footer">
		 <input type="hidden" name="nobuk" id="nobuk" >
          <button type="button" class="btn btn-default;text-align:'left';" data-dismiss="modal">Close</button>
          <button type="submit" id="btnSimpan" class="btn btn-primary ;text-align:'right';">Simpan</button>
        </div>
        </form>
    </div>
 
  </div>
</div> 
</div>    
<div  class="modal fade modalKecil" tabindex="-1" role="dialog" id="modalEditbayarojol" aria-hidden="true">
  <div class="modal-dialog modal-md">
 
    <div class="modal-content">
      <div class="modal-header" align='center'>
        <h4><font color='red'><b>EDIT JENIS TRANSAKSI</b></font></h4>
		
      </div>
        <div class="modal-body" align='center' >
          <form  class="form-horizontal" action="<?php echo base_url('kasir/kode_editbayarojol/')?>" method="post">
            <div class="form-group">
                <tr>
                    <td ><label align='left' class="control-label;text-align:'left' " for="nobuk">Nota</label></td>
                    <td><input style="width:80%;height:45px;" type="text" class="form-control" id="nobuk" name="nobuk" readonly></td>
                </tr>
                <tr>
                    <td align='left'><label  align='left' class="control-label;text-align:'left' " for="keter">Jenis Transaksi</label></td>
                    <td><input style="width:80%;height:45px;" type="text" class="form-control" id="keter" name="keter"  readonly></td>
                </tr>
                <tr>
                    <td align='left'><label align='left' class="control-label;text-align:'left' " for="bayar">Jenis Bayar</label></td>
                    <td><input style="width:80%;height:45px;"  type="text" class="form-control" id="bayar" name="bayar" readonly ></td>
                </tr>
                <tr>
                    <td align='left'><label align='left' class="control-label;text-align:'left' " for="bayarnew">Jenis Transaksi Baru</label></td>
                    <td>
							<select class="form-control" style="width:80%;height:45px;" name="bayarnew" id="bayarnew" required>
								<option height='45px' value="">Jenis Transaksi</option>
								<option <?php {echo 'selected';}?> value="KH02">Gofood</option>
								<option <?php {echo 'selected';}?> value="KH03">Grabfood</option>
								<option <?php {echo 'selected';}?> value="KH04">Shopeefood</option>
							</select>
						</td>
                </tr>    
                <tr><td></td></tr>
        </div>
        <div class="modal-footer">
		 <input type="hidden" name="nobuk" id="nobuk" >
          <button type="button" class="btn btn-default;text-align:'left';" data-dismiss="modal">Close</button>
          <button type="submit" id="btnSimpan" class="btn btn-primary ;text-align:'right';">Simpan</button>
        </div>
        </form>
    </div>
 
  </div>
</div> 
</div>    
       
<div  class="modal fade modalKecil" tabindex="-1" role="dialog" id="modalEditbatalojol" aria-hidden="true">
  <div class="modal-dialog modal-md">
 
    <div class="modal-content">
      <div class="modal-header" align='center'>
        <h4><font color='red'><b>EDIT STATUS TRANSAKSI</b></font></h4>
		
      </div>
        <div class="modal-body" align='center' >
          <form  class="form-horizontal" action="<?php echo base_url('kasir/kode_editbatalojol/')?>" method="post">
            <div class="form-group">
                <tr>
                    <td ><label align='left' class="control-label;text-align:'left' " for="nobuk">Nota</label></td>
                    <td><input style="width:80%;height:45px;" type="text" class="form-control" id="nobuk" name="nobuk" readonly></td>
                </tr>
                <tr>
                    <td align='left'><label  align='left' class="control-label;text-align:'left' " for="keter">Jenis Transaksi</label></td>
                    <td><input style="width:80%;height:45px;" type="text" class="form-control" id="keter" name="keter"  readonly></td>
                </tr>
                <tr>
                    <td align='left'><label align='left' class="control-label;text-align:'left' " for="bayar">Jenis Bayar</label></td>
                    <td><input style="width:80%;height:45px;"  type="text" class="form-control" id="bayar" name="bayar" readonly ></td>
                </tr>
                <tr>
                    <td align='left'><label align='left' class="control-label;text-align:'left' " for="stat">Status</label></td>
                    <td><input style="width:80%;height:45px;"  type="text" class="form-control" id="stat" name="stat" readonly ></td>
                </tr>
                <tr>
                    <td align='left'><label align='left' class="control-label;text-align:'left' " for="statusnew">Status Baru</label></td>
                    <td>
							<select class="form-control" style="width:80%;height:45px;" name="statusnew" id="statusnew" required>
								<option height='45px' value="">Jenis Status</option>
								<option <?php {echo 'selected';}?> value="3">Pending</option>
								<option <?php {echo 'selected';}?> value="4">Batal</option>
							</select>
					</td>
                </tr>    
                <tr>
                    <td align='left'><label align='left' class="control-label;text-align:'left' " for="note">Keterangan</label></td>
                    <td><input style="width:80%;height:45px;"  type="text" class="form-control" id="note" name="note" required ></td> 
					
                </tr>    
                <tr><td></td></tr>
        </div>
        <div class="modal-footer">
		 <input type="hidden" name="nobuk" id="nobuk" >
          <button type="button" class="btn btn-default;text-align:'left';" data-dismiss="modal">Close</button>
          <button type="submit" id="btnSimpan" class="btn btn-primary ;text-align:'right';">Simpan</button>
        </div>
        </form>
    </div>
 
  </div>
</div> 
</div>    
 
<div  class="modal fade modalKecil" tabindex="-1" role="dialog" id="modalEditreg" aria-hidden="true">
  <div class="modal-dialog modal-md">
 
    <div class="modal-content">
      <div class="modal-header" align='center'>
        <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)*130593));
			if ($detik>0) $token=((($tgl*$jam*$detik)*130593));
		?>
		
      </div>
        <div class="modal-body" align='center' >
          <form  class="form-horizontal" action="<?php echo base_url('kasir/kode_editbatalreg/')?>" method="post">
            <div class="form-group">
                <tr>
                    <td><label  align='left' class="control-label;text-align:'left' "  for="token">Nota</label></td>
                    <td><input style="width:80%;height:45px;" type="text" class="form-control" id="nobuk" name="nobuk" readonly></td>
                </tr>
                <tr>
                    <td><label  align='left' class="control-label;text-align:'left' " for="token">Kode Token</label></td>
                    <td><input style="width:80%;height:45px;" type="text" class="form-control" id="token" name="token"  value='<?php echo $token ?>' readonly></td>
                </tr>
                <tr>
                    <td><label align='left' class="control-label;text-align:'left' " for="idtoken">Password</label></td>
                    <td><input style="width:80%;height:45px;"  type="number" class="form-control" id="idtoken" name="idtoken" required ></td>
                </tr>
                <tr>
                    <td><label align='left' class="control-label;text-align:'left' " for="note">Acc</label></td>
                    <td><input style="width:80%;height:45px;" type="text" class="form-control" id="acc" name="acc" required ></td>
                </tr>  
                <tr>
                    <td><label align='left' class="control-label;text-align:'left' " for="note">Catatan</label></td>
                    <td><input style="width:80%;height:45px;" type="text" class="form-control" id="note" name="note" required ></td>
                </tr>    
                <tr><td></td></tr>
        </div>
        <div class="modal-footer">
		 <input type="hidden" name="nobuk" id="nobuk" >
          <button type="button" class="btn btn-default;text-align:'left';" data-dismiss="modal">Close</button>
          <button type="submit" id="btnSimpan" class="btn btn-primary ;text-align:'right';">Simpan</button>
        </div>
        </form>
    </div>
 
  </div>
</div> 
</div>      
       
<div  class="modal fade modalKecil" tabindex="-1" role="dialog" id="modalEditnomorwa" aria-hidden="true">
  <div class="modal-dialog modal-md">
 
    <div class="modal-content">
      <div class="modal-header" align='center'>
        <h4><font color='red'><b>EDIT NOMOR WA</b></font></h4>
        
        
      </div>
        <div class="modal-body" align='center' >
           <form target="printstruk" id="formCetakStruk" class="form-horizontal" action="<?php echo base_url('kasir/cetak-struk2/') ?>" onsubmit="window.location('about:blank','printstruk','width=500,height=400');" method="post">
            <div class="form-group">
                <tr>
                    <td ><label align='left' class="control-label;text-align:'left' " for="nobuk">Nota</label></td>
                    <td><input style="width:80%;height:45px;" type="text" class="form-control" id="nobuk" name="nobuk" readonly></td>
                </tr>
                <tr>
                    <td align='left'><label align='left' class="control-label;text-align:'left' " for="nowa">No Wa</label></td>
                    <td><input style="width:80%;height:45px;"  type="text" class="form-control" id="nowa" name="nowa" readonly ></td>
                </tr>
                <tr>
                    <td align='left'><label align='left' class="control-label;text-align:'left' " for="stat">Status</label></td>
                    <td><input style="width:80%;height:45px;"  type="text" class="form-control" id="stat" name="stat" readonly ></td>
                </tr>
                <tr>
                    <td align='left'><label align='left' class="control-label;text-align:'left' " for="nowanew">No Wa Baru</label></td>
                    <td><input style="width:80%;height:45px;"  type="text" class="form-control" id="nowanew" name="nowanew"  ></td>
                </tr>    
                <tr><td></td></tr>
        </div>
        <div class="modal-footer">
		    <input type="hidden" name="nobuk" id="nobuk" >
          <button type="button" class="btn btn-default;text-align:'left';" style="width:75px;height:35px; text-align: center;" data-dismiss="modal">Close</button>
          <button onclick="newTransaksi();" type="submit" id="btnCetakStruk" class="btn btn-primary ;text-align:'right';" style="width:75px;height:35px; text-align: center;" >Kirim</button>
          
        </div>
        </form>
    </div>
 
  </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/dataTables.buttons.min.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/buttons.flash.min.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/jszip.min.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/pdfmake.min.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/vfs_fonts.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/buttons.html5.min.js"></script>
    <script src="<?php echo base_url() ?>/assets/js/buttons.print.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>
      $('#tbPenjualan').DataTable({
          "paging":   false,
          "ordering": false,
          "info":     false,
          "searching":     false,
          "dom": 'Bfrtip',
          "buttons": [
            'copy', 'csv', 'pdf', 'print','excel'
        ]
      });
      $('form').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);
      
      $('#btnCetakStruk').on('click',function(e){
            var belanja = $('#sum_belanja').val();
            var cash = $('#cash_print').val();
            var debet = $('#debet_print').val();
            var kembali = (Number(cash)+Number(debet))-Number(belanja);
           
              $('#formCetakStruk').submit(function() {
                    window.open('about:blank','printstruk','width=500,height=400');
                    this.target = 'printstruk';
                   ;
                    
              });
        });
   
    $('#tbPenjualan').on('click','.lihat_record',function(){
        var faktur = $(this).data('faktur');
        var url = "<?php echo base_url('kasir/cetak_struk1/') ?>"+faktur;
        window.open(url, '_blank', 'location=yes,height=400,width=500,scrollbars=yes,status=yes');
    });
    $('#tbPenjualan').on('click','.retur',function(){
        var faktur = $(this).data('faktur');
        
        $('#modalEdit').modal('show').val(faktur);
        $('[name="nobuk"]').val(faktur);
        
    });
     $('#tbPenjualan').on('click','.editbayar',function(){
        var faktur = $(this).data('faktur');
        var kdharga = $(this).data('kdharga');
        var keter = $(this).data('keter');
        var jnsbayar = $(this).data('jnsbayar');
        $('#modalEditbayar').modal('show').val(faktur);
        $('[name="nobuk"]').val(faktur);
        $('[name="kdharga"]').val(kdharga);
        $('[name="keter"]').val(keter);
        $('[name="bayar"]').val(jnsbayar);
        
    });
     $('#tbPenjualan').on('click','.editbayarojol',function(){
        var faktur = $(this).data('faktur');
        var kdharga = $(this).data('kdharga');
        var keter = $(this).data('keter');
        var jnsbayar = $(this).data('jnsbayar');
        $('#modalEditbayarojol').modal('show').val(faktur);
        $('[name="nobuk"]').val(faktur);
        $('[name="kdharga"]').val(kdharga);
        $('[name="keter"]').val(keter);
        $('[name="bayar"]').val(jnsbayar);
        
    });
     $('#tbPenjualan').on('click','.editbatalojol',function(){
        var faktur = $(this).data('faktur');
        var kdharga = $(this).data('kdharga');
        var keter = $(this).data('keter');
        var jnsbayar = $(this).data('jnsbayar');
        var stat = $(this).data('stat');
        $('#modalEditbatalojol').modal('show').val(faktur);
        $('[name="nobuk"]').val(faktur);
        $('[name="kdharga"]').val(kdharga);
        $('[name="keter"]').val(keter);
        $('[name="bayar"]').val(jnsbayar);
        $('[name="stat"]').val(stat);
        
    });
     $('#tbPenjualan').on('click','.editbatalreg',function(){
        var faktur = $(this).data('faktur');
        var kdharga = $(this).data('kdharga');
        var keter = $(this).data('keter');
        var jnsbayar = $(this).data('jnsbayar');
        var stat = $(this).data('stat');
        $('#modalEditreg').modal('show').val(faktur);
        $('[name="nobuk"]').val(faktur);
        $('[name="kdharga"]').val(kdharga);
        $('[name="keter"]').val(keter);
        $('[name="bayar"]').val(jnsbayar);
        $('[name="stat"]').val(stat);
        
    });
    $('#tbPenjualan').on('click','.editnomorwa',function(){
        var faktur = $(this).data('faktur');
        var stat = $(this).data('stat');
        var nowa = $(this).data('nowa');
        
        $('#modalEditnomorwa').modal('show').val(faktur);
        $('[name="nobuk"]').val(faktur);
        $('[name="stat"]').val(stat);
        $('[name="nowa"]').val(nowa);
        
    });
    
    $("#btnRekap").on('click', function(e){
      e.preventDefault();
      var url = $(this).attr('href');
      window.open(url, '_blank', 'location=yes,height=600,width=500,scrollbars=yes,status=yes');
    });

    </script>
<style type="text/css">
	#gradient11 {
	  background-image: radial-gradient(circle, red, yellow, green);
	}
</style>
</body>
</html>