Josef Rokos 10 years ago
commit 3a5da06c48

@ -33,7 +33,7 @@ import java.util.Map;
public class Constants { public class Constants {
public final static long DB_VERSION = 3; public final static long DB_VERSION = 4;
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";

@ -7,6 +7,15 @@ import org.zkoss.util.resource.Labels;
public class StringUtils public class StringUtils
{ {
public static boolean isNullOrEmpty(String str)
{
return ((str == null) || (str.isEmpty()));
}
public static boolean isNullOrTrimmedEmpty(String str)
{
return ((str == null) || (str.trim().isEmpty()));
}
public static String nullToEmptyString(String str) public static String nullToEmptyString(String str)
{ {

@ -22,6 +22,7 @@ public class SettingsData {
private List<Vehicle> vehicles; private List<Vehicle> vehicles;
private Map<Integer, BigDecimal[]> refunds; private Map<Integer, BigDecimal[]> refunds;
private String stampFile; private String stampFile;
private String logoFile;
public SettingsData() { public SettingsData() {
newReqTemplate = new MailMessage(); newReqTemplate = new MailMessage();
@ -140,4 +141,13 @@ public class SettingsData {
this.stampFile = stampFile; this.stampFile = stampFile;
} }
public String getLogoFile()
{
return logoFile;
}
public void setLogoFile(String logoFile)
{
this.logoFile = logoFile;
}
} }

@ -1,10 +1,11 @@
package info.bukova.isspst.data; package info.bukova.isspst.data;
import info.bukova.isspst.storage.EntityWithAttachment; import info.bukova.isspst.storage.EntityWithAttachment;
import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption; import java.math.BigDecimal;
import org.hibernate.search.annotations.Indexed; import java.util.ArrayList;
import org.hibernate.search.annotations.IndexedEmbedded; import java.util.Date;
import java.util.List;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
@ -15,10 +16,14 @@ import javax.persistence.ManyToOne;
import javax.persistence.OneToMany; import javax.persistence.OneToMany;
import javax.persistence.OneToOne; import javax.persistence.OneToOne;
import javax.persistence.Table; import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.ArrayList; import org.hibernate.annotations.LazyCollection;
import java.util.Date; import org.hibernate.annotations.LazyCollectionOption;
import java.util.List; import org.hibernate.search.annotations.Analyze;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Index;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.IndexedEmbedded;
@Entity @Entity
@Table(name = "TRIP_BILL") @Table(name = "TRIP_BILL")
@ -32,6 +37,11 @@ public class TripBill extends BaseData implements EntityWithAttachment {
private Date resultMessageDate; private Date resultMessageDate;
@Column(name = "SIGN_DATE") @Column(name = "SIGN_DATE")
private Date signDate; private Date signDate;
@Column(name = "RESULT_MESSAGE")
@Field(index = Index.YES, analyze = Analyze.YES)
private String resultMessage;
@Column(name = "FREE_MEALS") @Column(name = "FREE_MEALS")
private boolean freeMeals; private boolean freeMeals;
@Column(name = "FREE_HOUSING") @Column(name = "FREE_HOUSING")
@ -85,6 +95,16 @@ public class TripBill extends BaseData implements EntityWithAttachment {
this.signDate = signDate; this.signDate = signDate;
} }
public String getResultMessage()
{
return resultMessage;
}
public void setResultMessage(String resultMessage)
{
this.resultMessage = resultMessage;
}
public boolean isFreeMeals() { public boolean isFreeMeals() {
return freeMeals; return freeMeals;
} }

@ -1,5 +1,10 @@
package info.bukova.isspst.data; package info.bukova.isspst.data;
import info.bukova.isspst.StringUtils;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Embeddable; import javax.persistence.Embeddable;
@ -47,4 +52,22 @@ public class UsersAddress {
this.city = city; this.city = city;
} }
public String toString() {
List<String> list = new ArrayList<String>();
list.add(this.street);
list.add(this.houseNumber);
final String s1 = StringUtils.joinNotEmpty(list, " ");
list.clear();
list.add(this.zipCode);
list.add(this.city);
final String s2 = StringUtils.joinNotEmpty(list, " ");
list.clear();
list.add(s1);
list.add(s2);
final String s = StringUtils.joinNotEmpty(list, ", ");
return s;
}
} }

@ -1,8 +1,6 @@
package info.bukova.isspst.reporting; package info.bukova.isspst.reporting;
import java.util.HashMap; import info.bukova.isspst.data.Address;
import java.util.Map;
import info.bukova.isspst.data.AuthItem; import info.bukova.isspst.data.AuthItem;
import info.bukova.isspst.data.Order; import info.bukova.isspst.data.Order;
import info.bukova.isspst.data.TripBill; import info.bukova.isspst.data.TripBill;
@ -13,8 +11,13 @@ import info.bukova.isspst.services.settings.GlobalSettingsService;
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 java.util.HashMap;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import com.mysql.jdbc.StringUtils;
public class ParamFiller { public class ParamFiller {
@Autowired @Autowired
@ -45,6 +48,7 @@ public class ParamFiller {
if ((definition.getDataSet().get(0) instanceof TripBill) if ((definition.getDataSet().get(0) instanceof TripBill)
&& definition.getReport().isSingleRecord()) { && definition.getReport().isSingleRecord()) {
if (userService.getUserSettings().getSignatureFile() != null if (userService.getUserSettings().getSignatureFile() != null
&& !userService.getUserSettings().getSignatureFile().isEmpty()) { && !userService.getUserSettings().getSignatureFile().isEmpty()) {
definition.setParam("P_USER_SIGNATURE", storage.serverPath(userService.getUserSettings().getSignatureFile())); definition.setParam("P_USER_SIGNATURE", storage.serverPath(userService.getUserSettings().getSignatureFile()));
@ -52,17 +56,25 @@ public class ParamFiller {
TripBill tb = (TripBill)definition.getDataSet().get(0); TripBill tb = (TripBill)definition.getDataSet().get(0);
tripReqService.loadAuthItems(tb.getRequirement()); tripReqService.loadAuthItems(tb.getRequirement());
AuthItem lastButOneAuth = tb.getRequirement().getAuthorization().get(0);
definition.setParam("P_PREV_APPROVE_DATE", lastButOneAuth.getAuthDate());
User lastButOneUser = lastButOneAuth.getApprover();
UserSettingsData prevApproverSettings = userService.getUserSettings(lastButOneUser);
if (prevApproverSettings != null && !StringUtils.isNullOrEmpty(prevApproverSettings.getSignatureFile())) {
definition.setParam("P_PREV_APPROVER_SIGNATURE", storage.serverPath(prevApproverSettings.getSignatureFile()));
}
AuthItem lastAuth = tb.getRequirement().getAuthorization().get(tb.getRequirement().getAuthorization().size() - 1); AuthItem lastAuth = tb.getRequirement().getAuthorization().get(tb.getRequirement().getAuthorization().size() - 1);
definition.setParam("P_APPROVE_DATE", lastAuth.getAuthDate()); definition.setParam("P_APPROVE_DATE", lastAuth.getAuthDate());
User u = lastAuth.getApprover(); User u = lastAuth.getApprover();
UserSettingsData approverSettings = userService.getUserSettings(u); UserSettingsData approverSettings = userService.getUserSettings(u);
if (approverSettings != null if (approverSettings != null && !StringUtils.isNullOrEmpty(approverSettings.getSignatureFile())) {
&& approverSettings.getSignatureFile() != null
&& !approverSettings.getSignatureFile().isEmpty()) {
definition.setParam("P_APPROVER_SIGNATURE", storage.serverPath(approverSettings.getSignatureFile())); definition.setParam("P_APPROVER_SIGNATURE", storage.serverPath(approverSettings.getSignatureFile()));
} }
} }
@ -74,6 +86,15 @@ public class ParamFiller {
definition.setParam("P_STAMP", storage.serverPath(settingService.getSettings().getStampFile())); definition.setParam("P_STAMP", storage.serverPath(settingService.getSettings().getStampFile()));
} }
} }
definition.setParam("P_LOGO", storage.serverPath(settingService.getSettings().getLogoFile()));
Address mainAddress = settingService.getSettings().getMainAddress();
if (mainAddress != null) {
String addr = (StringUtils.isNullOrEmpty(mainAddress.getCompany()) ? "" : mainAddress.getCompany());
definition.setParam("P_MAIN_ADDRESS", addr);
}
} }
} }

@ -126,6 +126,13 @@ public class DbInfoServiceImpl extends AbstractService<DbInfo> implements DbInfo
sq.executeUpdate(); sq.executeUpdate();
} }
if (dbVersion < 4)
{
sql = "UPDATE TRIP_BILL SET RESULT_MESSAGE = 'Zpráva z pracovní cesty' WHERE (RESULT_MESSAGE Is NULL) ";
sq = this.dao.getSession().createSQLQuery(sql);
sq.executeUpdate();
}
this.updateDatabaseVersion(); this.updateDatabaseVersion();
} }
} }

@ -1,6 +1,7 @@
package info.bukova.isspst.ui.settings; package info.bukova.isspst.ui.settings;
import info.bukova.isspst.Constants; import info.bukova.isspst.Constants;
import info.bukova.isspst.StringUtils;
import info.bukova.isspst.data.Address; import info.bukova.isspst.data.Address;
import info.bukova.isspst.data.Requirement; import info.bukova.isspst.data.Requirement;
import info.bukova.isspst.data.SettingsData; import info.bukova.isspst.data.SettingsData;
@ -77,7 +78,24 @@ public class GlobalSettingsVM extends DocumentViewModel
storage.removeFile(settings.getStampFile()); storage.removeFile(settings.getStampFile());
settings.setStampFile(null); settings.setStampFile(null);
} }
@Command
@NotifyChange({ "settings", "logoImg" })
public void uploadLogo(@ContextParam(ContextType.TRIGGER_EVENT) UploadEvent upEvent) {
int i = upEvent.getMedia().getName().lastIndexOf(".");
String fileName = "LogoImageFile" + upEvent.getMedia().getName().substring(i);
storage.saveFile(upEvent.getMedia().getByteData(), fileName);
settings.setLogoFile(fileName);
}
@Command
@NotifyChange("logoImg")
public void removeLogo()
{
storage.removeFile(settings.getLogoFile());
settings.setLogoFile(null);
}
public List<String> getRequirementFields() { public List<String> getRequirementFields() {
return ReflectionTools.getEntityFields(Requirement.class); return ReflectionTools.getEntityFields(Requirement.class);
} }
@ -144,7 +162,7 @@ public class GlobalSettingsVM extends DocumentViewModel
} }
public RenderedImage getStampImg() { public RenderedImage getStampImg() {
if (settings.getStampFile() == null || settings.getStampFile().isEmpty()) { if (StringUtils.isNullOrEmpty(settings.getStampFile())) {
return null; return null;
} }
@ -155,4 +173,16 @@ public class GlobalSettingsVM extends DocumentViewModel
} }
} }
public RenderedImage getLogoImg() {
if (StringUtils.isNullOrEmpty(settings.getLogoFile())) {
return null;
}
try {
return ImageIO.read(storage.file(settings.getLogoFile()));
}
catch (IOException e) {
return null;
}
}
} }

@ -8,6 +8,10 @@ import info.bukova.isspst.services.settings.GlobalSettingsService;
import info.bukova.isspst.services.tripbill.TripBillApprovalService; import info.bukova.isspst.services.tripbill.TripBillApprovalService;
import info.bukova.isspst.services.tripbill.TripBillService; import info.bukova.isspst.services.tripbill.TripBillService;
import info.bukova.isspst.ui.FormWithUpload; import info.bukova.isspst.ui.FormWithUpload;
import java.util.ArrayList;
import java.util.List;
import org.zkoss.bind.annotation.BindingParam; import org.zkoss.bind.annotation.BindingParam;
import org.zkoss.bind.annotation.Command; import org.zkoss.bind.annotation.Command;
import org.zkoss.bind.annotation.Init; import org.zkoss.bind.annotation.Init;
@ -18,9 +22,6 @@ 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;
import java.util.ArrayList;
import java.util.List;
public class TripBillForm extends FormWithUpload<TripBill> { public class TripBillForm extends FormWithUpload<TripBill> {
@WireVariable @WireVariable
@ -63,8 +64,16 @@ public class TripBillForm extends FormWithUpload<TripBill> {
@Override @Override
@Command @Command
@NotifyChange("errMessages") @NotifyChange("errMessages")
public void save(@BindingParam("window") Window win) { public void save(@BindingParam("window") Window win)
{
if (StringUtils.isNullOrTrimmedEmpty(this.getDataBean().getResultMessage()))
{
Messagebox.show(StringUtils.localize("ErrFillTripBillResultMessageText"), StringUtils.localize("Error"), Messagebox.OK, Messagebox.ERROR);
return;
}
final Window editWin = win; final Window editWin = win;
if (getDataBean().getApproval() == null && !isBillDisabled()) { if (getDataBean().getApproval() == null && !isBillDisabled()) {
Messagebox.show(StringUtils.localize("TripBillSaveApprove"), StringUtils.localize("TripBillSave"), Messagebox.YES Messagebox.show(StringUtils.localize("TripBillSaveApprove"), StringUtils.localize("TripBillSave"), Messagebox.YES
| Messagebox.NO, Messagebox.QUESTION, new EventListener<Event>() { | Messagebox.NO, Messagebox.QUESTION, new EventListener<Event>() {

@ -182,6 +182,8 @@ GlobalSettingsFreeMealsCount=Počet jídel zdarma
GlobalSettingsHours=Hodin GlobalSettingsHours=Hodin
GlobalSettingsUploadStamp=Nahrát obrázek razítka GlobalSettingsUploadStamp=Nahrát obrázek razítka
GlobalSettingsStamp=Razítko GlobalSettingsStamp=Razítko
GlobalSettingsUploadOrganizationLogo=Nahrát logo
GlobalSettingsOrganizationLogo=Logo
GlobalSettingsReqEnable=Povolení požadavků GlobalSettingsReqEnable=Povolení požadavků
GlobalSettingsInsertUrl=Vložit URL záznamu GlobalSettingsInsertUrl=Vložit URL záznamu
@ -399,3 +401,5 @@ Passenger = Pasažér
ChooseThePasseger = Vyberte pasažéra ChooseThePasseger = Vyberte pasažéra
TransportMode = Způsob dopravy TransportMode = Způsob dopravy
ForeignPersons = Cizí osoby ForeignPersons = Cizí osoby
TripBillResultMessageText = Zpráva z pracovní cesty
ErrFillTripBillResultMessageText = Vyplňte zprávu z pracovní cesty.

@ -1,12 +1,18 @@
<?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="10" bottomMargin="20" uuid="f59e8277-a431-4cdc-abaa-c82c1cf193af">
<property name="ireport.zoom" value="2.0"/> <property name="ireport.zoom" value="1.5"/>
<property name="ireport.x" value="176"/> <property name="ireport.x" value="0"/>
<property name="ireport.y" value="856"/> <property name="ireport.y" value="378"/>
<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["./"]]></defaultValueExpression>
</parameter> </parameter>
<parameter name="P_USER_SIGNATURE" class="java.lang.String"/> <parameter name="P_USER_SIGNATURE" class="java.lang.String"/>
<parameter name="P_LOGO" class="java.lang.String"/>
<parameter name="P_MAIN_ADDRESS" class="java.lang.String"/>
<parameter name="P_PREV_APPROVER_SIGNATURE" class="java.lang.String"/>
<parameter name="P_APPROVER_SIGNATURE" class="java.lang.String"/>
<parameter name="P_PREV_APPROVE_DATE" class="java.util.Date"/>
<parameter name="P_APPROVE_DATE" class="java.util.Date"/>
<queryString> <queryString>
<![CDATA[]]> <![CDATA[]]>
</queryString> </queryString>
@ -46,169 +52,194 @@
<field name="ownedBy.address.houseNumber" class="java.lang.String"/> <field name="ownedBy.address.houseNumber" class="java.lang.String"/>
<field name="ownedBy.address.zipCode" class="java.lang.String"/> <field name="ownedBy.address.zipCode" class="java.lang.String"/>
<field name="ownedBy.address.city" class="java.lang.String"/> <field name="ownedBy.address.city" class="java.lang.String"/>
<field name="modified" class="java.util.Date"/>
<background> <background>
<band splitType="Stretch"/> <band splitType="Stretch"/>
</background> </background>
<pageHeader> <pageHeader>
<band height="259" splitType="Stretch"> <band height="275" splitType="Stretch">
<image onErrorType="Blank">
<reportElement uuid="f9a1f9fe-b6d4-4b1d-972a-59d43b380a5b" x="440" y="206" width="130" height="43">
<printWhenExpression><![CDATA[$P{P_PREV_APPROVER_SIGNATURE} != null]]></printWhenExpression>
</reportElement>
<imageExpression><![CDATA[$P{P_PREV_APPROVER_SIGNATURE}]]></imageExpression>
</image>
<staticText> <staticText>
<reportElement uuid="6e60bd03-48b9-4555-91ab-757532d93e6a" x="10" y="47" width="143" height="20"/> <reportElement uuid="6e60bd03-48b9-4555-91ab-757532d93e6a" x="10" y="61" 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="67" width="100" height="20"/> <reportElement uuid="448ba3e9-dc29-45c4-b384-3e597d036134" x="10" y="81" 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="47" width="181" height="20"/> <reportElement uuid="62d493f1-c058-42e6-b2f5-1a691ac9e5db" x="196" y="61" 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="92" width="143" height="27"/> <reportElement uuid="86395201-6c9d-4584-a8a3-eb46dd4af411" x="143" y="106" 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="120" width="143" height="20"/> <reportElement uuid="f62e3881-5a60-45ed-997b-71f5e1c25b28" x="0" y="134" 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="90" width="1" height="75"/> <reportElement uuid="67730ab5-6550-4a51-8daa-ef3c509d44ad" x="143" y="104" width="1" height="75"/>
</line> </line>
<line> <line>
<reportElement uuid="98195ce4-de92-4643-bd50-f63d553a6235" x="0" y="165" width="572" height="1"/> <reportElement uuid="98195ce4-de92-4643-bd50-f63d553a6235" x="0" y="179" width="572" height="1"/>
</line> </line>
<staticText> <staticText>
<reportElement uuid="4827d565-87ea-4648-a5b0-6473e8814bb1" x="429" y="92" width="143" height="26"/> <reportElement uuid="4827d565-87ea-4648-a5b0-6473e8814bb1" x="429" y="106" 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="92" width="143" height="27"/> <reportElement uuid="76f85619-891b-44f4-8c7f-d1ceba0bef3c" x="0" y="106" 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="90" width="1" height="75"/> <reportElement uuid="e5c8f5ac-f7b5-4235-ba39-566b94bb6382" x="428" y="104" 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="140" width="143" height="20"/> <reportElement uuid="f758abfe-1e97-4ac0-a7e8-293438ef1d78" x="429" y="154" 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="140" width="53" height="20"/> <reportElement uuid="0db3d6e2-36e3-4c66-b4a1-2cdc555b2831" x="90" y="154" 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="120" width="143" height="40"/> <reportElement uuid="76000adf-2d9c-4c56-9471-51bc278ca433" x="286" y="134" 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="120" width="143" height="20"/> <reportElement uuid="4b1e7687-d605-46bb-aa2b-08637cff229a" x="143" y="134" 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="90" width="1" height="75"/> <reportElement uuid="70db0a7e-650a-4324-9c62-f75bcbdcbb8d" x="285" y="104" width="1" height="75"/>
</line> </line>
<staticText> <staticText>
<reportElement uuid="d52c698d-07c8-4740-a791-2df4f5cb1c6e" x="286" y="91" width="143" height="27"/> <reportElement uuid="d52c698d-07c8-4740-a791-2df4f5cb1c6e" x="286" y="105" 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="140" width="90" height="20"/> <reportElement uuid="88c08297-c140-410a-8980-02416ec62475" x="0" y="154" 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="120" width="143" height="20"/> <reportElement uuid="21724842-be95-48ba-a811-0bf7a862ae3f" x="429" y="134" 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="89" width="572" height="1"/> <reportElement uuid="dd38c006-cfb4-4b8f-abf8-986222d3bd27" x="0" y="103" 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="101" y="16" width="472" height="39"/>
<textElement textAlignment="Center"> <textElement textAlignment="Center" verticalAlignment="Bottom">
<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Í <text><![CDATA[VYÚČTOVÁNÍ
tuzemské pracovní cesty]]></text> tuzemské pracovní cesty]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement uuid="6990eca1-ad98-4545-b211-1892d039bc74" x="1" y="172" width="571" height="20"/> <reportElement uuid="6990eca1-ad98-4545-b211-1892d039bc74" x="1" y="186" 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="195" width="296" height="20"/> <reportElement uuid="9b5868e4-5034-4141-b470-8c199e81ee4e" x="0" y="209" 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" isBlankWhenNull="true">
<reportElement uuid="d7b2da96-3040-4a89-9380-0dbb55068601" x="428" y="192" width="144" height="20"/> <reportElement uuid="d7b2da96-3040-4a89-9380-0dbb55068601" x="296" y="206" width="144" height="20"/>
<textElement textAlignment="Right"/> <textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{resultMessageDate}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{resultMessageDate}]]></textFieldExpression>
</textField> </textField>
<staticText> <staticText>
<reportElement uuid="b2b60eec-df87-4385-a6d9-8d3f80cc319a" x="1" y="215" width="295" height="20"/> <reportElement uuid="b2b60eec-df87-4385-a6d9-8d3f80cc319a" x="1" y="229" 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="235" width="276" height="1"/> <reportElement uuid="0cf99b2a-b025-4a50-bcb5-8e371536bb77" x="296" y="249" width="276" height="1"/>
</line> </line>
<staticText> <staticText>
<reportElement uuid="17876cb8-7666-48f4-9275-f7a70cd08ff9" x="296" y="239" width="276" height="20"/> <reportElement uuid="17876cb8-7666-48f4-9275-f7a70cd08ff9" x="296" y="253" 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="258" width="572" height="1"/> <reportElement uuid="c67f7840-5e38-4eed-ab3f-e4907ac33b5c" x="0" y="272" 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="55" width="571" height="1"/>
</line> </line>
<line> <line>
<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="258"/> <reportElement uuid="d4738137-17c1-4721-b222-7187988c1b06" x="-1" y="1" width="1" height="272"/>
</line> </line>
<line> <line>
<reportElement uuid="bf83547c-60d9-4f95-a5f1-db0763ba17cb" x="571" y="0" width="1" height="259"/> <reportElement uuid="bf83547c-60d9-4f95-a5f1-db0763ba17cb" x="571" y="1" width="1" height="272"/>
</line> </line>
<textField> <textField isBlankWhenNull="true">
<reportElement uuid="8af60406-55bf-46f0-82e9-865dc9edbdb4" x="196" y="68" width="375" height="20"> <reportElement uuid="8af60406-55bf-46f0-82e9-865dc9edbdb4" x="196" y="82" width="375" height="20">
<printWhenExpression><![CDATA[$F{ownedBy.address} != null]]></printWhenExpression> <printWhenExpression><![CDATA[$F{ownedBy.address} != null]]></printWhenExpression>
</reportElement> </reportElement>
<textElement> <textElement>
<font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/> <font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{ownedBy.address.street} + " " + $F{ownedBy.address.houseNumber} + ", " + $F{ownedBy.address.zipCode} + " " + $F{ownedBy.address.city}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{ownedBy.address}]]></textFieldExpression>
</textField>
<image onErrorType="Blank">
<reportElement uuid="031517a3-12c1-4094-9da4-59d82aec9243" x="1" y="1" width="100" height="54">
<printWhenExpression><![CDATA[$P{P_LOGO} != null]]></printWhenExpression>
</reportElement>
<imageExpression><![CDATA[$P{P_LOGO}]]></imageExpression>
</image>
<textField>
<reportElement uuid="2541cdb2-9c7e-4d10-aa30-af0d1f5e0e2f" x="101" y="1" width="470" height="20"/>
<textElement textAlignment="Center">
<font isBold="true" pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression><![CDATA[$P{P_MAIN_ADDRESS}]]></textFieldExpression>
</textField>
<textField pattern="dd. MM. yyyy" isBlankWhenNull="false">
<reportElement uuid="d8f79af9-b603-4103-9f78-a98ef574447e" x="340" y="229" width="100" height="20"/>
<textElement verticalAlignment="Bottom"/>
<textFieldExpression><![CDATA[$P{P_PREV_APPROVE_DATE}]]></textFieldExpression>
</textField> </textField>
</band> </band>
</pageHeader> </pageHeader>
@ -239,12 +270,12 @@ tuzemské pracovní cesty]]></text>
</textElement> </textElement>
<text><![CDATA[ANO]]></text> <text><![CDATA[ANO]]></text>
</staticText> </staticText>
<textField pattern="dd. MM. yyyy"> <textField pattern="dd. MM. yyyy" isBlankWhenNull="true">
<reportElement uuid="bf1013d3-8037-4f6f-9c23-6e1d801afbeb" x="345" y="131" width="100" height="13"/> <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>
<textFieldExpression><![CDATA[new Date()]]></textFieldExpression> <textFieldExpression><![CDATA[$F{modified}]]></textFieldExpression>
</textField> </textField>
<textField pattern="###0.00;-###0.00" isBlankWhenNull="true"> <textField pattern="###0.00;-###0.00" isBlankWhenNull="true">
<reportElement uuid="d5aa48e6-f801-4633-b18b-ccc7358da1e3" x="477" y="2" width="56" height="43"/> <reportElement uuid="d5aa48e6-f801-4633-b18b-ccc7358da1e3" x="477" y="2" width="56" height="43"/>
@ -329,7 +360,7 @@ tuzemské pracovní cesty]]></text>
<textElement textAlignment="Center" verticalAlignment="Middle"/> <textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Doplatek - přeplatek]]></text> <text><![CDATA[Doplatek - přeplatek]]></text>
</staticText> </staticText>
<image> <image onErrorType="Blank">
<reportElement uuid="0a136d64-9565-4ed7-9baa-3b68aa98eada" x="450" y="106" width="113" height="36"> <reportElement uuid="0a136d64-9565-4ed7-9baa-3b68aa98eada" x="450" y="106" width="113" height="36">
<printWhenExpression><![CDATA[$P{P_USER_SIGNATURE} != null]]></printWhenExpression> <printWhenExpression><![CDATA[$P{P_USER_SIGNATURE} != null]]></printWhenExpression>
</reportElement> </reportElement>
@ -390,6 +421,18 @@ tuzemské pracovní cesty]]></text>
</detail> </detail>
<summary> <summary>
<band height="194" splitType="Prevent"> <band height="194" splitType="Prevent">
<image onErrorType="Blank">
<reportElement uuid="4c553957-3ab2-4f19-af01-577f5d3cef40" x="438" y="103" width="130" height="46">
<printWhenExpression><![CDATA[$P{P_PREV_APPROVER_SIGNATURE} != null]]></printWhenExpression>
</reportElement>
<imageExpression><![CDATA[$P{P_PREV_APPROVER_SIGNATURE}]]></imageExpression>
</image>
<image onErrorType="Blank">
<reportElement uuid="2e42de6e-3f15-42c0-8a1d-5a21809f3193" x="290" y="103" width="130" height="46">
<printWhenExpression><![CDATA[$P{P_APPROVER_SIGNATURE} != null]]></printWhenExpression>
</reportElement>
<imageExpression><![CDATA[$P{P_APPROVER_SIGNATURE}]]></imageExpression>
</image>
<staticText> <staticText>
<reportElement uuid="58e4cf15-a8e1-4b4d-b491-ad4a1825f0a3" x="281" y="5" width="30" height="15"/> <reportElement uuid="58e4cf15-a8e1-4b4d-b491-ad4a1825f0a3" x="281" y="5" width="30" height="15"/>
<textElement/> <textElement/>

@ -2,7 +2,7 @@
<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="tripRequirement" pageWidth="612" pageHeight="792" columnWidth="572" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="0b7fa2d2-d452-4a1f-b1c0-2d8e16a22525"> <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="tripRequirement" pageWidth="612" pageHeight="792" columnWidth="572" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="0b7fa2d2-d452-4a1f-b1c0-2d8e16a22525">
<property name="ireport.zoom" value="1.5"/> <property name="ireport.zoom" value="1.5"/>
<property name="ireport.x" value="0"/> <property name="ireport.x" value="0"/>
<property name="ireport.y" value="128"/> <property name="ireport.y" value="0"/>
<style name="table"> <style name="table">
<box> <box>
<pen lineWidth="1.0" lineColor="#000000"/> <pen lineWidth="1.0" lineColor="#000000"/>
@ -35,6 +35,10 @@
<parameter name="P_USER_SIGNATURE" class="java.lang.String"/> <parameter name="P_USER_SIGNATURE" class="java.lang.String"/>
<parameter name="P_APPROVE_DATE" class="java.util.Date"/> <parameter name="P_APPROVE_DATE" class="java.util.Date"/>
<parameter name="P_APPROVER_SIGNATURE" class="java.lang.String"/> <parameter name="P_APPROVER_SIGNATURE" class="java.lang.String"/>
<parameter name="P_LOGO" class="java.lang.String"/>
<parameter name="P_MAIN_ADDRESS" class="java.lang.String"/>
<parameter name="P_PREV_APPROVE_DATE" class="java.util.Date"/>
<parameter name="P_PREV_APPROVER_SIGNATURE" class="java.lang.String"/>
<field name="requirement" class="info.bukova.isspst.data.TripRequirement"/> <field name="requirement" class="info.bukova.isspst.data.TripRequirement"/>
<field name="ownedBy" class="info.bukova.isspst.data.User"/> <field name="ownedBy" class="info.bukova.isspst.data.User"/>
<field name="requirement.reqDate" class="java.util.Date"/> <field name="requirement.reqDate" class="java.util.Date"/>
@ -59,19 +63,26 @@
</background> </background>
<title> <title>
<band height="79" splitType="Stretch"> <band height="79" splitType="Stretch">
<staticText> <image onErrorType="Blank">
<reportElement uuid="50f96189-2183-4afd-915d-b5342375e988" x="0" y="30" width="572" height="20"/> <reportElement uuid="ef1dc796-f5c6-4036-99eb-26e7b6b7abbc" x="0" y="0" width="100" height="79" isRemoveLineWhenBlank="true">
<printWhenExpression><![CDATA[$P{P_LOGO} != null]]></printWhenExpression>
</reportElement>
<imageExpression><![CDATA[$P{P_LOGO}]]></imageExpression>
</image>
<textField>
<reportElement uuid="3e2074cd-220c-4c9a-b94c-a0a254cc24a6" x="100" y="0" width="471" height="34"/>
<textElement textAlignment="Center"> <textElement textAlignment="Center">
<font size="16" isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/> <font isBold="true" pdfEncoding="Cp1250"/>
</textElement> </textElement>
<text><![CDATA[Cestovní příkaz]]></text> <textFieldExpression><![CDATA[$P{P_MAIN_ADDRESS}]]></textFieldExpression>
</staticText> </textField>
<staticText> <staticText>
<reportElement uuid="5b2dc2ca-188e-4636-b617-dd5c1132246b" x="0" y="50" width="572" height="20"/> <reportElement uuid="a7a82c52-e8b8-41cf-b13a-ebc54d30d04f" x="101" y="34" width="470" height="45"/>
<textElement textAlignment="Center"> <textElement textAlignment="Center" verticalAlignment="Bottom">
<font size="16" isBold="true" pdfFontName="Helvetica-Bold"/> <font size="14" isBold="true" pdfEncoding="Cp1250"/>
</textElement> </textElement>
<text><![CDATA[k tuzemské pracovní cestě]]></text> <text><![CDATA[CESTOVNÍ PŘÍKAZ
k tuzemské pracovní cestě]]></text>
</staticText> </staticText>
</band> </band>
</title> </title>
@ -315,7 +326,7 @@ L - letadlo, P - pěšky, T - taxi]]></text>
<textElement textAlignment="Right"/> <textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{requirement.downPayment}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{requirement.downPayment}]]></textFieldExpression>
</textField> </textField>
<image> <image onErrorType="Blank">
<reportElement uuid="954e517f-5d23-4166-b776-7c31b4409ddd" x="378" y="69" 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>
@ -324,20 +335,20 @@ L - letadlo, P - pěšky, T - taxi]]></text>
<textField pattern="dd. MM. yyyy" isBlankWhenNull="true"> <textField pattern="dd. MM. yyyy" isBlankWhenNull="true">
<reportElement uuid="97daa8a7-dab0-4104-babb-c3889faac21a" x="301" y="399" width="77" height="20"/> <reportElement uuid="97daa8a7-dab0-4104-babb-c3889faac21a" x="301" y="399" width="77" height="20"/>
<textElement/> <textElement/>
<textFieldExpression><![CDATA[$P{P_APPROVE_DATE}]]></textFieldExpression> <textFieldExpression><![CDATA[$P{P_PREV_APPROVE_DATE}]]></textFieldExpression>
</textField> </textField>
<image> <image onErrorType="Blank">
<reportElement uuid="baf922bc-b6fb-4dbf-abc9-250f448baef3" x="378" y="368" width="183" height="50"> <reportElement uuid="baf922bc-b6fb-4dbf-abc9-250f448baef3" x="378" y="368" width="183" height="50">
<printWhenExpression><![CDATA[$P{P_APPROVER_SIGNATURE} != null]]></printWhenExpression> <printWhenExpression><![CDATA[$P{P_PREV_APPROVER_SIGNATURE} != null]]></printWhenExpression>
</reportElement> </reportElement>
<imageExpression><![CDATA[$P{P_APPROVER_SIGNATURE}]]></imageExpression> <imageExpression><![CDATA[$P{P_PREV_APPROVER_SIGNATURE}]]></imageExpression>
</image> </image>
<textField> <textField>
<reportElement uuid="16e5c4e2-a366-4eca-ad27-7db7fef6771c" x="186" y="27" width="375" height="20"> <reportElement uuid="16e5c4e2-a366-4eca-ad27-7db7fef6771c" x="186" y="27" width="375" height="20">
<printWhenExpression><![CDATA[$F{ownedBy.address} != null]]></printWhenExpression> <printWhenExpression><![CDATA[$F{ownedBy.address} != null]]></printWhenExpression>
</reportElement> </reportElement>
<textElement/> <textElement/>
<textFieldExpression><![CDATA[$F{ownedBy.address.street} + " " + $F{ownedBy.address.houseNumber} + ", " + $F{ownedBy.address.zipCode} + " " + $F{ownedBy.address.city}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{ownedBy.address}]]></textFieldExpression>
</textField> </textField>
</band> </band>
</detail> </detail>

@ -1,11 +1,25 @@
<?page title="${labels.ReportReport}" contentType="text/html;charset=UTF-8"?> <?page contentType="text/html;charset=UTF-8"?>
<zk> <zk>
<window border="normal" closable="true" apply="org.zkoss.bind.BindComposer" <window
viewModel="@id('vm') @init('info.bukova.isspst.ui.reporting.ReportVM')"> width="95%"
<caption src="/img/print.png" zclass="form-caption" label="${labels.ReportReport}" /> height="95%"
<toolbar> border="normal"
<toolbarbutton image="/img/send.png" tooltiptext="${labels.ReportSend}" onClick="@command('send')"/> closable="true"
</toolbar> apply="org.zkoss.bind.BindComposer"
<iframe width="800px" height="660px" src="/api/report.pdf"/> viewModel="@id('vm') @init('info.bukova.isspst.ui.reporting.ReportVM')">
</window> <caption
src="/img/print.png"
zclass="form-caption"
label="${labels.ReportReport}" />
<toolbar>
<toolbarbutton
image="/img/send.png"
tooltiptext="${labels.ReportSend}"
onClick="@command('send')" />
</toolbar>
<iframe
width="100%"
height="100%"
src="/api/report.pdf" />
</window>
</zk> </zk>

@ -1,4 +1,4 @@
<?page title="${labels.ReportReports}" contentType="text/html;charset=UTF-8"?> <?page contentType="text/html;charset=UTF-8"?>
<zk> <zk>
<window id="reportDialog" border="normal" apply="org.zkoss.bind.BindComposer" <window id="reportDialog" border="normal" apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.reporting.ReportDialogVM')" viewModel="@id('vm') @init('info.bukova.isspst.ui.reporting.ReportDialogVM')"

@ -43,37 +43,53 @@
</grid> </grid>
<grid> <grid>
<columns> <columns>
<column/> <column hflex="min" />
<column/> <column hflex="min" />
<column hflex="1" />
</columns> </columns>
<rows> <rows>
<row> <row>
<label value="${labels.TripBillResultMessage}"/> <cell>
<datebox <label value="${labels.TripBillResultMessage}" />
value="@bind(vm.dataBean.resultMessageDate)" </cell>
disabled="${disabled}" <cell>
format="${labels.DateFormat}" /> <datebox
value="@bind(vm.dataBean.resultMessageDate)"
disabled="${disabled}"
format="${labels.DateFormat}" />
</cell>
</row> </row>
<row> <row>
<cell colspan="2"> <cell rowspan="3">
<checkbox label="${labels.TripBillFreeMeals}" <textbox
checked="@bind(vm.dataBean.freeMeals)" placeholder="${labels.TripBillResultMessageText}"
onCheck="@command('calculate')" value="@bind(vm.dataBean.resultMessage)"
disabled="@load(vm.billDisabled or disabled)"/> style="resize:none"
rows="3"
cols="80" />
</cell>
<cell>
<checkbox
label="${labels.TripBillFreeMeals}"
checked="@bind(vm.dataBean.freeMeals)"
onCheck="@command('calculate')"
disabled="@load(vm.billDisabled or disabled)" />
</cell> </cell>
</row> </row>
<row> <row>
<cell colspan="2"> <cell>
<checkbox label="${labels.TripBillFreeHousing}" <checkbox
checked="@bind(vm.dataBean.freeHousing)" label="${labels.TripBillFreeHousing}"
disabled="@load(vm.billDisabled or disabled)" /> checked="@bind(vm.dataBean.freeHousing)"
disabled="@load(vm.billDisabled or disabled)" />
</cell> </cell>
</row> </row>
<row> <row>
<cell colspan="2"> <cell>
<checkbox label="${labels.TripBillFreeCarfare}" <checkbox
checked="@bind(vm.dataBean.freeCarfare)" label="${labels.TripBillFreeCarfare}"
disabled="@load(vm.billDisabled or disabled)" /> checked="@bind(vm.dataBean.freeCarfare)"
disabled="@load(vm.billDisabled or disabled)" />
</cell> </cell>
</row> </row>
</rows> </rows>

@ -1,28 +1,60 @@
<?page title="requirements" contentType="text/html;charset=UTF-8"?> <?page title="requirements" contentType="text/html;charset=UTF-8"?>
<zk> <zk>
<groupbox mold="3d"> <groupbox mold="3d">
<caption label="${labels.GlobalSettingsReqEnable}"/> <caption label="${labels.GlobalSettingsReqEnable}" />
<div> <div>
<checkbox <checkbox
label="${labels.EnableRequirements}" label="${labels.EnableRequirements}"
checked="@bind(vm.settings.enableRequirements)" disabled="@load(not vm.canSave)" /> checked="@bind(vm.settings.enableRequirements)"
</div> disabled="@load(not vm.canSave)" />
</div>
</groupbox> </groupbox>
<groupbox mold="3d"> <groupbox mold="3d">
<caption label="${labels.GlobalSettingsStamp}"/> <caption label="${labels.GlobalSettingsStamp}" />
<hbox> <hbox>
<button label="${labels.GlobalSettingsUploadStamp}" <button
upload="true,maxsize=600,accept=image/*" label="${labels.GlobalSettingsUploadStamp}"
upload="true,maxsize=600,accept=image/*"
onUpload="@command('uploadStamp')" onUpload="@command('uploadStamp')"
sclass="nicebutton" sclass="nicebutton"
disabled="@load(not vm.canSave)"/> disabled="@load(not vm.canSave)" />
<div width="400px" height="110px" style="border: 1px solid black;"> <div
<image height="100px" content="@load(vm.stampImg)"/> width="400px"
height="110px"
style="border: 1px solid black;">
<image
height="100px"
content="@load(vm.stampImg)" />
</div> </div>
</hbox> </hbox>
<button label="${labels.ButtonDelete}" <button
onClick="@command('removeStamp')" label="${labels.ButtonDelete}"
onClick="@command('removeStamp')"
sclass="nicebutton" sclass="nicebutton"
disabled="@load(not vm.canSave)"/> disabled="@load(not vm.canSave)" />
</groupbox>
<groupbox mold="3d">
<caption label="${labels.GlobalSettingsOrganizationLogo}" />
<hbox>
<button
label="${labels.GlobalSettingsUploadOrganizationLogo}"
upload="true,maxsize=600,accept=image/*"
onUpload="@command('uploadLogo')"
sclass="nicebutton"
disabled="@load(not vm.canSave)" />
<div
width="400px"
height="110px"
style="border: 1px solid black;">
<image
height="100px"
content="@load(vm.logoImg)" />
</div>
</hbox>
<button
label="${labels.ButtonDelete}"
onClick="@command('removeLogo')"
sclass="nicebutton"
disabled="@load(not vm.canSave)" />
</groupbox> </groupbox>
</zk> </zk>
Loading…
Cancel
Save