Do gridů v cestovních příkazech byly přidány sloupce "Počátek sl. cesty", "Spolucestující" a "Datum schválení".
This commit is contained in:
@@ -5,6 +5,8 @@ import javax.persistence.FetchType;
|
|||||||
import javax.persistence.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
import javax.persistence.OneToOne;
|
import javax.persistence.OneToOne;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Pepa Rokos
|
* @author Pepa Rokos
|
||||||
@@ -17,6 +19,36 @@ public class TripBillApproval extends RequirementBase {
|
|||||||
@OneToOne(fetch = FetchType.EAGER)
|
@OneToOne(fetch = FetchType.EAGER)
|
||||||
@JoinColumn(name = "TRIPBILL_ID")
|
@JoinColumn(name = "TRIPBILL_ID")
|
||||||
private TripBill bill;
|
private TripBill bill;
|
||||||
|
@Transient
|
||||||
|
private boolean billForPassenger;
|
||||||
|
@Transient
|
||||||
|
private Date approveDate;
|
||||||
|
@Transient
|
||||||
|
private Date tripDate;
|
||||||
|
|
||||||
|
public boolean isBillForPassenger() {
|
||||||
|
return billForPassenger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBillForPassenger(boolean billForPassenger) {
|
||||||
|
this.billForPassenger = billForPassenger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getTripDate() {
|
||||||
|
return tripDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTripDate(Date tripDate) {
|
||||||
|
this.tripDate = tripDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getApproveDate() {
|
||||||
|
return approveDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApproveDate(Date approveDate) {
|
||||||
|
this.approveDate = approveDate;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getNumser() {
|
public String getNumser() {
|
||||||
|
|||||||
@@ -53,7 +53,11 @@ public class TripBillApprovalFilter implements Filter<TripBillApproval>
|
|||||||
boolean foundOwner = User.isEqualByUserForFilter(item.getBill().getOwnedBy(), condition.getBill().getOwnedBy());
|
boolean foundOwner = User.isEqualByUserForFilter(item.getBill().getOwnedBy(), condition.getBill().getOwnedBy());
|
||||||
boolean foundPaid = BooleanUtils.isEqualByBooleanValue(item.getBill().getPaid(), condition.getBill().getPaid());
|
boolean foundPaid = BooleanUtils.isEqualByBooleanValue(item.getBill().getPaid(), condition.getBill().getPaid());
|
||||||
boolean foundPaidDate = DateTimeUtils.isEqualByDateForFilter(item.getBill().getPaidDate(), condition.getBill().getPaidDate());
|
boolean foundPaidDate = DateTimeUtils.isEqualByDateForFilter(item.getBill().getPaidDate(), condition.getBill().getPaidDate());
|
||||||
return foundNumser && foundReqDate && foundDescription && foundFrom && foundTo && foundWorkgroup && foundCentre && foundOwner && foundPaid && foundPaidDate;
|
boolean foundPassenger = (item.getBill().getOwnedBy() != item.getBill().getRequirement().getOwnedBy()) == condition.isBillForPassenger();
|
||||||
|
boolean foundApproveDate = DateTimeUtils.isEqualByDateForFilter(item.getLastApproveDate(), condition.getApproveDate());
|
||||||
|
boolean foundTripDate = DateTimeUtils.isEqualByDateForFilter(item.getBill().getRequirement().getTripDate(), condition.getTripDate());
|
||||||
|
return foundNumser && foundReqDate && foundDescription && foundFrom && foundTo && foundWorkgroup && foundCentre && foundOwner && foundPaid
|
||||||
|
&& foundPaidDate && foundPassenger && foundApproveDate && foundTripDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Factory
|
@Factory
|
||||||
|
|||||||
@@ -20,7 +20,12 @@ public class TripBillListAll extends TripBillListBase {
|
|||||||
@Override
|
@Override
|
||||||
protected List<TripBillApproval> getListFromService() {
|
protected List<TripBillApproval> getListFromService() {
|
||||||
try {
|
try {
|
||||||
return getReqService().getAll();
|
List<TripBillApproval> list = getReqService().getAll();
|
||||||
|
for (TripBillApproval item : list)
|
||||||
|
{
|
||||||
|
getReqService().loadAuthItems(item);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
} catch (AccessDeniedException e) {
|
} catch (AccessDeniedException e) {
|
||||||
BindUtils.postGlobalCommand(null, null, "disableAll", null);
|
BindUtils.postGlobalCommand(null, null, "disableAll", null);
|
||||||
return new ArrayList<TripBillApproval>();
|
return new ArrayList<TripBillApproval>();
|
||||||
|
|||||||
@@ -20,7 +20,12 @@ public class TripBillListCentre extends TripBillListBase {
|
|||||||
@Override
|
@Override
|
||||||
protected List<TripBillApproval> getListFromService() {
|
protected List<TripBillApproval> getListFromService() {
|
||||||
try {
|
try {
|
||||||
return getReqService().getCentreReq();
|
List<TripBillApproval> list = getReqService().getCentreReq();
|
||||||
|
for (TripBillApproval item : list)
|
||||||
|
{
|
||||||
|
getReqService().loadAuthItems(item);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
} catch (AccessDeniedException e) {
|
} catch (AccessDeniedException e) {
|
||||||
BindUtils.postGlobalCommand(null, null, "disableCentre", null);
|
BindUtils.postGlobalCommand(null, null, "disableCentre", null);
|
||||||
return new ArrayList<TripBillApproval>();
|
return new ArrayList<TripBillApproval>();
|
||||||
|
|||||||
@@ -20,7 +20,12 @@ public class TripBillListWorkgroup extends TripBillListBase {
|
|||||||
@Override
|
@Override
|
||||||
protected List<TripBillApproval> getListFromService() {
|
protected List<TripBillApproval> getListFromService() {
|
||||||
try {
|
try {
|
||||||
return getReqService().getWorkgroupReq();
|
List<TripBillApproval> list = getReqService().getWorkgroupReq();
|
||||||
|
for (TripBillApproval item : list)
|
||||||
|
{
|
||||||
|
getReqService().loadAuthItems(item);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
} catch (AccessDeniedException e) {
|
} catch (AccessDeniedException e) {
|
||||||
BindUtils.postGlobalCommand(null, null, "disableWorkgroup", null);
|
BindUtils.postGlobalCommand(null, null, "disableWorkgroup", null);
|
||||||
return new ArrayList<TripBillApproval>();
|
return new ArrayList<TripBillApproval>();
|
||||||
|
|||||||
@@ -247,6 +247,7 @@ TripBillCancelApprovalTitle=Zrušit schválení
|
|||||||
TripBillPaid=Proplaceno
|
TripBillPaid=Proplaceno
|
||||||
TripBillPaidDate=Datum proplacení
|
TripBillPaidDate=Datum proplacení
|
||||||
TripBillPay=Proplatit
|
TripBillPay=Proplatit
|
||||||
|
TribBillApproveDate=Datum schválení
|
||||||
|
|
||||||
TripBillSummaryDetail=Detail
|
TripBillSummaryDetail=Detail
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,12 @@
|
|||||||
label="${labels.TravelOrdersGridReqDate}"
|
label="${labels.TravelOrdersGridReqDate}"
|
||||||
sort="auto(bill.requirement.reqDate)"
|
sort="auto(bill.requirement.reqDate)"
|
||||||
onSort="@command('onSortHeader', header=self)"
|
onSort="@command('onSortHeader', header=self)"
|
||||||
width="70%" />
|
width="40%" />
|
||||||
|
<listheader
|
||||||
|
label="${labels.TripBillTravelBegin}"
|
||||||
|
sort="auto(bill.requirement.tripDate)"
|
||||||
|
onSort="@command('onSortHeader', header=self)"
|
||||||
|
width="40%" />
|
||||||
<listheader
|
<listheader
|
||||||
label="${labels.TravelOrdersGridFrom}"
|
label="${labels.TravelOrdersGridFrom}"
|
||||||
sort="czech(bill.requirement.from)"
|
sort="czech(bill.requirement.from)"
|
||||||
@@ -42,16 +47,22 @@
|
|||||||
sort="auto(bill.total)"
|
sort="auto(bill.total)"
|
||||||
onSort="@command('onSortHeader', header=self)"
|
onSort="@command('onSortHeader', header=self)"
|
||||||
align="right"
|
align="right"
|
||||||
width="70%" />
|
width="30%" />
|
||||||
<listheader
|
<listheader
|
||||||
label="${labels.ownedBy}"
|
label="${labels.ownedBy}"
|
||||||
width="50%"/>
|
width="50%"/>
|
||||||
|
<listheader
|
||||||
|
label="${labels.RequirementsFormPassengers}"
|
||||||
|
width="10%"/>
|
||||||
|
<listheader
|
||||||
|
label="${labels.TribBillApproveDate}"
|
||||||
|
width="40%"/>
|
||||||
<listheader
|
<listheader
|
||||||
label="${labels.TripBillPaid}"
|
label="${labels.TripBillPaid}"
|
||||||
width="10%"/>
|
width="10%"/>
|
||||||
<listheader
|
<listheader
|
||||||
label="${labels.TripBillPaidDate}"
|
label="${labels.TripBillPaidDate}"
|
||||||
width="20%"/>
|
width="40%"/>
|
||||||
</listhead>
|
</listhead>
|
||||||
<auxhead
|
<auxhead
|
||||||
sclass="category-center"
|
sclass="category-center"
|
||||||
@@ -87,6 +98,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</auxheader>
|
</auxheader>
|
||||||
|
<auxheader>
|
||||||
|
<div sclass="find-grid-cell">
|
||||||
|
<div sclass="find-grid-divtextbox">
|
||||||
|
<datebox
|
||||||
|
value="@bind(vm.filterTemplate.tripDate)"
|
||||||
|
format="${labels.DateFormat}"
|
||||||
|
instant="true"
|
||||||
|
onChange="@command('doFilter')"
|
||||||
|
sclass="find-grid-textbox"
|
||||||
|
width="100%" />
|
||||||
|
</div>
|
||||||
|
<div sclass="find-grid-img">
|
||||||
|
<image src="/img/funnel.png" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</auxheader>
|
||||||
<auxheader>
|
<auxheader>
|
||||||
<div sclass="find-grid-cell">
|
<div sclass="find-grid-cell">
|
||||||
<div sclass="find-grid-divtextbox">
|
<div sclass="find-grid-divtextbox">
|
||||||
@@ -153,6 +180,34 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</auxheader>
|
</auxheader>
|
||||||
|
<auxheader>
|
||||||
|
<div sclass="find-grid-cell">
|
||||||
|
<div sclass="find-grid-divtextbox">
|
||||||
|
<checkbox
|
||||||
|
checked="@bind(vm.filterTemplate.billForPassenger)"
|
||||||
|
onClick="@command('doFilter')" />
|
||||||
|
</div>
|
||||||
|
<div sclass="find-grid-img">
|
||||||
|
<image src="/img/funnel.png" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</auxheader>
|
||||||
|
<auxheader>
|
||||||
|
<div sclass="find-grid-cell">
|
||||||
|
<div sclass="find-grid-divtextbox">
|
||||||
|
<datebox
|
||||||
|
value="@bind(vm.filterTemplate.approveDate)"
|
||||||
|
format="${labels.DateFormat}"
|
||||||
|
instant="true"
|
||||||
|
onChange="@command('doFilter')"
|
||||||
|
sclass="find-grid-textbox"
|
||||||
|
width="100%" />
|
||||||
|
</div>
|
||||||
|
<div sclass="find-grid-img">
|
||||||
|
<image src="/img/funnel.png" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</auxheader>
|
||||||
<auxheader>
|
<auxheader>
|
||||||
<div sclass="find-grid-cell">
|
<div sclass="find-grid-cell">
|
||||||
<div sclass="find-grid-divtextbox">
|
<div sclass="find-grid-divtextbox">
|
||||||
@@ -186,10 +241,13 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<listcell label="@load(each.bill.requirement.numser)" />
|
<listcell label="@load(each.bill.requirement.numser)" />
|
||||||
<listcell label="@load(each.bill.requirement.reqDate) @converter('formatedDate', format=labels.DateFormat)" />
|
<listcell label="@load(each.bill.requirement.reqDate) @converter('formatedDate', format=labels.DateFormat)" />
|
||||||
|
<listcell label="@load(each.bill.requirement.tripDate) @converter('formatedDate', format=labels.DateFormat)" />
|
||||||
<listcell label="@load(each.bill.requirement.from)" />
|
<listcell label="@load(each.bill.requirement.from)" />
|
||||||
<listcell label="@load(each.bill.requirement.to)" />
|
<listcell label="@load(each.bill.requirement.to)" />
|
||||||
<listcell label="@load(each.bill.total) @converter(vm.standardBigDecimalConverter)"/>
|
<listcell label="@load(each.bill.total) @converter(vm.standardBigDecimalConverter)"/>
|
||||||
<listcell label="@load(each.bill.ownedBy)"/>
|
<listcell label="@load(each.bill.ownedBy)"/>
|
||||||
|
<listcell label="@load(each.bill.ownedBy ne each.bill.requirement.ownedBy) @converter(vm.standardBoolConverter)"/>
|
||||||
|
<listcell label="@load(each.lastApproveDate) @converter('formatedDate', format=labels.DateFormat)"/>
|
||||||
<listcell label="@load(each.bill.paid) @converter(vm.standardBoolConverter)"/>
|
<listcell label="@load(each.bill.paid) @converter(vm.standardBoolConverter)"/>
|
||||||
<listcell label="@load(each.bill.paidDate) @converter('formatedDate', format=labels.DateFormat)"/>
|
<listcell label="@load(each.bill.paidDate) @converter('formatedDate', format=labels.DateFormat)"/>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|||||||
Reference in New Issue
Block a user