Přidána agenda pro zadávání fakturace k požadavkům. Chybí filtrování.

refs #164
This commit is contained in:
2014-10-26 22:16:14 +01:00
parent f1ca2d11c8
commit b2d141e52b
33 changed files with 735 additions and 26 deletions
@@ -330,6 +330,17 @@ OrderFormInvoiceNumber=Číslo faktury
OrderFormInvoiceTotal=Částka faktury
OrderPrintPrices=Tisknout ceny
Invoicing=Fakturace požadavků
InvoicingRequirementNumber=Číslo požadavku
InvoicingRequirementPrice=Cena požadavku
InvoicingInvoicedPrice=Vyfakturovaná cena
InvoicingFormTitle=Zadání fakturace
InvoicingAdd=Přidat fakturaci
InvoicingDate=Datum
InvoicingInvoiceNumber=Číslo faktury
InvoicingAmount=Částka
InvoicingDescription=Popis
HandleComboKeyFilter=#del
HandleComboKey=$#del
@@ -251,6 +251,10 @@
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="invoicingDao" class="info.bukova.isspst.dao.jpa.InvoicingDaoJPA">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<!-- Business logic -->
<bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>
@@ -317,7 +321,7 @@
<property name="xmlContext" ref="xmlCtxAres" />
</bean>
<bean id="approvedService" class="info.bukova.isspst.services.approved.ApprovedServiceImpl"/>
<bean id="approvedService" class="info.bukova.isspst.services.orders.ApprovedServiceImpl"/>
<bean id="permissionService" class="info.bukova.isspst.services.users.PermissionServiceImpl">
<property name="dao" ref="permissionDao"/>
@@ -408,10 +412,15 @@
<property name="validator" ref="validator"/>
</bean>
<bean id="orderService" class="info.bukova.isspst.services.approved.OrderServiceImpl">
<bean id="orderService" class="info.bukova.isspst.services.orders.OrderServiceImpl">
<property name="dao" ref="orderDao"/>
<property name="validator" ref="validator"/>
<property name="numberSeriesService" ref="numericSeriesService"/>
</bean>
<bean id="invoicingService" class="info.bukova.isspst.services.invoicing.InvoicingServiceImpl">
<property name="dao" ref="invoicingDao"/>
<property name="validator" ref="validator"/>
</bean>
</beans>
+7 -1
View File
@@ -9,7 +9,7 @@
autodrop="true">
<menuitem
label="${labels.Information}"
href="/" />
href="/app/" />
<menuseparator />
<menu label="${labels.Orders}">
<menupopup>
@@ -34,6 +34,12 @@
label="${labels.CreatedOrders}"
href="/main/orders/created/"
disabled="${not sec:isAllGranted('PERM_READ_ORDER')}" />
<menuseparator/>
<menuitem
image="/img/invoicing-016.png"
label="${labels.Invoicing}"
href="/main/invoicing/"
disabled="${not sec:isAllGranted('PERM_READ_INVOICING')}" />
</menupopup>
</menu>
<menu label="${labels.BussinessTrips}">
+1 -1
View File
@@ -1,7 +1,7 @@
<?page title="toolbar" contentType="text/html;charset=UTF-8"?>
<zk>
<toolbar>
<toolbarbutton image="/img/add.png" tooltiptext="${labels.ToolbarRecNew}" id="btnNew" onClick="@command('addNew')" disabled="@load(vm.filter)" />
<toolbarbutton image="/img/add.png" tooltiptext="${labels.ToolbarRecNew}" id="btnNew" onClick="@command('addNew')" disabled="@load(vm.filter or not vm.ableToAdd)" />
<toolbarbutton image="/img/edit.png" tooltiptext="${labels.ToolbarRecEdit}" id="btnEdit" onClick="@command('edit')" disabled="@load(empty vm.dataBean ? 'true' : 'false')"/>
<toolbarbutton image="/img/delete.png" tooltiptext="${labels.ToolbarRecDelete}" id="btnDelete" onClick="@command('delete')" disabled="@load(not vm.ableToDelete)" />
<toolbarbutton image="/img/funnel.png" tooltiptext="${labels.ToolbarRecFilter}" id="btnFilter" onClick="@command('filter')" />
Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

+10
View File
@@ -0,0 +1,10 @@
<?page title="${labels.Invoicing}" contentType="text/html;charset=UTF-8"?>
<zk>
<zscript>
String gridZul = "invoicingGrid.zul";
</zscript>
<include src="/app/template.zhtml"/>
</zk>
@@ -0,0 +1,191 @@
<?page title="${labels.Invoicing}" contentType="text/html;charset=UTF-8"?>
<zk>
<window
id="editWin"
closable="true"
width="95%"
height="95%"
border="normal"
position="center"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.main.invoicing.InvoicingForm')">
<caption
src="/img/invoicing-032.png"
zclass="form-caption"
label="${labels.InvoicingFormTitle}" />
<vlayout vflex="1">
<hbox>
<vbox height="300px">
<button
image="/img/item-add.png"
label="${labels.InvoicingAdd}"
sclass="nicebutton"
onClick="@command('addItem')"/>
<listbox
model="@load(vm.dataBean.items)"
vflex="1"
selectedItem="@bind(vm.selectedItem)"
selectedIndex="@bind(vm.selectedIndex)">
<listhead>
<listheader
label="${labels.InvoicingDate}"
width="150px"/>
<listheader label="${labels.InvoicingInvoiceNumber}" />
<listheader
label="${labels.InvoicingAmount}"
align="right"
width="90px"/>
<listheader/>
</listhead>
<template name="model">
<listitem>
<listcell>
<datebox
value="@bind(each.invoiceDate)"
inplace="true"
onFocus="@command('onFocus', item=each)"/>
</listcell>
<listcell>
<textbox
value="@bind(each.invoiceNumber)"
sclass="grid-textbox-max"
inplace="true"
onFocus="@command('onFocus', item=each)"/>
</listcell>
<listcell>
<textbox
value="@bind(each.amount) @converter(vm.standardBigDecimalConverter)"
sclass="grid-textbox-max"
inplace="true"
onFocus="@command('onFocus', item=each)"
onChange="@command('calculate')"/>
</listcell>
<listcell>
<button label="${labels.RemoveItem}" sclass="nicebutton" onClick="@command('removeItem', item=each)"/>
</listcell>
</listitem>
</template>
</listbox>
</vbox>
<grid hflex="min">
<columns>
<column
align="right"
hflex="min" />
<column />
</columns>
<rows>
<row>
<cell sclass="row-title">${labels.InvoicingRequirementNumber} :</cell>
<cell>
<textbox
width="200px"
value="@bind(vm.dataBean.requirement.numser)"
style="font-weight: bold;"
readonly="true"/>
</cell>
</row>
<row>
<cell sclass="row-title">${labels.InvoicingDescription} :</cell>
<cell>
<textbox
width="350px"
rows="5"
value="@bind(vm.dataBean.requirement.description)"
readonly="true" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.InvoicingRequirementPrice} :</cell>
<cell>
<textbox
width="150px"
value="@bind(vm.dataBean.requirement.sumTotal) @converter(vm.standardBigDecimalConverter)"
readonly="true"/>
</cell>
</row>
<row>
<cell sclass="row-title">${labels.InvoicingInvoicedPrice} :</cell>
<cell>
<textbox
width="150px"
value="@bind(vm.dataBean.totalInvoiced) @converter(vm.standardBigDecimalConverter)"
readonly="true"/>
</cell>
</row>
</rows>
</grid>
</hbox>
<listbox
vflex="1"
model="@load(vm.dataBean.requirement.items)">
<listhead>
<listheader
hflex="10"
label="${labels.RequirementItemCode}" />
<listheader
hflex="15"
label="${labels.RequirementItemName}" />
<listheader
hflex="30"
label="${labels.RequirementItemText}" />
<listheader
hflex="10"
align="right"
label="${labels.RequirementItemQuantity}" />
<listheader
hflex="10"
label="${labels.RequirementItemMUnit}" />
<listheader
hflex="10"
align="right"
label="${labels.RequirementItemUnitPrice}" />
<listheader
hflex="10"
align="right"
label="${labels.RequirementItemTotal}" />
<listheader
hflex="15"
label="${labels.RequirementItemDescription}" />
</listhead>
<template name="model">
<listitem>
<listcell>
<label value="@load(each.code)"/>
</listcell>
<listcell>
<label value="@load(each.name)" />
</listcell>
<listcell>
<label value="@load(each.textItem)" />
</listcell>
<listcell>
<label value="@bind(each.quantity) @converter(vm.standardBigDecimalConverter)" />
</listcell>
<listcell>
<label value="@bind(each.munit.name)" />
</listcell>
<listcell>
<label value="@bind(each.unitPrice) @converter(vm.standardBigDecimalConverter)" />
</listcell>
<listcell>
<label value="@bind(each.total) @converter(vm.standardBigDecimalConverter)" />
</listcell>
<listcell>
<label value="@bind(each.description)" />
</listcell>
</listitem>
</template>
</listbox>
<include src="/app/formButtons.zul" />
</vlayout>
</window>
</zk>
@@ -0,0 +1,76 @@
<?page title="${labels.Invoicing}" contentType="text/html;charset=UTF-8"?>
<zk>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<window
vflex="1"
border="normal"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.main.invoicing.InvoicingList')">
<caption
src="/img/invoicing-032.png"
zclass="form-caption"
label="${labels.Invoicing}" />
<include src="/app/toolbar.zul" />
<listbox
vflex="1"
model="@load(vm.dataList)"
selectedItem="@bind(vm.dataBean)">
<listhead menupopup="auto">
<listheader
label="${labels.InvoicingRequirementNumber}"
width="130px" />
<listheader
label="Popis"
width=""/>
<listheader
label="${labels.InvoicingRequirementPrice}"
align="right"
width="130px" />
<listheader
label="${labels.InvoicingInvoicedPrice}"
align="right"
width="130px" />
</listhead>
<!-- auxhead
sclass="category-center"
visible="@load(vm.filter)">
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox
value="@bind(vm.filterTemplate.name)"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox" />
</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">
<textbox
value="@bind(vm.filterTemplate.description)"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
</auxhead-->
<template name="model">
<listitem>
<listcell label="@load(each.requirement.numser)" />
<listcell label="@load(each.requirement.description)" />
<listcell label="@load(each.requirement.sumTotal) @converter(vm.standardBigDecimalConverter)" />
<listcell label="@load(each.totalInvoiced) @converter(vm.standardBigDecimalConverter)" />
</listitem>
</template>
</listbox>
</window>
</zk>