/*
- * Copyright © 2019 Damyan Ivanov.
+ * Copyright © 2020 Damyan Ivanov.
* This file is part of MoLe.
* MoLe is free software: you can distribute it and/or modify it
* under the term of the GNU General Public License as published by
params.add(accFilter);
}
- sb.append(" ORDER BY t.date DESC LIMIT 1");
+ sb.append(" ORDER BY t.year desc, t.month desc, t.day desc LIMIT 1");
final String sql = sb.toString();
debug("descr", sql);
final String broaderSql =
"select t.profile, t.id from transactions t where t.description=?" +
- " ORDER BY date desc LIMIT 1";
+ " ORDER BY year desc, month desc, day desc LIMIT 1";
params.remove(1);
debug("descr", broaderSql);
debug("descr", description);
void noteFocusIsOnComment(int position) {
model.noteFocusChanged(position, NewTransactionModel.FocusedElement.Comment);
}
+ void noteFocusIsOnTransactionComment(int position) {
+ model.noteFocusChanged(position, NewTransactionModel.FocusedElement.TransactionComment);
+ }
+ public void noteFocusIsOnDescription(int pos) {
+ model.noteFocusChanged(pos, NewTransactionModel.FocusedElement.Description);
+ }
private void holdSubmittableChecks() {
checkHoldCounter++;
}
itemsWithAccountForCurrency.add(currName, item);
}
- if (acc.isAmountSet()) {
+ if (!acc.isAmountValid()) {
+ Logger.debug("submittable",
+ String.format("Not submittable: row %d has an invalid amount", i + 1));
+ submittable = false;
+ }
+ else if (acc.isAmountSet()) {
itemsWithAmountForCurrency.add(currName, item);
balance.add(currName, acc.getAmount());
}