Skip to content

Commit

Permalink
[26195] always use display to show original article question
Browse files Browse the repository at this point in the history
  • Loading branch information
huthomas committed Feb 27, 2024
1 parent 7268095 commit 74fd849
Showing 1 changed file with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,20 @@ public void adjust(IBilled billed) {
CoreModelServiceHolder.get().save(billed);
} else {
if ("O".equals(((IArtikelstammItem) billable).getGenericType())) { //$NON-NLS-1$
int answer = MessageDialog.open(MessageDialog.WARNING, Display.getDefault().getActiveShell(),
"Originalpräparat", billable.getLabel() + " ist ein Originalpräparat mit "
+ ((IArtikelstammItem) billable).getDeductible()
+ "% Selbstbehalt. Soll dieses Präparat verrechnet werden?",
SWT.NONE, "Ja", "Ja, mit Substitution nicht möglich", "Nein");
if (answer == 1) {
billed.setExtInfo(Constants.FLD_EXT_ORIGINALNOSUBSTITUTE, "true"); //$NON-NLS-1$
CoreModelServiceHolder.get().save(billed);
} else if (answer == 2) {
billingService.removeBilled(billed, billed.getEncounter());
}
Display.getDefault().syncExec(() -> {
int answer = MessageDialog.open(MessageDialog.WARNING,
Display.getDefault().getActiveShell(), "Originalpräparat",
billable.getLabel() + " ist ein Originalpräparat mit "
+ ((IArtikelstammItem) billable).getDeductible()
+ "% Selbstbehalt. Soll dieses Präparat verrechnet werden?",
SWT.NONE, "Ja", "Ja, mit Substitution nicht möglich", "Nein");
if (answer == 1) {
billed.setExtInfo(Constants.FLD_EXT_ORIGINALNOSUBSTITUTE, "true"); //$NON-NLS-1$
CoreModelServiceHolder.get().save(billed);
} else if (answer == 2) {
billingService.removeBilled(billed, billed.getEncounter());
}
});
}
}
}
Expand Down

0 comments on commit 74fd849

Please sign in to comment.