Implementováno schvalování vyúčtování služebních cest.

closes #202
This commit is contained in:
2015-03-17 10:20:59 +01:00
parent ceac59c8d3
commit 9c5679af2c
26 changed files with 396 additions and 26 deletions
@@ -229,6 +229,10 @@ TripBillInKc=v Kč
TripBillTo=Tam
TripBillBack=Zpět
TripBillTotal=Celkem
TripBillSaveApprove=Jestliže máte vše vyplněno, pošlete vyúčtování ke schválení. Vyúčtování zaslané ke schválení už nelze dále upravovat. Odeslat ke schválení?
TripBillSave=Odeslat ke schválení?
TripBillSummaryDetail=Detail
TripRequirement=Požadavek na služební cestu
ShowTripBill=Zobrazit vyúčtování
@@ -103,6 +103,7 @@
<bean id="evalHolder" class="info.bukova.isspst.security.EvaluatorsHolder">
<property name="globalEvaluators">
<map>
<entry key="#{T(info.bukova.isspst.services.tripbill.TripBillApprovalService)}" value-ref="tripReqEditEval"/>
<entry key="#{T(info.bukova.isspst.services.Service)}" value-ref="serviceEval"/>
<entry key="#{T(info.bukova.isspst.data.Requirement)}" value-ref="reqEditEval"/>
<entry key="#{T(info.bukova.isspst.data.TripRequirement)}" value-ref="tripReqEditEval"/>
@@ -267,6 +268,10 @@
<bean id="invoicingDao" class="info.bukova.isspst.dao.jpa.InvoicingDaoJPA">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="tripBillApprovalDao" class="info.bukova.isspst.dao.jpa.TripBillApprovalDaoJPA">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<!-- Business logic -->
<bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>
@@ -443,5 +448,9 @@
</bean>
<bean id="fulltextService" class="info.bukova.isspst.services.fulltext.FullTextServiceImpl"/>
<bean id="tripBillApprovalService" class="info.bukova.isspst.services.tripbill.TripBillApprovalServiceImpl">
<property name="dao" ref="tripBillApprovalDao"/>
</bean>
</beans>
@@ -8,7 +8,7 @@
<hbox>
<listbox model="@load(vm.reports)" width="250px" height="350px" selectedItem="@bind(vm.selected)">
<template name="model">
<listitem disabled="@load(each.singleRecord and empty vm.singleObject)">
<listitem disabled="@load(each.singleRecord and (empty vm.singleObject or (each.hasCondition and not vm.canPrint) ))">
<listcell><label value="@load(each.name)"/></listcell>
</listitem>
</template>
@@ -1,5 +1,7 @@
<?page title="${labels.TravelOrders}" contentType="text/html;charset=UTF-8"?>
<zk>
<zk xmlns="http://www.zkoss.org/2005/zul"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd">
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<window
vflex="1"
@@ -73,7 +75,7 @@
</auxheader>
</auxhead> -->
<template name="model">
<listitem>
<listitem style="@load((empty each.approval ? '' : (each.approval.state eq 'PARTIALLY') ? 'background-color: #fffb90' : ((each.approval.state eq 'APPROVED') ? 'background-color: #afffb5' : 'background-color: #fdfbca') ))">
<listcell label="@load(each.requirement.numser)" />
<listcell label="@load(each.requirement.reqDate) @converter('formatedDate', format=labels.DateFormat)" />
<listcell label="@load(each.requirement.from)" />
@@ -0,0 +1,72 @@
<?page title="${labels.TravelOrdersFormTitle}" contentType="text/html;charset=UTF-8"?>
<zk xmlns="http://www.zkoss.org/2005/zul"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd">
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<window id="billWin"
closable="true"
width="700px"
height="450px"
border="normal"
position="center"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.tripbill.TripBillSummaryVM')">
<caption
src="/img/pickup-032.png"
zclass="form-caption"
label="${labels.TravelOrdersFormTitle}" />
<hbox vflex="1">
<vbox width="350px" vflex="1">
<label value="@load(vm.bill.ownedBy)" style="font-weight: bold; font-size: larger"/>
<hbox>
<label value="${labels.RequirementsFormFrom}: "/>
<label value="@load(vm.bill.requirement.from)"/>
<label value="${labels.RequirementsFormTo}: "/>
<label value="@load(vm.bill.requirement.to)"/>
</hbox>
<hbox>
<label value="${labels.RequirementsFormStartDateTime}: "/>
<label value="@load(vm.bill.requirement.tripDate) @converter('formatedDate', format=labels.DateFormat)"/>
</hbox>
<hbox>
<label value="${labels.RequirementsFormEndDate}: "/>
<label value="@load(vm.bill.requirement.endDate) @converter('formatedDate', format=labels.DateFormat)"/>
</hbox>
<hbox>
<label value="${labels.RequirementsFormPurpose}: "/>
<label value="@load(vm.bill.requirement.description)"/>
</hbox>
<hbox>
<label value="${labels.TripBillTotal}:"/> <label value="@load(vm.bill.total) @converter(vm.standardBigDecimalConverter)"/>
</hbox>
<button label="${labels.TripBillSummaryDetail}"
onClick="@command('showBill', bill=vm.bill)"
sclass="nicebutton"/>
<div visible="@load(not empty vm.bills)" vflex="1">
<separator bar="true" width="100%"/>
<label value="${labels.RequirementsFormPassengers}"/>
<grid model="@load(vm.bills)" vflex="1">
<columns>
<column />
<column width="90px"/>
</columns>
<rows>
<template name="model">
<row>
<label value="@load(each.ownedBy)"/>
<button label="${labels.TripBillSummaryDetail}"
sclass="nicebutton"
onClick="@command('showBill', bill=each)"/>
</row>
</template>
</rows>
</grid>
</div>
</vbox>
<include src="../../approveStatus.zul" vflex="1"/>
</hbox>
</window>
</zk>