Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ def create_pdf(data, filename):
|
|
52 |
sub_total = 0
|
53 |
for p in data['produk']:
|
54 |
total = p['jumlah'] * p['harga']
|
55 |
-
sub_total += total
|
56 |
table_data.append([p['nama'], str(p['jumlah']), f"{p['harga']:,}", f"{total:,}"])
|
57 |
|
58 |
# Hitung diskon dan grand total
|
|
|
52 |
sub_total = 0
|
53 |
for p in data['produk']:
|
54 |
total = p['jumlah'] * p['harga']
|
55 |
+
sub_total += float(total)
|
56 |
table_data.append([p['nama'], str(p['jumlah']), f"{p['harga']:,}", f"{total:,}"])
|
57 |
|
58 |
# Hitung diskon dan grand total
|