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.data.TripRequirement;
|
||||||
import info.bukova.isspst.reporting.Report;
|
import info.bukova.isspst.reporting.Report;
|
||||||
import info.bukova.isspst.reporting.ReportMapping;
|
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.addressbook.AdbService;
|
||||||
import info.bukova.isspst.services.buildings.BuildingService;
|
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.invoicing.InvoicingService;
|
||||||
import info.bukova.isspst.services.munits.MUnitService;
|
import info.bukova.isspst.services.munits.MUnitService;
|
||||||
import info.bukova.isspst.services.orders.ApprovedService;
|
import info.bukova.isspst.services.orders.ApprovedService;
|
||||||
@@ -33,7 +33,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
public class Constants {
|
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 = "admin";
|
||||||
public final static String DEF_ADMIN_PASSWD = "admin";
|
public final static String DEF_ADMIN_PASSWD = "admin";
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ import org.hibernate.annotations.LazyCollectionOption;
|
|||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "INVOICING")
|
@Table(name = "INVOICING")
|
||||||
public class Invoicing extends BaseData {
|
public class Invoicing extends BaseData implements Cloneable
|
||||||
|
{
|
||||||
|
|
||||||
@OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
|
@OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
|
||||||
@JoinColumn(name = "REQUIREMENT_ID")
|
@JoinColumn(name = "REQUIREMENT_ID")
|
||||||
@@ -31,6 +32,9 @@ public class Invoicing extends BaseData {
|
|||||||
@Column(name = "TOTAL_INVOICED", precision = 15, scale = 4)
|
@Column(name = "TOTAL_INVOICED", precision = 15, scale = 4)
|
||||||
private BigDecimal totalInvoiced;
|
private BigDecimal totalInvoiced;
|
||||||
|
|
||||||
|
@Column(name = "COMPLETED")
|
||||||
|
private boolean completed;
|
||||||
|
|
||||||
public Requirement getRequirement() {
|
public Requirement getRequirement() {
|
||||||
return requirement;
|
return requirement;
|
||||||
}
|
}
|
||||||
@@ -55,4 +59,20 @@ public class Invoicing extends BaseData {
|
|||||||
this.totalInvoiced = totalInvoiced;
|
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>();
|
List<Str2Str> tables = new ArrayList<Str2Str>();
|
||||||
|
|
||||||
tables.add(new Str2Str("address", "DESCRIPTION"));
|
tables.add(new Str2Str("ADDRESS", "DESCRIPTION"));
|
||||||
tables.add(new Str2Str("building", "DESCRIPTION"));
|
tables.add(new Str2Str("BUILDING", "DESCRIPTION"));
|
||||||
tables.add(new Str2Str("material", "DESCRIPTION"));
|
tables.add(new Str2Str("MATERIAL", "DESCRIPTION"));
|
||||||
tables.add(new Str2Str("munit", "DESCRIPTION"));
|
tables.add(new Str2Str("MUNIT", "DESCRIPTION"));
|
||||||
tables.add(new Str2Str("orders", "DESCRIPTION"));
|
tables.add(new Str2Str("ORDERS", "DESCRIPTION"));
|
||||||
tables.add(new Str2Str("order_item", "DESCRIPTION"));
|
tables.add(new Str2Str("ORDER_ITEM", "DESCRIPTION"));
|
||||||
tables.add(new Str2Str("permission", "DESCRIPTION"));
|
tables.add(new Str2Str("PERMISSION", "DESCRIPTION"));
|
||||||
tables.add(new Str2Str("requirement", "DESCRIPTION"));
|
tables.add(new Str2Str("REQUIREMENT", "DESCRIPTION"));
|
||||||
tables.add(new Str2Str("requirementtype", "DESCRIPTION"));
|
tables.add(new Str2Str("REQUIREMENTTYPE", "DESCRIPTION"));
|
||||||
tables.add(new Str2Str("requirement_items", "DESCRIPTION"));
|
tables.add(new Str2Str("REQUIREMENT_ITEMS", "DESCRIPTION"));
|
||||||
tables.add(new Str2Str("role", "DESCRIPTION"));
|
tables.add(new Str2Str("ROLE", "DESCRIPTION"));
|
||||||
tables.add(new Str2Str("service", "DESCRIPTION"));
|
tables.add(new Str2Str("SERVICE", "DESCRIPTION"));
|
||||||
tables.add(new Str2Str("triprequirement", "DESCRIPTION"));
|
tables.add(new Str2Str("TRIPREQUIREMENT", "DESCRIPTION"));
|
||||||
|
|
||||||
tables.add(new Str2Str("material", "MUNIT_DESCRIPTION"));
|
tables.add(new Str2Str("MATERIAL", "MUNIT_DESCRIPTION"));
|
||||||
tables.add(new Str2Str("orders", "INVOICE_DESCRIPTION"));
|
tables.add(new Str2Str("ORDERS", "INVOICE_DESCRIPTION"));
|
||||||
tables.add(new Str2Str("orders", "DELIVERY_DESCRIPTION"));
|
tables.add(new Str2Str("ORDERS", "DELIVERY_DESCRIPTION"));
|
||||||
tables.add(new Str2Str("orders", "SUPPLIER_DESCRIPTION"));
|
tables.add(new Str2Str("ORDERS", "SUPPLIER_DESCRIPTION"));
|
||||||
tables.add(new Str2Str("order_item", "MUNIT_DESCRIPTION"));
|
tables.add(new Str2Str("ORDER_ITEM", "MUNIT_DESCRIPTION"));
|
||||||
tables.add(new Str2Str("requirement_items", "MUNIT_DESCRIPTION"));
|
tables.add(new Str2Str("REQUIREMENT_ITEMS", "MUNIT_DESCRIPTION"));
|
||||||
tables.add(new Str2Str("triprequirement", "VEHICLE_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", "BACK_VEHICLE_DESCRIPTION"));
|
||||||
tables.add(new Str2Str("trip_bill_items", "VEHICLE_DESCRIPTION"));
|
tables.add(new Str2Str("TRIP_BILL_ITEMS", "VEHICLE_DESCRIPTION"));
|
||||||
|
|
||||||
for (Str2Str item : tables)
|
for (Str2Str item : tables)
|
||||||
{
|
{
|
||||||
@@ -107,9 +107,9 @@ public class DbInfoServiceImpl extends AbstractService<DbInfo> implements DbInfo
|
|||||||
{
|
{
|
||||||
List<String> tables = new ArrayList<String>();
|
List<String> tables = new ArrayList<String>();
|
||||||
|
|
||||||
tables.add("material");
|
tables.add("MATERIAL");
|
||||||
tables.add("order_item");
|
tables.add("ORDER_ITEM");
|
||||||
tables.add("requirement_items");
|
tables.add("REQUIREMENT_ITEMS");
|
||||||
|
|
||||||
for (String item : tables)
|
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();
|
this.updateDatabaseVersion();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
package info.bukova.isspst.services.invoicing;
|
package info.bukova.isspst.services.invoicing;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
import info.bukova.isspst.data.Invoicing;
|
import info.bukova.isspst.data.Invoicing;
|
||||||
import info.bukova.isspst.data.Workgroup;
|
import info.bukova.isspst.data.Workgroup;
|
||||||
import info.bukova.isspst.services.Service;
|
import info.bukova.isspst.services.Service;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface InvoicingService extends Service<Invoicing> {
|
public interface InvoicingService extends Service<Invoicing> {
|
||||||
|
|
||||||
public BigDecimal totalInvoicedForWorkgroup(Workgroup workgroup);
|
public BigDecimal totalInvoicedForWorkgroup(Workgroup workgroup);
|
||||||
@@ -16,4 +17,7 @@ public interface InvoicingService extends Service<Invoicing> {
|
|||||||
|
|
||||||
public void calculate(Invoicing 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());
|
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;
|
dataBean = editBean;
|
||||||
if (!newRec && editBean != null) {
|
if (!newRec && editBean != null) {
|
||||||
dataList.set(selIndex, editBean);
|
if (selIndex < dataList.size())
|
||||||
|
{
|
||||||
|
dataList.set(selIndex, editBean);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BindUtils.postGlobalCommand(null, null, "reloadRelated", null);
|
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.services.invoicing.InvoicingService;
|
||||||
import info.bukova.isspst.ui.FormViewModel;
|
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.BindingParam;
|
||||||
import org.zkoss.bind.annotation.Command;
|
import org.zkoss.bind.annotation.Command;
|
||||||
import org.zkoss.bind.annotation.Init;
|
import org.zkoss.bind.annotation.Init;
|
||||||
@@ -13,14 +16,44 @@ import org.zkoss.zk.ui.select.annotation.WireVariable;
|
|||||||
|
|
||||||
public class InvoicingForm extends FormViewModel<Invoicing> {
|
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 InvoicingItem selectedItem;
|
||||||
private int selectedIndex;
|
private int selectedIndex;
|
||||||
@WireVariable
|
@WireVariable
|
||||||
private InvoicingService invoicingService;
|
private InvoicingService invoicingService;
|
||||||
|
|
||||||
|
protected Invoicing invoicingBeforeEdit;
|
||||||
|
|
||||||
@Init(superclass = true)
|
@Init(superclass = true)
|
||||||
public void init() {
|
public void initInvoicingForm()
|
||||||
|
{
|
||||||
selectedIndex = -1;
|
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) {
|
private void selectItem(InvoicingItem item) {
|
||||||
@@ -77,4 +110,13 @@ public class InvoicingForm extends FormViewModel<Invoicing> {
|
|||||||
this.selectedIndex = selectedIndex;
|
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;
|
package info.bukova.isspst.ui.main.invoicing;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import info.bukova.isspst.data.Invoicing;
|
import info.bukova.isspst.data.Invoicing;
|
||||||
import info.bukova.isspst.data.User;
|
import info.bukova.isspst.data.User;
|
||||||
import info.bukova.isspst.data.Workgroup;
|
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.services.workgroups.WorkgroupService;
|
||||||
import info.bukova.isspst.ui.ListViewModel;
|
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.Init;
|
||||||
|
import org.zkoss.bind.annotation.NotifyChange;
|
||||||
import org.zkoss.zk.ui.select.annotation.WireVariable;
|
import org.zkoss.zk.ui.select.annotation.WireVariable;
|
||||||
|
|
||||||
public class InvoicingList extends ListViewModel<Invoicing> {
|
public class InvoicingList extends ListViewModel<Invoicing> {
|
||||||
|
|
||||||
@WireVariable
|
@WireVariable
|
||||||
private InvoicingService invoicingService;
|
protected InvoicingService invoicingService;
|
||||||
@WireVariable
|
@WireVariable
|
||||||
private WorkgroupService workgroupService;
|
private WorkgroupService workgroupService;
|
||||||
@WireVariable
|
@WireVariable
|
||||||
@@ -53,4 +55,15 @@ public class InvoicingList extends ListViewModel<Invoicing> {
|
|||||||
return userService.getUsersForCombo();
|
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í
|
AgendaSearch=Vyhledávání
|
||||||
Search=Hledat
|
Search=Hledat
|
||||||
|
Pending = Nevyřízené
|
||||||
|
Archive = Archiv
|
||||||
|
Completed = Vyřízeno
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<zk>
|
<zk>
|
||||||
|
|
||||||
<zscript>
|
<zscript>
|
||||||
String gridZul = "invoicingGrid.zul";
|
String gridZul = "setup.zul";
|
||||||
</zscript>
|
</zscript>
|
||||||
|
|
||||||
<include src="/app/template.zhtml"/>
|
<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
|
<hbox
|
||||||
vflex="min"
|
vflex="min"
|
||||||
hflex="1">
|
hflex="1">
|
||||||
<button
|
<div hflex="1">
|
||||||
image="/img/item-add.png"
|
<button
|
||||||
label="${labels.InvoicingAdd}"
|
image="/img/item-add.png"
|
||||||
sclass="nicebutton"
|
label="${labels.InvoicingAdd}"
|
||||||
onClick="@command('addItem')" />
|
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>
|
||||||
<hbox vflex="1">
|
<hbox vflex="1">
|
||||||
<vbox vflex="1">
|
<vbox vflex="1">
|
||||||
|
|||||||
@@ -1,209 +1,195 @@
|
|||||||
<?page title="${labels.Invoicing}" contentType="text/html;charset=UTF-8"?>
|
<?page contentType="text/html;charset=UTF-8"?>
|
||||||
<zk>
|
<listbox
|
||||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
vflex="1"
|
||||||
<window
|
model="@load(vm.dataList)"
|
||||||
vflex="1"
|
selectedItem="@bind(vm.dataBean)">
|
||||||
border="normal"
|
<listhead menupopup="auto">
|
||||||
apply="org.zkoss.bind.BindComposer"
|
<listheader
|
||||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.main.invoicing.InvoicingList')">
|
label="${labels.InvoicingRequirementNumber}"
|
||||||
<caption
|
sort="czech(requirement.numser)"
|
||||||
src="/img/invoicing-032.png"
|
onCreate="self.sort(false)"
|
||||||
zclass="form-caption"
|
width="130px" />
|
||||||
label="${labels.Invoicing}" />
|
<listheader
|
||||||
<include src="/app/toolbar.zul" />
|
label="${labels.RequirementsGridReqDate}"
|
||||||
<listbox
|
sort="auto(requirement.reqDate)"
|
||||||
vflex="1"
|
width="150px" />
|
||||||
model="@load(vm.dataList)"
|
<listheader
|
||||||
selectedItem="@bind(vm.dataBean)">
|
label="${labels.RequirementsGridCenter}"
|
||||||
<listhead menupopup="auto">
|
sort="czech(requirement.centre.fullName)"
|
||||||
<listheader
|
width="180px" />
|
||||||
label="${labels.InvoicingRequirementNumber}"
|
<listheader
|
||||||
sort="czech(requirement.numser)"
|
label="${labels.RequirementsGridWorkgroup}"
|
||||||
onCreate="self.sort(true)"
|
sort="czech(requirement.workgroup.fullName)"
|
||||||
width="130px" />
|
width="180px" />
|
||||||
<listheader
|
<listheader
|
||||||
label="${labels.RequirementsGridReqDate}"
|
label="${labels.InvoicingApplicant}"
|
||||||
sort="auto(requirement.reqDate)"
|
sort="czech(requirement.ownedBy.fullName)"
|
||||||
width="150px" />
|
width="180px" />
|
||||||
<listheader
|
<listheader
|
||||||
label="${labels.RequirementsGridCenter}"
|
label="${labels.InvoicingDescription}"
|
||||||
sort="czech(requirement.centre.fullName)"
|
sort="czech(requirement.description)"
|
||||||
width="180px" />
|
width="" />
|
||||||
<listheader
|
<listheader
|
||||||
label="${labels.RequirementsGridWorkgroup}"
|
label="${labels.InvoicingRequirementPrice}"
|
||||||
sort="czech(requirement.workgroup.fullName)"
|
sort="auto(requirement.sumTotal)"
|
||||||
width="180px" />
|
align="right"
|
||||||
<listheader
|
width="130px" />
|
||||||
label="${labels.InvoicingApplicant}"
|
<listheader
|
||||||
sort="czech(requirement.ownedBy.fullName)"
|
label="${labels.InvoicingInvoicedPrice}"
|
||||||
width="180px" />
|
align="right"
|
||||||
<listheader
|
sort="auto(totalInvoiced)"
|
||||||
label="${labels.InvoicingDescription}"
|
width="130px" />
|
||||||
sort="czech(requirement.description)"
|
</listhead>
|
||||||
width="" />
|
<auxhead
|
||||||
<listheader
|
sclass="category-center"
|
||||||
label="${labels.InvoicingRequirementPrice}"
|
visible="@load(vm.filter)">
|
||||||
sort="auto(requirement.sumTotal)"
|
<auxheader>
|
||||||
align="right"
|
<div sclass="find-grid-cell">
|
||||||
width="130px" />
|
<div sclass="find-grid-divtextbox">
|
||||||
<listheader
|
<textbox
|
||||||
label="${labels.InvoicingInvoicedPrice}"
|
value="@bind(vm.filterTemplate.requirement.numser)"
|
||||||
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)"
|
|
||||||
instant="true"
|
instant="true"
|
||||||
onChange="@command('doFilter')"
|
onChange="@command('doFilter')"
|
||||||
maxlength="@load(vm.lengthText)"
|
maxlength="@load(vm.lengthText)"
|
||||||
sclass="find-grid-textbox" />
|
sclass="find-grid-textbox" />
|
||||||
</div>
|
</div>
|
||||||
<div sclass="find-grid-img">
|
<div sclass="find-grid-img">
|
||||||
<image src="/img/funnel.png" />
|
<image src="/img/funnel.png" />
|
||||||
</div>
|
</div>
|
||||||
</div -->
|
</div>
|
||||||
</auxheader>
|
</auxheader>
|
||||||
<auxheader>
|
<auxheader>
|
||||||
<!-- div sclass="find-grid-cell">
|
<div sclass="find-grid-cell">
|
||||||
<div sclass="find-grid-divtextbox">
|
<div sclass="find-grid-divtextbox">
|
||||||
<textbox
|
<datebox
|
||||||
value="@bind(vm.filterTemplate.totalInvoiced) @converter(vm.standardBigDecimalConverter)"
|
value="@bind(vm.filterTemplate.requirement.reqDate)"
|
||||||
|
format="${labels.DateFormat}"
|
||||||
instant="true"
|
instant="true"
|
||||||
onChange="@command('doFilter')"
|
onChange="@command('doFilter')"
|
||||||
maxlength="@load(vm.lengthText)"
|
|
||||||
sclass="find-grid-textbox" />
|
sclass="find-grid-textbox" />
|
||||||
</div>
|
</div>
|
||||||
<div sclass="find-grid-img">
|
<div sclass="find-grid-img">
|
||||||
<image src="/img/funnel.png" />
|
<image src="/img/funnel.png" />
|
||||||
</div>
|
</div>
|
||||||
</div-->
|
</div>
|
||||||
</auxheader>
|
</auxheader>
|
||||||
</auxhead>
|
<auxheader>
|
||||||
<template name="model">
|
<div sclass="find-grid-cell">
|
||||||
<listitem>
|
<combobox
|
||||||
<listcell label="@load(each.requirement.numser)" />
|
ctrlKeys="${labels.HandleComboKeyFilter}"
|
||||||
<listcell label="@load(each.requirement.reqDate) @converter('formatedDate', format=labels.DateFormat)" />
|
onCtrlKey="@command('handleComboKeyFilter', ctrl=self, keyEvent=event)"
|
||||||
<listcell label="@load(each.requirement.centre)" />
|
onChange="@command('doFilter')"
|
||||||
<listcell label="@load(each.requirement.workgroup)" />
|
model="@load(vm.centres)"
|
||||||
<listcell label="@load(each.requirement.ownedBy)" />
|
readonly="true"
|
||||||
<listcell label="@load(each.requirement.description)" />
|
width="100%"
|
||||||
<listcell label="@load(each.requirement.sumTotal) @converter(vm.standardBigDecimalConverter)" />
|
selectedItem="@bind(vm.filterTemplate.requirement.centre)">
|
||||||
<listcell
|
<template name="model">
|
||||||
label="@load(each.totalInvoiced) @converter(vm.standardBigDecimalConverter)"
|
<comboitem label="@load(each.fullName)" />
|
||||||
style="@load(vm.dataBean.totalInvoiced gt vm.dataBean.requirement.sumTotal ? ' color: red;' : '' )" />
|
</template>
|
||||||
</listitem>
|
</combobox>
|
||||||
</template>
|
<div sclass="find-grid-img">
|
||||||
</listbox>
|
<image src="/img/funnel.png" />
|
||||||
</window>
|
</div>
|
||||||
</zk>
|
</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>
|
<zk>
|
||||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||||
<window
|
<window
|
||||||
vflex=" 1"
|
vflex="1"
|
||||||
border="normal"
|
border="normal"
|
||||||
apply="org.zkoss.bind.BindComposer"
|
apply="org.zkoss.bind.BindComposer"
|
||||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.main.orders.created.OrderList')">
|
viewModel="@id('vm') @init('info.bukova.isspst.ui.main.orders.created.OrderList')">
|
||||||
|
|||||||
Reference in New Issue
Block a user