Opravena chyba při vytváření vyúčtování služební cesty a požadavku na schválení cesťáku- na záznamech se nenastavovalo období.

Opraveno filtrování nabízených středisek.
master
Josef Rokos 9 years ago
parent b276746bac
commit b0fb32825b

@ -40,6 +40,7 @@ public class TripBillApprovalServiceImpl extends RequirementBaseServiceImpl<Trip
TripBillApproval approval = new TripBillApproval(); TripBillApproval approval = new TripBillApproval();
approval.setCentre(bill.getRequirement().getCentre()); approval.setCentre(bill.getRequirement().getCentre());
approval.setWorkgroup(bill.getRequirement().getWorkgroup()); approval.setWorkgroup(bill.getRequirement().getWorkgroup());
approval.setSeason(bill.getSeason());
approval.setReqDate(new Date()); approval.setReqDate(new Date());
approval.setType(reqTypeService.getTypeById(Constants.REQTYPE_BUSINESSTRIP)); approval.setType(reqTypeService.getTypeById(Constants.REQTYPE_BUSINESSTRIP));
approval.setState(RequirementState.NEW); approval.setState(RequirementState.NEW);

@ -47,6 +47,7 @@ public class TripBillServiceImpl extends AbstractOwnedService<TripBill> implemen
TripBill bill = new TripBill(); TripBill bill = new TripBill();
bill.setRequirement(requirement); bill.setRequirement(requirement);
bill.setSeason(requirement.getSeason());
if (!passengers) { if (!passengers) {
bill.setDownPayment(requirement.getDownPayment()); bill.setDownPayment(requirement.getDownPayment());

@ -183,7 +183,15 @@ public class WorkgroupServiceImpl extends AbstractOwnedService<Workgroup> implem
} }
} }
for (Workgroup w : getUserWorkgroups(user)) { List<Workgroup> workGroups;
if (userOnly) {
workGroups = filterUserOnly(user, getUserWorkgroups(user));
} else {
workGroups = getUserWorkgroups(user);
}
for (Workgroup w : workGroups) {
loadParents(w); loadParents(w);
for (Workgroup centre : w.getParents()) { for (Workgroup centre : w.getParents()) {
if (!centres.contains(centre)) { if (!centres.contains(centre)) {

Loading…
Cancel
Save