Skip to content
Snippets Groups Projects
Commit 9ba78953 authored by Harry Linrui XU's avatar Harry Linrui XU
Browse files

Removed incorrect if-statement that prevented items from getting added to table

parent fb283145
Branches fix/navbar-type
No related tags found
10 merge requests!43Merging frontend-testing into master,!38"Made progressbar dynamic in accordance to spending. Added balance field....,!37Made the sub progress bars respond to changes in expense,!32Added input validation to add dialog boxes.,!30Redesigned scenes,!29Redesigned scenes,!28Redesigned scenes,!26Redesigned Main menu and expense/income windows,!24Merging frontend-testing with master,!23Merging frontend-testing and master
......@@ -79,16 +79,13 @@ public class AddExpenseController {
descriptionField.textProperty().bindBidirectional(descriptionProperty);
}
public void pressOkBtn(ActionEvent event) {
if (this.newExpense.getAmount() == 1.1) {
String date = dateField.getText();
double amount = Double.parseDouble(amountField.getText());
String description = descriptionField.getText();
ExpenseCategory category = getCategory();
boolean recurring = isRecurring();
newExpense = new Expense(description, amount, recurring, category, date);
System.out.println(date + " " + amount + " " + description + " " + category + " " + recurring);
}
String date = dateField.getText();
double amount = Double.parseDouble(amountField.getText());
String description = descriptionField.getText();
ExpenseCategory category = getCategory();
boolean recurring = isRecurring();
newExpense = new Expense(description, amount, recurring, category, date);
System.out.println(date + " " + amount + " " + description + " " + category + " " + recurring);
final Node source = (Node) event.getSource();
((Stage) source.getScene().getWindow()).close();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment