Agenda Fakturace požadavků
• grid rozdělen na 2 záložky [Nevyřízené] a [Archive] • na formuláři přidán checkbox [Vyřízeno] closes #207
This commit is contained in:
@@ -10,9 +10,9 @@ import info.bukova.isspst.data.TripBill;
|
||||
import info.bukova.isspst.data.TripRequirement;
|
||||
import info.bukova.isspst.reporting.Report;
|
||||
import info.bukova.isspst.reporting.ReportMapping;
|
||||
import info.bukova.isspst.services.fulltext.FullTextService;
|
||||
import info.bukova.isspst.services.addressbook.AdbService;
|
||||
import info.bukova.isspst.services.buildings.BuildingService;
|
||||
import info.bukova.isspst.services.fulltext.FullTextService;
|
||||
import info.bukova.isspst.services.invoicing.InvoicingService;
|
||||
import info.bukova.isspst.services.munits.MUnitService;
|
||||
import info.bukova.isspst.services.orders.ApprovedService;
|
||||
@@ -33,7 +33,7 @@ import java.util.Map;
|
||||
|
||||
public class Constants {
|
||||
|
||||
public final static long DB_VERSION = 2;
|
||||
public final static long DB_VERSION = 3;
|
||||
|
||||
public final static String DEF_ADMIN = "admin";
|
||||
public final static String DEF_ADMIN_PASSWD = "admin";
|
||||
|
||||
@@ -17,7 +17,8 @@ import org.hibernate.annotations.LazyCollectionOption;
|
||||
|
||||
@Entity
|
||||
@Table(name = "INVOICING")
|
||||
public class Invoicing extends BaseData {
|
||||
public class Invoicing extends BaseData implements Cloneable
|
||||
{
|
||||
|
||||
@OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
|
||||
@JoinColumn(name = "REQUIREMENT_ID")
|
||||
@@ -31,6 +32,9 @@ public class Invoicing extends BaseData {
|
||||
@Column(name = "TOTAL_INVOICED", precision = 15, scale = 4)
|
||||
private BigDecimal totalInvoiced;
|
||||
|
||||
@Column(name = "COMPLETED")
|
||||
private boolean completed;
|
||||
|
||||
public Requirement getRequirement() {
|
||||
return requirement;
|
||||
}
|
||||
@@ -55,4 +59,20 @@ public class Invoicing extends BaseData {
|
||||
this.totalInvoiced = totalInvoiced;
|
||||
}
|
||||
|
||||
public boolean isCompleted()
|
||||
{
|
||||
return completed;
|
||||
}
|
||||
|
||||
public void setCompleted(boolean completed)
|
||||
{
|
||||
this.completed = completed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object clone() throws CloneNotSupportedException
|
||||
{
|
||||
Invoicing cloned = (Invoicing) super.clone();
|
||||
return cloned;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,29 +71,29 @@ public class DbInfoServiceImpl extends AbstractService<DbInfo> implements DbInfo
|
||||
{
|
||||
List<Str2Str> tables = new ArrayList<Str2Str>();
|
||||
|
||||
tables.add(new Str2Str("address", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("building", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("material", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("munit", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("orders", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("order_item", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("permission", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("requirement", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("requirementtype", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("requirement_items", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("role", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("service", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("triprequirement", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("ADDRESS", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("BUILDING", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("MATERIAL", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("MUNIT", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("ORDERS", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("ORDER_ITEM", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("PERMISSION", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("REQUIREMENT", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("REQUIREMENTTYPE", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("REQUIREMENT_ITEMS", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("ROLE", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("SERVICE", "DESCRIPTION"));
|
||||
tables.add(new Str2Str("TRIPREQUIREMENT", "DESCRIPTION"));
|
||||
|
||||
tables.add(new Str2Str("material", "MUNIT_DESCRIPTION"));
|
||||
tables.add(new Str2Str("orders", "INVOICE_DESCRIPTION"));
|
||||
tables.add(new Str2Str("orders", "DELIVERY_DESCRIPTION"));
|
||||
tables.add(new Str2Str("orders", "SUPPLIER_DESCRIPTION"));
|
||||
tables.add(new Str2Str("order_item", "MUNIT_DESCRIPTION"));
|
||||
tables.add(new Str2Str("requirement_items", "MUNIT_DESCRIPTION"));
|
||||
tables.add(new Str2Str("triprequirement", "VEHICLE_DESCRIPTION"));
|
||||
tables.add(new Str2Str("trip_bill_items", "BACK_VEHICLE_DESCRIPTION"));
|
||||
tables.add(new Str2Str("trip_bill_items", "VEHICLE_DESCRIPTION"));
|
||||
tables.add(new Str2Str("MATERIAL", "MUNIT_DESCRIPTION"));
|
||||
tables.add(new Str2Str("ORDERS", "INVOICE_DESCRIPTION"));
|
||||
tables.add(new Str2Str("ORDERS", "DELIVERY_DESCRIPTION"));
|
||||
tables.add(new Str2Str("ORDERS", "SUPPLIER_DESCRIPTION"));
|
||||
tables.add(new Str2Str("ORDER_ITEM", "MUNIT_DESCRIPTION"));
|
||||
tables.add(new Str2Str("REQUIREMENT_ITEMS", "MUNIT_DESCRIPTION"));
|
||||
tables.add(new Str2Str("TRIPREQUIREMENT", "VEHICLE_DESCRIPTION"));
|
||||
tables.add(new Str2Str("TRIP_BILL_ITEMS", "BACK_VEHICLE_DESCRIPTION"));
|
||||
tables.add(new Str2Str("TRIP_BILL_ITEMS", "VEHICLE_DESCRIPTION"));
|
||||
|
||||
for (Str2Str item : tables)
|
||||
{
|
||||
@@ -107,9 +107,9 @@ public class DbInfoServiceImpl extends AbstractService<DbInfo> implements DbInfo
|
||||
{
|
||||
List<String> tables = new ArrayList<String>();
|
||||
|
||||
tables.add("material");
|
||||
tables.add("order_item");
|
||||
tables.add("requirement_items");
|
||||
tables.add("MATERIAL");
|
||||
tables.add("ORDER_ITEM");
|
||||
tables.add("REQUIREMENT_ITEMS");
|
||||
|
||||
for (String item : tables)
|
||||
{
|
||||
@@ -119,6 +119,13 @@ public class DbInfoServiceImpl extends AbstractService<DbInfo> implements DbInfo
|
||||
}
|
||||
}
|
||||
|
||||
if (dbVersion < 3)
|
||||
{
|
||||
sql = "UPDATE INVOICING SET COMPLETED = false WHERE (COMPLETED Is NULL) ";
|
||||
sq = this.dao.getSession().createSQLQuery(sql);
|
||||
sq.executeUpdate();
|
||||
}
|
||||
|
||||
this.updateDatabaseVersion();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package info.bukova.isspst.services.invoicing;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import info.bukova.isspst.data.Invoicing;
|
||||
import info.bukova.isspst.data.Workgroup;
|
||||
import info.bukova.isspst.services.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
public interface InvoicingService extends Service<Invoicing> {
|
||||
|
||||
public BigDecimal totalInvoicedForWorkgroup(Workgroup workgroup);
|
||||
@@ -16,4 +17,7 @@ public interface InvoicingService extends Service<Invoicing> {
|
||||
|
||||
public void calculate(Invoicing invoicing);
|
||||
|
||||
public List<Invoicing> getPendingList();
|
||||
|
||||
public List<Invoicing> getArchiveList();
|
||||
}
|
||||
|
||||
@@ -73,4 +73,23 @@ public class InvoicingServiceImpl extends AbstractOwnedService<Invoicing> implem
|
||||
invoice.getRequirement().setOwnedBy(inv.getRequirement().getOwnedBy());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
@Transactional
|
||||
@PreAuthorize("hasPermission(this, 'PERM_READ')")
|
||||
public List<Invoicing> getPendingList()
|
||||
{
|
||||
Query q = dao.getQuery("select inv from Invoicing as inv join fetch inv.requirement rq join fetch rq.ownedBy where (inv.completed Is Null or inv.completed = false) order by rq.numser");
|
||||
return q.list();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
@Transactional
|
||||
@PreAuthorize("hasPermission(this, 'PERM_READ')")
|
||||
public List<Invoicing> getArchiveList()
|
||||
{
|
||||
Query q = dao.getQuery("select inv from Invoicing as inv join fetch inv.requirement rq join fetch rq.ownedBy where inv.completed = true order by rq.numser");
|
||||
return q.list();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,7 +258,10 @@ public class ListViewModel<T extends DataModel> extends DocumentViewModel
|
||||
}
|
||||
dataBean = editBean;
|
||||
if (!newRec && editBean != null) {
|
||||
dataList.set(selIndex, editBean);
|
||||
if (selIndex < dataList.size())
|
||||
{
|
||||
dataList.set(selIndex, editBean);
|
||||
}
|
||||
}
|
||||
|
||||
BindUtils.postGlobalCommand(null, null, "reloadRelated", null);
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package info.bukova.isspst.ui.main.invoicing;
|
||||
|
||||
import info.bukova.isspst.data.Invoicing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.zkoss.bind.annotation.Init;
|
||||
|
||||
public class InvoicingArchiveList extends InvoicingList
|
||||
{
|
||||
@Init(superclass = true)
|
||||
public void initInvoicingArchiveList()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<Invoicing> getListFromService()
|
||||
{
|
||||
try
|
||||
{
|
||||
return invoicingService.getArchiveList();
|
||||
}
|
||||
catch (AccessDeniedException e)
|
||||
{
|
||||
// BindUtils.postGlobalCommand(null, null, "disableCentre", null);
|
||||
// e.printStackTrace();
|
||||
return new ArrayList<Invoicing>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,9 @@ import info.bukova.isspst.data.InvoicingItem;
|
||||
import info.bukova.isspst.services.invoicing.InvoicingService;
|
||||
import info.bukova.isspst.ui.FormViewModel;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.zkoss.bind.BindUtils;
|
||||
import org.zkoss.bind.annotation.BindingParam;
|
||||
import org.zkoss.bind.annotation.Command;
|
||||
import org.zkoss.bind.annotation.Init;
|
||||
@@ -13,16 +16,46 @@ import org.zkoss.zk.ui.select.annotation.WireVariable;
|
||||
|
||||
public class InvoicingForm extends FormViewModel<Invoicing> {
|
||||
|
||||
public final static String TAG = InvoicingForm.class.getSimpleName();
|
||||
private final static Logger log = LoggerFactory.getLogger(InvoicingForm.class.getSimpleName());
|
||||
|
||||
private InvoicingItem selectedItem;
|
||||
private int selectedIndex;
|
||||
@WireVariable
|
||||
private InvoicingService invoicingService;
|
||||
|
||||
protected Invoicing invoicingBeforeEdit;
|
||||
|
||||
@Init(superclass = true)
|
||||
public void init() {
|
||||
public void initInvoicingForm()
|
||||
{
|
||||
selectedIndex = -1;
|
||||
|
||||
try
|
||||
{
|
||||
this.invoicingBeforeEdit = (Invoicing) this.getDataBean().clone();
|
||||
}
|
||||
catch (CloneNotSupportedException e)
|
||||
{
|
||||
log.error("Nelze provést hlubokou kopii fakturace!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doSave()
|
||||
{
|
||||
// Zjisti, zda se změnil příznak Vyřízeno
|
||||
boolean competedChanged = (this.invoicingBeforeEdit.isCompleted() != this.getDataBean().isCompleted());
|
||||
|
||||
super.doSave();
|
||||
|
||||
if (competedChanged)
|
||||
{
|
||||
BindUtils.postGlobalCommand(null, null, "refreshTabs", null);
|
||||
}
|
||||
}
|
||||
|
||||
private void selectItem(InvoicingItem item) {
|
||||
if (item != null) {
|
||||
selectedItem = item;
|
||||
@@ -77,4 +110,13 @@ public class InvoicingForm extends FormViewModel<Invoicing> {
|
||||
this.selectedIndex = selectedIndex;
|
||||
}
|
||||
|
||||
public Invoicing getInvoicingBeforeEdit()
|
||||
{
|
||||
return invoicingBeforeEdit;
|
||||
}
|
||||
|
||||
public void setInvoicingBeforeEdit(Invoicing invoicingBeforeEdit)
|
||||
{
|
||||
this.invoicingBeforeEdit = invoicingBeforeEdit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package info.bukova.isspst.ui.main.invoicing;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import info.bukova.isspst.data.Invoicing;
|
||||
import info.bukova.isspst.data.User;
|
||||
import info.bukova.isspst.data.Workgroup;
|
||||
@@ -11,13 +9,17 @@ import info.bukova.isspst.services.users.UserService;
|
||||
import info.bukova.isspst.services.workgroups.WorkgroupService;
|
||||
import info.bukova.isspst.ui.ListViewModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.zkoss.bind.annotation.GlobalCommand;
|
||||
import org.zkoss.bind.annotation.Init;
|
||||
import org.zkoss.bind.annotation.NotifyChange;
|
||||
import org.zkoss.zk.ui.select.annotation.WireVariable;
|
||||
|
||||
public class InvoicingList extends ListViewModel<Invoicing> {
|
||||
|
||||
@WireVariable
|
||||
private InvoicingService invoicingService;
|
||||
protected InvoicingService invoicingService;
|
||||
@WireVariable
|
||||
private WorkgroupService workgroupService;
|
||||
@WireVariable
|
||||
@@ -53,4 +55,15 @@ public class InvoicingList extends ListViewModel<Invoicing> {
|
||||
return userService.getUsersForCombo();
|
||||
}
|
||||
|
||||
@GlobalCommand
|
||||
@NotifyChange({ "dataList", "dataBean", "ableToDelete" })
|
||||
public void refreshTabs()
|
||||
{
|
||||
// Změnou hodnoty Vyřízeno se záznam přesunul do jiné záložky
|
||||
// Aby se editovaný záznam nerefreshoval, protože tam už nebude, nastaví
|
||||
// se na null
|
||||
this.setEditBean(null);
|
||||
// Provede přenačtení všech záložek
|
||||
this.reload();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package info.bukova.isspst.ui.main.invoicing;
|
||||
|
||||
import info.bukova.isspst.data.Invoicing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.zkoss.bind.annotation.Init;
|
||||
|
||||
public class InvoicingPendingList extends InvoicingList
|
||||
{
|
||||
@Init(superclass = true)
|
||||
public void initInvoicingPendingList()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<Invoicing> getListFromService()
|
||||
{
|
||||
try
|
||||
{
|
||||
return invoicingService.getPendingList();
|
||||
}
|
||||
catch (AccessDeniedException e)
|
||||
{
|
||||
// BindUtils.postGlobalCommand(null, null, "disableCentre", null);
|
||||
// e.printStackTrace();
|
||||
return new ArrayList<Invoicing>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -386,3 +386,6 @@ ModuleNotActive=Modul není aktivovaný
|
||||
|
||||
AgendaSearch=Vyhledávání
|
||||
Search=Hledat
|
||||
Pending = Nevyřízené
|
||||
Archive = Archiv
|
||||
Completed = Vyřízeno
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<zk>
|
||||
|
||||
<zscript>
|
||||
String gridZul = "invoicingGrid.zul";
|
||||
String gridZul = "setup.zul";
|
||||
</zscript>
|
||||
|
||||
<include src="/app/template.zhtml"/>
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<zk>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<window
|
||||
vflex="1"
|
||||
border="none"
|
||||
apply="org.zkoss.bind.BindComposer"
|
||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.main.invoicing.InvoicingArchiveList')">
|
||||
<include src="/app/toolbar.zul" />
|
||||
<include
|
||||
vflex="1"
|
||||
src="/main/invoicing/invoicingGrid.zul" />
|
||||
</window>
|
||||
</zk>
|
||||
@@ -0,0 +1,13 @@
|
||||
<zk>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<window
|
||||
vflex="1"
|
||||
border="none"
|
||||
apply="org.zkoss.bind.BindComposer"
|
||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.main.invoicing.InvoicingPendingList')">
|
||||
<include src="/app/toolbar.zul" />
|
||||
<include
|
||||
vflex="1"
|
||||
src="/main/invoicing/invoicingGrid.zul" />
|
||||
</window>
|
||||
</zk>
|
||||
@@ -17,11 +17,21 @@
|
||||
<hbox
|
||||
vflex="min"
|
||||
hflex="1">
|
||||
<button
|
||||
image="/img/item-add.png"
|
||||
label="${labels.InvoicingAdd}"
|
||||
sclass="nicebutton"
|
||||
onClick="@command('addItem')" />
|
||||
<div hflex="1">
|
||||
<button
|
||||
image="/img/item-add.png"
|
||||
label="${labels.InvoicingAdd}"
|
||||
sclass="nicebutton"
|
||||
onClick="@command('addItem')" />
|
||||
</div>
|
||||
<div hflex="1"></div>
|
||||
<div
|
||||
hflex="1"
|
||||
align="right">
|
||||
<checkbox
|
||||
label="${labels.Completed}"
|
||||
checked="@bind(vm.dataBean.completed)" />
|
||||
</div>
|
||||
</hbox>
|
||||
<hbox vflex="1">
|
||||
<vbox vflex="1">
|
||||
|
||||
@@ -1,209 +1,195 @@
|
||||
<?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}"
|
||||
sort="czech(requirement.numser)"
|
||||
onCreate="self.sort(true)"
|
||||
width="130px" />
|
||||
<listheader
|
||||
label="${labels.RequirementsGridReqDate}"
|
||||
sort="auto(requirement.reqDate)"
|
||||
width="150px" />
|
||||
<listheader
|
||||
label="${labels.RequirementsGridCenter}"
|
||||
sort="czech(requirement.centre.fullName)"
|
||||
width="180px" />
|
||||
<listheader
|
||||
label="${labels.RequirementsGridWorkgroup}"
|
||||
sort="czech(requirement.workgroup.fullName)"
|
||||
width="180px" />
|
||||
<listheader
|
||||
label="${labels.InvoicingApplicant}"
|
||||
sort="czech(requirement.ownedBy.fullName)"
|
||||
width="180px" />
|
||||
<listheader
|
||||
label="${labels.InvoicingDescription}"
|
||||
sort="czech(requirement.description)"
|
||||
width="" />
|
||||
<listheader
|
||||
label="${labels.InvoicingRequirementPrice}"
|
||||
sort="auto(requirement.sumTotal)"
|
||||
align="right"
|
||||
width="130px" />
|
||||
<listheader
|
||||
label="${labels.InvoicingInvoicedPrice}"
|
||||
align="right"
|
||||
sort="auto(totalInvoiced)"
|
||||
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.requirement.numser)"
|
||||
instant="true"
|
||||
onChange="@command('doFilter')"
|
||||
maxlength="@load(vm.lengthText)"
|
||||
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">
|
||||
<datebox
|
||||
value="@bind(vm.filterTemplate.requirement.reqDate)"
|
||||
format="${labels.DateFormat}"
|
||||
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">
|
||||
<combobox
|
||||
ctrlKeys="${labels.HandleComboKeyFilter}"
|
||||
onCtrlKey="@command('handleComboKeyFilter', ctrl=self, keyEvent=event)"
|
||||
onChange="@command('doFilter')"
|
||||
model="@load(vm.centres)"
|
||||
readonly="true"
|
||||
width="100%"
|
||||
selectedItem="@bind(vm.filterTemplate.requirement.centre)">
|
||||
<template name="model">
|
||||
<comboitem label="@load(each.fullName)" />
|
||||
</template>
|
||||
</combobox>
|
||||
<div sclass="find-grid-img">
|
||||
<image src="/img/funnel.png" />
|
||||
</div>
|
||||
</div>
|
||||
</auxheader>
|
||||
<auxheader>
|
||||
<div sclass="find-grid-cell">
|
||||
<combobox
|
||||
ctrlKeys="${labels.HandleComboKeyFilter}"
|
||||
onCtrlKey="@command('handleComboKeyFilter', ctrl=self, keyEvent=event)"
|
||||
onChange="@command('doFilter')"
|
||||
model="@load(vm.workgroups)"
|
||||
readonly="true"
|
||||
width="100%"
|
||||
selectedItem="@bind(vm.filterTemplate.requirement.workgroup)">
|
||||
<template name="model">
|
||||
<comboitem label="@load(each.fullName)" />
|
||||
</template>
|
||||
</combobox>
|
||||
<div sclass="find-grid-img">
|
||||
<image src="/img/funnel.png" />
|
||||
</div>
|
||||
</div>
|
||||
</auxheader>
|
||||
<auxheader>
|
||||
<div zclass="find-grid-cell">
|
||||
<div sclass="find-grid-divtextbox">
|
||||
<combobox
|
||||
ctrlKeys="${labels.HandleComboKeyFilter}"
|
||||
onCtrlKey="@command('handleComboKeyFilter', ctrl=self, keyEvent=event)"
|
||||
onChange="@command('doFilter')"
|
||||
width="100%"
|
||||
selectedItem="@bind(vm.filterTemplate.requirement.ownedBy)"
|
||||
model="@load(vm.users)"
|
||||
readonly="true">
|
||||
<template name="model">
|
||||
<comboitem label="@load(each.fullName)" />
|
||||
</template>
|
||||
</combobox>
|
||||
</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.requirement.description)"
|
||||
instant="true"
|
||||
onChange="@command('doFilter')"
|
||||
maxlength="@load(vm.lengthDescription)"
|
||||
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.requirement.sumTotal) @converter(vm.standardBigDecimalConverter)"
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<listbox
|
||||
vflex="1"
|
||||
model="@load(vm.dataList)"
|
||||
selectedItem="@bind(vm.dataBean)">
|
||||
<listhead menupopup="auto">
|
||||
<listheader
|
||||
label="${labels.InvoicingRequirementNumber}"
|
||||
sort="czech(requirement.numser)"
|
||||
onCreate="self.sort(false)"
|
||||
width="130px" />
|
||||
<listheader
|
||||
label="${labels.RequirementsGridReqDate}"
|
||||
sort="auto(requirement.reqDate)"
|
||||
width="150px" />
|
||||
<listheader
|
||||
label="${labels.RequirementsGridCenter}"
|
||||
sort="czech(requirement.centre.fullName)"
|
||||
width="180px" />
|
||||
<listheader
|
||||
label="${labels.RequirementsGridWorkgroup}"
|
||||
sort="czech(requirement.workgroup.fullName)"
|
||||
width="180px" />
|
||||
<listheader
|
||||
label="${labels.InvoicingApplicant}"
|
||||
sort="czech(requirement.ownedBy.fullName)"
|
||||
width="180px" />
|
||||
<listheader
|
||||
label="${labels.InvoicingDescription}"
|
||||
sort="czech(requirement.description)"
|
||||
width="" />
|
||||
<listheader
|
||||
label="${labels.InvoicingRequirementPrice}"
|
||||
sort="auto(requirement.sumTotal)"
|
||||
align="right"
|
||||
width="130px" />
|
||||
<listheader
|
||||
label="${labels.InvoicingInvoicedPrice}"
|
||||
align="right"
|
||||
sort="auto(totalInvoiced)"
|
||||
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.requirement.numser)"
|
||||
instant="true"
|
||||
onChange="@command('doFilter')"
|
||||
maxlength="@load(vm.lengthText)"
|
||||
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.totalInvoiced) @converter(vm.standardBigDecimalConverter)"
|
||||
</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.requirement.reqDate)"
|
||||
format="${labels.DateFormat}"
|
||||
instant="true"
|
||||
onChange="@command('doFilter')"
|
||||
maxlength="@load(vm.lengthText)"
|
||||
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.reqDate) @converter('formatedDate', format=labels.DateFormat)" />
|
||||
<listcell label="@load(each.requirement.centre)" />
|
||||
<listcell label="@load(each.requirement.workgroup)" />
|
||||
<listcell label="@load(each.requirement.ownedBy)" />
|
||||
<listcell label="@load(each.requirement.description)" />
|
||||
<listcell label="@load(each.requirement.sumTotal) @converter(vm.standardBigDecimalConverter)" />
|
||||
<listcell
|
||||
label="@load(each.totalInvoiced) @converter(vm.standardBigDecimalConverter)"
|
||||
style="@load(vm.dataBean.totalInvoiced gt vm.dataBean.requirement.sumTotal ? ' color: red;' : '' )" />
|
||||
</listitem>
|
||||
</template>
|
||||
</listbox>
|
||||
</window>
|
||||
</zk>
|
||||
</div>
|
||||
<div sclass="find-grid-img">
|
||||
<image src="/img/funnel.png" />
|
||||
</div>
|
||||
</div>
|
||||
</auxheader>
|
||||
<auxheader>
|
||||
<div sclass="find-grid-cell">
|
||||
<combobox
|
||||
ctrlKeys="${labels.HandleComboKeyFilter}"
|
||||
onCtrlKey="@command('handleComboKeyFilter', ctrl=self, keyEvent=event)"
|
||||
onChange="@command('doFilter')"
|
||||
model="@load(vm.centres)"
|
||||
readonly="true"
|
||||
width="100%"
|
||||
selectedItem="@bind(vm.filterTemplate.requirement.centre)">
|
||||
<template name="model">
|
||||
<comboitem label="@load(each.fullName)" />
|
||||
</template>
|
||||
</combobox>
|
||||
<div sclass="find-grid-img">
|
||||
<image src="/img/funnel.png" />
|
||||
</div>
|
||||
</div>
|
||||
</auxheader>
|
||||
<auxheader>
|
||||
<div sclass="find-grid-cell">
|
||||
<combobox
|
||||
ctrlKeys="${labels.HandleComboKeyFilter}"
|
||||
onCtrlKey="@command('handleComboKeyFilter', ctrl=self, keyEvent=event)"
|
||||
onChange="@command('doFilter')"
|
||||
model="@load(vm.workgroups)"
|
||||
readonly="true"
|
||||
width="100%"
|
||||
selectedItem="@bind(vm.filterTemplate.requirement.workgroup)">
|
||||
<template name="model">
|
||||
<comboitem label="@load(each.fullName)" />
|
||||
</template>
|
||||
</combobox>
|
||||
<div sclass="find-grid-img">
|
||||
<image src="/img/funnel.png" />
|
||||
</div>
|
||||
</div>
|
||||
</auxheader>
|
||||
<auxheader>
|
||||
<div zclass="find-grid-cell">
|
||||
<div sclass="find-grid-divtextbox">
|
||||
<combobox
|
||||
ctrlKeys="${labels.HandleComboKeyFilter}"
|
||||
onCtrlKey="@command('handleComboKeyFilter', ctrl=self, keyEvent=event)"
|
||||
onChange="@command('doFilter')"
|
||||
width="100%"
|
||||
selectedItem="@bind(vm.filterTemplate.requirement.ownedBy)"
|
||||
model="@load(vm.users)"
|
||||
readonly="true">
|
||||
<template name="model">
|
||||
<comboitem label="@load(each.fullName)" />
|
||||
</template>
|
||||
</combobox>
|
||||
</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.requirement.description)"
|
||||
instant="true"
|
||||
onChange="@command('doFilter')"
|
||||
maxlength="@load(vm.lengthDescription)"
|
||||
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.requirement.sumTotal) @converter(vm.standardBigDecimalConverter)"
|
||||
instant="true"
|
||||
onChange="@command('doFilter')"
|
||||
maxlength="@load(vm.lengthText)"
|
||||
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.totalInvoiced) @converter(vm.standardBigDecimalConverter)"
|
||||
instant="true"
|
||||
onChange="@command('doFilter')"
|
||||
maxlength="@load(vm.lengthText)"
|
||||
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.reqDate) @converter('formatedDate', format=labels.DateFormat)" />
|
||||
<listcell label="@load(each.requirement.centre)" />
|
||||
<listcell label="@load(each.requirement.workgroup)" />
|
||||
<listcell label="@load(each.requirement.ownedBy)" />
|
||||
<listcell label="@load(each.requirement.description)" />
|
||||
<listcell label="@load(each.requirement.sumTotal) @converter(vm.standardBigDecimalConverter)" />
|
||||
<listcell
|
||||
label="@load(each.totalInvoiced) @converter(vm.standardBigDecimalConverter)"
|
||||
style="@load(vm.dataBean.totalInvoiced gt vm.dataBean.requirement.sumTotal ? ' color: red;' : '' )" />
|
||||
</listitem>
|
||||
</template>
|
||||
</listbox>
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<zk>
|
||||
<zscript>
|
||||
String gridPending = "/main/invoicing/invHeadListPending.zul";
|
||||
String gridArchive = "/main/invoicing/invHeadListArchive.zul";
|
||||
</zscript>
|
||||
<window
|
||||
vflex="1"
|
||||
border="normal">
|
||||
<caption
|
||||
src="/img/invoicing-032.png"
|
||||
zclass="form-caption"
|
||||
label="${labels.Invoicing}" />
|
||||
<include
|
||||
vflex="1"
|
||||
src="/main/invoicing/tabPanels.zul" />
|
||||
</window>
|
||||
</zk>
|
||||
@@ -0,0 +1,16 @@
|
||||
<tabbox
|
||||
apply="org.zkoss.bind.BindComposer"
|
||||
vflex="1">
|
||||
<tabs>
|
||||
<tab label="${labels.Pending}" />
|
||||
<tab label="${labels.Archive}" />
|
||||
</tabs>
|
||||
<tabpanels>
|
||||
<tabpanel>
|
||||
<include src="${gridPending}" />
|
||||
</tabpanel>
|
||||
<tabpanel>
|
||||
<include src="${gridArchive}" />
|
||||
</tabpanel>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
@@ -2,7 +2,7 @@
|
||||
<zk>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<window
|
||||
vflex=" 1"
|
||||
vflex="1"
|
||||
border="normal"
|
||||
apply="org.zkoss.bind.BindComposer"
|
||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.main.orders.created.OrderList')">
|
||||
|
||||
Reference in New Issue
Block a user