Skip to content
Snippets Groups Projects
Commit 9ac73baf authored by Robert Goldmann's avatar Robert Goldmann
Browse files

Fixed #59 - HomeController --> color text red if remaining budget is negative

parent 52516e10
No related branches found
No related tags found
No related merge requests found
......@@ -80,6 +80,10 @@ public class HomeController implements Refreshable
Budget budget = new Budget(controller.getPayments());
double remaining = budget.getIncomeSum() + budget.getPaymentSum();
labelBudget.setText(String.valueOf(Helpers.NUMBER_FORMAT.format(remaining).replace(".", ",")) + " " + controller.getSettings().getCurrency());
if(remaining <= 0)
{
labelBudget.setStyle("-fx-text-fill: #CC0000");
}
labelStartBudget.setText("von " + String.valueOf(Helpers.NUMBER_FORMAT.format(budget.getIncomeSum()).replace(".", ",")) + " " + controller.getSettings().getCurrency() + " verbleibend");
double factor = remaining / budget.getIncomeSum();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment