Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def add_invoice(head, company_name, sp_station, invoice_no, date, amount):
|
|
28 |
|
29 |
# Calculate the total for the selected head
|
30 |
total_amount = filtered_ledger["Amount"].sum()
|
31 |
-
return filtered_ledger, f"Total for {head}: {total_amount}"
|
32 |
|
33 |
except Exception as e:
|
34 |
print(f"Error during adding invoice: {e}")
|
@@ -44,7 +44,7 @@ def search_by_head(head):
|
|
44 |
# Calculate the total for the selected head
|
45 |
total_amount = filtered_ledger["Amount"].sum()
|
46 |
|
47 |
-
return filtered_ledger, f"Total for {head}: {total_amount}"
|
48 |
|
49 |
except Exception as e:
|
50 |
print(f"Error during search by head: {e}")
|
|
|
28 |
|
29 |
# Calculate the total for the selected head
|
30 |
total_amount = filtered_ledger["Amount"].sum()
|
31 |
+
return filtered_ledger, f"Total for {head}: {total_amount:.2f}"
|
32 |
|
33 |
except Exception as e:
|
34 |
print(f"Error during adding invoice: {e}")
|
|
|
44 |
# Calculate the total for the selected head
|
45 |
total_amount = filtered_ledger["Amount"].sum()
|
46 |
|
47 |
+
return filtered_ledger, f"Total for {head}: {total_amount:.2f}"
|
48 |
|
49 |
except Exception as e:
|
50 |
print(f"Error during search by head: {e}")
|