This commit is contained in:
Bluwww 2025-12-15 09:25:17 +07:00
parent 67bee18afd
commit 05b65471d1
9 changed files with 44 additions and 7 deletions

View File

@ -23,3 +23,5 @@ id,transaksi_id,menu_id,qty,harga_satuan,subtotal_item
22,13,2,1,25000.0,25000.0 22,13,2,1,25000.0,25000.0
23,13,3,1,30000.0,30000.0 23,13,3,1,30000.0,30000.0
24,14,10,1,20000.0,20000.0 24,14,10,1,20000.0,20000.0
25,15,3,1,30000.0,30000.0
26,15,7,1,21000.0,21000.0

1 id transaksi_id menu_id qty harga_satuan subtotal_item
23 22 13 2 1 25000.0 25000.0
24 23 13 3 1 30000.0 30000.0
25 24 14 10 1 20000.0 20000.0
26 25 15 3 1 30000.0 30000.0
27 26 15 7 1 21000.0 21000.0

View File

@ -5,9 +5,9 @@ user_id,menu_id,order_count,last_ordered
1,6,1,2025-12-13 20:12:35 1,6,1,2025-12-13 20:12:35
4,2,3,2025-12-14 21:14:46 4,2,3,2025-12-14 21:14:46
4,4,3,2025-12-14 10:35:35 4,4,3,2025-12-14 10:35:35
4,3,4,2025-12-14 21:14:46 4,3,5,2025-12-14 22:09:34
4,11,1,2025-12-14 01:44:46 4,11,1,2025-12-14 01:44:46
4,7,3,2025-12-14 21:12:55 4,7,4,2025-12-14 22:09:34
4,8,2,2025-12-14 21:14:46 4,8,2,2025-12-14 21:14:46
4,9,1,2025-12-14 09:50:02 4,9,1,2025-12-14 09:50:02
4,10,1,2025-12-14 21:43:51 4,10,1,2025-12-14 21:43:51

1 user_id menu_id order_count last_ordered
5 1 6 1 2025-12-13 20:12:35
6 4 2 3 2025-12-14 21:14:46
7 4 4 3 2025-12-14 10:35:35
8 4 3 4 5 2025-12-14 21:14:46 2025-12-14 22:09:34
9 4 11 1 2025-12-14 01:44:46
10 4 7 3 4 2025-12-14 21:12:55 2025-12-14 22:09:34
11 4 8 2 2025-12-14 21:14:46
12 4 9 1 2025-12-14 09:50:02
13 4 10 1 2025-12-14 21:43:51

View File

@ -2767,6 +2767,8 @@ class App:
del self.cart_items[idx] del self.cart_items[idx]
self.update_cart_display() self.update_cart_display()
self.reload_order_menu_cards()
def clear_cart(self): def clear_cart(self):
"""Kosongkan keranjang""" """Kosongkan keranjang"""
if not self.cart_items: if not self.cart_items:
@ -2776,6 +2778,8 @@ class App:
self.cart_items = [] self.cart_items = []
self.update_cart_display() self.update_cart_display()
self.reload_order_menu_cards()
def checkout_order(self): def checkout_order(self):
"""Simpan pesanan ke database""" """Simpan pesanan ke database"""
if not self.cart_items: if not self.cart_items:

View File

@ -1,11 +1,11 @@
nomor_meja,status,transaksi_id nomor_meja,status,transaksi_id
1,kosong, 1,terisi,
2,kosong, 2,terisi,
3,kosong, 3,kosong,
4,kosong, 4,kosong,
5,kosong, 5,kosong,
6,kosong, 6,kosong,
7,kosong, 7,terisi,
8,kosong, 8,kosong,
9,kosong, 9,kosong,
10,kosong, 10,kosong,

1 nomor_meja status transaksi_id
2 1 kosong terisi
3 2 kosong terisi
4 3 kosong
5 4 kosong
6 5 kosong
7 6 kosong
8 7 kosong terisi
9 8 kosong
10 9 kosong
11 10 kosong

View File

@ -1,11 +1,11 @@
id,nama,kategori,harga,stok,foto,tersedia,item_discount_pct id,nama,kategori,harga,stok,foto,tersedia,item_discount_pct
1,Americano,Minuman,20000.0,7,img/americano.jpg,1,0.0 1,Americano,Minuman,20000.0,7,img/americano.jpg,1,0.0
2,Latte,Minuman,25000.0,3,img/latte.jpg,1,10.0 2,Latte,Minuman,25000.0,3,img/latte.jpg,1,10.0
3,Banana Cake,Dessert,30000.0,7,img/banana_cake.jpg,1,4.0 3,Banana Cake,Dessert,30000.0,6,img/banana_cake.jpg,1,4.0
4,Nasi Goreng,Makanan,25000.0,9,img/nasi_goreng.jpg,1,0.0 4,Nasi Goreng,Makanan,25000.0,9,img/nasi_goreng.jpg,1,0.0
5,Nasi Kuning,Makanan,18000.0,7,img/Nasi-Kuning.jpg,1,5.0 5,Nasi Kuning,Makanan,18000.0,7,img/Nasi-Kuning.jpg,1,5.0
6,Strawberry Milkshake,Minuman,19000.0,5,img/strawberry_milkshake.jpg,1,0.0 6,Strawberry Milkshake,Minuman,19000.0,5,img/strawberry_milkshake.jpg,1,0.0
7,Coconut Matcha,Minuman,21000.0,11,img/coconut_matcha.jpg,1,5.0 7,Coconut Matcha,Minuman,21000.0,10,img/coconut_matcha.jpg,1,5.0
8,Beef Yakiniku,Makanan,25000.0,11,img/Beef-Yakiniku.jpg,1,4.0 8,Beef Yakiniku,Makanan,25000.0,11,img/Beef-Yakiniku.jpg,1,4.0
9,Osaka Curry,Makanan,30000.0,14,img/osaka_curry.jpg,1,10.0 9,Osaka Curry,Makanan,30000.0,14,img/osaka_curry.jpg,1,10.0
10,Choco Pudding,Dessert,20000.0,15,img/chocolate-pudding.jpg,1,8.0 10,Choco Pudding,Dessert,20000.0,15,img/chocolate-pudding.jpg,1,8.0

1 id nama kategori harga stok foto tersedia item_discount_pct
2 1 Americano Minuman 20000.0 7 img/americano.jpg 1 0.0
3 2 Latte Minuman 25000.0 3 img/latte.jpg 1 10.0
4 3 Banana Cake Dessert 30000.0 7 6 img/banana_cake.jpg 1 4.0
5 4 Nasi Goreng Makanan 25000.0 9 img/nasi_goreng.jpg 1 0.0
6 5 Nasi Kuning Makanan 18000.0 7 img/Nasi-Kuning.jpg 1 5.0
7 6 Strawberry Milkshake Minuman 19000.0 5 img/strawberry_milkshake.jpg 1 0.0
8 7 Coconut Matcha Minuman 21000.0 11 10 img/coconut_matcha.jpg 1 5.0
9 8 Beef Yakiniku Makanan 25000.0 11 img/Beef-Yakiniku.jpg 1 4.0
10 9 Osaka Curry Makanan 30000.0 14 img/osaka_curry.jpg 1 10.0
11 10 Choco Pudding Dessert 20000.0 15 img/chocolate-pudding.jpg 1 8.0

View File

@ -7,3 +7,4 @@ id,transaksi_id,metode_pembayaran,jumlah_bayar,status_pembayaran,tanggal_bayar,s
6,13,qris,75300.0,sukses,2025-12-14 21:17:59, 6,13,qris,75300.0,sukses,2025-12-14 21:17:59,
7,12,cash,100000.0,sukses,2025-12-14 21:46:15, 7,12,cash,100000.0,sukses,2025-12-14 21:46:15,
8,14,cash,100000.0,sukses,2025-12-14 21:46:20, 8,14,cash,100000.0,sukses,2025-12-14 21:46:20,
9,15,qris,46312.5,sukses,2025-12-15 08:52:51,

1 id transaksi_id metode_pembayaran jumlah_bayar status_pembayaran tanggal_bayar struk
7 6 13 qris 75300.0 sukses 2025-12-14 21:17:59
8 7 12 cash 100000.0 sukses 2025-12-14 21:46:15
9 8 14 cash 100000.0 sukses 2025-12-14 21:46:20
10 9 15 qris 46312.5 sukses 2025-12-15 08:52:51

View File

@ -3,3 +3,4 @@ OPENING,percent,10,0
ANNIVERSARY,fixed,5000,20000 ANNIVERSARY,fixed,5000,20000
MERDEKA,percent,45.0,30000.0 MERDEKA,percent,45.0,30000.0
CAFETOTORO,fixed,7000.0,10000.0 CAFETOTORO,fixed,7000.0,10000.0
ANGIN,percent,5.0,15000.0

1 code type value min_total
3 ANNIVERSARY fixed 5000 20000
4 MERDEKA percent 45.0 30000.0
5 CAFETOTORO fixed 7000.0 10000.0
6 ANGIN percent 5.0 15000.0

View File

@ -0,0 +1,28 @@
═════════════════════════════════════════
TOTORO CAFE
Jl. Raya Totoro No. 123, Surabaya
Telp: 031-123456
═════════════════════════════════════════
No. Struk : STR-15-20251215
Tanggal : 14/12/2025 22:09
Meja : 4
Kasir : kasir
Pembayaran : QRIS
─────────────────────────────────────────
ITEM PESANAN:
─────────────────────────────────────────
Banana Cake
1 x Rp 30,000 Rp 30,000
Coconut Matcha
1 x Rp 21,000 Rp 21,000
─────────────────────────────────────────
Subtotal : Rp 51,000
Diskon Item : Rp 2,250
Diskon Promo : Rp 2,438
─────────────────────────────────────────
TOTAL BAYAR : Rp 46,312
═════════════════════════════════════════
TERIMA KASIH ATAS KUNJUNGAN ANDA
SAMPAI JUMPA LAGI!
═════════════════════════════════════════

View File

@ -13,3 +13,4 @@ id,user_id,nomor_meja,total,status,promo_code,subtotal,item_discount,promo_disco
12,4,1,19950.0,dibayar,,21000.0,1050.0,0.0,2025-12-14 21:12:55 12,4,1,19950.0,dibayar,,21000.0,1050.0,0.0,2025-12-14 21:12:55
13,4,2,75300.0,dibayar,,80000.0,4700.0,0.0,2025-12-14 21:14:46 13,4,2,75300.0,dibayar,,80000.0,4700.0,0.0,2025-12-14 21:14:46
14,4,9,18400.0,dibayar,,20000.0,1600.0,0.0,2025-12-14 21:43:51 14,4,9,18400.0,dibayar,,20000.0,1600.0,0.0,2025-12-14 21:43:51
15,4,4,46312.5,dibayar,ANGIN,51000.0,2250.0,2437.5,2025-12-14 22:09:34

1 id user_id nomor_meja total status promo_code subtotal item_discount promo_discount tanggal
13 12 4 1 19950.0 dibayar 21000.0 1050.0 0.0 2025-12-14 21:12:55
14 13 4 2 75300.0 dibayar 80000.0 4700.0 0.0 2025-12-14 21:14:46
15 14 4 9 18400.0 dibayar 20000.0 1600.0 0.0 2025-12-14 21:43:51
16 15 4 4 46312.5 dibayar ANGIN 51000.0 2250.0 2437.5 2025-12-14 22:09:34