21 Commits

Author SHA1 Message Date
franta 884bc8267d U nových objednávek lze nyní zatrhout, že je rovnou objednáno...
closes #196
2015-02-09 13:27:32 +01:00
pepa ecbc2be47c V agendě Fakturace požadavků byl opraven lazy load vlastníka požadavku.
refs #182
2015-01-21 10:59:15 +01:00
pepa 4e2b00a957 U požadavků se nyní zobrazuje fakturovaná částka.
Opraveno mazání objednávek- pokud je mazaná objednávka označená jako
objednaná, musíme z položek smazat číslo objednávky, aby se nabídly pro
další objednávku.
closes #193
2015-01-20 15:19:51 +01:00
pepa d9fd26bbad Ve schválených položkách požadavků byl do gridu přidaný sloupec s číslem
požadavku.
closes #192
2015-01-20 14:11:59 +01:00
pepa e461afd611 Merge branch 'Verze_1.0' of https://git.bukova.info/repos/git/isspst into Verze_1.0 2015-01-20 10:37:09 +01:00
pepa ba99079a85 V agendě Fakturace bylo rozchozeno filtrování podle žadatele.
Odkaz na nápovědu v toolbaru.
Zvýšen session timeout na 480 minut.
refs #182
2015-01-20 10:31:30 +01:00
franta a0447318e6 Embeded měrné jednotky (new MUnitEmb) mají nyní ID inicializované na 0.
Převod DB nastaví NULL hodnoty ID na 0, takže načtení přes hibernate
vytvoří neNULLový objekt MUnitEmb.

closes #185
2015-01-20 10:12:30 +01:00
franta 8e33bb8ef7 Agenda "Fakturace požadavků" nyní podporuje řazení.
Po otevření agendy je nastaveno řazení podle sloupce čísla požadavku.
U textových sloupců se data řadí podle CZ pravidel.
Přidána možnost řadit vnořené property podle CZ pravidel.


closes #189
2015-01-20 09:01:24 +01:00
franta d37076cd27 Implementována verze DB a převod DB.
Nové DB mají délku nastavenou anotací.
ZUL soubory jsou omezeny atributem maxlength.

closes #186
2015-01-19 13:20:43 +01:00
pepa 780edd5678 Opravena kontrola práv v agendě "Schválené položky požadavků".
refs #183
2015-01-18 15:54:50 +01:00
pepa e51955f86a Již se nezkrývají schválené požadavky na záložkách
Moje/střediska/komise.
closes #181
2015-01-18 15:53:03 +01:00
pepa 26699fd3a9 Na sestavu cesťáku byla přidaná spodní část "Pokladní doklad". Opraven
překlep na sestavě žádosti o služební cestu.
closes #190
2015-01-18 14:57:15 +01:00
pepa ce17f5b626 Na toolbar v záložkách Má střediska, Mé komise a Vše bylo přidáno
tlačítko pro smazání záznamu.
refs #183
2015-01-15 15:44:44 +01:00
pepa 2a6ce7e4d3 Upraveno formátovaní času na sestavě cesťáku. Drobné úpravy formátování
sestavy žádosti a cesťáku.
closes #180
closes #188
2015-01-15 15:36:23 +01:00
pepa f4fe974931 Do UserServis byla přidána metoda getUsersForCombo, která vrátí seznam
uživatelů podle abecedy. Volá se pro plnění comboboxů u filtrů a na
formuláři pro zadání žádosti o služební cestu- combo spolucestující.
closes #191
2015-01-15 15:09:11 +01:00
pepa 537cc563ac Merge branch 'Verze_1.0' of https://git.bukova.info/repos/git/isspst into Verze_1.0 2015-01-15 10:48:53 +01:00
pepa 4cd2f5b5e6 V agndě Fakturace požadavků přidán sloupec s žadatelem. Výchozí třídění
gridu je nyní podle čísla požadavku.
closes #182
refs #189
2015-01-15 10:40:46 +01:00
pepa 6ff69c932c Do agendy požadavků bylo přidáno nové oprávnění pro mazání neschválených
požadavků.
closes #183
2015-01-15 10:04:00 +01:00
franta 908b214a93 Merge branch 'Verze_1.0' of https://git.bukova.info/repos/git/isspst into Verze_1.0 2015-01-13 14:16:22 +01:00
franta cd2214c7ef Změněn název agendy z "Požadavky na servis" na "Požadavky na služby"
closes #184
2015-01-13 14:11:52 +01:00
pepa 66133dce1a Opravena kontrola práv při úpravě objednávky. Opraveno vyhodnocení práv
pro zobrazení požadavků střediska/komise.
closes #187
2015-01-13 13:57:43 +01:00
116 changed files with 1585 additions and 357 deletions
@@ -11,6 +11,7 @@ import info.bukova.isspst.data.User;
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.reporting.ReportType; import info.bukova.isspst.reporting.ReportType;
import info.bukova.isspst.services.dbinfo.DbInfoService;
import info.bukova.isspst.services.munits.MUnitService; import info.bukova.isspst.services.munits.MUnitService;
import info.bukova.isspst.services.numberseries.NumberSeriesService; import info.bukova.isspst.services.numberseries.NumberSeriesService;
import info.bukova.isspst.services.requirement.RequirementTypeService; import info.bukova.isspst.services.requirement.RequirementTypeService;
@@ -33,6 +34,8 @@ import org.springframework.web.context.support.WebApplicationContextUtils;
public class AppInitListener implements ServletContextListener { public class AppInitListener implements ServletContextListener {
private DbInfoService dbInfoService;
private MUnitService mUnitsService; private MUnitService mUnitsService;
private RoleService roleService; private RoleService roleService;
private UserService userService; private UserService userService;
@@ -52,6 +55,7 @@ public class AppInitListener implements ServletContextListener {
logger.info("Initializing database"); logger.info("Initializing database");
WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(evt.getServletContext()); WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(evt.getServletContext());
dbInfoService = ctx.getBean(DbInfoService.class);
mUnitsService = ctx.getBean(MUnitService.class); mUnitsService = ctx.getBean(MUnitService.class);
roleService = ctx.getBean(RoleService.class); roleService = ctx.getBean(RoleService.class);
userService = ctx.getBean(UserService.class); userService = ctx.getBean(UserService.class);
@@ -61,6 +65,7 @@ public class AppInitListener implements ServletContextListener {
reqTypeService = ctx.getBean(RequirementTypeService.class); reqTypeService = ctx.getBean(RequirementTypeService.class);
userService.grantAdmin(); userService.grantAdmin();
this.checkDbInfo();
checkMUnits(); checkMUnits();
checkRoles(); checkRoles();
checkUsers(); checkUsers();
@@ -74,6 +79,24 @@ public class AppInitListener implements ServletContextListener {
loadModuleReports(); loadModuleReports();
} }
private void checkDbInfo()
{
List<User> userList = userService.getAll();
if (userList.isEmpty())
{
// Database is new/empty, column definition is anotated - set actual
// database version
dbInfoService.updateDatabaseVersion();
}
else
{
// Existing database - try change structure and set actual database
// version...
dbInfoService.changeDatabase();
}
}
private void checkMUnits() private void checkMUnits()
{ {
List<MUnit> mUnits = mUnitsService.getAll(); List<MUnit> mUnits = mUnitsService.getAll();
@@ -1,9 +1,5 @@
package info.bukova.isspst; package info.bukova.isspst;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import info.bukova.isspst.data.Permission; import info.bukova.isspst.data.Permission;
import info.bukova.isspst.data.PermissionType; import info.bukova.isspst.data.PermissionType;
import info.bukova.isspst.data.Requirement; import info.bukova.isspst.data.Requirement;
@@ -28,8 +24,14 @@ import info.bukova.isspst.services.users.RoleService;
import info.bukova.isspst.services.users.UserService; import info.bukova.isspst.services.users.UserService;
import info.bukova.isspst.services.workgroups.WorkgroupService; import info.bukova.isspst.services.workgroups.WorkgroupService;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
public class Constants { public class Constants {
public final static long DB_VERSION = 2;
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";
public final static String ROLE_USER = "ROLE_USER"; public final static String ROLE_USER = "ROLE_USER";
@@ -102,15 +104,18 @@ public class Constants {
public final static String PERM_SHOW_ALL_REQ = "PERM_SHOW_ALL_REQ"; public final static String PERM_SHOW_ALL_REQ = "PERM_SHOW_ALL_REQ";
public final static String PERM_EDIT_NEW = "PERM_EDIT_NEW"; public final static String PERM_EDIT_NEW = "PERM_EDIT_NEW";
public final static String PERM_EDIT_OWN = "PERM_EDIT_OWN"; public final static String PERM_EDIT_OWN = "PERM_EDIT_OWN";
public final static String PERM_DELETE_NEW = "PERM_DELETE_NEW";
public final static Permission SPECIAL_PERMISSIONS[] = { public final static Permission SPECIAL_PERMISSIONS[] = {
new Permission(PERM_EDIT_NEW, "Upravit neschválené", MOD_REQUIREMENTS, PermissionType.GLOBAL), new Permission(PERM_EDIT_NEW, "Upravit neschválené", MOD_REQUIREMENTS, PermissionType.GLOBAL),
new Permission(PERM_DELETE_NEW, "Mazat neschválené", MOD_REQUIREMENTS, PermissionType.GLOBAL),
new Permission(PERM_SHOW_WORKGROUP_REQ, "Zobrazení požadavků komise", MOD_REQUIREMENTS, PermissionType.WORKGROUP), new Permission(PERM_SHOW_WORKGROUP_REQ, "Zobrazení požadavků komise", MOD_REQUIREMENTS, PermissionType.WORKGROUP),
new Permission(PERM_SHOW_CENTRE_REQ, "Zobrazení požadavků střediska", MOD_REQUIREMENTS, PermissionType.CENTRE), new Permission(PERM_SHOW_CENTRE_REQ, "Zobrazení požadavků střediska", MOD_REQUIREMENTS, PermissionType.CENTRE),
new Permission(PERM_SHOW_ALL_REQ, "Zobrazení všech požadavků", MOD_REQUIREMENTS, PermissionType.GLOBAL), new Permission(PERM_SHOW_ALL_REQ, "Zobrazení všech požadavků", MOD_REQUIREMENTS, PermissionType.GLOBAL),
new Permission(PERM_APPROVE, "Schválení", MOD_REQUIREMENTS, PermissionType.WORKGROUP), new Permission(PERM_APPROVE, "Schválení", MOD_REQUIREMENTS, PermissionType.WORKGROUP),
new Permission(PERM_EDIT_NEW, "Upravit neschválené", MOD_TRIPREQUIREMENTS, PermissionType.GLOBAL), new Permission(PERM_EDIT_NEW, "Upravit neschválené", MOD_TRIPREQUIREMENTS, PermissionType.GLOBAL),
new Permission(PERM_DELETE_NEW, "Mazat neschválené", MOD_TRIPREQUIREMENTS, PermissionType.GLOBAL),
new Permission(PERM_SHOW_WORKGROUP_REQ, "Zobrazení požadavků komise", MOD_TRIPREQUIREMENTS, PermissionType.WORKGROUP), new Permission(PERM_SHOW_WORKGROUP_REQ, "Zobrazení požadavků komise", MOD_TRIPREQUIREMENTS, PermissionType.WORKGROUP),
new Permission(PERM_SHOW_CENTRE_REQ, "Zobrazení požadavků střediska", MOD_TRIPREQUIREMENTS, PermissionType.CENTRE), new Permission(PERM_SHOW_CENTRE_REQ, "Zobrazení požadavků střediska", MOD_TRIPREQUIREMENTS, PermissionType.CENTRE),
new Permission(PERM_SHOW_ALL_REQ, "Zobrazení všech požadavků", MOD_TRIPREQUIREMENTS, PermissionType.GLOBAL), new Permission(PERM_SHOW_ALL_REQ, "Zobrazení všech požadavků", MOD_TRIPREQUIREMENTS, PermissionType.GLOBAL),
@@ -142,4 +147,7 @@ public class Constants {
put(Requirement.class, "/main/orders/"); put(Requirement.class, "/main/orders/");
put(TripRequirement.class, "/main/trips/requirements/"); put(TripRequirement.class, "/main/trips/requirements/");
}} ); }} );
public final static int LEN_TEXT = 255;
public final static int LEN_DESCRIPTION = 8192;
} }
@@ -1,5 +1,6 @@
package info.bukova.isspst; package info.bukova.isspst;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.zkoss.util.resource.Labels; import org.zkoss.util.resource.Labels;
@@ -149,4 +150,47 @@ public class StringUtils
return result; return result;
} }
public static List<String> split(String value, String separator)
{
String tmp = value;
List<String> list = new ArrayList<String>();
if (tmp != null)
{
if ((separator == null) || separator.isEmpty() || tmp.isEmpty())
{
list.add(tmp);
}
else
{
int separatorLength = separator.length();
while (!tmp.isEmpty())
{
String part = "";
int idx = tmp.indexOf(separator);
if (idx > -1)
{
part = tmp.substring(0, idx);
list.add(part);
tmp = tmp.substring(idx + separatorLength);
if (tmp.isEmpty())
{
list.add("");
}
}
else
{
list.add(tmp);
tmp = "";
}
}
}
}
return list;
}
} }
@@ -0,0 +1,7 @@
package info.bukova.isspst.dao;
import info.bukova.isspst.data.DbInfo;
public interface DbInfoDao extends BaseDao<DbInfo>
{
}
@@ -0,0 +1,9 @@
package info.bukova.isspst.dao.jpa;
import info.bukova.isspst.dao.DbInfoDao;
import info.bukova.isspst.data.DbInfo;
public class DbInfoDaoJPA extends BaseDaoJPA<DbInfo> implements DbInfoDao
{
}
@@ -1,5 +1,6 @@
package info.bukova.isspst.data; package info.bukova.isspst.data;
import info.bukova.isspst.Constants;
import info.bukova.isspst.StringUtils; import info.bukova.isspst.StringUtils;
import java.util.ArrayList; import java.util.ArrayList;
@@ -45,7 +46,7 @@ public class Address extends BaseData
private String email; private String email;
@Column(name = "WEB") @Column(name = "WEB")
private String web; private String web;
@Column(name = "DESCRIPTION") @Column(name = "DESCRIPTION", length = Constants.LEN_DESCRIPTION)
private String description; private String description;
@NotNull(message = "Zadejte firmu") @NotNull(message = "Zadejte firmu")
@@ -1,5 +1,7 @@
package info.bukova.isspst.data; package info.bukova.isspst.data;
import info.bukova.isspst.Constants;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -23,7 +25,7 @@ public class Building extends BaseData implements DataModel {
@Column(name = "NAME") @Column(name = "NAME")
private String name; private String name;
@Column(name = "DESCRIPTION") @Column(name = "DESCRIPTION", length = Constants.LEN_DESCRIPTION)
private String description; private String description;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "building", orphanRemoval = true) @OneToMany(cascade = CascadeType.ALL, mappedBy = "building", orphanRemoval = true)
@@ -0,0 +1,28 @@
package info.bukova.isspst.data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
@Entity
@Table(name = "DBINFO")
public class DbInfo extends BaseSimpleData
{
@Column(name = "VERSION")
private long version;
public DbInfo()
{
this.version = 0;
}
public long getVersion()
{
return version;
}
public void setVersion(long version)
{
this.version = version;
}
}
@@ -1,5 +1,6 @@
package info.bukova.isspst.data; package info.bukova.isspst.data;
import info.bukova.isspst.Constants;
import info.bukova.isspst.StringUtils; import info.bukova.isspst.StringUtils;
import javax.persistence.Column; import javax.persistence.Column;
@@ -13,7 +14,7 @@ public class MUnit extends BaseData
@Column(name = "NAME") @Column(name = "NAME")
private String name; private String name;
@Column(name = "DESCRIPTION") @Column(name = "DESCRIPTION", length = Constants.LEN_DESCRIPTION)
private String description; private String description;
public String getName() public String getName()
@@ -1,5 +1,6 @@
package info.bukova.isspst.data; package info.bukova.isspst.data;
import info.bukova.isspst.Constants;
import info.bukova.isspst.StringUtils; import info.bukova.isspst.StringUtils;
import javax.persistence.Column; import javax.persistence.Column;
@@ -14,11 +15,14 @@ public class MUnitEmb
@Column(name = "MUNIT_NAME") @Column(name = "MUNIT_NAME")
private String name; private String name;
@Column(name = "MUNIT_DESCRIPTION") @Column(name = "MUNIT_DESCRIPTION", length = Constants.LEN_DESCRIPTION)
private String description; private String description;
public MUnitEmb() public MUnitEmb()
{ {
// Embeddable object is loaded by hibernate like NULL, if all properties
// are NULL. So, we set ID.
this.id = 0;
} }
public MUnitEmb(MUnit munit) public MUnitEmb(MUnit munit)
@@ -1,5 +1,7 @@
package info.bukova.isspst.data; package info.bukova.isspst.data;
import info.bukova.isspst.Constants;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
@@ -35,7 +37,7 @@ public class Order extends BaseData implements Cloneable
@AttributeOverride(name = "company", column = @Column(name = "SUPPLIER_COMPANY")), @AttributeOverride(name = "company", column = @Column(name = "SUPPLIER_COMPANY")),
@AttributeOverride(name = "contactName", column = @Column(name = "SUPPLIER_CONTACT_NAME")), @AttributeOverride(name = "contactName", column = @Column(name = "SUPPLIER_CONTACT_NAME")),
@AttributeOverride(name = "department", column = @Column(name = "SUPPLIER_DEPARTMENT")), @AttributeOverride(name = "department", column = @Column(name = "SUPPLIER_DEPARTMENT")),
@AttributeOverride(name = "description", column = @Column(name = "SUPPLIER_DESCRIPTION")), @AttributeOverride(name = "description", column = @Column(name = "SUPPLIER_DESCRIPTION", length = Constants.LEN_DESCRIPTION)),
@AttributeOverride(name = "dic", column = @Column(name = "SUPPLIER_DIC")), @AttributeOverride(name = "dic", column = @Column(name = "SUPPLIER_DIC")),
@AttributeOverride(name = "email", column = @Column(name = "SUPPLIER_EMAIL")), @AttributeOverride(name = "email", column = @Column(name = "SUPPLIER_EMAIL")),
@AttributeOverride(name = "houseNumber", column = @Column(name = "SUPPLIER_HOUSENUMBER")), @AttributeOverride(name = "houseNumber", column = @Column(name = "SUPPLIER_HOUSENUMBER")),
@@ -54,7 +56,7 @@ public class Order extends BaseData implements Cloneable
@AttributeOverride(name = "company", column = @Column(name = "INVOICE_COMPANY")), @AttributeOverride(name = "company", column = @Column(name = "INVOICE_COMPANY")),
@AttributeOverride(name = "contactName", column = @Column(name = "INVOICE_CONTACT_NAME")), @AttributeOverride(name = "contactName", column = @Column(name = "INVOICE_CONTACT_NAME")),
@AttributeOverride(name = "department", column = @Column(name = "INVOICE_DEPARTMENT")), @AttributeOverride(name = "department", column = @Column(name = "INVOICE_DEPARTMENT")),
@AttributeOverride(name = "description", column = @Column(name = "INVOICE_DESCRIPTION")), @AttributeOverride(name = "description", column = @Column(name = "INVOICE_DESCRIPTION", length = Constants.LEN_DESCRIPTION)),
@AttributeOverride(name = "dic", column = @Column(name = "INVOICE_DIC")), @AttributeOverride(name = "dic", column = @Column(name = "INVOICE_DIC")),
@AttributeOverride(name = "email", column = @Column(name = "INVOICE_EMAIL")), @AttributeOverride(name = "email", column = @Column(name = "INVOICE_EMAIL")),
@AttributeOverride(name = "houseNumber", column = @Column(name = "INVOICE_HOUSENUMBER")), @AttributeOverride(name = "houseNumber", column = @Column(name = "INVOICE_HOUSENUMBER")),
@@ -73,7 +75,7 @@ public class Order extends BaseData implements Cloneable
@AttributeOverride(name = "company", column = @Column(name = "DELIVERY_COMPANY")), @AttributeOverride(name = "company", column = @Column(name = "DELIVERY_COMPANY")),
@AttributeOverride(name = "contactName", column = @Column(name = "DELIVERY_CONTACT_NAME")), @AttributeOverride(name = "contactName", column = @Column(name = "DELIVERY_CONTACT_NAME")),
@AttributeOverride(name = "department", column = @Column(name = "DELIVERY_DEPARTMENT")), @AttributeOverride(name = "department", column = @Column(name = "DELIVERY_DEPARTMENT")),
@AttributeOverride(name = "description", column = @Column(name = "DELIVERY_DESCRIPTION")), @AttributeOverride(name = "description", column = @Column(name = "DELIVERY_DESCRIPTION", length = Constants.LEN_DESCRIPTION)),
@AttributeOverride(name = "dic", column = @Column(name = "DELIVERY_DIC")), @AttributeOverride(name = "dic", column = @Column(name = "DELIVERY_DIC")),
@AttributeOverride(name = "email", column = @Column(name = "DELIVERY_EMAIL")), @AttributeOverride(name = "email", column = @Column(name = "DELIVERY_EMAIL")),
@AttributeOverride(name = "houseNumber", column = @Column(name = "DELIVERY_HOUSENUMBER")), @AttributeOverride(name = "houseNumber", column = @Column(name = "DELIVERY_HOUSENUMBER")),
@@ -94,7 +96,7 @@ public class Order extends BaseData implements Cloneable
@Column(name = "DELIVERY_TYPE") @Column(name = "DELIVERY_TYPE")
private String deliveryType; private String deliveryType;
@Column(name = "DESCRIPTION") @Column(name = "DESCRIPTION", length = Constants.LEN_DESCRIPTION)
private String description; private String description;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "order", orphanRemoval = true) @OneToMany(cascade = CascadeType.ALL, mappedBy = "order", orphanRemoval = true)
@@ -1,5 +1,7 @@
package info.bukova.isspst.data; package info.bukova.isspst.data;
import info.bukova.isspst.Constants;
import java.math.BigDecimal; import java.math.BigDecimal;
import javax.persistence.Column; import javax.persistence.Column;
@@ -43,7 +45,7 @@ public class OrderItem
@Column(name = "TOTAL", precision = 15, scale = 4) @Column(name = "TOTAL", precision = 15, scale = 4)
private BigDecimal total; private BigDecimal total;
@Column(name = "DESCRIPTION") @Column(name = "DESCRIPTION", length = Constants.LEN_DESCRIPTION)
private String description; private String description;
@ManyToOne(fetch = FetchType.EAGER) @ManyToOne(fetch = FetchType.EAGER)
@@ -1,5 +1,7 @@
package info.bukova.isspst.data; package info.bukova.isspst.data;
import info.bukova.isspst.Constants;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.EnumType; import javax.persistence.EnumType;
@@ -19,7 +21,7 @@ public class Permission extends BaseSimpleData implements GrantedAuthority {
@Column(name="AUTHORITY") @Column(name="AUTHORITY")
private String authority; private String authority;
@Column(name="DESCRIPTION") @Column(name = "DESCRIPTION", length = Constants.LEN_DESCRIPTION)
private String description; private String description;
@Column(name="MODULE") @Column(name="MODULE")
private String module; private String module;
@@ -1,5 +1,7 @@
package info.bukova.isspst.data; package info.bukova.isspst.data;
import info.bukova.isspst.Constants;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@@ -32,7 +34,7 @@ public class RequirementBase extends BaseData implements FilterableRequirement {
private String numser; private String numser;
@Column(name = "REQ_DATE") @Column(name = "REQ_DATE")
private Date reqDate; private Date reqDate;
@Column(name = "DESCRIPTION") @Column(name = "DESCRIPTION", length = Constants.LEN_DESCRIPTION)
private String description; private String description;
@ManyToOne(fetch = FetchType.EAGER) @ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "CENTRE_ID") @JoinColumn(name = "CENTRE_ID")
@@ -1,5 +1,7 @@
package info.bukova.isspst.data; package info.bukova.isspst.data;
import info.bukova.isspst.Constants;
import java.math.BigDecimal; import java.math.BigDecimal;
import javax.persistence.Column; import javax.persistence.Column;
@@ -50,7 +52,7 @@ public class RequirementItem
@Column(name = "TOTAL", precision=15, scale=4) @Column(name = "TOTAL", precision=15, scale=4)
private BigDecimal total; private BigDecimal total;
@Column(name = "DESCRIPTION") @Column(name = "DESCRIPTION", length = Constants.LEN_DESCRIPTION)
private String description; private String description;
@Column(name = "DELIVERED") @Column(name = "DELIVERED")
@@ -1,5 +1,7 @@
package info.bukova.isspst.data; package info.bukova.isspst.data;
import info.bukova.isspst.Constants;
import java.util.Date; import java.util.Date;
import javax.persistence.Column; import javax.persistence.Column;
@@ -42,7 +44,7 @@ public abstract class RequirementSubject implements OwnedDataModel {
private String code; private String code;
@Column(name = "NAME") @Column(name = "NAME")
private String name; private String name;
@Column(name = "DESCRIPTION") @Column(name = "DESCRIPTION", length = Constants.LEN_DESCRIPTION)
private String description; private String description;
@NotEmpty(message = "{MaterialFormCodeConstr}") @NotEmpty(message = "{MaterialFormCodeConstr}")
@@ -1,13 +1,15 @@
package info.bukova.isspst.data; package info.bukova.isspst.data;
import info.bukova.isspst.Constants;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.JoinTable;
import javax.persistence.JoinColumn; import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany; import javax.persistence.ManyToMany;
import javax.persistence.OneToMany; import javax.persistence.OneToMany;
import javax.persistence.OrderBy; import javax.persistence.OrderBy;
@@ -22,7 +24,7 @@ public class RequirementType extends BaseData {
@Column(name = "TYPE") @Column(name = "TYPE")
private String type; private String type;
@Column(name = "DESCRIPTION") @Column(name = "DESCRIPTION", length = Constants.LEN_DESCRIPTION)
private String description; private String description;
@OneToMany(cascade = CascadeType.ALL, orphanRemoval=true) @OneToMany(cascade = CascadeType.ALL, orphanRemoval=true)
@LazyCollection(LazyCollectionOption.FALSE) @LazyCollection(LazyCollectionOption.FALSE)
@@ -1,5 +1,7 @@
package info.bukova.isspst.data; package info.bukova.isspst.data;
import info.bukova.isspst.Constants;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -25,7 +27,7 @@ public class Role extends BaseSimpleData implements GrantedAuthority, DataModel
@Column(name="AUTHORITY", unique=true) @Column(name="AUTHORITY", unique=true)
private String authority; private String authority;
@Column(name="DESCRIPTION") @Column(name = "DESCRIPTION", length = Constants.LEN_DESCRIPTION)
private String description; private String description;
@ManyToMany @ManyToMany
@LazyCollection(LazyCollectionOption.FALSE) @LazyCollection(LazyCollectionOption.FALSE)
@@ -1,5 +1,7 @@
package info.bukova.isspst.data; package info.bukova.isspst.data;
import info.bukova.isspst.Constants;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@@ -33,7 +35,7 @@ public class TripBillItem extends BaseData {
@Embedded @Embedded
@AttributeOverrides({ @AttributeOverrides({
@AttributeOverride(name = "code", column = @Column(name = "BACK_VEHICLE_CODE")), @AttributeOverride(name = "code", column = @Column(name = "BACK_VEHICLE_CODE")),
@AttributeOverride(name = "description", column = @Column(name = "BACK_VEHICLE_DESCRIPTION")) @AttributeOverride(name = "description", column = @Column(name = "BACK_VEHICLE_DESCRIPTION", length = Constants.LEN_DESCRIPTION))
}) })
private Vehicle backVehicle; private Vehicle backVehicle;
@Column(name = "BEGIN_WORK") @Column(name = "BEGIN_WORK")
@@ -1,5 +1,7 @@
package info.bukova.isspst.data; package info.bukova.isspst.data;
import info.bukova.isspst.Constants;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Embeddable; import javax.persistence.Embeddable;
@@ -8,7 +10,7 @@ public class Vehicle {
@Column(name = "VEHICLE_CODE") @Column(name = "VEHICLE_CODE")
private String code; private String code;
@Column(name = "VEHICLE_DESCRIPTION") @Column(name = "VEHICLE_DESCRIPTION", length = Constants.LEN_DESCRIPTION)
private String description; private String description;
public String getCode() { public String getCode() {
@@ -4,6 +4,7 @@ import info.bukova.isspst.DateTimeUtils;
import info.bukova.isspst.StringUtils; import info.bukova.isspst.StringUtils;
import info.bukova.isspst.data.Invoicing; import info.bukova.isspst.data.Invoicing;
import info.bukova.isspst.data.Requirement; import info.bukova.isspst.data.Requirement;
import info.bukova.isspst.data.User;
import info.bukova.isspst.data.Workgroup; import info.bukova.isspst.data.Workgroup;
import org.hamcrest.Description; import org.hamcrest.Description;
@@ -48,8 +49,9 @@ public class InvoicingFilter implements Filter<Invoicing>
boolean foundReqDate = DateTimeUtils.isEqualByDateForFilter(item.getRequirement().getReqDate(), condition.getRequirement().getReqDate()); boolean foundReqDate = DateTimeUtils.isEqualByDateForFilter(item.getRequirement().getReqDate(), condition.getRequirement().getReqDate());
boolean foundCenter = Workgroup.isEqualByWorkgroupForFilter(item.getRequirement().getCentre(), condition.getRequirement().getCentre()); boolean foundCenter = Workgroup.isEqualByWorkgroupForFilter(item.getRequirement().getCentre(), condition.getRequirement().getCentre());
boolean foundWorkgroup = Workgroup.isEqualByWorkgroupForFilter(item.getRequirement().getWorkgroup(), condition.getRequirement().getWorkgroup()); boolean foundWorkgroup = Workgroup.isEqualByWorkgroupForFilter(item.getRequirement().getWorkgroup(), condition.getRequirement().getWorkgroup());
boolean foundUser = User.isEqualByUserForFilter(item.getRequirement().getOwnedBy(), condition.getRequirement().getOwnedBy());
boolean foundDescription = StringUtils.isEqualForFilter(item.getRequirement().getDescription(), condition.getRequirement().getDescription()); boolean foundDescription = StringUtils.isEqualForFilter(item.getRequirement().getDescription(), condition.getRequirement().getDescription());
return (foundNumser && foundReqDate && foundCenter && foundDescription && foundWorkgroup); return (foundNumser && foundReqDate && foundCenter && foundDescription && foundWorkgroup && foundUser);
} }
@Factory @Factory
@@ -30,6 +30,10 @@ public abstract class AbstractRequirementEvaluator extends AbstractModuleEvaluat
return req.getState() == RequirementState.NEW; return req.getState() == RequirementState.NEW;
} }
if (permission.equals(Constants.PERM_DELETE_NEW)) {
return req.getState() == RequirementState.NEW;
}
return true; return true;
} }
@@ -1,11 +1,13 @@
package info.bukova.isspst.security; package info.bukova.isspst.security;
import info.bukova.isspst.Constants; import info.bukova.isspst.Constants;
import info.bukova.isspst.Module;
import info.bukova.isspst.data.Permission; import info.bukova.isspst.data.Permission;
import info.bukova.isspst.data.PermissionType; import info.bukova.isspst.data.PermissionType;
import info.bukova.isspst.data.Role; import info.bukova.isspst.data.Role;
import info.bukova.isspst.data.User; import info.bukova.isspst.data.User;
import info.bukova.isspst.data.Workgroup; import info.bukova.isspst.data.Workgroup;
import info.bukova.isspst.services.Service;
import info.bukova.isspst.services.workgroups.WorkgroupService; import info.bukova.isspst.services.workgroups.WorkgroupService;
import java.util.List; import java.util.List;
@@ -39,11 +41,31 @@ public class WorkgroupAwareServiceEvaluator implements Evaluator {
} }
User user = (User)authentication.getPrincipal(); User user = (User)authentication.getPrincipal();
String moduleId = "";
if (targetDomainObject instanceof Service<?>) {
Service<?> service = (Service<?>)targetDomainObject;
Module mod = service.getModule();
if (mod != null) {
moduleId = mod.getId();
}
}
// TODO - v master větvi je na toto pomocná třída
/*for (Module m : Constants.MODULES) {
if (m.getServiceClass() != null && m.getServiceClass().isAssignableFrom(targetDomainObject.getClass())) {
moduleId = m.getId();
break;
}
}*/
Permission appPermission = null; Permission appPermission = null;
for (Permission p : Constants.SPECIAL_PERMISSIONS) { for (Permission p : Constants.SPECIAL_PERMISSIONS) {
if (p.getAuthority().equals(permission)) { if (p.getAuthority().equals(permission)
&& p.getModule().equals(moduleId)) {
appPermission = p; appPermission = p;
break;
} }
} }
@@ -66,7 +88,8 @@ public class WorkgroupAwareServiceEvaluator implements Evaluator {
for (Role r : wgRoles) { for (Role r : wgRoles) {
for (Permission p : r.getPermissions()) { for (Permission p : r.getPermissions()) {
if (p.getAuthority().equals(appPermission.getAuthority())) { if (p.getAuthority().equals(appPermission.getAuthority())
&& p.getModule().equals(appPermission.getModule())) {
return true; return true;
} }
} }
@@ -59,6 +59,10 @@ public abstract class AbstractService<T extends DataModel> implements Service<T>
return ""; return "";
} }
public String getDeleteEntityPermission() {
return "";
}
@Override @Override
@PreAuthorize("hasPermission(this, 'PERM_ADD')") @PreAuthorize("hasPermission(this, 'PERM_ADD')")
public final T create() { public final T create() {
@@ -93,7 +97,7 @@ public abstract class AbstractService<T extends DataModel> implements Service<T>
@Override @Override
@Transactional @Transactional
@PreAuthorize("hasPermission(this, 'PERM_DELETE')") @PreAuthorize("hasPermission(this, 'PERM_DELETE') or hasPermission(#entity, this.getDeleteEntityPermission())")
public void delete(T entity) { public void delete(T entity) {
if (dao == null) { if (dao == null) {
throw new IsspstException("DAO is null"); throw new IsspstException("DAO is null");
@@ -0,0 +1,11 @@
package info.bukova.isspst.services.dbinfo;
import info.bukova.isspst.data.DbInfo;
import info.bukova.isspst.services.Service;
public interface DbInfoService extends Service<DbInfo>
{
public void changeDatabase();
public void updateDatabaseVersion();
}
@@ -0,0 +1,134 @@
package info.bukova.isspst.services.dbinfo;
import info.bukova.isspst.Constants;
import info.bukova.isspst.data.DbInfo;
import info.bukova.isspst.services.AbstractService;
import java.util.ArrayList;
import java.util.List;
import org.hibernate.SQLQuery;
import org.springframework.transaction.annotation.Transactional;
public class DbInfoServiceImpl extends AbstractService<DbInfo> implements DbInfoService
{
private DbInfo getDbInfo()
{
DbInfo dbInfo = null;
List<DbInfo> list = this.getAll();
if (list.isEmpty())
{
dbInfo = new DbInfo();
this.add(dbInfo);
list = this.getAll();
}
for (DbInfo item : list)
{
dbInfo = item;
break;
}
return dbInfo;
}
@Override
@Transactional
public void changeDatabase()
{
class Str2Str
{
private String key;
private String value;
public Str2Str(String key, String value)
{
this.key = key;
this.value = value;
}
public String getKey()
{
return this.key;
}
public String getValue()
{
return this.value;
}
}
long dbVersion = this.getDbInfo().getVersion();
if (Constants.DB_VERSION > dbVersion)
{
SQLQuery sq = null;
String sql = "";
if (dbVersion < 1)
{
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("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)
{
sql = "ALTER TABLE " + item.getKey() + " MODIFY " + item.getValue() + " VARCHAR(" + String.valueOf(Constants.LEN_DESCRIPTION) + ")";
sq = this.dao.getSession().createSQLQuery(sql);
sq.executeUpdate();
}
}
if (dbVersion < 2)
{
List<String> tables = new ArrayList<String>();
tables.add("material");
tables.add("order_item");
tables.add("requirement_items");
for (String item : tables)
{
sql = "UPDATE " + item + " SET MUNIT_ID = 0 WHERE (MUNIT_ID Is NULL) ";
sq = this.dao.getSession().createSQLQuery(sql);
sq.executeUpdate();
}
}
this.updateDatabaseVersion();
}
}
@Override
@Transactional
public void updateDatabaseVersion()
{
DbInfo dbInfo = this.getDbInfo();
dbInfo.setVersion(Constants.DB_VERSION);
this.update(dbInfo);
}
}
@@ -7,9 +7,11 @@ import info.bukova.isspst.services.AbstractOwnedService;
import info.bukova.isspst.services.LazyLoader; import info.bukova.isspst.services.LazyLoader;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List;
import org.hibernate.Hibernate; import org.hibernate.Hibernate;
import org.hibernate.Query; import org.hibernate.Query;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
public class InvoicingServiceImpl extends AbstractOwnedService<Invoicing> implements public class InvoicingServiceImpl extends AbstractOwnedService<Invoicing> implements
@@ -54,4 +56,21 @@ public class InvoicingServiceImpl extends AbstractOwnedService<Invoicing> implem
invoicing.setTotalInvoiced(total); invoicing.setTotalInvoiced(total);
} }
@SuppressWarnings("unchecked")
@Override
@Transactional
@PreAuthorize("hasPermission(this, 'PERM_READ')")
public List<Invoicing> getAll() {
Query q = dao.getQuery("select inv from Invoicing as inv join fetch inv.requirement rq join fetch rq.ownedBy order by rq.numser");
return q.list();
}
@Transactional
@LazyLoader("form")
public void loadOwnedBy(Invoicing invoice) {
Invoicing inv = getById(invoice.getId());
Hibernate.initialize(inv.getRequirement().getOwnedBy());
invoice.getRequirement().setOwnedBy(inv.getRequirement().getOwnedBy());
}
} }
@@ -1,9 +1,13 @@
package info.bukova.isspst.services.orders; package info.bukova.isspst.services.orders;
import info.bukova.isspst.Constants;
import info.bukova.isspst.Module;
import info.bukova.isspst.data.JoinedItem; import info.bukova.isspst.data.JoinedItem;
import info.bukova.isspst.data.RequirementItem; import info.bukova.isspst.data.RequirementItem;
import info.bukova.isspst.data.RequirementState; import info.bukova.isspst.data.RequirementState;
import info.bukova.isspst.data.Workgroup; import info.bukova.isspst.data.Workgroup;
import info.bukova.isspst.reporting.Report;
import info.bukova.isspst.reporting.ReportType;
import info.bukova.isspst.services.AbstractService; import info.bukova.isspst.services.AbstractService;
import info.bukova.isspst.services.users.UserService; import info.bukova.isspst.services.users.UserService;
import info.bukova.isspst.services.workgroups.WorkgroupService; import info.bukova.isspst.services.workgroups.WorkgroupService;
@@ -55,4 +59,27 @@ public class ApprovedServiceImpl extends AbstractService<JoinedItem> implements
return items; return items;
} }
@Override
public Module getModule() {
for (Module m : Constants.MODULES) {
if (m.getId() == Constants.MOD_REQUIREMENTS) {
return m;
}
}
return null;
}
@Override
public List<Report> getReports() {
Report rep = new Report();
rep.setType(ReportType.DYNAMIC);
rep.setName(Constants.DYNAMIC_REPORT_NAME);
List<Report> ret = new ArrayList<Report>();
ret.add(rep);
return ret;
}
} }
@@ -22,5 +22,7 @@ public interface OrderService extends Service<Order> {
public BigDecimal calcSumTotalFromItems(List<OrderItem> items); public BigDecimal calcSumTotalFromItems(List<OrderItem> items);
public void addApprovedItems(Order order, boolean orderedChanged);
public void updateApprovedItems(Order order, boolean orderedChanged); public void updateApprovedItems(Order order, boolean orderedChanged);
} }
@@ -180,8 +180,7 @@ public class OrderServiceImpl extends AbstractOwnedService<Order> implements
return sumTotal; return sumTotal;
} }
@Transactional protected void setApprovedItems(Order order, boolean orderedChanged)
public void updateApprovedItems(Order order, boolean orderedChanged)
{ {
if (orderedChanged) if (orderedChanged)
{ {
@@ -196,7 +195,41 @@ public class OrderServiceImpl extends AbstractOwnedService<Order> implements
} }
} }
} }
}
@Override
@Transactional
@PreAuthorize("hasPermission(this, 'PERM_ADD')")
public void addApprovedItems(Order order, boolean orderedChanged)
{
this.add(order);
this.setApprovedItems(order, orderedChanged);
}
@Override
@Transactional
@PreAuthorize("hasPermission(this, 'PERM_EDIT') or hasPermission(#entity, this.getUpdateEntityPermission())")
public void updateApprovedItems(Order order, boolean orderedChanged)
{
this.setApprovedItems(order, orderedChanged);
super.update(order); super.update(order);
} }
@Override
@Transactional
@PreAuthorize("hasPermission(this, 'PERM_DELETE') or hasPermission(#entity, this.getDeleteEntityPermission())")
public void delete(Order order) {
for (OrderItem item : order.getItems())
{
RequirementItem rItem = item.getReqItem();
if (rItem != null)
{
rItem.setOrderNum(null);
requirementItemDao.modify(rItem);
}
}
super.delete(order);
}
} }
@@ -38,9 +38,8 @@ public class ReqMaterialServiceImpl extends RequirementServiceImpl implements Re
@PreAuthorize("hasPermission(this, 'PERM_READ')") @PreAuthorize("hasPermission(this, 'PERM_READ')")
public List<Requirement> getMy() public List<Requirement> getMy()
{ {
Query q = dao.getQuery("from " + dao.getEntityName() + " where ownedBy = :owner and state != :state and kind = :kind"); Query q = dao.getQuery("from " + dao.getEntityName() + " where ownedBy = :owner and kind = :kind");
q.setParameter("owner", getLoggedInUser()); q.setParameter("owner", getLoggedInUser());
q.setParameter("state", RequirementState.APPROVED);
q.setParameter("kind", Constants.REQ_TYPE_MATERIAL); q.setParameter("kind", Constants.REQ_TYPE_MATERIAL);
return q.list(); return q.list();
} }
@@ -53,9 +52,8 @@ public class ReqMaterialServiceImpl extends RequirementServiceImpl implements Re
public List<Requirement> getCentreReq() public List<Requirement> getCentreReq()
{ {
List<Workgroup> wgList = workgroupService.getUserCentres(getLoggedInUser()); List<Workgroup> wgList = workgroupService.getUserCentres(getLoggedInUser());
Query q = dao.getQuery("select tr from " + dao.getEntityName() + " tr join fetch tr.ownedBy join tr.centre c where tr.state != :state and c in (:wgList) and kind = :kind order by tr.numser"); Query q = dao.getQuery("select tr from " + dao.getEntityName() + " tr join fetch tr.ownedBy join tr.centre c where c in (:wgList) and kind = :kind order by tr.numser");
q.setParameterList("wgList", wgList); q.setParameterList("wgList", wgList);
q.setParameter("state", RequirementState.APPROVED);
q.setParameter("kind", Constants.REQ_TYPE_MATERIAL); q.setParameter("kind", Constants.REQ_TYPE_MATERIAL);
return q.list(); return q.list();
} }
@@ -70,9 +68,8 @@ public class ReqMaterialServiceImpl extends RequirementServiceImpl implements Re
List<Workgroup> wgList = workgroupService.getUserWorkgroups(getLoggedInUser()); List<Workgroup> wgList = workgroupService.getUserWorkgroups(getLoggedInUser());
Query q = dao.getQuery("select tr from " Query q = dao.getQuery("select tr from "
+ dao.getEntityName() + dao.getEntityName()
+ " tr join fetch tr.ownedBy join tr.workgroup w where tr.state != :state and w in (:wgList) and kind = :kind order by tr.numser"); + " tr join fetch tr.ownedBy join tr.workgroup w where w in (:wgList) and kind = :kind order by tr.numser");
q.setParameterList("wgList", wgList); q.setParameterList("wgList", wgList);
q.setParameter("state", RequirementState.APPROVED);
q.setParameter("kind", Constants.REQ_TYPE_MATERIAL); q.setParameter("kind", Constants.REQ_TYPE_MATERIAL);
return q.list(); return q.list();
} }
@@ -38,9 +38,8 @@ public class ReqServicesServiceImpl extends RequirementServiceImpl implements Re
@PreAuthorize("hasPermission(this, 'PERM_READ')") @PreAuthorize("hasPermission(this, 'PERM_READ')")
public List<Requirement> getMy() public List<Requirement> getMy()
{ {
Query q = dao.getQuery("from " + dao.getEntityName() + " where ownedBy = :owner and state != :state and kind = :kind"); Query q = dao.getQuery("from " + dao.getEntityName() + " where ownedBy = :owner and kind = :kind");
q.setParameter("owner", getLoggedInUser()); q.setParameter("owner", getLoggedInUser());
q.setParameter("state", RequirementState.APPROVED);
q.setParameter("kind", Constants.REQ_TYPE_SERVICES); q.setParameter("kind", Constants.REQ_TYPE_SERVICES);
return q.list(); return q.list();
} }
@@ -53,9 +52,8 @@ public class ReqServicesServiceImpl extends RequirementServiceImpl implements Re
public List<Requirement> getCentreReq() public List<Requirement> getCentreReq()
{ {
List<Workgroup> wgList = workgroupService.getUserCentres(getLoggedInUser()); List<Workgroup> wgList = workgroupService.getUserCentres(getLoggedInUser());
Query q = dao.getQuery("select tr from " + dao.getEntityName() + " tr join fetch tr.ownedBy join tr.centre c where tr.state != :state and c in (:wgList) and kind = :kind order by tr.numser"); Query q = dao.getQuery("select tr from " + dao.getEntityName() + " tr join fetch tr.ownedBy join tr.centre c where c in (:wgList) and kind = :kind order by tr.numser");
q.setParameterList("wgList", wgList); q.setParameterList("wgList", wgList);
q.setParameter("state", RequirementState.APPROVED);
q.setParameter("kind", Constants.REQ_TYPE_SERVICES); q.setParameter("kind", Constants.REQ_TYPE_SERVICES);
return q.list(); return q.list();
} }
@@ -70,9 +68,8 @@ public class ReqServicesServiceImpl extends RequirementServiceImpl implements Re
List<Workgroup> wgList = workgroupService.getUserWorkgroups(getLoggedInUser()); List<Workgroup> wgList = workgroupService.getUserWorkgroups(getLoggedInUser());
Query q = dao.getQuery("select tr from " Query q = dao.getQuery("select tr from "
+ dao.getEntityName() + dao.getEntityName()
+ " tr join fetch tr.ownedBy join tr.workgroup w where tr.state != :state and w in (:wgList) and kind = :kind order by tr.numser"); + " tr join fetch tr.ownedBy join tr.workgroup w where w in (:wgList) and kind = :kind order by tr.numser");
q.setParameterList("wgList", wgList); q.setParameterList("wgList", wgList);
q.setParameter("state", RequirementState.APPROVED);
q.setParameter("kind", Constants.REQ_TYPE_SERVICES); q.setParameter("kind", Constants.REQ_TYPE_SERVICES);
return q.list(); return q.list();
} }
@@ -334,9 +334,8 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
@PreAuthorize("hasPermission(this, 'PERM_READ')") @PreAuthorize("hasPermission(this, 'PERM_READ')")
public List<T> getMy() public List<T> getMy()
{ {
Query q = dao.getQuery("from " + dao.getEntityName() + " where ownedBy = :owner and state != :state"); Query q = dao.getQuery("from " + dao.getEntityName() + " where ownedBy = :owner");
q.setParameter("owner", getLoggedInUser()); q.setParameter("owner", getLoggedInUser());
q.setParameter("state", RequirementState.APPROVED);
return q.list(); return q.list();
} }
@@ -348,9 +347,8 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
public List<T> getCentreReq() public List<T> getCentreReq()
{ {
List<Workgroup> wgList = workgroupService.getUserCentres(getLoggedInUser()); List<Workgroup> wgList = workgroupService.getUserCentres(getLoggedInUser());
Query q = dao.getQuery("select tr from " + dao.getEntityName() + " tr join fetch tr.ownedBy join tr.centre c where tr.state != :state and c in (:wgList) order by tr.numser"); Query q = dao.getQuery("select tr from " + dao.getEntityName() + " tr join fetch tr.ownedBy join tr.centre c where c in (:wgList) order by tr.numser");
q.setParameterList("wgList", wgList); q.setParameterList("wgList", wgList);
q.setParameter("state", RequirementState.APPROVED);
return q.list(); return q.list();
} }
@@ -362,9 +360,8 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
public List<T> getWorkgroupReq() public List<T> getWorkgroupReq()
{ {
List<Workgroup> wgList = workgroupService.getUserWorkgroups(getLoggedInUser()); List<Workgroup> wgList = workgroupService.getUserWorkgroups(getLoggedInUser());
Query q = dao.getQuery("select tr from " + dao.getEntityName() + " tr join fetch tr.ownedBy join tr.workgroup w where tr.state != :state and w in (:wgList) order by tr.numser"); Query q = dao.getQuery("select tr from " + dao.getEntityName() + " tr join fetch tr.ownedBy join tr.workgroup w where w in (:wgList) order by tr.numser");
q.setParameterList("wgList", wgList); q.setParameterList("wgList", wgList);
q.setParameter("state", RequirementState.APPROVED);
return q.list(); return q.list();
} }
@@ -383,4 +380,9 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
return Constants.PERM_EDIT_NEW; return Constants.PERM_EDIT_NEW;
} }
@Override
public String getDeleteEntityPermission() {
return Constants.PERM_DELETE_NEW;
}
} }
@@ -26,4 +26,6 @@ public interface RequirementService extends RequirementBaseService<Requirement>
public RequirementItem calcItemValuesFromItemTotal(RequirementItem item); public RequirementItem calcItemValuesFromItemTotal(RequirementItem item);
public BigDecimal calcSumTotalFromItems(List<RequirementItem> items); public BigDecimal calcSumTotalFromItems(List<RequirementItem> items);
public BigDecimal getInvoicedAmount(Requirement req);
} }
@@ -16,6 +16,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import org.hibernate.Hibernate; import org.hibernate.Hibernate;
import org.hibernate.Query;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@@ -240,4 +241,15 @@ public class RequirementServiceImpl extends RequirementBaseServiceImpl<Requireme
invoicingService.add(inv); invoicingService.add(inv);
} }
} }
@Override
@Transactional
public BigDecimal getInvoicedAmount(Requirement req) {
Query query = dao.getQuery("select invoice from Invoicing invoice join invoice.requirement rq where rq.id = :reqId");
query.setParameter("reqId", req.getId());
Invoicing inv = (Invoicing) query.uniqueResult();
return inv != null ? inv.getTotalInvoiced() : null;
}
} }
@@ -27,5 +27,6 @@ public interface UserService extends UserDetailsService, Service<User> {
public void setUserSettings(UserSettingsData settings); public void setUserSettings(UserSettingsData settings);
public void setAuthMethod(AuthMethod method); public void setAuthMethod(AuthMethod method);
public AuthMethod getAuthMethod(); public AuthMethod getAuthMethod();
public List<User> getUsersForCombo();
} }
@@ -230,4 +230,12 @@ public class UserServiceImpl extends AbstractService<User> implements UserServic
} }
} }
@SuppressWarnings("unchecked")
@Override
@Transactional
public List<User> getUsersForCombo() {
Query q = dao.getQuery("from User u order by u.lastName");
return q.list();
}
} }
@@ -1,19 +1,21 @@
package info.bukova.isspst.sort; package info.bukova.isspst.sort;
import info.bukova.isspst.StringUtils;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.text.Collator; import java.text.Collator;
import java.text.ParseException; import java.text.ParseException;
import java.text.RuleBasedCollator; import java.text.RuleBasedCollator;
import java.util.Comparator; import java.util.Comparator;
import java.util.List;
import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.Clients;
public class CzechStringComparator implements Comparator<Object> { public class CzechStringComparator implements Comparator<Object> {
private String m_rule; private String m_rule;
private final String m_property; private final List<String> m_propertyPath;
private final boolean m_ascending; private final boolean m_ascending;
private Method m_getter;
private Comparator<Object> m_comparator; private Comparator<Object> m_comparator;
public CzechStringComparator(String property, boolean ascending) { public CzechStringComparator(String property, boolean ascending) {
@@ -47,7 +49,7 @@ public class CzechStringComparator implements Comparator<Object> {
m_rule += "< Y,y < Ý,ý "; m_rule += "< Y,y < Ý,ý ";
m_rule += "< Z,z < Ź,ź < Ž,ž "; m_rule += "< Z,z < Ź,ź < Ž,ž ";
m_property = property; m_propertyPath = StringUtils.split(property, ".");
m_ascending = ascending; m_ascending = ascending;
} }
@@ -72,21 +74,56 @@ public class CzechStringComparator implements Comparator<Object> {
return 0; return 0;
} }
private Object getValue(Object caller)
{
Object obj = caller;
for (String property : m_propertyPath)
{
if (obj == null)
{
return null;
}
Method method = ReflectionTools.getGetterMethod(obj, property);
try
{
obj = method.invoke(obj);
}
catch (IllegalAccessException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
catch (IllegalArgumentException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
catch (InvocationTargetException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return obj;
}
private int internalCompare(Object argL, Object argR) private int internalCompare(Object argL, Object argR)
throws ParseException, IllegalAccessException, throws ParseException, IllegalAccessException,
IllegalArgumentException, InvocationTargetException { IllegalArgumentException, InvocationTargetException {
if (m_getter == null) {
m_getter = ReflectionTools.getGetterMethod(argL, m_property);
}
if (m_comparator == null) { if (m_comparator == null)
{
Collator c = new RuleBasedCollator(m_rule); Collator c = new RuleBasedCollator(m_rule);
c.setStrength(Collator.TERTIARY); c.setStrength(Collator.TERTIARY);
m_comparator = c; m_comparator = c;
} }
Object valL = m_getter.invoke(argL); Object valL = this.getValue(argL);
Object valR = m_getter.invoke(argR); Object valR = this.getValue(argR);
boolean isNullValL = (valL == null); boolean isNullValL = (valL == null);
boolean isNullValR = (valR == null); boolean isNullValR = (valR == null);
@@ -1,5 +1,6 @@
package info.bukova.isspst.ui; package info.bukova.isspst.ui;
import info.bukova.isspst.Constants;
import info.bukova.isspst.StringUtils; import info.bukova.isspst.StringUtils;
import java.util.ArrayList; import java.util.ArrayList;
@@ -39,6 +40,16 @@ public class DocumentViewModel
this.standardBoolConverter = standardBoolConverter; this.standardBoolConverter = standardBoolConverter;
} }
final public int getLengthText()
{
return Constants.LEN_TEXT;
}
final public int getLengthDescription()
{
return Constants.LEN_DESCRIPTION;
}
@Init @Init
public void initDocumentViewModel() public void initDocumentViewModel()
{ {
@@ -14,6 +14,7 @@ import info.bukova.isspst.reporting.GeneratorFactory;
import info.bukova.isspst.reporting.ReportDefinition; import info.bukova.isspst.reporting.ReportDefinition;
import info.bukova.isspst.services.addressbook.AdbService; import info.bukova.isspst.services.addressbook.AdbService;
import info.bukova.isspst.services.users.UserService; import info.bukova.isspst.services.users.UserService;
import info.bukova.isspst.ui.DocumentViewModel;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -27,7 +28,8 @@ import org.zkoss.bind.annotation.NotifyChange;
import org.zkoss.zk.ui.select.annotation.WireVariable; import org.zkoss.zk.ui.select.annotation.WireVariable;
import org.zkoss.zul.Window; import org.zkoss.zul.Window;
public class MailForm { public class MailForm extends DocumentViewModel
{
@WireVariable @WireVariable
private Mailer mailer; private Mailer mailer;
@@ -52,7 +54,7 @@ public class MailForm {
private int adbType; private int adbType;
private String findAddress; private String findAddress;
@Init @Init(superclass = true)
public void init(@ExecutionArgParam("report") Boolean report) { public void init(@ExecutionArgParam("report") Boolean report) {
message = new MailMessage(); message = new MailMessage();
message.setHtml(true); message.setHtml(true);
@@ -85,7 +85,7 @@ public class ApprovedList extends ListViewModel<JoinedItem>
public List<User> getUsers() public List<User> getUsers()
{ {
return this.userService.getAll(); return this.userService.getUsersForCombo();
} }
@Command @Command
@@ -3,9 +3,11 @@ package info.bukova.isspst.ui.main.invoicing;
import java.util.List; 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.Workgroup; import info.bukova.isspst.data.Workgroup;
import info.bukova.isspst.filters.InvoicingFilter; import info.bukova.isspst.filters.InvoicingFilter;
import info.bukova.isspst.services.invoicing.InvoicingService; import info.bukova.isspst.services.invoicing.InvoicingService;
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;
@@ -18,6 +20,8 @@ public class InvoicingList extends ListViewModel<Invoicing> {
private InvoicingService invoicingService; private InvoicingService invoicingService;
@WireVariable @WireVariable
private WorkgroupService workgroupService; private WorkgroupService workgroupService;
@WireVariable
private UserService userService;
@Init(superclass = true) @Init(superclass = true)
public void initInvoicing() { public void initInvoicing() {
@@ -45,4 +49,8 @@ public class InvoicingList extends ListViewModel<Invoicing> {
return workgroupService.getWorkgroups(); return workgroupService.getWorkgroups();
} }
public List<User> getUsers() {
return userService.getUsersForCombo();
}
} }
@@ -297,6 +297,17 @@ public class OrderForm extends FormViewModel<Order>
this.calcAndUpdateFormTotalPrice(form); this.calcAndUpdateFormTotalPrice(form);
} }
@Override
protected void doAdd()
{
// Zjisti, zda se změnil příznak objednávky (objednáno/neobjednáno)
boolean orderedChanged = (this.recordBeforeEdit.isOrdered() != this.getDataBean().isOrdered());
// Aktualizovat příznak schválených položek, aby se nemohli vložit do
// jiných objednávek
orderService.addApprovedItems(this.getDataBean(), orderedChanged);
BindUtils.postGlobalCommand(null, null, "reload", null);
}
@Override @Override
protected void doSave() protected void doSave()
{ {
@@ -29,10 +29,10 @@ public class SelectMaterialItems extends SelectItems
private MaterialFilter dataFilterMaterial; private MaterialFilter dataFilterMaterial;
@Init @Init(superclass = true)
public void init() public void initSelectMaterialItems()
{ {
super.init(); // super.init();
this.setFullMaterialList(materialService.getAll()); this.setFullMaterialList(materialService.getAll());
this.setMaterialList(this.getFullMaterialList()); this.setMaterialList(this.getFullMaterialList());
@@ -7,6 +7,7 @@ import info.bukova.isspst.services.requirement.RequirementService;
import info.bukova.isspst.services.workgroups.WorkgroupService; import info.bukova.isspst.services.workgroups.WorkgroupService;
import info.bukova.isspst.ui.requirement.RequirementSubpage; import info.bukova.isspst.ui.requirement.RequirementSubpage;
import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -64,4 +65,18 @@ public class ReqListMyAll extends RequirementSubpage<Requirement>
protected void beforeSelectViaUrl() { protected void beforeSelectViaUrl() {
BindUtils.postGlobalCommand(null, null, "selectAll", null); BindUtils.postGlobalCommand(null, null, "selectAll", null);
} }
public BigDecimal getInvoicedAmount() {
if (getDataBean() != null) {
return requirementService.getInvoicedAmount(getDataBean());
} else {
return null;
}
}
@Override
@NotifyChange({ "dataBean", "ableToDelete", "canApprove", "invoicedAmount" })
public void setDataBean(Requirement data) {
super.setDataBean(data);
}
} }
@@ -7,6 +7,7 @@ import info.bukova.isspst.services.requirement.RequirementService;
import info.bukova.isspst.services.workgroups.WorkgroupService; import info.bukova.isspst.services.workgroups.WorkgroupService;
import info.bukova.isspst.ui.requirement.RequirementSubpage; import info.bukova.isspst.ui.requirement.RequirementSubpage;
import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -64,4 +65,18 @@ public class ReqListMyCenters extends RequirementSubpage<Requirement>
protected void beforeSelectViaUrl() { protected void beforeSelectViaUrl() {
BindUtils.postGlobalCommand(null, null, "selectCentre", null); BindUtils.postGlobalCommand(null, null, "selectCentre", null);
} }
public BigDecimal getInvoicedAmount() {
if (getDataBean() != null) {
return requirementService.getInvoicedAmount(getDataBean());
} else {
return null;
}
}
@Override
@NotifyChange({ "dataBean", "ableToDelete", "canApprove", "invoicedAmount" })
public void setDataBean(Requirement data) {
super.setDataBean(data);
}
} }
@@ -7,6 +7,7 @@ import info.bukova.isspst.services.requirement.RequirementService;
import info.bukova.isspst.services.workgroups.WorkgroupService; import info.bukova.isspst.services.workgroups.WorkgroupService;
import info.bukova.isspst.ui.requirement.RequirementSubpage; import info.bukova.isspst.ui.requirement.RequirementSubpage;
import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -64,4 +65,18 @@ public class ReqListMyWorkgroups extends RequirementSubpage<Requirement>
protected void beforeSelectViaUrl() { protected void beforeSelectViaUrl() {
BindUtils.postGlobalCommand(null, null, "selectWorkgroup", null); BindUtils.postGlobalCommand(null, null, "selectWorkgroup", null);
} }
public BigDecimal getInvoicedAmount() {
if (getDataBean() != null) {
return requirementService.getInvoicedAmount(getDataBean());
} else {
return null;
}
}
@Override
@NotifyChange({ "dataBean", "ableToDelete", "canApprove", "invoicedAmount" })
public void setDataBean(Requirement data) {
super.setDataBean(data);
}
} }
@@ -183,7 +183,14 @@ public class RequirementForm extends FormViewModel<Requirement>
if (isMaterial) if (isMaterial)
{ {
Material materialItem = (Material) selected; Material materialItem = (Material) selected;
item.setMunit(materialItem.getMunit()); MUnitEmb unit = materialItem.getMunit();
// if (unit == null)
// {
// unit = new MUnitEmb();
// }
item.setMunit(unit);
} }
this.setSelectedItem(item); this.setSelectedItem(item);
@@ -3,13 +3,14 @@ package info.bukova.isspst.ui.main.orders.requirements;
import info.bukova.isspst.data.MUnitEmb; import info.bukova.isspst.data.MUnitEmb;
import info.bukova.isspst.data.RequirementSubject; import info.bukova.isspst.data.RequirementSubject;
import info.bukova.isspst.services.munits.MUnitService; import info.bukova.isspst.services.munits.MUnitService;
import info.bukova.isspst.ui.DocumentViewModel;
import java.util.List; import java.util.List;
import org.zkoss.bind.annotation.Init; import org.zkoss.bind.annotation.Init;
import org.zkoss.zk.ui.select.annotation.WireVariable; import org.zkoss.zk.ui.select.annotation.WireVariable;
public class SelectItems public class SelectItems extends DocumentViewModel
{ {
protected RequirementSubject selectedItem; protected RequirementSubject selectedItem;
@@ -19,8 +20,8 @@ public class SelectItems
protected List<MUnitEmb> munitList; protected List<MUnitEmb> munitList;
@Init @Init(superclass = true)
public void init() public void initSelectItems()
{ {
this.setMunitList(munitService.getEmbAll()); this.setMunitList(munitService.getEmbAll());
} }
@@ -29,10 +29,10 @@ public class SelectServicesItems extends SelectItems
private ServiceItemFilter dataFilterService; private ServiceItemFilter dataFilterService;
@Init @Init(superclass = true)
public void init() public void initSelectServicesItems()
{ {
super.init(); // super.init();
this.setFullServiceItemList(serviceItemService.getAll()); this.setFullServiceItemList(serviceItemService.getAll());
this.setServiceItemList(this.getFullServiceItemList()); this.setServiceItemList(this.getFullServiceItemList());
@@ -4,6 +4,7 @@ import info.bukova.isspst.reporting.Report;
import info.bukova.isspst.reporting.ReportDefinition; import info.bukova.isspst.reporting.ReportDefinition;
import info.bukova.isspst.reporting.ReportType; import info.bukova.isspst.reporting.ReportType;
import info.bukova.isspst.sort.ReflectionTools; import info.bukova.isspst.sort.ReflectionTools;
import info.bukova.isspst.ui.DocumentViewModel;
import info.bukova.isspst.ui.ListChecks; import info.bukova.isspst.ui.ListChecks;
import info.bukova.isspst.ui.LocaleConverter; import info.bukova.isspst.ui.LocaleConverter;
@@ -12,13 +13,13 @@ import java.util.List;
import org.zkoss.bind.annotation.Init; import org.zkoss.bind.annotation.Init;
import org.zkoss.zk.ui.select.annotation.WireVariable; import org.zkoss.zk.ui.select.annotation.WireVariable;
public class ColSelectVM { public class ColSelectVM extends DocumentViewModel
{
@WireVariable @WireVariable
private ReportDefinition reportDefinition; private ReportDefinition reportDefinition;
private LocaleConverter locConverter; private LocaleConverter locConverter;
@Init @Init(superclass = true)
public void init() { public void init() {
locConverter = new LocaleConverter(); locConverter = new LocaleConverter();
} }
@@ -1,17 +1,18 @@
package info.bukova.isspst.ui.reporting; package info.bukova.isspst.ui.reporting;
import info.bukova.isspst.reporting.ReportDefinition; import info.bukova.isspst.reporting.ReportDefinition;
import info.bukova.isspst.ui.DocumentViewModel;
import org.zkoss.bind.annotation.Init; import org.zkoss.bind.annotation.Init;
import org.zkoss.zk.ui.select.annotation.WireVariable; import org.zkoss.zk.ui.select.annotation.WireVariable;
public class OrderOptionsVM { public class OrderOptionsVM extends DocumentViewModel
{
private boolean printPrices; private boolean printPrices;
@WireVariable @WireVariable
private ReportDefinition reportDefinition; private ReportDefinition reportDefinition;
@Init @Init(superclass = true)
public void init() { public void init() {
printPrices = true; printPrices = true;
reportDefinition.setParam("SET_PRICES", true); reportDefinition.setParam("SET_PRICES", true);
@@ -4,6 +4,7 @@ import info.bukova.isspst.reporting.Report;
import info.bukova.isspst.reporting.ReportDefinition; import info.bukova.isspst.reporting.ReportDefinition;
import info.bukova.isspst.reporting.ReportType; import info.bukova.isspst.reporting.ReportType;
import info.bukova.isspst.services.Service; import info.bukova.isspst.services.Service;
import info.bukova.isspst.ui.DocumentViewModel;
import java.util.List; import java.util.List;
@@ -16,7 +17,8 @@ import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.select.annotation.WireVariable; import org.zkoss.zk.ui.select.annotation.WireVariable;
import org.zkoss.zul.Window; import org.zkoss.zul.Window;
public class ReportDialogVM { public class ReportDialogVM extends DocumentViewModel
{
private List<Report> reports; private List<Report> reports;
private Report selected; private Report selected;
@@ -25,7 +27,7 @@ public class ReportDialogVM {
private List<Object> dataList; private List<Object> dataList;
private Object singleObject; private Object singleObject;
@Init @Init(superclass = true)
public void init(@ExecutionArgParam("reports") List<Report> reports, public void init(@ExecutionArgParam("reports") List<Report> reports,
@ExecutionArgParam("data") List<Object> data, @ExecutionArgParam("data") List<Object> data,
@ExecutionArgParam("singleObject") Object singleObject, @ExecutionArgParam("singleObject") Object singleObject,
@@ -1,5 +1,7 @@
package info.bukova.isspst.ui.reporting; package info.bukova.isspst.ui.reporting;
import info.bukova.isspst.ui.DocumentViewModel;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@@ -8,9 +10,9 @@ import org.zkoss.bind.annotation.Init;
import org.zkoss.zk.ui.Executions; import org.zkoss.zk.ui.Executions;
import org.zkoss.zul.Window; import org.zkoss.zul.Window;
public class ReportVM { public class ReportVM extends DocumentViewModel
{
@Init @Init(superclass = true)
public void init() { public void init() {
} }
@@ -1,6 +1,7 @@
package info.bukova.isspst.ui.requirement; package info.bukova.isspst.ui.requirement;
import info.bukova.isspst.data.Workflow; import info.bukova.isspst.data.Workflow;
import info.bukova.isspst.ui.DocumentViewModel;
import org.zkoss.bind.annotation.BindingParam; import org.zkoss.bind.annotation.BindingParam;
import org.zkoss.bind.annotation.Command; import org.zkoss.bind.annotation.Command;
@@ -8,11 +9,11 @@ import org.zkoss.bind.annotation.ExecutionArgParam;
import org.zkoss.bind.annotation.Init; import org.zkoss.bind.annotation.Init;
import org.zkoss.zul.Window; import org.zkoss.zul.Window;
public class LimitVM { public class LimitVM extends DocumentViewModel
{
private Workflow workflow; private Workflow workflow;
@Init @Init(superclass = true)
public void init(@ExecutionArgParam("workflow") Workflow workflow) { public void init(@ExecutionArgParam("workflow") Workflow workflow) {
this.workflow = workflow; this.workflow = workflow;
} }
@@ -1,5 +1,11 @@
package info.bukova.isspst.ui.requirement; package info.bukova.isspst.ui.requirement;
import info.bukova.isspst.data.RequirementType;
import info.bukova.isspst.data.Workgroup;
import info.bukova.isspst.services.workgroups.WorkgroupService;
import info.bukova.isspst.ui.DocumentViewModel;
import info.bukova.isspst.ui.ListChecks;
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.ExecutionArgParam; import org.zkoss.bind.annotation.ExecutionArgParam;
@@ -7,19 +13,14 @@ import org.zkoss.bind.annotation.Init;
import org.zkoss.zk.ui.select.annotation.WireVariable; import org.zkoss.zk.ui.select.annotation.WireVariable;
import org.zkoss.zul.Window; import org.zkoss.zul.Window;
import info.bukova.isspst.data.RequirementType; public class OfferedCentresVM extends DocumentViewModel
import info.bukova.isspst.data.Workgroup; {
import info.bukova.isspst.services.workgroups.WorkgroupService;
import info.bukova.isspst.ui.ListChecks;
public class OfferedCentresVM {
private RequirementType selectedType; private RequirementType selectedType;
@WireVariable @WireVariable
private WorkgroupService workgroupService; private WorkgroupService workgroupService;
private ListChecks<Workgroup> wgChecks; private ListChecks<Workgroup> wgChecks;
@Init @Init(superclass = true)
public void init(@ExecutionArgParam("type") RequirementType type) { public void init(@ExecutionArgParam("type") RequirementType type) {
this.selectedType = type; this.selectedType = type;
wgChecks = new ListChecks<Workgroup>(selectedType.getOfferedCentres(), workgroupService.getCentres()); wgChecks = new ListChecks<Workgroup>(selectedType.getOfferedCentres(), workgroupService.getCentres());
@@ -25,7 +25,7 @@ public class RequirementSubpage<T extends RequirementBase> extends ListViewModel
public List<User> getAllUsers() public List<User> getAllUsers()
{ {
return userService.getAll(); return userService.getUsersForCombo();
} }
private BigDecimalConverter bigDecimalConverter; private BigDecimalConverter bigDecimalConverter;
@@ -42,7 +42,7 @@ public class TripRequirementForm extends FormViewModel<TripRequirement> {
public void init() { public void init() {
tripRequirementService.loadType(getDataBean()); tripRequirementService.loadType(getDataBean());
centres = reqTypeService.filterCentres(getDataBean().getType(), workgroupService.getUserCentres(userService.getCurrent())); centres = reqTypeService.filterCentres(getDataBean().getType(), workgroupService.getUserCentres(userService.getCurrent()));
users = userService.getAll(); users = userService.getUsersForCombo();
passengers = getDataBean().getPassengers(); passengers = getDataBean().getPassengers();
validator = new TripRequirementFormValidator(); validator = new TripRequirementFormValidator();
} }
@@ -9,6 +9,7 @@ import info.bukova.isspst.mail.MailMessage;
import info.bukova.isspst.services.settings.GlobalSettingsService; import info.bukova.isspst.services.settings.GlobalSettingsService;
import info.bukova.isspst.sort.ReflectionTools; import info.bukova.isspst.sort.ReflectionTools;
import info.bukova.isspst.storage.FileStorage; import info.bukova.isspst.storage.FileStorage;
import info.bukova.isspst.ui.DocumentViewModel;
import info.bukova.isspst.ui.LocaleConverter; import info.bukova.isspst.ui.LocaleConverter;
import info.bukova.isspst.ui.SecurityHelper; import info.bukova.isspst.ui.SecurityHelper;
@@ -31,7 +32,8 @@ import org.zkoss.zk.ui.event.UploadEvent;
import org.zkoss.zk.ui.select.annotation.WireVariable; import org.zkoss.zk.ui.select.annotation.WireVariable;
import org.zkoss.zul.Window; import org.zkoss.zul.Window;
public class GlobalSettingsVM { public class GlobalSettingsVM extends DocumentViewModel
{
@WireVariable @WireVariable
private GlobalSettingsService settingsService; private GlobalSettingsService settingsService;
@@ -42,7 +44,7 @@ public class GlobalSettingsVM {
@WireVariable @WireVariable
private FileStorage storage; private FileStorage storage;
@Init @Init(superclass = true)
public void init() { public void init() {
settings = settingsService.getSettings(); settings = settingsService.getSettings();
locConverter = new LocaleConverter(); locConverter = new LocaleConverter();
@@ -1,5 +1,11 @@
package info.bukova.isspst.ui.settings; package info.bukova.isspst.ui.settings;
import info.bukova.isspst.Constants;
import info.bukova.isspst.Module;
import info.bukova.isspst.data.NumberSeries;
import info.bukova.isspst.services.numberseries.NumberSeriesService;
import info.bukova.isspst.ui.DocumentViewModel;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@@ -11,19 +17,15 @@ import org.zkoss.bind.annotation.Init;
import org.zkoss.zk.ui.select.annotation.WireVariable; import org.zkoss.zk.ui.select.annotation.WireVariable;
import org.zkoss.zul.Window; import org.zkoss.zul.Window;
import info.bukova.isspst.Constants; public class NumberSeriesVM extends DocumentViewModel
import info.bukova.isspst.Module; {
import info.bukova.isspst.data.NumberSeries;
import info.bukova.isspst.services.numberseries.NumberSeriesService;
public class NumberSeriesVM {
@WireVariable @WireVariable
private NumberSeriesService numericSeriesService; private NumberSeriesService numericSeriesService;
private List<NumberSeries> numberSeriesList; private List<NumberSeries> numberSeriesList;
private Map<String, Module> moduleMap; private Map<String, Module> moduleMap;
@Init @Init(superclass = true)
public void init() { public void init() {
numberSeriesList = new ArrayList<NumberSeries>(numericSeriesService.getAll()); numberSeriesList = new ArrayList<NumberSeries>(numericSeriesService.getAll());
moduleMap = new HashMap<String, Module>(); moduleMap = new HashMap<String, Module>();
@@ -3,6 +3,7 @@ package info.bukova.isspst.ui.settings;
import info.bukova.isspst.data.UserSettingsData; import info.bukova.isspst.data.UserSettingsData;
import info.bukova.isspst.services.users.UserService; import info.bukova.isspst.services.users.UserService;
import info.bukova.isspst.storage.FileStorage; import info.bukova.isspst.storage.FileStorage;
import info.bukova.isspst.ui.DocumentViewModel;
import java.awt.image.RenderedImage; import java.awt.image.RenderedImage;
import java.io.IOException; import java.io.IOException;
@@ -19,15 +20,15 @@ import org.zkoss.zk.ui.event.UploadEvent;
import org.zkoss.zk.ui.select.annotation.WireVariable; import org.zkoss.zk.ui.select.annotation.WireVariable;
import org.zkoss.zul.Window; import org.zkoss.zul.Window;
public class UserSettingsVM { public class UserSettingsVM extends DocumentViewModel
{
@WireVariable @WireVariable
private UserService userService; private UserService userService;
@WireVariable @WireVariable
private FileStorage storage; private FileStorage storage;
private UserSettingsData settings; private UserSettingsData settings;
@Init @Init(superclass = true)
public void init() { public void init() {
settings = userService.getUserSettings(); settings = userService.getUserSettings();
} }
@@ -2,6 +2,7 @@ package info.bukova.isspst.ui.users;
import info.bukova.isspst.data.User; import info.bukova.isspst.data.User;
import info.bukova.isspst.services.users.UserService; import info.bukova.isspst.services.users.UserService;
import info.bukova.isspst.ui.DocumentViewModel;
import org.zkoss.bind.annotation.BindingParam; import org.zkoss.bind.annotation.BindingParam;
import org.zkoss.bind.annotation.Command; import org.zkoss.bind.annotation.Command;
@@ -10,7 +11,8 @@ import org.zkoss.zk.ui.select.annotation.WireVariable;
import org.zkoss.zul.Messagebox; import org.zkoss.zul.Messagebox;
import org.zkoss.zul.Window; import org.zkoss.zul.Window;
public class PasswdVM { public class PasswdVM extends DocumentViewModel
{
private String oldPw; private String oldPw;
private String newPw; private String newPw;
@@ -19,7 +21,7 @@ public class PasswdVM {
@WireVariable @WireVariable
private UserService userService; private UserService userService;
@Init @Init(superclass = true)
public void init() { public void init() {
user = userService.getCurrent(); user = userService.getCurrent();
} }
+1
View File
@@ -5,6 +5,7 @@
<hibernate-configuration> <hibernate-configuration>
<session-factory> <session-factory>
<mapping class="info.bukova.isspst.data.DbInfo"></mapping>
<mapping class="info.bukova.isspst.data.User"></mapping> <mapping class="info.bukova.isspst.data.User"></mapping>
<mapping class="info.bukova.isspst.data.Role"></mapping> <mapping class="info.bukova.isspst.data.Role"></mapping>
<mapping class="info.bukova.isspst.data.Permission"></mapping> <mapping class="info.bukova.isspst.data.Permission"></mapping>
@@ -40,6 +40,8 @@ RequirementItemUnitPrice=Jedn. cena
RequirementItemTotal=Celkem RequirementItemTotal=Celkem
RequirementItemDescription=Poznámka RequirementItemDescription=Poznámka
RequirementInvoicedAmount=Fakturovaná částka:
AgendaMyOrders=Aktuální AgendaMyOrders=Aktuální
AgendaOrdersHistory=Ukončené AgendaOrdersHistory=Ukončené
@@ -285,8 +287,8 @@ OrderAbr=Obj.
MaterialRequirement=Požadavek na materiál MaterialRequirement=Požadavek na materiál
MaterialRequirements=Požadavky na materiál MaterialRequirements=Požadavky na materiál
ServiceRequirement=Požadavek na servis ServiceRequirement=Požadavek na službu
ServiceRequirements=Požadavky na servis ServiceRequirements=Požadavky na služby
ApprovedRequirementItems=Schválené položky požadavků ApprovedRequirementItems=Schválené položky požadavků
CurrentRequirements=Aktuální požadavky CurrentRequirements=Aktuální požadavky
@@ -312,6 +314,7 @@ DateTimeFormat=dd. MM. yyyy, HH:MM:ss
AddItem=Přidat položku AddItem=Přidat položku
SelectGroup=Vybrat skupinu... SelectGroup=Vybrat skupinu...
RemoveItem=Smazat RemoveItem=Smazat
Confirm=Potvrdit
StudentProject = Studentský projekt StudentProject = Studentský projekt
StudentProjectAbr = St. projekt StudentProjectAbr = St. projekt
@@ -346,6 +349,7 @@ InvoicingInvoiceNumber=Číslo faktury
InvoicingAmount=Částka InvoicingAmount=Částka
InvoicingDescription=Popis InvoicingDescription=Popis
InvoicingInvoiced=Fakturováno InvoicingInvoiced=Fakturováno
InvoicingApplicant=Žadatel
HandleComboKeyFilter=#del HandleComboKeyFilter=#del
HandleComboKey=$#del HandleComboKey=$#del
@@ -356,3 +360,6 @@ WorkgroupFormCannotAddUser=Uživatele nelze přidat
WorkgroupFormCannotAddWorkgroup=Komisi nelze přidat WorkgroupFormCannotAddWorkgroup=Komisi nelze přidat
WorkgroupFormOrderLimit=Limit nákupů WorkgroupFormOrderLimit=Limit nákupů
WorkgroupIsInWorkgroup=Komisi nelze smazat, protože je členem některého střediska WorkgroupIsInWorkgroup=Komisi nelze smazat, protože je členem některého střediska
GoogleDriveUrl=Odkaz na Google Drive
Help=Příručka
Binary file not shown.
+281 -141
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="tripBill" pageWidth="612" pageHeight="792" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="f59e8277-a431-4cdc-abaa-c82c1cf193af"> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="tripBill" pageWidth="612" pageHeight="792" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="f59e8277-a431-4cdc-abaa-c82c1cf193af">
<property name="ireport.zoom" value="2.0"/> <property name="ireport.zoom" value="2.0"/>
<property name="ireport.x" value="214"/> <property name="ireport.x" value="176"/>
<property name="ireport.y" value="0"/> <property name="ireport.y" value="856"/>
<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false"> <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["/home/pepa/Dokumenty/dev/java/isspst/"]]></defaultValueExpression> <defaultValueExpression><![CDATA["/home/pepa/Dokumenty/dev/java/isspst/"]]></defaultValueExpression>
</parameter> </parameter>
@@ -50,97 +50,97 @@
<band splitType="Stretch"/> <band splitType="Stretch"/>
</background> </background>
<pageHeader> <pageHeader>
<band height="282" splitType="Stretch"> <band height="259" splitType="Stretch">
<staticText> <staticText>
<reportElement uuid="6e60bd03-48b9-4555-91ab-757532d93e6a" x="10" y="66" width="143" height="20"/> <reportElement uuid="6e60bd03-48b9-4555-91ab-757532d93e6a" x="10" y="47" width="143" height="20"/>
<textElement> <textElement>
<font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/> <font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
</textElement> </textElement>
<text><![CDATA[Příjmení, jméno, titul:]]></text> <text><![CDATA[Příjmení, jméno, titul:]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement uuid="448ba3e9-dc29-45c4-b384-3e597d036134" x="10" y="86" width="100" height="20"/> <reportElement uuid="448ba3e9-dc29-45c4-b384-3e597d036134" x="10" y="67" width="100" height="20"/>
<textElement> <textElement>
<font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/> <font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
</textElement> </textElement>
<text><![CDATA[Bydliště:]]></text> <text><![CDATA[Bydliště:]]></text>
</staticText> </staticText>
<textField> <textField>
<reportElement uuid="62d493f1-c058-42e6-b2f5-1a691ac9e5db" x="196" y="66" width="181" height="20"/> <reportElement uuid="62d493f1-c058-42e6-b2f5-1a691ac9e5db" x="196" y="47" width="181" height="20"/>
<textElement> <textElement>
<font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/> <font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{ownedBy}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{ownedBy}]]></textFieldExpression>
</textField> </textField>
<staticText> <staticText>
<reportElement uuid="86395201-6c9d-4584-a8a3-eb46dd4af411" x="143" y="115" width="143" height="27"/> <reportElement uuid="86395201-6c9d-4584-a8a3-eb46dd4af411" x="143" y="92" width="143" height="27"/>
<textElement textAlignment="Center"/> <textElement textAlignment="Center"/>
<text><![CDATA[Místo jednání]]></text> <text><![CDATA[Místo jednání]]></text>
</staticText> </staticText>
<textField> <textField>
<reportElement uuid="f62e3881-5a60-45ed-997b-71f5e1c25b28" x="0" y="143" width="143" height="20"/> <reportElement uuid="f62e3881-5a60-45ed-997b-71f5e1c25b28" x="0" y="120" width="143" height="20"/>
<textElement textAlignment="Center"/> <textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{requirement.from}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{requirement.from}]]></textFieldExpression>
</textField> </textField>
<line> <line>
<reportElement uuid="67730ab5-6550-4a51-8daa-ef3c509d44ad" x="143" y="113" width="1" height="75"/> <reportElement uuid="67730ab5-6550-4a51-8daa-ef3c509d44ad" x="143" y="90" width="1" height="75"/>
</line> </line>
<line> <line>
<reportElement uuid="98195ce4-de92-4643-bd50-f63d553a6235" x="0" y="188" width="572" height="1"/> <reportElement uuid="98195ce4-de92-4643-bd50-f63d553a6235" x="0" y="165" width="572" height="1"/>
</line> </line>
<staticText> <staticText>
<reportElement uuid="4827d565-87ea-4648-a5b0-6473e8814bb1" x="429" y="115" width="143" height="26"/> <reportElement uuid="4827d565-87ea-4648-a5b0-6473e8814bb1" x="429" y="92" width="143" height="26"/>
<textElement textAlignment="Center"/> <textElement textAlignment="Center"/>
<text><![CDATA[Konec cesty (místo, datum)]]></text> <text><![CDATA[Konec cesty (místo, datum)]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement uuid="76f85619-891b-44f4-8c7f-d1ceba0bef3c" x="0" y="115" width="143" height="27"/> <reportElement uuid="76f85619-891b-44f4-8c7f-d1ceba0bef3c" x="0" y="92" width="143" height="27"/>
<textElement textAlignment="Center"/> <textElement textAlignment="Center"/>
<text><![CDATA[Počátek cesty (místo, datum, hodina)]]></text> <text><![CDATA[Počátek cesty (místo, datum, hodina)]]></text>
</staticText> </staticText>
<line> <line>
<reportElement uuid="e5c8f5ac-f7b5-4235-ba39-566b94bb6382" x="428" y="113" width="1" height="75"/> <reportElement uuid="e5c8f5ac-f7b5-4235-ba39-566b94bb6382" x="428" y="90" width="1" height="75"/>
</line> </line>
<textField pattern="dd. MM. yyyy"> <textField pattern="dd. MM. yyyy">
<reportElement uuid="f758abfe-1e97-4ac0-a7e8-293438ef1d78" x="429" y="163" width="143" height="20"/> <reportElement uuid="f758abfe-1e97-4ac0-a7e8-293438ef1d78" x="429" y="140" width="143" height="20"/>
<textElement textAlignment="Center"/> <textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{requirement.endDate}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{requirement.endDate}]]></textFieldExpression>
</textField> </textField>
<textField pattern="hh:mm"> <textField pattern="HH:mm">
<reportElement uuid="0db3d6e2-36e3-4c66-b4a1-2cdc555b2831" x="90" y="163" width="53" height="20"/> <reportElement uuid="0db3d6e2-36e3-4c66-b4a1-2cdc555b2831" x="90" y="140" width="53" height="20"/>
<textElement/> <textElement/>
<textFieldExpression><![CDATA[$F{requirement.tripDate}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{requirement.tripDate}]]></textFieldExpression>
</textField> </textField>
<textField isBlankWhenNull="true"> <textField isBlankWhenNull="true">
<reportElement uuid="76000adf-2d9c-4c56-9471-51bc278ca433" x="286" y="143" width="143" height="40"/> <reportElement uuid="76000adf-2d9c-4c56-9471-51bc278ca433" x="286" y="120" width="143" height="40"/>
<textElement textAlignment="Center"/> <textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{requirement.description}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{requirement.description}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="4b1e7687-d605-46bb-aa2b-08637cff229a" x="143" y="143" width="143" height="20"/> <reportElement uuid="4b1e7687-d605-46bb-aa2b-08637cff229a" x="143" y="120" width="143" height="20"/>
<textElement textAlignment="Center"/> <textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{requirement.to}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{requirement.to}]]></textFieldExpression>
</textField> </textField>
<line> <line>
<reportElement uuid="70db0a7e-650a-4324-9c62-f75bcbdcbb8d" x="285" y="113" width="1" height="75"/> <reportElement uuid="70db0a7e-650a-4324-9c62-f75bcbdcbb8d" x="285" y="90" width="1" height="75"/>
</line> </line>
<staticText> <staticText>
<reportElement uuid="d52c698d-07c8-4740-a791-2df4f5cb1c6e" x="286" y="114" width="143" height="27"/> <reportElement uuid="d52c698d-07c8-4740-a791-2df4f5cb1c6e" x="286" y="91" width="143" height="27"/>
<textElement textAlignment="Center"/> <textElement textAlignment="Center"/>
<text><![CDATA[Účel cesty]]></text> <text><![CDATA[Účel cesty]]></text>
</staticText> </staticText>
<textField pattern="dd. MM. yyyy"> <textField pattern="dd. MM. yyyy">
<reportElement uuid="88c08297-c140-410a-8980-02416ec62475" x="0" y="163" width="90" height="20"/> <reportElement uuid="88c08297-c140-410a-8980-02416ec62475" x="0" y="140" width="90" height="20"/>
<textElement/> <textElement/>
<textFieldExpression><![CDATA[$F{requirement.tripDate}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{requirement.tripDate}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="21724842-be95-48ba-a811-0bf7a862ae3f" x="429" y="143" width="143" height="20"/> <reportElement uuid="21724842-be95-48ba-a811-0bf7a862ae3f" x="429" y="120" width="143" height="20"/>
<textElement textAlignment="Center"/> <textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{requirement.end}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{requirement.end}]]></textFieldExpression>
</textField> </textField>
<line> <line>
<reportElement uuid="dd38c006-cfb4-4b8f-abf8-986222d3bd27" x="0" y="112" width="572" height="1"/> <reportElement uuid="dd38c006-cfb4-4b8f-abf8-986222d3bd27" x="0" y="89" width="572" height="1"/>
</line> </line>
<staticText> <staticText>
<reportElement uuid="831faf0e-2b31-47df-9ccf-4bf1c5bcdcbd" x="1" y="3" width="572" height="38"/> <reportElement uuid="831faf0e-2b31-47df-9ccf-4bf1c5bcdcbd" x="1" y="3" width="572" height="38"/>
@@ -151,43 +151,43 @@
tuzemské pracovní cesty]]></text> tuzemské pracovní cesty]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement uuid="6990eca1-ad98-4545-b211-1892d039bc74" x="1" y="195" width="571" height="20"/> <reportElement uuid="6990eca1-ad98-4545-b211-1892d039bc74" x="1" y="172" width="571" height="20"/>
<textElement textAlignment="Center"> <textElement textAlignment="Center">
<font size="14" isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/> <font size="14" isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
</textElement> </textElement>
<text><![CDATA[VYÚČTOVÁNÍ PRACOVNÍ CESTY]]></text> <text><![CDATA[VYÚČTOVÁNÍ PRACOVNÍ CESTY]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement uuid="9b5868e4-5034-4141-b470-8c199e81ee4e" x="0" y="218" width="296" height="20"/> <reportElement uuid="9b5868e4-5034-4141-b470-8c199e81ee4e" x="0" y="195" width="296" height="20"/>
<textElement> <textElement>
<font isBold="true" pdfFontName="Helvetica-Bold"/> <font isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement> </textElement>
<text><![CDATA[Zpráva o výsledku pracovní cesty byla podána dne:]]></text> <text><![CDATA[Zpráva o výsledku pracovní cesty byla podána dne:]]></text>
</staticText> </staticText>
<textField pattern="dd. MM. yyyy"> <textField pattern="dd. MM. yyyy">
<reportElement uuid="d7b2da96-3040-4a89-9380-0dbb55068601" x="428" y="215" width="144" height="20"/> <reportElement uuid="d7b2da96-3040-4a89-9380-0dbb55068601" x="428" y="192" width="144" height="20"/>
<textElement textAlignment="Right"/> <textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{resultMessageDate}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{resultMessageDate}]]></textFieldExpression>
</textField> </textField>
<staticText> <staticText>
<reportElement uuid="b2b60eec-df87-4385-a6d9-8d3f80cc319a" x="1" y="238" width="295" height="20"/> <reportElement uuid="b2b60eec-df87-4385-a6d9-8d3f80cc319a" x="1" y="215" width="295" height="20"/>
<textElement> <textElement>
<font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/> <font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
</textElement> </textElement>
<text><![CDATA[Se způsobem provedení souhlasí:]]></text> <text><![CDATA[Se způsobem provedení souhlasí:]]></text>
</staticText> </staticText>
<line> <line>
<reportElement uuid="0cf99b2a-b025-4a50-bcb5-8e371536bb77" x="296" y="258" width="276" height="1"/> <reportElement uuid="0cf99b2a-b025-4a50-bcb5-8e371536bb77" x="296" y="235" width="276" height="1"/>
</line> </line>
<staticText> <staticText>
<reportElement uuid="17876cb8-7666-48f4-9275-f7a70cd08ff9" x="296" y="262" width="276" height="20"/> <reportElement uuid="17876cb8-7666-48f4-9275-f7a70cd08ff9" x="296" y="239" width="276" height="20"/>
<textElement textAlignment="Center"> <textElement textAlignment="Center">
<font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/> <font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
</textElement> </textElement>
<text><![CDATA[Datum a podpis oprávněné osoby]]></text> <text><![CDATA[Datum a podpis oprávněné osoby]]></text>
</staticText> </staticText>
<line> <line>
<reportElement uuid="c67f7840-5e38-4eed-ab3f-e4907ac33b5c" x="0" y="281" width="572" height="1"/> <reportElement uuid="c67f7840-5e38-4eed-ab3f-e4907ac33b5c" x="0" y="258" width="572" height="1"/>
</line> </line>
<line> <line>
<reportElement uuid="e3530085-daa8-4675-bf3a-d98c775be07e" x="0" y="41" width="571" height="1"/> <reportElement uuid="e3530085-daa8-4675-bf3a-d98c775be07e" x="0" y="41" width="571" height="1"/>
@@ -196,13 +196,13 @@ tuzemské pracovní cesty]]></text>
<reportElement uuid="47e4e70d-fb5f-4266-889a-4149c71efa42" x="-1" y="0" width="572" height="1"/> <reportElement uuid="47e4e70d-fb5f-4266-889a-4149c71efa42" x="-1" y="0" width="572" height="1"/>
</line> </line>
<line> <line>
<reportElement uuid="d4738137-17c1-4721-b222-7187988c1b06" x="-1" y="1" width="1" height="281"/> <reportElement uuid="d4738137-17c1-4721-b222-7187988c1b06" x="-1" y="1" width="1" height="258"/>
</line> </line>
<line> <line>
<reportElement uuid="bf83547c-60d9-4f95-a5f1-db0763ba17cb" x="571" y="0" width="1" height="281"/> <reportElement uuid="bf83547c-60d9-4f95-a5f1-db0763ba17cb" x="571" y="0" width="1" height="259"/>
</line> </line>
<textField> <textField>
<reportElement uuid="8af60406-55bf-46f0-82e9-865dc9edbdb4" x="196" y="87" width="375" height="20"> <reportElement uuid="8af60406-55bf-46f0-82e9-865dc9edbdb4" x="196" y="68" width="375" height="20">
<printWhenExpression><![CDATA[$F{ownedBy.address} != null]]></printWhenExpression> <printWhenExpression><![CDATA[$F{ownedBy.address} != null]]></printWhenExpression>
</reportElement> </reportElement>
<textElement> <textElement>
@@ -220,51 +220,9 @@ tuzemské pracovní cesty]]></text>
<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "tripBillItems.jasper"]]></subreportExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "tripBillItems.jasper"]]></subreportExpression>
</subreport> </subreport>
</band> </band>
</detail> <band height="168">
<summary>
<band height="170" splitType="Stretch">
<subreport>
<reportElement uuid="b2e1d029-267f-4363-9411-716a0db9b048" x="0" y="23" width="241" height="40">
<printWhenExpression><![CDATA[$F{freeMeals}]]></printWhenExpression>
</reportElement>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{billItems})]]></dataSourceExpression>
<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "tripBillFreeMeals.jasper"]]></subreportExpression>
</subreport>
<staticText> <staticText>
<reportElement uuid="0be16cf4-2ad5-453b-9933-a696979331a1" x="0" y="0" width="241" height="23"/> <reportElement uuid="791d16f6-690b-4aae-8ac1-d3c3ade837e9" x="242" y="61" width="22" height="15">
<textElement>
<font size="8"/>
</textElement>
<text><![CDATA[Stravování poskytnuto bezplatně ve dnech:
(vyberte pro každý den zvlášť počet hlavních jídel (S-O-V)]]></text>
</staticText>
<staticText>
<reportElement uuid="4b4103f4-082a-4cfb-bbaa-ad41f187e53a" x="241" y="3" width="23" height="20">
<printWhenExpression><![CDATA[$F{freeMeals}]]></printWhenExpression>
</reportElement>
<textElement>
<font size="8"/>
</textElement>
<text><![CDATA[ANO]]></text>
</staticText>
<staticText>
<reportElement uuid="dae29735-a372-4c9b-86e4-43507632c08a" x="242" y="3" width="22" height="20">
<printWhenExpression><![CDATA[!$F{freeMeals}]]></printWhenExpression>
</reportElement>
<textElement>
<font size="8"/>
</textElement>
<text><![CDATA[NE]]></text>
</staticText>
<staticText>
<reportElement uuid="5457410d-912f-47f9-a15f-2c15dadd6c57" x="0" y="62" width="242" height="15"/>
<textElement>
<font size="8"/>
</textElement>
<text><![CDATA[Ubytování poskytnuto bezplatně]]></text>
</staticText>
<staticText>
<reportElement uuid="791d16f6-690b-4aae-8ac1-d3c3ade837e9" x="242" y="62" width="22" height="15">
<printWhenExpression><![CDATA[!$F{freeHousing}]]></printWhenExpression> <printWhenExpression><![CDATA[!$F{freeHousing}]]></printWhenExpression>
</reportElement> </reportElement>
<textElement> <textElement>
@@ -273,85 +231,119 @@ tuzemské pracovní cesty]]></text>
<text><![CDATA[NE]]></text> <text><![CDATA[NE]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement uuid="4c309095-9cbb-49e7-8fe5-7a8f231c130f" x="243" y="62" width="21" height="15"> <reportElement uuid="4b4103f4-082a-4cfb-bbaa-ad41f187e53a" x="241" y="2" width="23" height="20">
<printWhenExpression><![CDATA[$F{freeHousing}]]></printWhenExpression> <printWhenExpression><![CDATA[$F{freeMeals}]]></printWhenExpression>
</reportElement> </reportElement>
<textElement> <textElement>
<font size="8"/> <font size="8"/>
</textElement> </textElement>
<text><![CDATA[ANO]]></text> <text><![CDATA[ANO]]></text>
</staticText> </staticText>
<staticText> <textField pattern="dd. MM. yyyy">
<reportElement uuid="c200a476-63ba-4c3d-8e17-298b5928b0dd" x="1" y="77" width="240" height="15"/> <reportElement uuid="bf1013d3-8037-4f6f-9c23-6e1d801afbeb" x="345" y="131" width="100" height="13"/>
<textElement> <textElement>
<font size="8"/> <font size="8"/>
</textElement> </textElement>
<text><![CDATA[Volná - zlevněná jízdenka]]></text> <textFieldExpression><![CDATA[new Date()]]></textFieldExpression>
</staticText> </textField>
<textField pattern="###0.00;-###0.00" isBlankWhenNull="true">
<reportElement uuid="d5aa48e6-f801-4633-b18b-ccc7358da1e3" x="477" y="2" width="56" height="43"/>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{requirement.downPayment}]]></textFieldExpression>
</textField>
<textField pattern="###0.00;-###0.00">
<reportElement uuid="93cba14d-18d2-4279-9a8d-86f795291879" x="477" y="46" width="56" height="44"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement>
<textFieldExpression><![CDATA[$F{total}]]></textFieldExpression>
</textField>
<staticText> <staticText>
<reportElement uuid="18b2ff27-e584-4352-98c8-0c642609b5e1" x="242" y="77" width="22" height="15"> <reportElement uuid="dae29735-a372-4c9b-86e4-43507632c08a" x="242" y="2" width="22" height="20">
<printWhenExpression><![CDATA[!$F{freeCarfare}]]></printWhenExpression> <printWhenExpression><![CDATA[!$F{freeMeals}]]></printWhenExpression>
</reportElement> </reportElement>
<textElement> <textElement>
<font size="8"/> <font size="8"/>
</textElement> </textElement>
<text><![CDATA[NE]]></text> <text><![CDATA[NE]]></text>
</staticText> </staticText>
<staticText> <subreport>
<reportElement uuid="d4de606e-fad8-4216-b467-2d8446cc3747" x="243" y="77" width="21" height="15"> <reportElement uuid="b2e1d029-267f-4363-9411-716a0db9b048" x="0" y="22" width="241" height="40">
<printWhenExpression><![CDATA[$F{freeCarfare}]]></printWhenExpression> <printWhenExpression><![CDATA[$F{freeMeals}]]></printWhenExpression>
</reportElement> </reportElement>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{billItems})]]></dataSourceExpression>
<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "tripBillFreeMeals.jasper"]]></subreportExpression>
</subreport>
<staticText>
<reportElement uuid="0be16cf4-2ad5-453b-9933-a696979331a1" x="0" y="-1" width="241" height="23"/>
<textElement> <textElement>
<font size="8"/> <font size="8"/>
</textElement> </textElement>
<text><![CDATA[ANO]]></text> <text><![CDATA[Stravování poskytnuto bezplatně ve dnech:
(vyberte pro každý den zvlášť počet hlavních jídel (S-O-V)]]></text>
</staticText> </staticText>
<line> <line>
<reportElement uuid="6f7577a1-edc7-491a-a803-a76f8b84b13d" x="290" y="-3" width="1" height="95"/> <reportElement uuid="4e40e52b-207e-404e-b4f3-f0984af588c1" x="-1" y="90" width="572" height="1"/>
</line> </line>
<line> <line>
<reportElement uuid="afefe2a2-4c7b-4e62-892f-5c8fb68f8a0f" x="571" y="0" width="1" height="169"/> <reportElement uuid="620dbf9c-0990-4895-963e-bd3759e64202" x="-1" y="-1" width="1" height="168"/>
</line> </line>
<line> <line>
<reportElement uuid="4e40e52b-207e-404e-b4f3-f0984af588c1" x="-1" y="91" width="572" height="1"/> <reportElement uuid="db423f1f-b9c6-49ec-8336-fa06680c9dad" x="334" y="144" width="237" height="1"/>
</line>
<line>
<reportElement uuid="08b18c85-1c4f-4b8d-bc0b-ac3df196a182" x="291" y="46" width="281" height="1"/>
</line> </line>
<staticText> <staticText>
<reportElement uuid="20f38e87-a1bd-4d02-8742-4ce3a6b357bf" x="291" y="3" width="186" height="43"/> <reportElement uuid="c83e0050-7bac-43fa-8182-728243f702c2" x="1" y="106" width="570" height="15"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Záloha]]></text>
</staticText>
<staticText>
<reportElement uuid="eae56af6-8fd9-45e1-8463-282939b67f05" x="291" y="47" width="186" height="44"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Doplatek - přeplatek]]></text>
</staticText>
<textField pattern="###0.00;-###0.00">
<reportElement uuid="93cba14d-18d2-4279-9a8d-86f795291879" x="477" y="47" width="56" height="44"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement>
<textFieldExpression><![CDATA[$F{total}]]></textFieldExpression>
</textField>
<line>
<reportElement uuid="620dbf9c-0990-4895-963e-bd3759e64202" x="-1" y="0" width="1" height="168"/>
</line>
<staticText>
<reportElement uuid="55cde79e-3253-4ff8-8387-f2f5f959bc06" x="1" y="92" width="570" height="15"/>
<textElement textAlignment="Center"/>
<text><![CDATA[K vyúčtování pracovní cesty připojuji počet příloh]]></text>
</staticText>
<staticText>
<reportElement uuid="c83e0050-7bac-43fa-8182-728243f702c2" x="1" y="107" width="570" height="15"/>
<textElement textAlignment="Center"> <textElement textAlignment="Center">
<font isBold="true" pdfFontName="Helvetica-Bold"/> <font isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement> </textElement>
<text><![CDATA[Prohlašuji, že jsem všechny údaje uvedl úplně a správně.]]></text> <text><![CDATA[Prohlašuji, že jsem všechny údaje uvedl úplně a správně.]]></text>
</staticText> </staticText>
<line>
<reportElement uuid="08b18c85-1c4f-4b8d-bc0b-ac3df196a182" x="291" y="45" width="281" height="1"/>
</line>
<staticText> <staticText>
<reportElement uuid="aea69aee-5394-4c6e-82da-9fef6a1fe2b9" x="1" y="132" width="305" height="30"/> <reportElement uuid="55cde79e-3253-4ff8-8387-f2f5f959bc06" x="1" y="91" width="570" height="15"/>
<textElement textAlignment="Center"/>
<text><![CDATA[K vyúčtování pracovní cesty připojuji počet příloh]]></text>
</staticText>
<line>
<reportElement uuid="452bba4b-d293-4253-92c3-5fa58f58ea53" x="-1" y="167" width="572" height="1"/>
</line>
<staticText>
<reportElement uuid="5457410d-912f-47f9-a15f-2c15dadd6c57" x="0" y="61" width="242" height="15"/>
<textElement>
<font size="8"/>
</textElement>
<text><![CDATA[Ubytování poskytnuto bezplatně]]></text>
</staticText>
<staticText>
<reportElement uuid="20f38e87-a1bd-4d02-8742-4ce3a6b357bf" x="291" y="2" width="186" height="43"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Záloha]]></text>
</staticText>
<line>
<reportElement uuid="6f7577a1-edc7-491a-a803-a76f8b84b13d" x="290" y="-4" width="1" height="95"/>
</line>
<staticText>
<reportElement uuid="eae56af6-8fd9-45e1-8463-282939b67f05" x="291" y="46" width="186" height="44"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Doplatek - přeplatek]]></text>
</staticText>
<image>
<reportElement uuid="0a136d64-9565-4ed7-9baa-3b68aa98eada" x="450" y="106" width="113" height="36">
<printWhenExpression><![CDATA[$P{P_USER_SIGNATURE} != null]]></printWhenExpression>
</reportElement>
<imageExpression><![CDATA[$P{P_USER_SIGNATURE}]]></imageExpression>
</image>
<staticText>
<reportElement uuid="c200a476-63ba-4c3d-8e17-298b5928b0dd" x="1" y="76" width="240" height="15"/>
<textElement>
<font size="8"/>
</textElement>
<text><![CDATA[Volná - zlevněná jízdenka]]></text>
</staticText>
<staticText>
<reportElement uuid="aea69aee-5394-4c6e-82da-9fef6a1fe2b9" x="1" y="131" width="305" height="30"/>
<textElement> <textElement>
<font size="8"/> <font size="8"/>
</textElement> </textElement>
@@ -360,34 +352,182 @@ tuzemské pracovní cesty]]></text>
3) Počet km uvádějte jen při použití vlastního dopravního prostředku.]]></text> 3) Počet km uvádějte jen při použití vlastního dopravního prostředku.]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement uuid="ff356c6e-d796-4148-b20f-114dde6e9340" x="305" y="147" width="266" height="15"/> <reportElement uuid="d4de606e-fad8-4216-b467-2d8446cc3747" x="243" y="76" width="21" height="15">
<printWhenExpression><![CDATA[$F{freeCarfare}]]></printWhenExpression>
</reportElement>
<textElement>
<font size="8"/>
</textElement>
<text><![CDATA[ANO]]></text>
</staticText>
<staticText>
<reportElement uuid="ff356c6e-d796-4148-b20f-114dde6e9340" x="334" y="146" width="237" height="15"/>
<textElement textAlignment="Center"/> <textElement textAlignment="Center"/>
<text><![CDATA[Datum a podpis účtovatele ]]></text> <text><![CDATA[Datum a podpis účtovatele ]]></text>
</staticText> </staticText>
<line> <line>
<reportElement uuid="db423f1f-b9c6-49ec-8336-fa06680c9dad" x="306" y="145" width="265" height="1"/> <reportElement uuid="afefe2a2-4c7b-4e62-892f-5c8fb68f8a0f" x="571" y="-1" width="1" height="169"/>
</line> </line>
<line> <staticText>
<reportElement uuid="452bba4b-d293-4253-92c3-5fa58f58ea53" x="-1" y="168" width="572" height="1"/> <reportElement uuid="4c309095-9cbb-49e7-8fe5-7a8f231c130f" x="243" y="61" width="21" height="15">
</line> <printWhenExpression><![CDATA[$F{freeHousing}]]></printWhenExpression>
<textField pattern="###0.00;-###0.00" isBlankWhenNull="true">
<reportElement uuid="d5aa48e6-f801-4633-b18b-ccc7358da1e3" x="477" y="3" width="56" height="43"/>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{requirement.downPayment}]]></textFieldExpression>
</textField>
<image>
<reportElement uuid="0a136d64-9565-4ed7-9baa-3b68aa98eada" x="406" y="120" width="147" height="24">
<printWhenExpression><![CDATA[$P{P_USER_SIGNATURE} != null]]></printWhenExpression>
</reportElement> </reportElement>
<imageExpression><![CDATA[$P{P_USER_SIGNATURE}]]></imageExpression>
</image>
<textField pattern="dd. MM. yyyy">
<reportElement uuid="bf1013d3-8037-4f6f-9c23-6e1d801afbeb" x="306" y="132" width="100" height="13"/>
<textElement> <textElement>
<font size="8"/> <font size="8"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[new Date()]]></textFieldExpression> <text><![CDATA[ANO]]></text>
</textField> </staticText>
<staticText>
<reportElement uuid="18b2ff27-e584-4352-98c8-0c642609b5e1" x="242" y="76" width="22" height="15">
<printWhenExpression><![CDATA[!$F{freeCarfare}]]></printWhenExpression>
</reportElement>
<textElement>
<font size="8"/>
</textElement>
<text><![CDATA[NE]]></text>
</staticText>
</band>
</detail>
<summary>
<band height="194" splitType="Prevent">
<staticText>
<reportElement uuid="58e4cf15-a8e1-4b4d-b491-ad4a1825f0a3" x="281" y="5" width="30" height="15"/>
<textElement/>
<text><![CDATA[číslo:]]></text>
</staticText>
<staticText>
<reportElement uuid="6609a389-adc3-4fa1-8aaa-532805d293a4" x="1" y="150" width="130" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Datum a podpis příjemce]]></text>
</staticText>
<staticText>
<reportElement uuid="45ed3989-a9f1-4323-bba2-0cd2e5dc2365" x="292" y="170" width="129" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[(datum, podpis)]]></text>
</staticText>
<line>
<reportElement uuid="7a26d915-835c-48f7-ab2d-ec53b330c9fe" x="311" y="19" width="252" height="1"/>
</line>
<staticText>
<reportElement uuid="b3c1a046-6cca-4cb7-a8e1-3c71dd3dc815" x="438" y="150" width="130" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Příkazce operací]]></text>
</staticText>
<line>
<reportElement uuid="65725040-d1fd-489f-86ee-b0a0082d5576" x="438" y="149" width="130" height="1"/>
</line>
<staticText>
<reportElement uuid="8f4864f7-b60a-4b4c-a724-451a89da1f2f" x="1" y="20" width="280" height="15"/>
<textElement>
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Účtovaná náhrada byla přezkoušena a upravena na Kč:]]></text>
</staticText>
<staticText>
<reportElement uuid="4aca1ec1-c2dc-47b9-a973-40ded5f52d29" x="260" y="103" width="290" height="20"/>
<textElement/>
<text><![CDATA[Datum a podpis zaměstnance, který upravil vyúčtování]]></text>
</staticText>
<line>
<reportElement uuid="2665a0ca-420d-46dc-9085-522ed3950c44" x="291" y="149" width="130" height="1"/>
</line>
<line>
<reportElement uuid="b239b59d-42f0-44d1-b753-cbe1fd0f577b" x="106" y="49" width="457" height="1"/>
</line>
<line>
<reportElement uuid="4cd4e501-5b15-48ba-ac27-766e2292d270" x="106" y="66" width="457" height="1"/>
</line>
<staticText>
<reportElement uuid="970cbe95-7b9f-4769-9ab1-59a4018c84ac" x="1" y="51" width="105" height="15"/>
<textElement>
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Doplatekpřeplatek:]]></text>
</staticText>
<staticText>
<reportElement uuid="e95b083f-374c-4f73-b903-b0f6bd5891b7" x="1" y="35" width="105" height="15"/>
<textElement>
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Vyplacená záloha:]]></text>
</staticText>
<staticText>
<reportElement uuid="8df04d2f-8a01-4986-9bb9-6c9cb849e6b6" x="146" y="170" width="130" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[(hlavní účetní)]]></text>
</staticText>
<line>
<reportElement uuid="37c5882d-8568-42d8-bbc2-68ef3ceb01c3" x="281" y="35" width="282" height="1"/>
</line>
<staticText>
<reportElement uuid="1a55dac0-377d-4653-85ba-dbc376f14ff1" x="1" y="170" width="130" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[(průkaz totožnosti)]]></text>
</staticText>
<staticText>
<reportElement uuid="2ad403e0-6c9a-4eb6-a8fb-abca20fca185" x="1" y="5" width="237" height="15"/>
<textElement>
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[VÝDAJOVÝ–PŘÍJMOVÝ POKLADNÍ DOKLAD]]></text>
</staticText>
<line>
<reportElement uuid="c2618aa5-76df-461b-b168-aa587ce4a7ec" x="146" y="149" width="130" height="1"/>
</line>
<line>
<reportElement uuid="e583f82d-b26d-4b13-a668-5505b8783a2a" x="1" y="149" width="130" height="1"/>
</line>
<staticText>
<reportElement uuid="0d64c6ec-3c2a-464e-8068-171df105af12" x="438" y="170" width="130" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[(datum, podpis)]]></text>
</staticText>
<line>
<reportElement uuid="978b5c74-4f0e-4107-b654-7eb1621cea60" x="0" y="192" width="572" height="1"/>
</line>
<line>
<reportElement uuid="7b4b0991-c3d9-4fa3-a080-cc3ae98c0eb1" x="243" y="102" width="320" height="1"/>
</line>
<line>
<reportElement uuid="63479d2a-ecc1-40de-a36a-89218d1f648b" x="38" y="81" width="525" height="1"/>
</line>
<staticText>
<reportElement uuid="51ec3ef1-6a8c-441c-80c9-598f59077b81" x="146" y="150" width="130" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Datum a podpis pokladníka]]></text>
</staticText>
<staticText>
<reportElement uuid="83737011-db81-4f02-9012-a9aca5561e76" x="291" y="150" width="130" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Správce rozpočtu]]></text>
</staticText>
<staticText>
<reportElement uuid="49fcf5bc-5910-4525-aa6d-ae1bc6ca90e0" x="1" y="66" width="37" height="15"/>
<textElement/>
<text><![CDATA[Slovy:]]></text>
</staticText>
<line>
<reportElement uuid="8b83472f-9960-429e-8fab-84d1c3d1d678" x="571" y="-1" width="1" height="194"/>
</line>
<line>
<reportElement uuid="5e5a7c99-962e-4c99-b3ba-dbed5315f5aa" x="-1" y="-2" width="1" height="195"/>
</line>
</band> </band>
</summary> </summary>
</jasperReport> </jasperReport>
@@ -97,7 +97,7 @@
<staticText> <staticText>
<reportElement uuid="306f2b85-5dc6-40a6-8c44-76ed46831680" x="0" y="76" width="143" height="20"/> <reportElement uuid="306f2b85-5dc6-40a6-8c44-76ed46831680" x="0" y="76" width="143" height="20"/>
<textElement/> <textElement/>
<text><![CDATA[Požduji poskytnutí zálohy:]]></text> <text><![CDATA[Požaduji poskytnutí zálohy:]]></text>
</staticText> </staticText>
<line> <line>
<reportElement uuid="029f1b4c-5f59-4a5e-8d3d-b644af41b657" x="301" y="121" width="271" height="1"/> <reportElement uuid="029f1b4c-5f59-4a5e-8d3d-b644af41b657" x="301" y="121" width="271" height="1"/>
@@ -316,7 +316,7 @@ L - letadlo, P - pěšky, T - taxi]]></text>
<textFieldExpression><![CDATA[$F{requirement.downPayment}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{requirement.downPayment}]]></textFieldExpression>
</textField> </textField>
<image> <image>
<reportElement uuid="954e517f-5d23-4166-b776-7c31b4409ddd" x="378" y="71" width="183" height="50"> <reportElement uuid="954e517f-5d23-4166-b776-7c31b4409ddd" x="378" y="69" width="183" height="50">
<printWhenExpression><![CDATA[$P{P_USER_SIGNATURE} != null]]></printWhenExpression> <printWhenExpression><![CDATA[$P{P_USER_SIGNATURE} != null]]></printWhenExpression>
</reportElement> </reportElement>
<imageExpression><![CDATA[$P{P_USER_SIGNATURE}]]></imageExpression> <imageExpression><![CDATA[$P{P_USER_SIGNATURE}]]></imageExpression>
@@ -183,6 +183,10 @@
<property name="sessionFactory" ref="sessionFactory"/> <property name="sessionFactory" ref="sessionFactory"/>
</bean> </bean>
<bean id="dbInfoDao" class="info.bukova.isspst.dao.jpa.DbInfoDaoJPA">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="userDao" class="info.bukova.isspst.dao.jpa.UserDaoJPA"> <bean id="userDao" class="info.bukova.isspst.dao.jpa.UserDaoJPA">
<property name="sessionFactory" ref="sessionFactory"/> <property name="sessionFactory" ref="sessionFactory"/>
</bean> </bean>
@@ -258,6 +262,10 @@
<!-- Business logic --> <!-- Business logic -->
<bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/> <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>
<bean id="dbInfoService" class="info.bukova.isspst.services.dbinfo.DbInfoServiceImpl">
<property name="dao" ref="dbInfoDao" />
</bean>
<bean id="userService" class="info.bukova.isspst.services.users.UserServiceImpl"> <bean id="userService" class="info.bukova.isspst.services.users.UserServiceImpl">
<constructor-arg name="marshaller" ref="marshallerUsrSettings"/> <constructor-arg name="marshaller" ref="marshallerUsrSettings"/>
<constructor-arg name="unmarshaller" ref="unmarshallerUsrSettings"/> <constructor-arg name="unmarshaller" ref="unmarshallerUsrSettings"/>
+4
View File
@@ -187,6 +187,10 @@
<url-pattern>/*</url-pattern> <url-pattern>/*</url-pattern>
</filter-mapping> </filter-mapping>
<session-config>
<session-timeout>480</session-timeout>
</session-config>
<welcome-file-list> <welcome-file-list>
<welcome-file>index.zul</welcome-file> <welcome-file>index.zul</welcome-file>
<welcome-file>index.zhtml</welcome-file> <welcome-file>index.zhtml</welcome-file>
+25 -7
View File
@@ -34,6 +34,7 @@
value="@bind(vm.dataBean.username)" value="@bind(vm.dataBean.username)"
instant="true" instant="true"
disabled="@load(vm.editRec)" disabled="@load(vm.editRec)"
maxlength="@load(vm.lengthText)"
onChange="@command('checkLogin')" /> onChange="@command('checkLogin')" />
<label <label
value="Login je obsazený" value="Login je obsazený"
@@ -42,21 +43,28 @@
</row> </row>
<row> <row>
<label value="${labels.UsersFormFirstName}" /> <label value="${labels.UsersFormFirstName}" />
<textbox value="@bind(vm.dataBean.firstName)" /> <textbox
value="@bind(vm.dataBean.firstName)"
maxlength="@load(vm.lengthText)" />
</row> </row>
<row> <row>
<label value="${labels.UsersFormSureName}" /> <label value="${labels.UsersFormSureName}" />
<textbox value="@bind(vm.dataBean.lastName)" /> <textbox
value="@bind(vm.dataBean.lastName)"
maxlength="@load(vm.lengthText)" />
</row> </row>
<row> <row>
<label value="${labels.UsersFormPersonalID}" /> <label value="${labels.UsersFormPersonalID}" />
<textbox <textbox
value="@bind(vm.dataBean.personalNumber)" value="@bind(vm.dataBean.personalNumber)"
maxlength="@load(vm.lengthText)"
width="90px" /> width="90px" />
</row> </row>
<row> <row>
<label value="${labels.UsersFormEmail}" /> <label value="${labels.UsersFormEmail}" />
<textbox value="@bind(vm.dataBean.email)" /> <textbox
value="@bind(vm.dataBean.email)"
maxlength="@load(vm.lengthText)" />
</row> </row>
<row> <row>
<label value="" /> <label value="" />
@@ -70,6 +78,7 @@
id="idUserPasswordOriginal" id="idUserPasswordOriginal"
value="@save(vm.password, before='save')" value="@save(vm.password, before='save')"
type="password" type="password"
maxlength="@load(vm.lengthText)"
instant="true" /> instant="true" />
</row> </row>
<row> <row>
@@ -78,6 +87,7 @@
id="idUserPasswordDuplicate" id="idUserPasswordDuplicate"
value="@save(vm.retPasswd, before='save')" value="@save(vm.retPasswd, before='save')"
type="password" type="password"
maxlength="@load(vm.lengthText)"
instant="true" /> instant="true" />
</row> </row>
<row> <row>
@@ -110,19 +120,27 @@
<rows> <rows>
<row> <row>
<label value="${labels.SuppliersFormStreet}"/> <label value="${labels.SuppliersFormStreet}"/>
<textbox value="@bind(vm.dataBean.address.street)"/> <textbox
value="@bind(vm.dataBean.address.street)"
maxlength="@load(vm.lengthText)" />
</row> </row>
<row> <row>
<label value="${labels.SuppliersFormNo}"/> <label value="${labels.SuppliersFormNo}"/>
<textbox value="@bind(vm.dataBean.address.houseNumber)"/> <textbox
value="@bind(vm.dataBean.address.houseNumber)"
maxlength="@load(vm.lengthText)" />
</row> </row>
<row> <row>
<label value="${labels.SuppliersFormZIP}"/> <label value="${labels.SuppliersFormZIP}"/>
<textbox value="@bind(vm.dataBean.address.zipCode)"/> <textbox
value="@bind(vm.dataBean.address.zipCode)"
maxlength="@load(vm.lengthText)" />
</row> </row>
<row> <row>
<label value="${labels.SuppliersFormCity}"/> <label value="${labels.SuppliersFormCity}"/>
<textbox value="@bind(vm.dataBean.address.city)"/> <textbox
value="@bind(vm.dataBean.address.city)"
maxlength="@load(vm.lengthText)" />
</row> </row>
</rows> </rows>
</grid> </grid>
+24 -4
View File
@@ -24,7 +24,12 @@
<auxheader> <auxheader>
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox value="@bind(vm.filterTemplate.username)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" /> <textbox
value="@bind(vm.filterTemplate.username)"
instant="true"
onChange="@command('doFilter')"
maxlength="@load(vm.lengthText)"
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" />
@@ -34,7 +39,12 @@
<auxheader> <auxheader>
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox value="@bind(vm.filterTemplate.personalNumber)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" /> <textbox
value="@bind(vm.filterTemplate.personalNumber)"
instant="true"
onChange="@command('doFilter')"
maxlength="@load(vm.lengthText)"
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" />
@@ -44,7 +54,12 @@
<auxheader> <auxheader>
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox value="@bind(vm.filterTemplate.firstName)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" /> <textbox
value="@bind(vm.filterTemplate.firstName)"
instant="true"
onChange="@command('doFilter')"
maxlength="@load(vm.lengthText)"
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" />
@@ -54,7 +69,12 @@
<auxheader> <auxheader>
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox value="@bind(vm.filterTemplate.lastName)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" /> <textbox
value="@bind(vm.filterTemplate.lastName)"
instant="true"
onChange="@command('doFilter')"
maxlength="@load(vm.lengthText)"
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" />
@@ -13,13 +13,22 @@
<row> <row>
<cell sclass="row-title">${labels.code} :</cell> <cell sclass="row-title">${labels.code} :</cell>
<cell> <cell>
<textbox id="code" constraint="@load(vm.constriant)" width="200px" value="@bind(vm.dataBean.code)" /> <textbox
id="code"
constraint="@load(vm.constriant)"
width="200px"
maxlength="@load(vm.lengthText)"
value="@bind(vm.dataBean.code)" />
</cell> </cell>
</row> </row>
<row> <row>
<cell sclass="row-title">${labels.name} :</cell> <cell sclass="row-title">${labels.name} :</cell>
<cell> <cell>
<textbox id="name" width="200px" value="@bind(vm.dataBean.name)" /> <textbox
id="name"
width="200px"
maxlength="@load(vm.lengthText)"
value="@bind(vm.dataBean.name)" />
</cell> </cell>
</row> </row>
<row> <row>
@@ -30,7 +39,12 @@
<row> <row>
<cell sclass="row-title">${labels.WorkgroupFormOrderLimit} :</cell> <cell sclass="row-title">${labels.WorkgroupFormOrderLimit} :</cell>
<cell> <cell>
<textbox id="limit" width="200px" value="@bind(vm.dataBean.limit) @converter(vm.bdConverter)" disabled="@load(vm.centre)"/> <textbox
id="limit"
width="200px"
value="@bind(vm.dataBean.limit) @converter(vm.bdConverter)"
maxlength="@load(vm.lengthText)"
disabled="@load(vm.centre)" />
</cell> </cell>
</row> </row>
</rows> </rows>
@@ -38,7 +52,12 @@
<label value="Přetáhněte myší:"/> <label value="Přetáhněte myší:"/>
<hlayout> <hlayout>
<vbox> <vbox>
<textbox value="@bind(vm.findUser)" onChange="@command('find')" instant="true" width="300px"/> <textbox
value="@bind(vm.findUser)"
onChange="@command('find')"
instant="true"
maxlength="@load(vm.lengthText)"
width="300px" />
<listbox id="users" model="@bind(vm.users)" height="380px" width="300px" multiple="true" <listbox id="users" model="@bind(vm.users)" height="380px" width="300px" multiple="true"
droppable="true" onDrop="@command('addMember', event=event)" selectedItems="@bind(vm.selectedUsers)"> droppable="true" onDrop="@command('addMember', event=event)" selectedItems="@bind(vm.selectedUsers)">
<listhead> <listhead>
@@ -40,6 +40,7 @@
value="@bind(vm.filterTemplate.code)" value="@bind(vm.filterTemplate.code)"
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">
@@ -54,6 +55,7 @@
value="@bind(vm.filterTemplate.name)" value="@bind(vm.filterTemplate.name)"
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">
+12 -2
View File
@@ -13,7 +13,12 @@ viewModel="@id('vm') @init('info.bukova.isspst.ui.mail.MailForm')" width="800px"
<comboitem label="${labels.MailSuppliers}"/> <comboitem label="${labels.MailSuppliers}"/>
</combobox> </combobox>
</hbox> </hbox>
<textbox value="@bind(vm.findAddress)" instant="true" onChange="@command('find')" width="100%"/> <textbox
value="@bind(vm.findAddress)"
instant="true"
onChange="@command('find')"
maxlength="@load(vm.lengthText)"
width="100%" />
<listbox model="@load(vm.users)" <listbox model="@load(vm.users)"
visible="@load(vm.adbType eq 0)" visible="@load(vm.adbType eq 0)"
multiple="true" multiple="true"
@@ -54,7 +59,12 @@ viewModel="@id('vm') @init('info.bukova.isspst.ui.mail.MailForm')" width="800px"
</columns> </columns>
<rows> <rows>
<row> <row>
<label value="${labels.MailFor}"/> <textbox value="@bind(vm.to)" width="100%" droppable="true" onDrop="@command('addTo')"/> <label value="${labels.MailFor}"/>
<textbox
value="@bind(vm.to)"
width="100%"
droppable="true"
onDrop="@command('addTo')" />
</row> </row>
<row> <row>
<label value="${labels.MailCc}"/> <textbox value="@bind(vm.cc)" width="100%" droppable="true" onDrop="@command('addCc')"/> <label value="${labels.MailCc}"/> <textbox value="@bind(vm.cc)" width="100%" droppable="true" onDrop="@command('addCc')"/>
+3
View File
@@ -133,5 +133,8 @@
href="/j_spring_security_logout" /> href="/j_spring_security_logout" />
</menupopup> </menupopup>
</menu> </menu>
<menuitem label="${labels.Help}" target="blank"
href="https://drive.google.com/folderview?id=0B2inqAvr2t-TODg4ZWZoSThYbGM&amp;usp=sharing_eid"
tooltiptext="${labels.GoogleDriveUrl}" />
</menubar> </menubar>
</zk> </zk>
+21 -3
View File
@@ -13,9 +13,27 @@
<column/> <column/>
</columns> </columns>
<rows> <rows>
<row><label value="Staré heslo:"/><textbox type="password" value="@bind(vm.oldPw)"/></row> <row>
<row><label value="Nové heslo:"/><textbox type="password" value="@bind(vm.newPw)"/></row> <label value="Staré heslo:" />
<row><label value="Nové heslo znovu:"/><textbox type="password" value="@bind(vm.retPw)"/></row> <textbox
type="password"
maxlength="@load(vm.lengthText)"
value="@bind(vm.oldPw)" />
</row>
<row>
<label value="Nové heslo:" />
<textbox
type="password"
maxlength="@load(vm.lengthText)"
value="@bind(vm.newPw)" />
</row>
<row>
<label value="Nové heslo znovu:" />
<textbox
type="password"
maxlength="@load(vm.lengthText)"
value="@bind(vm.retPw)" />
</row>
</rows> </rows>
</grid> </grid>
<button image="/img/save.png" label="Uložit" onClick="@command('save', window=passwd)" sclass="nicebutton" /><button image="~./zul/img/misc/drag-disallow.png" label="Zrušit" onClick="passwd.detach()" sclass="nicebutton"/> <button image="/img/save.png" label="Uložit" onClick="@command('save', window=passwd)" sclass="nicebutton" /><button image="~./zul/img/misc/drag-disallow.png" label="Zrušit" onClick="passwd.detach()" sclass="nicebutton"/>
+4 -1
View File
@@ -4,7 +4,10 @@
viewModel="@id('vmOpt') @init('info.bukova.isspst.ui.reporting.ColSelectVM')"> viewModel="@id('vmOpt') @init('info.bukova.isspst.ui.reporting.ColSelectVM')">
<caption label="${labels.ReportOptions}"></caption> <caption label="${labels.ReportOptions}"></caption>
<hbox> <hbox>
<label value="${labels.ReportTitle}"/> <textbox value="@bind(vmOpt.reportDefinition.reportTitle)"/> <label value="${labels.ReportTitle}"/>
<textbox
value="@bind(vmOpt.reportDefinition.reportTitle)"
maxlength="@load(vm.lengthText)" />
</hbox> </hbox>
<vbox children="@load(vmOpt.columns.checks)"> <vbox children="@load(vmOpt.columns.checks)">
<template name="children"> <template name="children">
+1 -1
View File
@@ -51,6 +51,6 @@
<div id="mainData"> <div id="mainData">
<u:include src="${gridZul}" /> <u:include src="${gridZul}" />
</div> </div>
<div id="footer"> Verze 1.0 </div> <div id="footer"> Verze 1.3 </div>
</div> </div>
</html> </html>
+43 -11
View File
@@ -12,32 +12,52 @@
<rows> <rows>
<row> <row>
<label value="${labels.SuppliersFormCompany}" /> <label value="${labels.SuppliersFormCompany}" />
<textbox id="company" value="@bind(fx.company)" instant="true" width="320px" /> <textbox
id="company"
value="@bind(fx.company)"
instant="true"
maxlength="@load(vm.lengthText)"
width="320px" />
<button image="/img/search.png" label="${labels.SuppliersFormFindInARES}" onClick="@command('searchAres')" sclass="nicebutton" disabled="@load((fx.ic == 0) &amp;&amp; (empty fx.company))" /> <button image="/img/search.png" label="${labels.SuppliersFormFindInARES}" onClick="@command('searchAres')" sclass="nicebutton" disabled="@load((fx.ic == 0) &amp;&amp; (empty fx.company))" />
</row> </row>
<row> <row>
<label value="${labels.SuppliersFormIC}" /> <label value="${labels.SuppliersFormIC}" />
<textbox value="@bind(fx.ic)" instant="true" /> <textbox
value="@bind(fx.ic)"
maxlength="@load(vm.lengthText)"
instant="true" />
</row> </row>
<row> <row>
<label value="${labels.SuppliersFormDIC}" /> <label value="${labels.SuppliersFormDIC}" />
<textbox value="@bind(fx.dic)" /> <textbox
value="@bind(fx.dic)"
maxlength="@load(vm.lengthText)" />
</row> </row>
<row> <row>
<label value="${labels.SuppliersFormDepartment}" /> <label value="${labels.SuppliersFormDepartment}" />
<textbox value="@bind(fx.department)" /> <textbox
value="@bind(fx.department)"
maxlength="@load(vm.lengthText)" />
</row> </row>
<row> <row>
<label value="${labels.SuppliersFormContact}" /> <label value="${labels.SuppliersFormContact}" />
<textbox value="@bind(fx.contactName)" /> <textbox
value="@bind(fx.contactName)"
maxlength="@load(vm.lengthText)" />
</row> </row>
<row> <row>
<label value="${labels.SuppliersFormStreet}" /> <label value="${labels.SuppliersFormStreet}" />
<textbox value="@bind(fx.street)" width="320px" /> <textbox
value="@bind(fx.street)"
maxlength="@load(vm.lengthText)"
width="320px" />
</row> </row>
<row> <row>
<label value="${labels.SuppliersFormNo}" /> <label value="${labels.SuppliersFormNo}" />
<textbox value="@bind(fx.houseNumber)" width="80px" /> <textbox
value="@bind(fx.houseNumber)"
maxlength="@load(vm.lengthText)"
width="80px" />
</row> </row>
<row> <row>
<label value="${labels.SuppliersFormCity}" /> <label value="${labels.SuppliersFormCity}" />
@@ -45,19 +65,31 @@
</row> </row>
<row> <row>
<label value="${labels.SuppliersFormZIP}" /> <label value="${labels.SuppliersFormZIP}" />
<textbox value="@bind(fx.zipCode)" /> <textbox
value="@bind(fx.zipCode)"
maxlength="@load(vm.lengthText)" />
</row> </row>
<row> <row>
<label value="${labels.SuppliersFormPhone}" /> <label value="${labels.SuppliersFormPhone}" />
<textbox value="@bind(fx.phone)" /> <textbox
value="@bind(fx.phone)"
maxlength="@load(vm.lengthText)" />
</row> </row>
<row> <row>
<label value="${labels.SuppliersFormEmail}" /> <label value="${labels.SuppliersFormEmail}" />
<textbox id="email" value="@bind(fx.email)" width="320px" /> <textbox
id="email"
value="@bind(fx.email)"
maxlength="@load(vm.lengthText)"
width="320px" />
</row> </row>
<row> <row>
<label value="${labels.SuppliersFormWWW}" /> <label value="${labels.SuppliersFormWWW}" />
<textbox id="web" value="@bind(fx.web)" width="320px" /> <textbox
id="web"
value="@bind(fx.web)"
maxlength="@load(vm.lengthText)"
width="320px" />
</row> </row>
</rows> </rows>
</grid> </grid>
@@ -26,7 +26,12 @@
<auxheader> <auxheader>
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox value="@bind(vm.filterTemplate.company)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" /> <textbox
value="@bind(vm.filterTemplate.company)"
instant="true"
onChange="@command('doFilter')"
maxlength="@load(vm.lengthText)"
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" />
@@ -36,7 +41,12 @@
<auxheader> <auxheader>
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox value="@bind(vm.filterTemplate.ic)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" /> <textbox
value="@bind(vm.filterTemplate.ic)"
instant="true"
onChange="@command('doFilter')"
maxlength="@load(vm.lengthText)"
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" />
@@ -46,7 +56,12 @@
<auxheader> <auxheader>
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox value="@bind(vm.filterTemplate.contactName)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" /> <textbox
value="@bind(vm.filterTemplate.contactName)"
instant="true"
onChange="@command('doFilter')"
maxlength="@load(vm.lengthText)"
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" />
@@ -56,7 +71,12 @@
<auxheader> <auxheader>
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox value="@bind(vm.filterTemplate.street)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" /> <textbox
value="@bind(vm.filterTemplate.street)"
instant="true"
onChange="@command('doFilter')"
maxlength="@load(vm.lengthText)"
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" />
@@ -66,7 +86,12 @@
<auxheader> <auxheader>
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox value="@bind(vm.filterTemplate.houseNumber)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" /> <textbox
value="@bind(vm.filterTemplate.houseNumber)"
instant="true"
onChange="@command('doFilter')"
maxlength="@load(vm.lengthText)"
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" />
@@ -76,7 +101,12 @@
<auxheader> <auxheader>
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox value="@bind(vm.filterTemplate.city)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" /> <textbox
value="@bind(vm.filterTemplate.city)"
instant="true"
onChange="@command('doFilter')"
maxlength="@load(vm.lengthText)"
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" />
@@ -41,6 +41,7 @@
value="@bind(vm.filterTemplate.code)" value="@bind(vm.filterTemplate.code)"
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">
@@ -55,6 +56,7 @@
value="@bind(vm.filterTemplate.name)" value="@bind(vm.filterTemplate.name)"
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">
@@ -69,6 +71,7 @@
value="@bind(vm.filterTemplate.description)" value="@bind(vm.filterTemplate.description)"
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">
@@ -28,6 +28,7 @@
id="code" id="code"
constraint="@load(vm.constriant)" constraint="@load(vm.constriant)"
width="200px" width="200px"
maxlength="@load(vm.lengthText)"
value="@bind(vm.dataBean.code)" /> value="@bind(vm.dataBean.code)" />
</cell> </cell>
</row> </row>
@@ -37,6 +38,7 @@
<textbox <textbox
id="name" id="name"
width="200px" width="200px"
maxlength="@load(vm.lengthText)"
value="@bind(vm.dataBean.name)" /> value="@bind(vm.dataBean.name)" />
</cell> </cell>
</row> </row>
@@ -46,6 +48,7 @@
<textbox <textbox
id="description" id="description"
width="300px" width="300px"
maxlength="@load(vm.lengthDescription)"
value="@bind(vm.dataBean.description)" /> value="@bind(vm.dataBean.description)" />
</cell> </cell>
</row> </row>
@@ -69,26 +72,31 @@
<listcell> <listcell>
<textbox <textbox
inplace="true" inplace="true"
maxlength="@load(vm.lengthText)"
value="@bind(each.code)" /> value="@bind(each.code)" />
</listcell> </listcell>
<listcell> <listcell>
<textbox <textbox
inplace="true" inplace="true"
maxlength="@load(vm.lengthText)"
value="@bind(each.name)" /> value="@bind(each.name)" />
</listcell> </listcell>
<listcell> <listcell>
<textbox <textbox
inplace="true" inplace="true"
maxlength="@load(vm.lengthText)"
value="@bind(each.shortcut)" /> value="@bind(each.shortcut)" />
</listcell> </listcell>
<listcell> <listcell>
<textbox <textbox
inplace="true" inplace="true"
maxlength="@load(vm.lengthText)"
value="@bind(each.number)" /> value="@bind(each.number)" />
</listcell> </listcell>
<listcell> <listcell>
<textbox <textbox
inplace="true" inplace="true"
maxlength="@load(vm.lengthText)"
value="@bind(each.floor)" /> value="@bind(each.floor)" />
</listcell> </listcell>
<listcell> <listcell>
@@ -43,6 +43,7 @@
value="@bind(vm.filterTemplate.code)" value="@bind(vm.filterTemplate.code)"
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">
@@ -57,6 +58,7 @@
value="@bind(vm.filterTemplate.name)" value="@bind(vm.filterTemplate.name)"
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">
@@ -90,6 +92,7 @@
value="@bind(vm.filterTemplate.description)" value="@bind(vm.filterTemplate.description)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
maxlength="@load(vm.lengthDescription)"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
</div> </div>
<div sclass="find-grid-img"> <div sclass="find-grid-img">
@@ -27,6 +27,7 @@
id="code" id="code"
constraint="@load(vm.constriant)" constraint="@load(vm.constriant)"
width="200px" width="200px"
maxlength="@load(vm.lengthText)"
value="@bind(vm.dataBean.code)" /> value="@bind(vm.dataBean.code)" />
</cell> </cell>
</row> </row>
@@ -36,6 +37,7 @@
<textbox <textbox
id="name" id="name"
width="200px" width="200px"
maxlength="@load(vm.lengthText)"
value="@bind(vm.dataBean.name)" /> value="@bind(vm.dataBean.name)" />
</cell> </cell>
</row> </row>
@@ -58,6 +60,7 @@
<textbox <textbox
id="description" id="description"
width="300px" width="300px"
maxlength="@load(vm.lengthDescription)"
value="@bind(vm.dataBean.description)" /> value="@bind(vm.dataBean.description)" />
</cell> </cell>
</row> </row>
@@ -26,6 +26,7 @@
<textbox <textbox
id="name" id="name"
width="200px" width="200px"
maxlength="@load(vm.lengthText)"
value="@bind(vm.dataBean.name)" /> value="@bind(vm.dataBean.name)" />
</cell> </cell>
</row> </row>
@@ -35,6 +36,7 @@
<textbox <textbox
id="description" id="description"
width="300px" width="300px"
maxlength="@load(vm.lengthDescription)"
value="@bind(vm.dataBean.description)" /> value="@bind(vm.dataBean.description)" />
</cell> </cell>
</row> </row>
@@ -35,6 +35,7 @@
value="@bind(vm.filterTemplate.name)" value="@bind(vm.filterTemplate.name)"
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">
@@ -49,6 +50,7 @@
value="@bind(vm.filterTemplate.description)" value="@bind(vm.filterTemplate.description)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
maxlength="@load(vm.lengthDescription)"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
</div> </div>
<div sclass="find-grid-img"> <div sclass="find-grid-img">
@@ -40,6 +40,7 @@
value="@bind(vm.filterTemplate.code)" value="@bind(vm.filterTemplate.code)"
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">
@@ -54,6 +55,7 @@
value="@bind(vm.filterTemplate.name)" value="@bind(vm.filterTemplate.name)"
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">
@@ -68,6 +70,7 @@
value="@bind(vm.filterTemplate.description)" value="@bind(vm.filterTemplate.description)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
maxlength="@load(vm.lengthDescription)"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
</div> </div>
<div sclass="find-grid-img"> <div sclass="find-grid-img">
@@ -27,6 +27,7 @@
id="code" id="code"
constraint="@load(vm.constriant)" constraint="@load(vm.constriant)"
width="200px" width="200px"
maxlength="@load(vm.lengthText)"
value="@bind(vm.dataBean.code)" /> value="@bind(vm.dataBean.code)" />
</cell> </cell>
</row> </row>
@@ -36,6 +37,7 @@
<textbox <textbox
id="name" id="name"
width="200px" width="200px"
maxlength="@load(vm.lengthText)"
value="@bind(vm.dataBean.name)" /> value="@bind(vm.dataBean.name)" />
</cell> </cell>
</row> </row>
@@ -45,6 +47,7 @@
<textbox <textbox
id="description" id="description"
width="300px" width="300px"
maxlength="@load(vm.lengthDescription)"
value="@bind(vm.dataBean.description)" /> value="@bind(vm.dataBean.description)" />
</cell> </cell>
</row> </row>
@@ -52,6 +52,7 @@
value="@bind(each.invoiceNumber)" value="@bind(each.invoiceNumber)"
sclass="grid-textbox-max" sclass="grid-textbox-max"
inplace="true" inplace="true"
maxlength="@load(vm.lengthText)"
onFocus="@command('onFocus', item=each)"/> onFocus="@command('onFocus', item=each)"/>
</listcell> </listcell>
<listcell> <listcell>
@@ -60,6 +61,7 @@
sclass="grid-textbox-max" sclass="grid-textbox-max"
inplace="true" inplace="true"
onFocus="@command('onFocus', item=each)" onFocus="@command('onFocus', item=each)"
maxlength="@load(vm.lengthText)"
onChange="@command('calculate')"/> onChange="@command('calculate')"/>
</listcell> </listcell>
<listcell> <listcell>
@@ -85,6 +87,7 @@
width="200px" width="200px"
value="@bind(vm.dataBean.requirement.numser)" value="@bind(vm.dataBean.requirement.numser)"
style="font-weight: bold;" style="font-weight: bold;"
maxlength="@load(vm.lengthText)"
readonly="true"/> readonly="true"/>
</cell> </cell>
</row> </row>
@@ -95,6 +98,7 @@
width="350px" width="350px"
rows="5" rows="5"
value="@bind(vm.dataBean.requirement.description)" value="@bind(vm.dataBean.requirement.description)"
maxlength="@load(vm.lengthDescription)"
readonly="true" /> readonly="true" />
</cell> </cell>
</row> </row>
@@ -104,6 +108,7 @@
<textbox <textbox
width="150px" width="150px"
value="@bind(vm.dataBean.requirement.sumTotal) @converter(vm.standardBigDecimalConverter)" value="@bind(vm.dataBean.requirement.sumTotal) @converter(vm.standardBigDecimalConverter)"
maxlength="@load(vm.lengthText)"
readonly="true"/> readonly="true"/>
</cell> </cell>
</row> </row>
@@ -114,6 +119,7 @@
width="150px" width="150px"
value="@bind(vm.dataBean.totalInvoiced) @converter(vm.standardBigDecimalConverter)" value="@bind(vm.dataBean.totalInvoiced) @converter(vm.standardBigDecimalConverter)"
readonly="true" readonly="true"
maxlength="@load(vm.lengthText)"
style="@load(vm.dataBean.totalInvoiced gt vm.dataBean.requirement.sumTotal ? ' color: red;' : '' )"/> style="@load(vm.dataBean.totalInvoiced gt vm.dataBean.requirement.sumTotal ? ' color: red;' : '' )"/>
</cell> </cell>
</row> </row>
@@ -18,32 +18,43 @@
<listhead menupopup="auto"> <listhead menupopup="auto">
<listheader <listheader
label="${labels.InvoicingRequirementNumber}" label="${labels.InvoicingRequirementNumber}"
sort="czech(requirement.numser)"
onCreate="self.sort(true)"
width="130px" /> width="130px" />
<listheader <listheader
label="${labels.RequirementsGridReqDate}" label="${labels.RequirementsGridReqDate}"
width="150px"/> sort="auto(requirement.reqDate)"
width="150px" />
<listheader <listheader
label="${labels.RequirementsGridCenter}" label="${labels.RequirementsGridCenter}"
width="180px"/> sort="czech(requirement.centre.fullName)"
width="180px" />
<listheader <listheader
label="${labels.RequirementsGridWorkgroup}" label="${labels.RequirementsGridWorkgroup}"
width="180px"/> sort="czech(requirement.workgroup.fullName)"
width="180px" />
<listheader
label="${labels.InvoicingApplicant}"
sort="czech(requirement.ownedBy.fullName)"
width="180px" />
<listheader <listheader
label="${labels.InvoicingDescription}" label="${labels.InvoicingDescription}"
width=""/> sort="czech(requirement.description)"
width="" />
<listheader <listheader
label="${labels.InvoicingRequirementPrice}" label="${labels.InvoicingRequirementPrice}"
sort="auto(requirement.sumTotal)"
align="right" align="right"
width="130px" /> width="130px" />
<listheader <listheader
label="${labels.InvoicingInvoicedPrice}" label="${labels.InvoicingInvoicedPrice}"
align="right" align="right"
sort="auto(totalInvoiced)"
width="130px" /> width="130px" />
</listhead> </listhead>
<auxhead <auxhead
sclass="category-center" sclass="category-center"
visible="@load(vm.filter)"> visible="@load(vm.filter)">
<auxheader> <auxheader>
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
@@ -51,6 +62,7 @@
value="@bind(vm.filterTemplate.requirement.numser)" value="@bind(vm.filterTemplate.requirement.numser)"
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">
@@ -111,6 +123,27 @@
</div> </div>
</div> </div>
</auxheader> </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> <auxheader>
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
@@ -118,6 +151,7 @@
value="@bind(vm.filterTemplate.requirement.description)" value="@bind(vm.filterTemplate.requirement.description)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
maxlength="@load(vm.lengthDescription)"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
</div> </div>
<div sclass="find-grid-img"> <div sclass="find-grid-img">
@@ -128,32 +162,33 @@
<auxheader> <auxheader>
<!-- div sclass="find-grid-cell"> <!-- div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox <textbox
value="@bind(vm.filterTemplate.requirement.sumTotal) @converter(vm.standardBigDecimalConverter)" value="@bind(vm.filterTemplate.requirement.sumTotal) @converter(vm.standardBigDecimalConverter)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
sclass="find-grid-textbox" /> maxlength="@load(vm.lengthText)"
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 <textbox
value="@bind(vm.filterTemplate.totalInvoiced) @converter(vm.standardBigDecimalConverter)" value="@bind(vm.filterTemplate.totalInvoiced) @converter(vm.standardBigDecimalConverter)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
sclass="find-grid-textbox" /> maxlength="@load(vm.lengthText)"
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> </auxhead>
<template name="model"> <template name="model">
<listitem> <listitem>
@@ -161,9 +196,11 @@
<listcell label="@load(each.requirement.reqDate) @converter('formatedDate', format=labels.DateFormat)" /> <listcell label="@load(each.requirement.reqDate) @converter('formatedDate', format=labels.DateFormat)" />
<listcell label="@load(each.requirement.centre)" /> <listcell label="@load(each.requirement.centre)" />
<listcell label="@load(each.requirement.workgroup)" /> <listcell label="@load(each.requirement.workgroup)" />
<listcell label="@load(each.requirement.ownedBy)" />
<listcell label="@load(each.requirement.description)" /> <listcell label="@load(each.requirement.description)" />
<listcell label="@load(each.requirement.sumTotal) @converter(vm.standardBigDecimalConverter)" /> <listcell label="@load(each.requirement.sumTotal) @converter(vm.standardBigDecimalConverter)" />
<listcell label="@load(each.totalInvoiced) @converter(vm.standardBigDecimalConverter)" <listcell
label="@load(each.totalInvoiced) @converter(vm.standardBigDecimalConverter)"
style="@load(vm.dataBean.totalInvoiced gt vm.dataBean.requirement.sumTotal ? ' color: red;' : '' )" /> style="@load(vm.dataBean.totalInvoiced gt vm.dataBean.requirement.sumTotal ? ' color: red;' : '' )" />
</listitem> </listitem>
</template> </template>
@@ -32,6 +32,10 @@
<listhead menupopup="auto"> <listhead menupopup="auto">
<listheader width="27" /> <listheader width="27" />
<listheader <listheader
hflex="6"
sort="czech(requirement.numser)"
label="${labels.InvoicingRequirementNumber}" />
<listheader
hflex="7" hflex="7"
sort="czech(code)" sort="czech(code)"
label="${labels.RequirementItemCode}" /> label="${labels.RequirementItemCode}" />
@@ -82,12 +86,28 @@
<auxhead visible="@load(vm.filter)"> <auxhead visible="@load(vm.filter)">
<auxheader /> <auxheader />
<auxheader> <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-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox <textbox
value="@bind(vm.filterTemplate.code)" value="@bind(vm.filterTemplate.code)"
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">
@@ -102,6 +122,7 @@
value="@bind(vm.filterTemplate.name)" value="@bind(vm.filterTemplate.name)"
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">
@@ -116,6 +137,7 @@
value="@bind(vm.filterTemplate.textItem)" value="@bind(vm.filterTemplate.textItem)"
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">
@@ -133,6 +155,7 @@
value="@bind(vm.filterTemplate.quantity)" value="@bind(vm.filterTemplate.quantity)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
maxlength="@load(vm.lengthText)"
sclass="find-grid-textbox-right" /> sclass="find-grid-textbox-right" />
</div> </div>
</div--> </div-->
@@ -144,6 +167,7 @@
value="@bind(vm.filterTemplate.munit.name)" value="@bind(vm.filterTemplate.munit.name)"
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">
@@ -161,6 +185,7 @@
value="@bind(vm.filterTemplate.unitPrice)" value="@bind(vm.filterTemplate.unitPrice)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
maxlength="@load(vm.lengthText)"
sclass="find-grid-textbox-right" /> sclass="find-grid-textbox-right" />
</div> </div>
</div--> </div-->
@@ -175,6 +200,7 @@
value="@bind(vm.filterTemplate.total)" value="@bind(vm.filterTemplate.total)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
maxlength="@load(vm.lengthText)"
sclass="find-grid-textbox-right" /> sclass="find-grid-textbox-right" />
</div> </div>
</div--> </div-->
@@ -249,6 +275,7 @@
value="@bind(vm.filterTemplate.description)" value="@bind(vm.filterTemplate.description)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
maxlength="@load(vm.lengthDescription)"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
</div> </div>
<div sclass="find-grid-img"> <div sclass="find-grid-img">
@@ -260,6 +287,7 @@
<template name="model"> <template name="model">
<listitem context="popupMenu"> <listitem context="popupMenu">
<listcell /> <listcell />
<listcell label="@load(each.requirement.numser)"/>
<listcell label="@load(each.code)" /> <listcell label="@load(each.code)" />
<listcell label="@load(each.name)" /> <listcell label="@load(each.name)" />
<listcell label="@load(each.textItem)" /> <listcell label="@load(each.textItem)" />
@@ -95,6 +95,7 @@
value="@bind(vm.filterTemplate.numser)" value="@bind(vm.filterTemplate.numser)"
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">
@@ -200,6 +201,7 @@
value="@bind(vm.filterTemplate.address)" value="@bind(vm.filterTemplate.address)"
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">
@@ -235,6 +237,7 @@
value="@bind(vm.filterTemplate.description)" value="@bind(vm.filterTemplate.description)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
maxlength="@load(vm.lengthDescription)"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
</div> </div>
<div sclass="find-grid-img"> <div sclass="find-grid-img">
@@ -61,6 +61,7 @@
constraint="@load(vm.constriant)" constraint="@load(vm.constriant)"
value="@bind(fx.numser)" value="@bind(fx.numser)"
placeholder="${labels.NotYetFilled}..." placeholder="${labels.NotYetFilled}..."
maxlength="@load(vm.lengthText)"
readonly="true" /> readonly="true" />
</cell> </cell>
</row> </row>
@@ -81,6 +82,7 @@
id="idOrderTotal" id="idOrderTotal"
readonly="true" readonly="true"
width="150px" width="150px"
maxlength="@load(vm.lengthText)"
value="@bind(fx.total) @converter(vm.standardBigDecimalConverter)" /> value="@bind(fx.total) @converter(vm.standardBigDecimalConverter)" />
</cell> </cell>
</row> </row>
@@ -111,6 +113,7 @@
id="idOrderDescription" id="idOrderDescription"
width="100%" width="100%"
rows="5" rows="5"
maxlength="@load(vm.lengthDescription)"
value="@bind(fx.description)" /> value="@bind(fx.description)" />
</cell> </cell>
</row> </row>
@@ -177,12 +180,14 @@
<textbox <textbox
id="idSuppIC" id="idSuppIC"
value="@bind(fx.suplier.ic)" value="@bind(fx.suplier.ic)"
maxlength="@load(vm.lengthText)"
instant="true" /> instant="true" />
</cell> </cell>
<cell sclass="row-title">${labels.SuppliersFormDIC} :</cell> <cell sclass="row-title">${labels.SuppliersFormDIC} :</cell>
<cell> <cell>
<textbox <textbox
id="idSuppDIC" id="idSuppDIC"
maxlength="@load(vm.lengthText)"
value="@bind(fx.suplier.dic)" /> value="@bind(fx.suplier.dic)" />
</cell> </cell>
</row> </row>
@@ -192,6 +197,7 @@
<textbox <textbox
id="idSuppDepartment" id="idSuppDepartment"
value="@bind(fx.suplier.department)" value="@bind(fx.suplier.department)"
maxlength="@load(vm.lengthText)"
width="100%" /> width="100%" />
</cell> </cell>
<cell sclass="row-title">${labels.SuppliersFormContact} :</cell> <cell sclass="row-title">${labels.SuppliersFormContact} :</cell>
@@ -199,6 +205,7 @@
<textbox <textbox
id="idSuppContactName" id="idSuppContactName"
value="@bind(fx.suplier.contactName)" value="@bind(fx.suplier.contactName)"
maxlength="@load(vm.lengthText)"
width="100%" /> width="100%" />
</cell> </cell>
</row> </row>
@@ -208,12 +215,14 @@
<textbox <textbox
id="idSuppStreet" id="idSuppStreet"
value="@bind(fx.suplier.street)" value="@bind(fx.suplier.street)"
maxlength="@load(vm.lengthText)"
width="100%" /> width="100%" />
</cell> </cell>
<cell sclass="row-title">${labels.SuppliersFormNo} :</cell> <cell sclass="row-title">${labels.SuppliersFormNo} :</cell>
<cell> <cell>
<textbox <textbox
id="idSuppHouseNumber" id="idSuppHouseNumber"
maxlength="@load(vm.lengthText)"
value="@bind(fx.suplier.houseNumber)" /> value="@bind(fx.suplier.houseNumber)" />
</cell> </cell>
</row> </row>
@@ -223,12 +232,14 @@
<textbox <textbox
id="idSuppCity" id="idSuppCity"
value="@bind(fx.suplier.city)" value="@bind(fx.suplier.city)"
maxlength="@load(vm.lengthText)"
width="100%" /> width="100%" />
</cell> </cell>
<cell sclass="row-title">${labels.SuppliersFormZIP} :</cell> <cell sclass="row-title">${labels.SuppliersFormZIP} :</cell>
<cell> <cell>
<textbox <textbox
id="idSuppZIP" id="idSuppZIP"
maxlength="@load(vm.lengthText)"
value="@bind(fx.suplier.zipCode)" /> value="@bind(fx.suplier.zipCode)" />
</cell> </cell>
</row> </row>
@@ -237,6 +248,7 @@
<cell> <cell>
<textbox <textbox
id="idSuppPhone" id="idSuppPhone"
maxlength="@load(vm.lengthText)"
value="@bind(fx.suplier.phone)" /> value="@bind(fx.suplier.phone)" />
</cell> </cell>
<cell sclass="row-title">${labels.SuppliersFormEmail} :</cell> <cell sclass="row-title">${labels.SuppliersFormEmail} :</cell>
@@ -244,6 +256,7 @@
<textbox <textbox
id="idSuppEmail" id="idSuppEmail"
value="@bind(fx.suplier.email)" value="@bind(fx.suplier.email)"
maxlength="@load(vm.lengthText)"
width="100%" /> width="100%" />
</cell> </cell>
</row> </row>
@@ -253,6 +266,7 @@
<textbox <textbox
id="idSuppWWW" id="idSuppWWW"
value="@bind(fx.suplier.web)" value="@bind(fx.suplier.web)"
maxlength="@load(vm.lengthText)"
width="100%" /> width="100%" />
</cell> </cell>
</row> </row>
@@ -297,12 +311,14 @@
<cell> <cell>
<textbox <textbox
id="idDeliveryIC" id="idDeliveryIC"
maxlength="@load(vm.lengthText)"
value="@bind(fx.deliveryAddress.ic)" /> value="@bind(fx.deliveryAddress.ic)" />
</cell> </cell>
<cell sclass="row-title">${labels.SuppliersFormDIC} :</cell> <cell sclass="row-title">${labels.SuppliersFormDIC} :</cell>
<cell> <cell>
<textbox <textbox
id="idDeliveryDIC" id="idDeliveryDIC"
maxlength="@load(vm.lengthText)"
value="@bind(fx.deliveryAddress.dic)" /> value="@bind(fx.deliveryAddress.dic)" />
</cell> </cell>
</row> </row>
@@ -311,6 +327,7 @@
<cell> <cell>
<textbox <textbox
id="idDeliveryDepartment" id="idDeliveryDepartment"
maxlength="@load(vm.lengthText)"
value="@bind(fx.deliveryAddress.department)" value="@bind(fx.deliveryAddress.department)"
width="100%" /> width="100%" />
</cell> </cell>
@@ -319,6 +336,7 @@
<textbox <textbox
id="idDeliveryContactName" id="idDeliveryContactName"
value="@bind(fx.deliveryAddress.contactName)" value="@bind(fx.deliveryAddress.contactName)"
maxlength="@load(vm.lengthText)"
width="100%" /> width="100%" />
</cell> </cell>
</row> </row>
@@ -328,12 +346,14 @@
<textbox <textbox
id="idDeliveryStreet" id="idDeliveryStreet"
value="@bind(fx.deliveryAddress.street)" value="@bind(fx.deliveryAddress.street)"
maxlength="@load(vm.lengthText)"
width="100%" /> width="100%" />
</cell> </cell>
<cell sclass="row-title">${labels.SuppliersFormNo} :</cell> <cell sclass="row-title">${labels.SuppliersFormNo} :</cell>
<cell> <cell>
<textbox <textbox
id="idDeliveryHouseNumber" id="idDeliveryHouseNumber"
maxlength="@load(vm.lengthText)"
value="@bind(fx.deliveryAddress.houseNumber)" /> value="@bind(fx.deliveryAddress.houseNumber)" />
</cell> </cell>
</row> </row>
@@ -343,12 +363,14 @@
<textbox <textbox
id="idDeliveryCity" id="idDeliveryCity"
value="@bind(fx.deliveryAddress.city)" value="@bind(fx.deliveryAddress.city)"
maxlength="@load(vm.lengthText)"
width="100%" /> width="100%" />
</cell> </cell>
<cell sclass="row-title">${labels.SuppliersFormZIP} :</cell> <cell sclass="row-title">${labels.SuppliersFormZIP} :</cell>
<cell> <cell>
<textbox <textbox
id="idDeliveryZIP" id="idDeliveryZIP"
maxlength="@load(vm.lengthText)"
value="@bind(fx.deliveryAddress.zipCode)" /> value="@bind(fx.deliveryAddress.zipCode)" />
</cell> </cell>
</row> </row>
@@ -357,6 +379,7 @@
<cell> <cell>
<textbox <textbox
id="idDeliveryPhone" id="idDeliveryPhone"
maxlength="@load(vm.lengthText)"
value="@bind(fx.deliveryAddress.phone)" /> value="@bind(fx.deliveryAddress.phone)" />
</cell> </cell>
<cell sclass="row-title">${labels.SuppliersFormEmail} :</cell> <cell sclass="row-title">${labels.SuppliersFormEmail} :</cell>
@@ -364,6 +387,7 @@
<textbox <textbox
id="idDeliveryEmail" id="idDeliveryEmail"
value="@bind(fx.deliveryAddress.email)" value="@bind(fx.deliveryAddress.email)"
maxlength="@load(vm.lengthText)"
width="100%" /> width="100%" />
</cell> </cell>
</row> </row>
@@ -373,6 +397,7 @@
<textbox <textbox
id="idDeliveryWWW" id="idDeliveryWWW"
value="@bind(fx.deliveryAddress.web)" value="@bind(fx.deliveryAddress.web)"
maxlength="@load(vm.lengthText)"
width="100%" /> width="100%" />
</cell> </cell>
</row> </row>
@@ -400,6 +425,7 @@
<textbox <textbox
id="idInvoiceCompany" id="idInvoiceCompany"
value="@bind(fx.address.company)" value="@bind(fx.address.company)"
maxlength="@load(vm.lengthText)"
width="100%" /> width="100%" />
</cell> </cell>
</row> </row>
@@ -408,12 +434,14 @@
<cell> <cell>
<textbox <textbox
id="idInvoiceIC" id="idInvoiceIC"
maxlength="@load(vm.lengthText)"
value="@bind(fx.address.ic)" /> value="@bind(fx.address.ic)" />
</cell> </cell>
<cell sclass="row-title">${labels.SuppliersFormDIC} :</cell> <cell sclass="row-title">${labels.SuppliersFormDIC} :</cell>
<cell> <cell>
<textbox <textbox
id="idInvoiceDIC" id="idInvoiceDIC"
maxlength="@load(vm.lengthText)"
value="@bind(fx.address.dic)" /> value="@bind(fx.address.dic)" />
</cell> </cell>
</row> </row>
@@ -423,6 +451,7 @@
<textbox <textbox
id="idInvoiceDepartment" id="idInvoiceDepartment"
value="@bind(fx.address.department)" value="@bind(fx.address.department)"
maxlength="@load(vm.lengthText)"
width="100%" /> width="100%" />
</cell> </cell>
<cell sclass="row-title">${labels.SuppliersFormContact} :</cell> <cell sclass="row-title">${labels.SuppliersFormContact} :</cell>
@@ -430,6 +459,7 @@
<textbox <textbox
id="idInvoiceContactName" id="idInvoiceContactName"
value="@bind(fx.address.contactName)" value="@bind(fx.address.contactName)"
maxlength="@load(vm.lengthText)"
width="100%" /> width="100%" />
</cell> </cell>
</row> </row>
@@ -439,12 +469,14 @@
<textbox <textbox
id="idInvoiceStreet" id="idInvoiceStreet"
value="@bind(fx.address.street)" value="@bind(fx.address.street)"
maxlength="@load(vm.lengthText)"
width="100%" /> width="100%" />
</cell> </cell>
<cell sclass="row-title">${labels.SuppliersFormNo} :</cell> <cell sclass="row-title">${labels.SuppliersFormNo} :</cell>
<cell> <cell>
<textbox <textbox
id="idInvoiceHouseNumber" id="idInvoiceHouseNumber"
maxlength="@load(vm.lengthText)"
value="@bind(fx.address.houseNumber)" /> value="@bind(fx.address.houseNumber)" />
</cell> </cell>
</row> </row>
@@ -454,12 +486,14 @@
<textbox <textbox
id="idInvoiceCity" id="idInvoiceCity"
value="@bind(fx.address.city)" value="@bind(fx.address.city)"
maxlength="@load(vm.lengthText)"
width="100%" /> width="100%" />
</cell> </cell>
<cell sclass="row-title">${labels.SuppliersFormZIP} :</cell> <cell sclass="row-title">${labels.SuppliersFormZIP} :</cell>
<cell> <cell>
<textbox <textbox
id="idInvoiceZIP" id="idInvoiceZIP"
maxlength="@load(vm.lengthText)"
value="@bind(fx.address.zipCode)" /> value="@bind(fx.address.zipCode)" />
</cell> </cell>
</row> </row>
@@ -468,6 +502,7 @@
<cell> <cell>
<textbox <textbox
id="idInvoicePhone" id="idInvoicePhone"
maxlength="@load(vm.lengthText)"
value="@bind(fx.address.phone)" /> value="@bind(fx.address.phone)" />
</cell> </cell>
<cell sclass="row-title">${labels.SuppliersFormEmail} :</cell> <cell sclass="row-title">${labels.SuppliersFormEmail} :</cell>
@@ -475,6 +510,7 @@
<textbox <textbox
id="idInvoiceEmail" id="idInvoiceEmail"
value="@bind(fx.address.email)" value="@bind(fx.address.email)"
maxlength="@load(vm.lengthText)"
width="100%" /> width="100%" />
</cell> </cell>
</row> </row>
@@ -484,6 +520,7 @@
<textbox <textbox
id="idInvoiceWWW" id="idInvoiceWWW"
value="@bind(fx.address.web)" value="@bind(fx.address.web)"
maxlength="@load(vm.lengthText)"
width="100%" /> width="100%" />
</cell> </cell>
</row> </row>
@@ -550,6 +587,7 @@
readonly="true" readonly="true"
onFocus="@command('onFocusItem', item=each, ctrl=self)" onFocus="@command('onFocusItem', item=each, ctrl=self)"
onChange="@command('recalculate', form=fx, changed='quantity')" onChange="@command('recalculate', form=fx, changed='quantity')"
maxlength="@load(vm.lengthText)"
value="@bind(each.quantity) @converter(vm.standardBigDecimalConverter)" /> value="@bind(each.quantity) @converter(vm.standardBigDecimalConverter)" />
</listcell> </listcell>
<listcell label="@load(each.munit.name)" /> <listcell label="@load(each.munit.name)" />
@@ -560,6 +598,7 @@
readonly="${not sec:isAllGranted('ROLE_ADMIN')}" readonly="${not sec:isAllGranted('ROLE_ADMIN')}"
onFocus="@command('onFocusItem', item=each, ctrl=self)" onFocus="@command('onFocusItem', item=each, ctrl=self)"
onChange="@command('recalculate', form=fx, changed='unitPrice')" onChange="@command('recalculate', form=fx, changed='unitPrice')"
maxlength="@load(vm.lengthText)"
value="@bind(each.unitPrice) @converter(vm.standardBigDecimalConverter)" /> value="@bind(each.unitPrice) @converter(vm.standardBigDecimalConverter)" />
</listcell> </listcell>
<listcell> <listcell>
@@ -569,6 +608,7 @@
readonly="${not sec:isAllGranted('ROLE_ADMIN')}" readonly="${not sec:isAllGranted('ROLE_ADMIN')}"
onFocus="@command('onFocusItem', item=each, ctrl=self)" onFocus="@command('onFocusItem', item=each, ctrl=self)"
onChange="@command('recalculate', form=fx, changed='total')" onChange="@command('recalculate', form=fx, changed='total')"
maxlength="@load(vm.lengthText)"
value="@bind(each.total) @converter(vm.standardBigDecimalConverter)" /> value="@bind(each.total) @converter(vm.standardBigDecimalConverter)" />
</listcell> </listcell>
<listcell label="@load(each.description)" /> <listcell label="@load(each.description)" />
@@ -52,6 +52,7 @@
value="@bind(vm.filterTmpMaterial.code)" value="@bind(vm.filterTmpMaterial.code)"
instant="true" instant="true"
onChange="@command('doFilterMaterial')" onChange="@command('doFilterMaterial')"
maxlength="@load(vm.lengthText)"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
</div> </div>
<div sclass="find-grid-img"> <div sclass="find-grid-img">
@@ -66,6 +67,7 @@
value="@bind(vm.filterTmpMaterial.name)" value="@bind(vm.filterTmpMaterial.name)"
instant="true" instant="true"
onChange="@command('doFilterMaterial')" onChange="@command('doFilterMaterial')"
maxlength="@load(vm.lengthText)"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
</div> </div>
<div sclass="find-grid-img"> <div sclass="find-grid-img">
@@ -100,6 +102,7 @@
value="@bind(vm.filterTmpMaterial.description)" value="@bind(vm.filterTmpMaterial.description)"
instant="true" instant="true"
onChange="@command('doFilterMaterial')" onChange="@command('doFilterMaterial')"
maxlength="@load(vm.lengthDescription)"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
</div> </div>
<div sclass="find-grid-img"> <div sclass="find-grid-img">
@@ -26,6 +26,7 @@
width="150px" width="150px"
constraint="@load(vm.constriant)" constraint="@load(vm.constriant)"
value="@bind(fx.numser)" value="@bind(fx.numser)"
maxlength="@load(vm.lengthText)"
readonly="true" /> readonly="true" />
</cell> </cell>
</row> </row>
@@ -72,6 +73,7 @@
id="idSumTotal" id="idSumTotal"
readonly="true" readonly="true"
width="150px" width="150px"
maxlength="@load(vm.lengthText)"
value="@bind(fx.sumTotal) @converter(vm.standardBigDecimalConverter)" /> value="@bind(fx.sumTotal) @converter(vm.standardBigDecimalConverter)" />
</cell> </cell>
</row> </row>
@@ -82,6 +84,7 @@
id="description" id="description"
width="400px" width="400px"
rows="5" rows="5"
maxlength="@load(vm.lengthDescription)"
value="@bind(fx.description)" /> value="@bind(fx.description)" />
</cell> </cell>
</row> </row>
@@ -161,6 +164,7 @@
sclass="grid-textbox-max" sclass="grid-textbox-max"
readonly="false" readonly="false"
onFocus="@command('onFocusItem', item=each, ctrl=self)" onFocus="@command('onFocusItem', item=each, ctrl=self)"
maxlength="@load(vm.lengthText)"
value="@bind(each.name)" /> value="@bind(each.name)" />
</listcell> </listcell>
<listcell> <listcell>
@@ -168,6 +172,7 @@
inplace="true" inplace="true"
sclass="grid-textbox-max" sclass="grid-textbox-max"
onFocus="@command('onFocusItem', item=each, ctrl=self)" onFocus="@command('onFocusItem', item=each, ctrl=self)"
maxlength="@load(vm.lengthText)"
value="@bind(each.textItem)" /> value="@bind(each.textItem)" />
</listcell> </listcell>
<listcell> <listcell>
@@ -176,6 +181,7 @@
sclass="grid-textbox-max-right" sclass="grid-textbox-max-right"
onFocus="@command('onFocusItem', item=each, ctrl=self)" onFocus="@command('onFocusItem', item=each, ctrl=self)"
onChange="@command('recalculate', form=fx, changed='quantity')" onChange="@command('recalculate', form=fx, changed='quantity')"
maxlength="@load(vm.lengthText)"
value="@bind(each.quantity) @converter(vm.standardBigDecimalConverter)" /> value="@bind(each.quantity) @converter(vm.standardBigDecimalConverter)" />
</listcell> </listcell>
<listcell> <listcell>
@@ -184,6 +190,7 @@
sclass="grid-textbox-max" sclass="grid-textbox-max"
readonly="false" readonly="false"
onFocus="@command('onFocusItem', item=each, ctrl=self)" onFocus="@command('onFocusItem', item=each, ctrl=self)"
maxlength="@load(vm.lengthText)"
value="@bind(each.munit.name)" /> value="@bind(each.munit.name)" />
</listcell> </listcell>
<listcell> <listcell>
@@ -192,6 +199,7 @@
sclass="grid-textbox-max-right" sclass="grid-textbox-max-right"
onFocus="@command('onFocusItem', item=each, ctrl=self)" onFocus="@command('onFocusItem', item=each, ctrl=self)"
onChange="@command('recalculate', form=fx, changed='unitprice')" onChange="@command('recalculate', form=fx, changed='unitprice')"
maxlength="@load(vm.lengthText)"
value="@bind(each.unitPrice) @converter(vm.standardBigDecimalConverter)" /> value="@bind(each.unitPrice) @converter(vm.standardBigDecimalConverter)" />
</listcell> </listcell>
<listcell> <listcell>
@@ -200,6 +208,7 @@
sclass="grid-textbox-max-right" sclass="grid-textbox-max-right"
onFocus="@command('onFocusItem', item=each, ctrl=self)" onFocus="@command('onFocusItem', item=each, ctrl=self)"
onChange="@command('recalculate', form=fx, changed='total')" onChange="@command('recalculate', form=fx, changed='total')"
maxlength="@load(vm.lengthText)"
value="@bind(each.total) @converter(vm.standardBigDecimalConverter)" /> value="@bind(each.total) @converter(vm.standardBigDecimalConverter)" />
</listcell> </listcell>
<listcell> <listcell>
@@ -207,6 +216,7 @@
inplace="true" inplace="true"
sclass="grid-textbox-max" sclass="grid-textbox-max"
onFocus="@command('onFocusItem', item=each, ctrl=self)" onFocus="@command('onFocusItem', item=each, ctrl=self)"
maxlength="@load(vm.lengthDescription)"
value="@bind(each.description)" /> value="@bind(each.description)" />
</listcell> </listcell>
<listcell <listcell
@@ -59,6 +59,7 @@
value="@bind(vm.filterTemplate.numser)" value="@bind(vm.filterTemplate.numser)"
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">
@@ -122,6 +123,7 @@
value="@bind(vm.filterTemplate.sumTotal) @converter(vm.bigDecimalConverter)" value="@bind(vm.filterTemplate.sumTotal) @converter(vm.bigDecimalConverter)"
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">
@@ -136,6 +138,7 @@
value="@bind(vm.filterTemplate.description)" value="@bind(vm.filterTemplate.description)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
maxlength="@load(vm.lengthDescription)"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
</div> </div>
<div sclass="find-grid-img"> <div sclass="find-grid-img">
@@ -65,6 +65,7 @@
value="@bind(vm.filterTemplate.numser)" value="@bind(vm.filterTemplate.numser)"
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">
@@ -128,6 +129,7 @@
value="@bind(vm.filterTemplate.sumTotal) @converter(vm.bigDecimalConverter)" value="@bind(vm.filterTemplate.sumTotal) @converter(vm.bigDecimalConverter)"
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">
@@ -142,6 +144,7 @@
value="@bind(vm.filterTemplate.description)" value="@bind(vm.filterTemplate.description)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
maxlength="@load(vm.lengthDescription)"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
</div> </div>
<div sclass="find-grid-img"> <div sclass="find-grid-img">
@@ -185,6 +188,14 @@
</template> </template>
</listbox> </listbox>
<div hflex="3"> <div hflex="3">
<include src="/main/approveStatus.zul" /> <vbox>
<include src="/main/approveStatus.zul" />
<hbox visible="@load(not empty vm.invoicedAmount)">
<label value="${labels.RequirementInvoicedAmount}"/>
<label value="@load(vm.invoicedAmount) @converter(vm.bigDecimalConverter)"/>
</hbox>
</vbox>
</div> </div>
</hbox> </hbox>
@@ -65,6 +65,7 @@
value="@bind(vm.filterTemplate.numser)" value="@bind(vm.filterTemplate.numser)"
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">
@@ -128,6 +129,7 @@
value="@bind(vm.filterTemplate.sumTotal) @converter(vm.bigDecimalConverter)" value="@bind(vm.filterTemplate.sumTotal) @converter(vm.bigDecimalConverter)"
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">
@@ -142,6 +144,7 @@
value="@bind(vm.filterTemplate.description)" value="@bind(vm.filterTemplate.description)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
maxlength="@load(vm.lengthDescription)"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
</div> </div>
<div sclass="find-grid-img"> <div sclass="find-grid-img">
@@ -185,6 +188,14 @@
</template> </template>
</listbox> </listbox>
<div hflex="3"> <div hflex="3">
<include src="/main/approveStatus.zul" /> <vbox>
<include src="/main/approveStatus.zul" />
<hbox visible="@load(not empty vm.invoicedAmount)">
<label value="${labels.RequirementInvoicedAmount}"/>
<label value="@load(vm.invoicedAmount) @converter(vm.bigDecimalConverter)"/>
</hbox>
</vbox>
</div> </div>
</hbox> </hbox>
@@ -65,6 +65,7 @@
value="@bind(vm.filterTemplate.numser)" value="@bind(vm.filterTemplate.numser)"
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">
@@ -128,6 +129,7 @@
value="@bind(vm.filterTemplate.sumTotal) @converter(vm.bigDecimalConverter)" value="@bind(vm.filterTemplate.sumTotal) @converter(vm.bigDecimalConverter)"
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">
@@ -142,6 +144,7 @@
value="@bind(vm.filterTemplate.description)" value="@bind(vm.filterTemplate.description)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
maxlength="@load(vm.lengthDescription)"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
</div> </div>
<div sclass="find-grid-img"> <div sclass="find-grid-img">
@@ -185,6 +188,14 @@
</template> </template>
</listbox> </listbox>
<div hflex="3"> <div hflex="3">
<include src="/main/approveStatus.zul" /> <vbox>
<include src="/main/approveStatus.zul" />
<hbox visible="@load(not empty vm.invoicedAmount)">
<label value="${labels.RequirementInvoicedAmount}"/>
<label value="@load(vm.invoicedAmount) @converter(vm.bigDecimalConverter)"/>
</hbox>
</vbox>
</div> </div>
</hbox> </hbox>

Some files were not shown because too many files have changed in this diff Show More