MessageBox.showWarning("Нельзя продлять больничный более " + (Sicklist.SICKLIST_PROLONGATION_LIMIT - 1) + " раз, создайте новый");
return;
}
GregorianCalendar till = sicklist.getTill();
DialogSicklistContinue dsc = new DialogSicklistContinue(MainWindow.mainWindow, sicklist.getClient(), till, getAuditManager());
dsc.setVisible(true);
if (dsc.getDlgResult() == ModalDialog.DLG_OK) {
Calendar newLong = dsc.getDateTill();
SerRenLocal serren = dsc.getSerren();
GregorianCalendar coll = new GregorianCalendar();
coll.setTime(DateTimeUtils.getDateOnly(newLong.getTime()));
coll.add(GregorianCalendar.DAY_OF_MONTH, -1);
if (till.after(coll)){
MessageBox.showError(MessageBox.E_INCORRECT_SICKLIST_PROLOG_DATE);