Detail Laporan Fix (Month, Week , Table Number)
This commit is contained in:
parent
43b50ce022
commit
a2c374242f
15
main.py
15
main.py
@ -751,7 +751,8 @@ def report_get_weekly_summary(week_start=None, method_filter=None):
|
||||
'total_transaksi': summary['total_count'],
|
||||
'total_pendapatan': summary['total_income'],
|
||||
'rata_rata': summary['avg_per_transaction'],
|
||||
'metode_breakdown': summary['metode_breakdown']
|
||||
'metode_breakdown': summary['metode_breakdown'],
|
||||
'details': summary['payments']
|
||||
}
|
||||
|
||||
|
||||
@ -784,7 +785,8 @@ def report_get_monthly_summary(year=None, month=None, method_filter=None):
|
||||
'total_transaksi': summary['total_count'],
|
||||
'total_pendapatan': summary['total_income'],
|
||||
'rata_rata': summary['avg_per_transaction'],
|
||||
'metode_breakdown': summary['metode_breakdown']
|
||||
'metode_breakdown': summary['metode_breakdown'],
|
||||
'details': summary['payments']
|
||||
}
|
||||
|
||||
|
||||
@ -3653,10 +3655,17 @@ class App:
|
||||
# Populate tree dari payment details
|
||||
for payment in report_data.get('details', []):
|
||||
pid, tid, metode, jumlah, status, tanggal = payment
|
||||
nomor_meja = "-"
|
||||
trx_data = transaksi_get(tid) # Ambil data transaksi berdasarkan ID
|
||||
if trx_data:
|
||||
# trx_data = (tid, uid, meja, total, status, ...)
|
||||
nomor_meja = trx_data[2] # Index 2 adalah nomor meja
|
||||
# ----------------------------------
|
||||
|
||||
self.report_tree.insert("", tk.END, values=(
|
||||
tid,
|
||||
format_datetime(tanggal),
|
||||
"-", # meja (not available in payment data)
|
||||
nomor_meja, # <--- Ganti "-" dengan variabel nomor_meja
|
||||
format_currency(jumlah),
|
||||
metode.upper() if metode else "-",
|
||||
status
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user