use of name.abuchen.portfolio.ui.ConsistencyChecksJob in project portfolio by buchen.
the class CSVImportWizard method performFinish.
@Override
public boolean performFinish() {
((AbstractWizardPage) getContainer().getCurrentPage()).afterPage();
boolean isDirty = false;
if (importer.getExtractor() == importer.getSecurityPriceExtractor())
isDirty = importSecurityPrices();
else
isDirty = importItems();
if (isDirty) {
client.markDirty();
new ConsistencyChecksJob(client, false).schedule();
}
return true;
}
use of name.abuchen.portfolio.ui.ConsistencyChecksJob in project portfolio by buchen.
the class ImportExtractedItemsWizard method performFinish.
@Override
public boolean performFinish() {
if (!pages.isEmpty()) {
boolean isDirty = false;
for (int index = 0; index < pages.size(); index++) {
ReviewExtractedItemsPage page = pages.get(index);
page.afterPage();
InsertAction action = new InsertAction(client);
action.setConvertBuySellToDelivery(page.doConvertToDelivery());
for (ExtractedEntry entry : page.getEntries()) {
if (entry.isImported()) {
entry.getItem().apply(action, page);
isDirty = true;
}
}
}
if (isDirty) {
client.markDirty();
// run consistency checks in case bogus transactions have been
// created (say: an outbound delivery of a security where there
// no held shares)
new ConsistencyChecksJob(client, false).schedule();
}
}
return true;
}
use of name.abuchen.portfolio.ui.ConsistencyChecksJob in project portfolio by buchen.
the class RunConsistencyChecksHandler method execute.
@Execute
public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart part, @Named(IServiceConstants.ACTIVE_SHELL) Shell shell) {
Client client = MenuHelper.getActiveClient(part);
if (client == null)
return;
new ConsistencyChecksJob(client, true).schedule();
}
Aggregations