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

Fixed #154 - Report set initial export file name on month change

parent c740feaf
No related branches found
No related tags found
1 merge request!160merge v1_4_0 into master
...@@ -77,6 +77,7 @@ public class ReportController implements Refreshable ...@@ -77,6 +77,7 @@ public class ReportController implements Refreshable
private Controller controller; private Controller controller;
private ColumnFilter columnFilter; private ColumnFilter columnFilter;
private File reportPath; private File reportPath;
private String initialReportPath;
public void init(Controller controller) public void init(Controller controller)
{ {
...@@ -528,11 +529,7 @@ public class ReportController implements Refreshable ...@@ -528,11 +529,7 @@ public class ReportController implements Refreshable
} }
else else
{ {
DateTime currentDate = controller.getCurrentDate(); fileChooser.setInitialFileName( Localization.getString(initialReportPath));
String currentMonth = currentDate.toString("MM");
String currentYear = currentDate.toString("YYYY");
fileChooser.setInitialFileName( Localization.getString(Strings.REPORT_INITIAL_FILENAME, currentYear, currentMonth));
} }
fileChooser.getExtensionFilters().add(extFilter); fileChooser.getExtensionFilters().add(extFilter);
File file = fileChooser.showSaveDialog(controller.getStage()); File file = fileChooser.showSaveDialog(controller.getStage());
...@@ -665,5 +662,11 @@ public class ReportController implements Refreshable ...@@ -665,5 +662,11 @@ public class ReportController implements Refreshable
} }
refreshTableView(); refreshTableView();
DateTime currentDate = controller.getCurrentDate();
String currentMonth = currentDate.toString("MM");
String currentYear = currentDate.toString("YYYY");
initialReportPath = Localization.getString(Strings.REPORT_INITIAL_FILENAME, currentYear, currentMonth);
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment