diff --git a/src/main/java/info/bukova/isspst/data/TripBillApproval.java b/src/main/java/info/bukova/isspst/data/TripBillApproval.java index 84388caa..bda81d49 100644 --- a/src/main/java/info/bukova/isspst/data/TripBillApproval.java +++ b/src/main/java/info/bukova/isspst/data/TripBillApproval.java @@ -18,6 +18,22 @@ public class TripBillApproval extends RequirementBase { @JoinColumn(name = "TRIPBILL_ID") private TripBill bill; + @Override + public String getNumser() { + + if (bill == null) { + return ""; + } + + TripRequirement tr = bill.getRequirement(); + + if (tr == null) { + return ""; + } + + return tr.getNumser(); + } + public TripBill getBill() { return bill; } diff --git a/src/main/java/info/bukova/isspst/services/tripbill/TripBillApprovalServiceImpl.java b/src/main/java/info/bukova/isspst/services/tripbill/TripBillApprovalServiceImpl.java index 11080ccf..c9827168 100644 --- a/src/main/java/info/bukova/isspst/services/tripbill/TripBillApprovalServiceImpl.java +++ b/src/main/java/info/bukova/isspst/services/tripbill/TripBillApprovalServiceImpl.java @@ -8,12 +8,13 @@ import info.bukova.isspst.data.TripBillApproval; import info.bukova.isspst.services.IsspstException; import info.bukova.isspst.services.requirement.RequirementBaseServiceImpl; import info.bukova.isspst.services.requirement.RequirementTypeService; + +import java.util.Date; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.transaction.annotation.Transactional; -import java.util.Date; - /** * @author Pepa Rokos */ @@ -34,7 +35,7 @@ public class TripBillApprovalServiceImpl extends RequirementBaseServiceImpl