├── DB └── db_toko.sql ├── README.md ├── assets ├── bootstrap │ └── css │ │ └── bootstrap.min.css ├── css │ └── styles.min.css ├── img │ ├── about.png │ └── login.png └── js │ └── script.min.js ├── conf ├── globalvar.php └── init.php ├── index.php ├── pages ├── 404.php ├── about.php ├── barang-hapus.php ├── barang-tambah.php ├── barang-ubah.php ├── barang.php ├── laporan.php ├── login.php ├── logout.php ├── penjualan-hapus.php ├── penjualan-pilih.php └── penjualan.php └── screenshots ├── dashboard.jpg ├── data-barang.jpg ├── laporan-penjualan.jpg └── penjualan.jpg /DB/db_toko.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 4.8.3 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Host: 127.0.0.1 6 | -- Generation Time: Mar 02, 2019 at 05:11 AM 7 | -- Server version: 10.1.36-MariaDB 8 | -- PHP Version: 5.6.38 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | SET AUTOCOMMIT = 0; 12 | START TRANSACTION; 13 | SET time_zone = "+00:00"; 14 | 15 | 16 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 17 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 18 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 19 | /*!40101 SET NAMES utf8mb4 */; 20 | 21 | -- 22 | -- Database: `db_toko` 23 | -- 24 | 25 | DELIMITER $$ 26 | -- 27 | -- Procedures 28 | -- 29 | CREATE DEFINER=`root`@`localhost` PROCEDURE `sto_tambahProduk` (`pronama` VARCHAR(200), `proharga` FLOAT, `projumlah` BIGINT) BEGIN 30 | insert into produk (pronama,proharga,projumlah) values (pronama,proharga,projumlah); 31 | END$$ 32 | 33 | DELIMITER ; 34 | 35 | -- -------------------------------------------------------- 36 | 37 | -- 38 | -- Table structure for table `produk` 39 | -- 40 | 41 | CREATE TABLE `produk` ( 42 | `proid` bigint(20) NOT NULL, 43 | `pronama` varchar(200) DEFAULT NULL, 44 | `projumlah` bigint(20) DEFAULT NULL, 45 | `proharga` float DEFAULT NULL 46 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 47 | 48 | -- 49 | -- Dumping data for table `produk` 50 | -- 51 | 52 | INSERT INTO `produk` (`proid`, `pronama`, `projumlah`, `proharga`) VALUES 53 | (2, 'Keyboard Logitech', 6, 100000), 54 | (3, 'Layar', 2, 500000), 55 | (4, 'Mouse Baru', 10, 100000); 56 | 57 | -- -------------------------------------------------------- 58 | 59 | -- 60 | -- Table structure for table `transaksi` 61 | -- 62 | 63 | CREATE TABLE `transaksi` ( 64 | `trafaktur` varchar(200) NOT NULL, 65 | `tratanggal` date DEFAULT NULL, 66 | `trapelanggan` varchar(200) DEFAULT NULL, 67 | `tratotal` float DEFAULT NULL, 68 | `userid` bigint(20) DEFAULT NULL 69 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 70 | 71 | -- 72 | -- Dumping data for table `transaksi` 73 | -- 74 | 75 | INSERT INTO `transaksi` (`trafaktur`, `tratanggal`, `trapelanggan`, `tratotal`, `userid`) VALUES 76 | ('TRA0001', '2019-03-02', 'saif alikhan', 600000, 2); 77 | 78 | -- -------------------------------------------------------- 79 | 80 | -- 81 | -- Table structure for table `transaksi_detail` 82 | -- 83 | 84 | CREATE TABLE `transaksi_detail` ( 85 | `tdid` bigint(20) NOT NULL, 86 | `trafaktur` varchar(200) DEFAULT NULL, 87 | `proid` bigint(20) DEFAULT NULL, 88 | `tdjumlah` bigint(20) DEFAULT NULL, 89 | `tdharga` float DEFAULT NULL, 90 | `tdsubtotal` float DEFAULT NULL 91 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 92 | 93 | -- 94 | -- Dumping data for table `transaksi_detail` 95 | -- 96 | 97 | INSERT INTO `transaksi_detail` (`tdid`, `trafaktur`, `proid`, `tdjumlah`, `tdharga`, `tdsubtotal`) VALUES 98 | (6, 'TRA0001', 2, 1, 100000, 100000), 99 | (7, 'TRA0001', 3, 1, 500000, 500000); 100 | 101 | -- 102 | -- Triggers `transaksi_detail` 103 | -- 104 | DELIMITER $$ 105 | CREATE TRIGGER `tg_order` AFTER INSERT ON `transaksi_detail` FOR EACH ROW BEGIN 106 | update produk set projumlah=projumlah-new.tdjumlah where proid=new.proid; 107 | END 108 | $$ 109 | DELIMITER ; 110 | 111 | -- -------------------------------------------------------- 112 | 113 | -- 114 | -- Table structure for table `user` 115 | -- 116 | 117 | CREATE TABLE `user` ( 118 | `userid` bigint(20) NOT NULL, 119 | `username` varchar(200) NOT NULL, 120 | `userpass` varchar(200) NOT NULL 121 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 122 | 123 | -- 124 | -- Dumping data for table `user` 125 | -- 126 | 127 | INSERT INTO `user` (`userid`, `username`, `userpass`) VALUES 128 | (1, 'admin', 'admin'), 129 | (2, 'a', 'a'); 130 | 131 | -- -------------------------------------------------------- 132 | 133 | -- 134 | -- Indexes for dumped tables 135 | -- 136 | 137 | -- 138 | -- Indexes for table `produk` 139 | -- 140 | ALTER TABLE `produk` 141 | ADD PRIMARY KEY (`proid`); 142 | 143 | -- 144 | -- Indexes for table `transaksi` 145 | -- 146 | ALTER TABLE `transaksi` 147 | ADD PRIMARY KEY (`trafaktur`); 148 | 149 | -- 150 | -- Indexes for table `transaksi_detail` 151 | -- 152 | ALTER TABLE `transaksi_detail` 153 | ADD PRIMARY KEY (`tdid`); 154 | 155 | -- 156 | -- Indexes for table `user` 157 | -- 158 | ALTER TABLE `user` 159 | ADD PRIMARY KEY (`userid`); 160 | 161 | -- 162 | -- AUTO_INCREMENT for dumped tables 163 | -- 164 | 165 | -- 166 | -- AUTO_INCREMENT for table `produk` 167 | -- 168 | ALTER TABLE `produk` 169 | MODIFY `proid` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; 170 | 171 | -- 172 | -- AUTO_INCREMENT for table `transaksi_detail` 173 | -- 174 | ALTER TABLE `transaksi_detail` 175 | MODIFY `tdid` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; 176 | 177 | -- 178 | -- AUTO_INCREMENT for table `user` 179 | -- 180 | ALTER TABLE `user` 181 | MODIFY `userid` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; 182 | COMMIT; 183 | 184 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 185 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 186 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 187 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Aplikasi Kasir Simpel 2 | Aplikasi Simple Kasir merupakan Aplikasi berbasis WEB menggunakan bahasa pemrograman PHP dan template Bootstrap. Aplikasi yang sangat simpel dengan memiliki fitur pencatan barang dan stoknya. kemudian penjualan dan laporan penjualan. dengan sistem login oleh kasir( simple point of sale ) 3 | 4 | ## Syarat 5 | 6 | Pastikan Anda sudah menginstall : 7 | 8 | * PHP 5.6 9 | * MYSQL 10 | * Browser 11 | 12 | ## Cara Install 13 | #### 1. Clone Project 14 | ```bash 15 | git clone https://github.com/msaifa/simpe-kasir.git 16 | ``` 17 | 18 | #### 2. Pindahkan file ke directory apache 19 | * Windows : c:xampp/htdoc 20 | * Linux : /var/www/html/ 21 | 22 | #### 3. Edit conf/globalvar.php 23 | edit sesuai dengan url index aplikasi. 24 | ```php 25 | $base_url = "http://localhost.yii/simple-kasir/" ; 26 | ``` 27 | 28 | #### 4. Set-up database 29 | buat database baru dengan nama db_toko 30 | ```sql 31 | create database db_toko ; 32 | ``` 33 | export db_toko.sql ke database baru tersebut. 34 | 35 | ## Program Pendukung 36 | - Bootstrap Studio 37 | - Visual Studio Code 38 | - xampp 39 | 40 | ## Credits 41 | - Thanks to Allah 42 | - Thanks to My Parents 43 | - Thanks to My Teachers 44 | - Thanks to ALL 45 | 46 | ## About 47 | [Github](https://github.com/msaifa/) 48 | [LinkedIn](https://www.linkedin.com/in/msaifa/) 49 | [Instagram](https://instagram.com/msaifa) 50 | -------------------------------------------------------------------------------- /assets/css/styles.min.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/msaifa/simpel-kasir/ddd66234a2871a51e4c7f4abea7c8bb42cb54ed6/assets/css/styles.min.css -------------------------------------------------------------------------------- /assets/img/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/msaifa/simpel-kasir/ddd66234a2871a51e4c7f4abea7c8bb42cb54ed6/assets/img/about.png -------------------------------------------------------------------------------- /assets/img/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/msaifa/simpel-kasir/ddd66234a2871a51e4c7f4abea7c8bb42cb54ed6/assets/img/login.png -------------------------------------------------------------------------------- /assets/js/script.min.js: -------------------------------------------------------------------------------- 1 | $(document).ready((function(){$("[data-bs-chart]").each((function(e,o){this.chart=new Chart($(o),$(o).data("bs-chart"))}))})),function(e){"use strict";e("#sidebarToggle, #sidebarToggleTop").on("click",(function(o){e("body").toggleClass("sidebar-toggled"),e(".sidebar").toggleClass("toggled"),e(".sidebar").hasClass("toggled")&&e(".sidebar .collapse").collapse("hide")})),e(window).resize((function(){e(window).width()<768&&e(".sidebar .collapse").collapse("hide")})),e("body.fixed-nav .sidebar").on("mousewheel DOMMouseScroll wheel",(function(o){if(e(window).width()>768){var t=o.originalEvent,l=t.wheelDelta||-t.detail;this.scrollTop+=30*(l<0?1:-1),o.preventDefault()}})),e(document).on("scroll",(function(){e(this).scrollTop()>100?e(".scroll-to-top").fadeIn():e(".scroll-to-top").fadeOut()})),e(document).on("click","a.scroll-to-top",(function(o){var t=e(this);e("html, body").stop().animate({scrollTop:e(t.attr("href")).offset().top},1e3,"easeInOutExpo"),o.preventDefault()}))}(jQuery); -------------------------------------------------------------------------------- /conf/globalvar.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /conf/init.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 37 | 38 | 39 | 40 | 41 |
42 | 43 | 44 |Nama Barang | 78 |Sisa Stok | 79 |Harga | 80 |Aksi | 81 |82 | |
---|---|---|---|---|
= $row['pronama'] ?> | 92 |= $row['projumlah'] ?> | 93 |= number_format($row['proharga'],2) ?> | 94 |Ubah | 95 |Hapus | 96 |
Menampilkan = $count ;?> Data
107 |No | 72 |No. Faktur | 73 |Tanggal | 74 |Pelanggan | 75 |Jum. Barang | 76 |Jum. Bayar | 77 |Kasir | 78 |
---|---|---|---|---|---|---|
= $no ?> | 88 |= $row['trafaktur'] ;?> | 89 |= $row['trapelanggan'] ;?> | 90 |= $row['tratanggal'] ;?> | 91 |= number_format($row['jumbarang'],2) ;?> | 92 |= number_format($row['tratotal'],2) ;?> | 93 |= $row['username'] ;?> | 94 |
Menampilkan = $count ;?> Data
105 |Nama Barang | 110 |Sisa Stok | 111 |Harga | 112 |Aksi | 113 |
---|---|---|---|
= $row['pronama'] ?> | 122 |= $row['projumlah'] ?> | 123 |= $row['proharga'] ?> | 124 |Pilih | 125 |
Menampilkan = $count ;?> Data
136 |