atifsial123 commited on
Commit
6588037
·
verified ·
1 Parent(s): d6dc6f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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}")