Advertisement
UnknownCode

Program Kasir Online

Jan 20th, 2024
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.23 KB | Source Code | 0 0
  1. <!doctype html>
  2. <!--
  3. <htmlApplication
  4.  fixedSize="no"
  5.  width=500
  6.  height=300
  7.  contextmenu="no"
  8.  hidden="no"
  9.  menu="no" />
  10. -->
  11. <html>
  12. <head>
  13. <title>CASHIER APPLICATION UNIT</title>
  14. <!DOCTYPE html>
  15.  
  16.  
  17. <html>
  18. <head>
  19.  <title></title>
  20.  <style>
  21.   .tengah{
  22.            
  23.         }
  24.  
  25.  
  26.   table{
  27.    background: coral;
  28.    margin:auto;
  29.  
  30.   }
  31.  
  32.  
  33.  </style>
  34. </head>
  35. <body class="tengah">
  36.  <div>
  37.  
  38.   <table border="1">
  39.    <h2 align="center" style="background: coral">CASHIER APPLICATION UNIT</h2>
  40.    <tr>    
  41.     <th>NAMA BARANG</th>
  42.     <th><input type="text"  id="nama" onchange="total()" ></th>
  43.    </tr>
  44.    
  45.    <tr>    
  46.     <th>HARGA</th>
  47.     <th><input type="number"  id="harga" onchange="total()"></th>
  48.    </tr>
  49.  
  50.    <tr>    
  51.     <th>JUMLAH BELI</th>    
  52.     <th><input type="number" id="jumlah"  value="0" onchange="total()"></th>
  53.    </tr>
  54.    
  55.    <tr>    
  56.     <th>KATEGORI</th>
  57.     <th><select id="status" onchange="total()">
  58.    <option>BUAH SEGAR</option>
  59.    <option>MAKANAN</option>
  60.    <option>PAKAIAN</option>
  61.    <option>MINUMAN</option>
  62.             <option>IKAN SEGAR</option>
  63.             <option>PERLENGKAPAN RUMAH</option>
  64.             <option>BUMBU DAPUR</option>
  65.     </select></th>
  66.    </tr>
  67.    
  68.    <tr>    
  69.     <th>JUMLAH TOTAL</th>
  70.     <th><input type="text" style="background: yellow" id="total" disabled></th>
  71.    </tr>
  72.  
  73.    <tr>    
  74.     <th>PEMBAYARAN</th>    
  75.     <th><input type="number" id="bayar" onchange="total()"></th>
  76.    </tr>
  77.    
  78.    <tr>    
  79.     <th>KEMBALIAN</th>
  80.     <th><input type="text" style="background: yellow" id="total1" disabled></th>
  81.    </tr>
  82.          
  83.             <tr>
  84.                 <th><input type="button" style="background: white"  onclick="window.print()" value="CETAK"></th>
  85.             </tr>
  86.    
  87.    <tr>  
  88.     <table width="300" height="201px" border="8">
  89.     <th><label align="landscape"  id="cetak" ></label></th>
  90.     </table>
  91.    </tr>        
  92.    
  93.   </table>
  94.         <marquee scrolldelay="100" direction="left" bgcolor="coral"> > TERIMA KASIH TELAH MENGGUNAKAN PROGRAM INI ---------- PROGRAMER SILO KUSUMA ---------- DESIGNER BY SILO KUSUMA----------LAYOUT BY KAPAL NGODING < </marquee>
  95.  
  96.  
  97.   <script type="text/javascript">
  98.  
  99.   function total() {
  100.    var nama = document.getElementById('nama').value;
  101.    var harga =  parseInt(document.getElementById('harga').value);
  102.    var jumlah_beli =  parseInt(document.getElementById('jumlah').value);
  103.    var pembayaran =  parseInt(document.getElementById('bayar').value);
  104.    var jenis = document.getElementById("status").value;
  105.    var jumlah_harga = harga * jumlah_beli;
  106.     document.getElementById('total').value = jumlah_harga;
  107.  
  108.    var kembali = pembayaran - jumlah_harga;
  109.     document.getElementById('total1').value = kembali;
  110.  
  111.    var cetak = "NAMA    : "+nama+"</br>"+
  112.                       "HARGA   : "+harga+"</br>"+
  113.                       "JUMLAH BELI  : "+jumlah_beli+"</br>"+
  114.                       "KATEGORI   : "+jenis+"</br>"+
  115.                       "JUMLAH TOTAL  : "+jumlah_harga+"</br>"+
  116.                       "PEMBAYARAN  : "+pembayaran+"</br>"+
  117.                       "KEMBALIAN  : "+kembali;
  118.     document.getElementById("cetak").innerHTML=cetak;
  119.   }
  120.  
  121.   </script>
  122.  </div>
  123. </body>
  124. </html>
  125.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement