Commit 28a26786 authored by Thomas Huster's avatar Thomas Huster

[17454] fixed calling bill.create by not using Handler util class

parent 502e842f
Pipeline #12640 passed with stages
in 4 minutes and 56 seconds
......@@ -520,7 +520,6 @@ public class KonsZumVerrechnenView extends ViewPart implements ISaveablePart2 {
setToolTipText(Messages.KonsZumVerrechnenView_createInvoices); //$NON-NLS-1$
}
@SuppressWarnings("unchecked")
@Override
public void run(){
if (((StructuredSelection) tvSel.getSelection()).size() > 0) {
......@@ -530,25 +529,7 @@ public class KonsZumVerrechnenView extends ViewPart implements ISaveablePart2 {
return;
}
}
// Handler.execute(getViewSite(), "bill.create", tSelection);
ErstelleRnnCommand.ExecuteWithParams(getViewSite(), tSelection);
/*
* IHandlerService handlerService = (IHandlerService)
* getViewSite().getService(IHandlerService.class); ICommandService cmdService =
* (ICommandService) getViewSite().getService(ICommandService.class); try {
* Command command = cmdService.getCommand("bill.create"); Parameterization px =
* new Parameterization(command.getParameter
* ("ch.elexis.RechnungErstellen.parameter" ), new
* TreeToStringConverter().convertToString(tSelection)); ParameterizedCommand
* parmCommand = new ParameterizedCommand(command, new Parameterization[] { px
* });
*
* handlerService.executeCommand(parmCommand, null);
*
* } catch (Exception ex) { throw new RuntimeException("add.command not found");
* }
*/
tvSel.refresh();
}
};
......
......@@ -24,7 +24,7 @@ import org.slf4j.LoggerFactory;
import ch.elexis.core.constants.StringConstants;
import ch.elexis.core.data.events.ElexisEventDispatcher;
import ch.elexis.core.data.status.ElexisStatus;
import ch.elexis.core.ui.commands.Handler;
import ch.elexis.core.ui.commands.ErstelleRnnCommand;
import ch.elexis.data.Fall;
import ch.elexis.data.Konsultation;
import ch.elexis.data.Mandant;
......@@ -107,7 +107,7 @@ public class Rechnungslauf implements IRunnableWithProgress {
if (skip) {
monitor.subTask(Messages.Rechnungslauf_creatingBills); //$NON-NLS-1$
Handler.executeWithProgress(kzv.getViewSite(), "bill.create", kzv.tSelection, monitor); //$NON-NLS-1$
ErstelleRnnCommand.ExecuteWithParams(kzv.getViewSite(), kzv.tSelection);
}
monitor.done();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment