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

fixed payment cell category NONE display

parent b676079f
No related branches found
No related tags found
No related merge requests found
......@@ -88,7 +88,7 @@ public class PaymentCell extends ListCell<Payment>
HBox.setMargin(labelRepeating, new Insets(0, 30, 0, 15));
String categoryName = category.getName();
if(item.getName().equals("NONE"))
if(categoryName.equals("NONE"))
{
categoryName = "Keine Kategorie";
}
......
......@@ -335,7 +335,7 @@ public class DatabaseHandler
Statement stmt = null;
String query = "SELECT Payment.ID as ID FROM Payment WHERE (YEAR(Date) = " + year + " AND MONTH(Date) = " + month + " AND RepeatMonthDay = 0 OR RepeatMonthDay != 0 AND CONCAT('" + date + "', RepeatMonthDay) >= Date AND RepeatEndDate IS NULL OR RepeatMonthDay != 0 AND CONCAT('" + date
+ "', RepeatMonthDay) >= Date AND CONCAT('" + date
+ "', RepeatMonthDay) <= RepeatEndDate OR RepeatInterval != 0 AND DATEDIFF(NOW(), Date ) % RepeatInterval = 0 AND RepeatEndDate IS NULL OR RepeatInterval != 0 AND DATEDIFF(NOW(), Date ) % RepeatInterval = 0 AND RepeatEndDate IS NOT NULL AND DATEDIFF(RepeatEndDate, NOW()) > 0) GROUP BY Payment.ID ORDER BY Payment.Date";
+ "', RepeatMonthDay) <= RepeatEndDate OR RepeatInterval != 0 AND DATEDIFF(NOW(), Date ) % RepeatInterval = 0 AND RepeatEndDate IS NULL OR RepeatInterval != 0 AND DATEDIFF(NOW(), Date ) % RepeatInterval = 0 AND RepeatEndDate IS NOT NULL AND DATEDIFF(RepeatEndDate, NOW()) > 0) GROUP BY Payment.ID ORDER BY Payment.Date DESC";
ArrayList<Integer> results = new ArrayList<>();
try
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment