Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -557,7 +557,11 @@ def get_farmer_report(farmer_name, end_date=None, interest_rate=None):
|
|
| 557 |
detailed_df_display['Balance'] = detailed_df_display['Balance'].apply(format_indian_currency)
|
| 558 |
|
| 559 |
# Summary statistics
|
| 560 |
-
remaining_balance =
|
|
|
|
|
|
|
|
|
|
|
|
|
| 561 |
interest_accrued = total_interest
|
| 562 |
|
| 563 |
remaining_balance = (
|
|
|
|
| 557 |
detailed_df_display['Balance'] = detailed_df_display['Balance'].apply(format_indian_currency)
|
| 558 |
|
| 559 |
# Summary statistics
|
| 560 |
+
remaining_balance = (
|
| 561 |
+
-principal_due if principal_due > 0
|
| 562 |
+
else surplus_to_farmer
|
| 563 |
+
)
|
| 564 |
+
|
| 565 |
interest_accrued = total_interest
|
| 566 |
|
| 567 |
remaining_balance = (
|