<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
+ <remote-repository>
+ <option name="id" value="ZK CE" />
+ <option name="name" value="ZK CE Repository" />
+ <option name="url" value="https://mavensync.zkoss.org/maven2" />
+ </remote-repository>
+ <remote-repository>
+ <option name="id" value="ZK EVAL" />
+ <option name="name" value="ZK Evaluation Repository" />
+ <option name="url" value="https://mavensync.zkoss.org/eval" />
+ </remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
+0.0.6
* Projektek táblázat oszlopok sorrendje: Azonosító, Partner (inkább ügyfél), Név (inkább megnevezés), Kapcsolattartó. Értelemszerűen a projekt részletezésben s ügyfél és megnevezés legyen.
* A projekt részletek képernyőn össze lehetne csukni a be és a kimenő számla táblázatokat.
* Bejövő számlák: Szállító (ez most a partner), megnevezés (ez most a leírás), nettó összeg, Pénznem (ez most nincs), Fizetési határidő nem kell.
* Kimenő számlák: Vevő (ez most a partner), megnevezés (ez most a leírás), nettó összeg, pénznem (ez most nincs), fizetési határidő nem kell.
* A be és kimenő számlák felviteli képernyőjén be lehessen állítani, hogy ez egy tervezett számla-e.
* Számlakép feltöltés: pdf csatolás
-- A dátumformátum: 2023. 04. 23. Nincs hónapnév és értelemszerűen nincs idő sem.
-- Összegek: két tizedesre igazítva, magyar számformátum: pl: 100,23 1.543.234,00 2800,05
-- Tervezett számla esetén: a határidők nem ismertek, nem kötelező; áfa deviza esetén nem ismert, nem kötelező
-- Munkatárs lista és szerkesztő: név, óradíj?
-- Munkatárs hozzárendelése a projekthez (vagy fordítva)
+* Munkatárs lista és szerkesztő: név, óradíj
+0.0.7
+* Tervezett számla esetén: a határidők nem ismertek, nem kötelező; áfa deviza esetén nem ismert, nem kötelező
+0.0.8
+* Projekt szerkesztőben előbb van a kimenő számlák lista
+* Munkatárs szerkesztőben óradíj helyett havi önköltség legyen
+* Kevesebb tesztadat: 5-10 partner, 3-4 projekt szla
+* Számformátum magyarul, 2 tizedesig
+* Dátumformátum: 2023. 04. 23. nincs hónapnév és értelemszerűen nincs idő sem.
+- Munkatárs hozzárendelése a projekthez a szerkesztőben
+
+- Projekt szerkesztőben treasury műveletek lista: Eladás (aloszlop összeg és deviza), Vétel (aloszlop összeg és deviza),Üzletkötés dátuma, Értéknap
+- A treasury szerkesztőben banki visszaigazolás pdf csatolása
- Munkalap: külön lista xy hány órát (mindenki önköltség) dolgozott melyik projekten
+
- Autentikáció: AD és helyi
- Authorizáció: SAP S3 authorization objects leírás
- Munkalap rögzítés úgy, hogy raktáron lévő alkatrészt is fel lehessen vinni a munkalapra.
- Plugin: lehet egyedi testreszabási igény, de ennek valahogy el kell teljesen különülnie a "core" forráskódtól. Pl. javascript motort be lehetne építeni, a szkriptek pedig meghatározott pontokon lehetnének becsatolva a logikába. Számla részletezés volt a példa (10000EUR számla 3 részletben forintban, kérdés mennyi pl. az utsó számla összege); 10 custom mező, javascripttel futna a custom mezők módosítására.
+- Összegek: két tizedesre igazítva, magyar számformátum: pl: 100,23 1.543.234,00 2800,05
String name;
String login;
String password;
- double hourlyRate;
+ double monthlyCost;
boolean active;
}
--- /dev/null
+package hu.user.lis.db;
+
+import lombok.*;
+
+@Getter
+@Setter
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class ProjectAssociate {
+ String projectId;
+ String associateId;
+}
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>hu.user</groupId>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
+ <version>5.3.24</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
+ <version>5.3.24</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
@Override
public List<Invoice> getRandom(boolean income) {
getAll();
- int count = RandomUtils.nextInt(10, 20);
+ int count = RandomUtils.nextInt(2, 5);
List<Invoice> result = new ArrayList<>();
for (int i = 0; i < count; i++) {
int index = RandomUtils.nextInt(0, 500);
if (income) {
result.add(incomingEntities.get(index));
+ incomingEntities.remove(index);
} else {
result.add(outgoingEntities.get(index));
+ outgoingEntities.remove(index);
}
}
return result;
private List<Partner> generate() {
List<Partner> result = new ArrayList<>();
- for (int i = 0; i < 100; i++) {
+ int count = RandomUtils.nextInt(5, 10);
+ for (int i = 0; i < count; i++) {
String id = RandomStringUtils.random(8, "0123456789abcdef");
String name = dataGeneratorService.faker().name().fullName();
String vatNr = RandomStringUtils.random(12, "0123456789");
--- /dev/null
+package hu.user.lis.services.data;
+
+import hu.user.lis.db.ProjectAssociate;
+
+import java.util.Collection;
+
+public interface ProjectAssociateService {
+ ProjectAssociate createNew(String projectId, String associateId);
+
+ void add(ProjectAssociate entity);
+
+ void remove(ProjectAssociate entity);
+
+ String toString(ProjectAssociate sourceEntity);
+
+ Collection<ProjectAssociate> getAll();
+}
--- /dev/null
+package hu.user.lis.services.data;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import hu.user.lis.db.Associate;
+import hu.user.lis.db.Project;
+import hu.user.lis.db.ProjectAssociate;
+import lombok.extern.log4j.Log4j2;
+import org.apache.commons.lang3.RandomUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+@Log4j2
+public class ProjectAssociateServiceImpl implements ProjectAssociateService {
+ @Autowired
+ ObjectMapper mapper;
+ @Autowired
+ ProjectService projectService;
+ @Autowired
+ AssociateService associateService;
+ private List<ProjectAssociate> entities;
+
+ @Override
+ public List<ProjectAssociate> getAll() {
+ if (entities == null) {
+ entities = generate();
+ }
+ return entities;
+ }
+
+ @Override
+ public ProjectAssociate createNew(String projectId, String associateId) {
+ return ProjectAssociate.builder().projectId(projectId).associateId(associateId).build();
+ }
+
+ @Override
+ public void add(ProjectAssociate entity) {
+ entities.add(entity);
+ }
+
+ @Override
+ public void remove(ProjectAssociate entity) {
+ entities.remove(entity);
+ }
+
+ private List<ProjectAssociate> generate() {
+ List<ProjectAssociate> result = new ArrayList<>();
+ List<Project> projects = projectService.getAll();
+ for (Project project : projects) {
+ int associatesCount = RandomUtils.nextInt(1, 5);
+ for (int i = 0; i < associatesCount; i++) {
+ Associate associate = associateService.getRandom();
+ ProjectAssociate entity = ProjectAssociate.builder().projectId(project.getId()).associateId(associate.getId()).build();
+ result.add(entity);
+ }
+ }
+ return result;
+ }
+
+ @Override
+ public String toString(ProjectAssociate sourceEntity) {
+ String result = null;
+ try {
+ result = mapper.writeValueAsString(sourceEntity);
+ } catch (JsonProcessingException e) {
+ log.catching(e);
+ }
+ return result;
+ }
+
+}
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>hu.user</groupId>
<repository>
<id>ZK CE</id>
<name>ZK CE Repository</name>
- <url>http://mavensync.zkoss.org/maven2</url>
+ <url>https://mavensync.zkoss.org/maven2</url>
</repository>
</repositories>
<properties>
- <zkspringboot.version>1.0.4</zkspringboot.version>
+ <zkspringboot.version>2.7.7</zkspringboot.version>
<zk.version>9.6.0</zk.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
- <version>5.2.0.RELEASE</version>
+ <version>5.3.24</version>
</dependency>
<dependency>
<groupId>org.zkoss.zkspringboot</groupId>
<artifactId>zkspringboot-starter</artifactId>
+ <type>pom</type>
<version>${zkspringboot.version}</version>
</dependency>
- <dependency>
- <groupId>org.zkoss.zk</groupId>
- <artifactId>zk</artifactId>
- <version>${zk.version}</version>
- </dependency>
- <dependency>
- <groupId>org.zkoss.zk</groupId>
- <artifactId>zul</artifactId>
- <version>${zk.version}</version>
- </dependency>
- <dependency>
- <groupId>org.zkoss.zk</groupId>
- <artifactId>zkbind</artifactId>
- <version>${zk.version}</version>
- </dependency>
<dependency>
<groupId>org.zkoss.zk</groupId>
<artifactId>zkplus</artifactId>
<version>${zk.version}</version>
</dependency>
- <dependency>
- <groupId>org.zkoss.zk</groupId>
- <artifactId>zhtml</artifactId>
- <version>${zk.version}</version>
- </dependency>
<dependency>
<groupId>org.zkoss.theme</groupId>
<artifactId>silvertail</artifactId>
return "admin/index";
}
- @GetMapping({"/projects", "/associates", "/project/**"})
+ @GetMapping({"/projects", "/associates", "/project-associates", "/project/**"})
public String index() {
return "index";
}
--- /dev/null
+package hu.user.lis.ui.converter;
+
+import org.zkoss.bind.BindContext;
+import org.zkoss.bind.Converter;
+import org.zkoss.zul.Listcell;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public class DateToStringConverter implements Converter<String, Date, Listcell> {
+ private SimpleDateFormat df = new SimpleDateFormat("yyyy. MM. dd.");
+
+ @Override
+ public String coerceToUi(Date date, Listcell listCell, BindContext bindContext) {
+ return df.format(date);
+ }
+
+ @Override
+ public Date coerceToBean(String data, Listcell listCell, BindContext bindContext) {
+ return null;
+ }
+}
--- /dev/null
+package hu.user.lis.ui.converter;
+
+import org.zkoss.bind.BindContext;
+import org.zkoss.bind.Converter;
+import org.zkoss.zul.Listcell;
+
+import java.math.RoundingMode;
+import java.text.NumberFormat;
+import java.util.Locale;
+
+public class DoubleToStringConverter implements Converter<String, Double, Listcell> {
+ static private NumberFormat nf = NumberFormat.getInstance(new Locale("hu", "HU"));
+
+ static {
+ nf.setMaximumFractionDigits(2);
+ nf.setRoundingMode(RoundingMode.CEILING);
+ }
+
+ @Override
+ public String coerceToUi(Double date, Listcell listCell, BindContext bindContext) {
+ return nf.format(date);
+ }
+
+ @Override
+ public Double coerceToBean(String data, Listcell listCell, BindContext bindContext) {
+ return null;
+ }
+}
}
public void search(String partialName) {
- log.info("Searching ssociate using filters: name LIKE {}",
- partialName);
+ log.info("Searching associate using filters: name LIKE {}", partialName);
listAll = false;
this.partialName = partialName;
super.reset();
public void search(boolean filterShowActive, boolean filterShowInActive) {
- log.info("Searching partner using filters: filterShowActive {}, filterShowInActive {}",
+ log.info("Searching associate using filters: filterShowActive {}, filterShowInActive {}",
filterShowActive, filterShowInActive);
this.filterShowActive = filterShowActive;
this.filterShowInActive = filterShowInActive;
--- /dev/null
+package hu.user.lis.ui.data;
+
+import hu.user.lis.db.ProjectAssociate;
+import hu.user.lis.services.data.ProjectAssociateService;
+import lombok.Getter;
+import lombok.extern.log4j.Log4j2;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.config.ConfigurableBeanFactory;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.zkoss.bind.BindUtils;
+import org.zkoss.zul.FieldComparator;
+
+import java.util.Comparator;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Component
+@Log4j2
+@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+public class ProjectAssociatesDataModel extends CachedDataModel<ProjectAssociate> {
+ @Getter
+ @Autowired
+ ProjectAssociateService projectAssociateService;
+ private String projectId;
+
+
+ private boolean canExecuteSearch() {
+ boolean result = StringUtils.isNotBlank(projectId);
+ log.info("Can execute search: {}", result);
+ return result;
+ }
+
+ private boolean filter(ProjectAssociate projectAssociate) {
+ boolean result = true;
+ if (StringUtils.isNotBlank(projectId)) {
+ if (!projectAssociate.getProjectId().equals(projectId)) {
+ result = false;
+ }
+ }
+ return result;
+ }
+
+ @Override
+ protected List<ProjectAssociate> getResultSet(long offset, int limit, FieldComparator sortComparator) {
+ List<ProjectAssociate> result = null;
+ if (canExecuteSearch()) {
+ result = projectAssociateService.getAll().stream()
+ .filter(s -> filter(s))
+ .sorted(Comparator.comparing(ProjectAssociate::getAssociateId))
+ .collect(Collectors.toList());
+ }
+ return result;
+ }
+
+ @Override
+ public int getResultSetCount() {
+ int result = 0;
+ if (canExecuteSearch()) {
+ result = (int) projectAssociateService.getAll().stream()
+ .filter(s -> filter(s))
+ .count();
+ }
+ return result;
+ }
+
+ public void search(String projectId) {
+ log.info("Searching project associate using filters: projectId LIKE {}", projectId);
+ this.projectId = projectId;
+ super.reset();
+ BindUtils.postNotifyChange(null, null, this, "*");
+ }
+
+}
@Log4j2
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class ProjectsDataModel extends CachedDataModel<Project> {
- private String partialName;
- private String partialHumanId;
- private boolean listAll;
-
@Getter
@Autowired
ProjectService projectService;
+ private String partialName;
+ private String partialHumanId;
+ private boolean listAll;
private boolean filterShowInActive;
private boolean filterShowActive;
}
public void listAll() {
- log.info("List all partners");
+ log.info("List all projects");
listAll = true;
super.reset();
BindUtils.postNotifyChange(null, null, this, "*");
if (StringUtils.isBlank(newData.getName()) ||
StringUtils.isBlank(newData.getLogin()) ||
StringUtils.isBlank(newData.getPassword()) ||
- newData.getHourlyRate() < 1
+ newData.getMonthlyCost() < 1
) {
log.info("Document is not valid");
updateFormInvalid(true);
return;
}
- if (newData.getNetAmount() <= 0 ||
- newData.getGrossAmount() <= 0 ||
- newData.getVatAmount() <= 0 ||
- StringUtils.isBlank(newData.getTitle()) ||
- Objects.isNull(newData.getPartner()) ||
- Objects.isNull(newData.getCompletionDate()) ||
- Objects.isNull(newData.getCreateDate()) ||
- Objects.isNull(newData.getPaymentDeadline()) ||
- newData.getCreateDate().after(newData.getCompletionDate()) ||
- newData.getCompletionDate().after(newData.getPaymentDeadline())
- ) {
+ boolean invalid = false;
+ if (newData.isPlanned()) {
+ if (newData.getNetAmount() <= 0 ||
+ StringUtils.isBlank(newData.getTitle()) ||
+ Objects.isNull(newData.getPartner())
+ ) {
+ invalid = true;
+ }
+
+ if (!Currency.HUF.equals(newData.getCurrency())) {
+ if (newData.getGrossAmount() <= 0 || newData.getVatAmount() <= 0) {
+ invalid = true;
+ }
+ }
+ } else {
+ if (newData.getNetAmount() <= 0 ||
+ newData.getGrossAmount() <= 0 ||
+ newData.getVatAmount() <= 0 ||
+ StringUtils.isBlank(newData.getTitle()) ||
+ Objects.isNull(newData.getPartner()) ||
+ Objects.isNull(newData.getCompletionDate()) ||
+ Objects.isNull(newData.getCreateDate()) ||
+ Objects.isNull(newData.getPaymentDeadline()) ||
+ newData.getCreateDate().after(newData.getCompletionDate()) ||
+ newData.getCompletionDate().after(newData.getPaymentDeadline())
+ ) {
+ invalid = true;
+ }
+ }
+
+ if (invalid) {
log.info("Document is not valid");
updateFormInvalid(true);
}
import com.fasterxml.jackson.core.JsonProcessingException;
import com.google.common.collect.ImmutableMap;
+import hu.user.lis.db.Associate;
import hu.user.lis.db.Invoice;
import hu.user.lis.db.Project;
import hu.user.lis.services.data.InvoiceService;
+import hu.user.lis.services.data.ProjectAssociateService;
import hu.user.lis.services.data.ProjectService;
import hu.user.lis.ui.Constants;
+import hu.user.lis.ui.data.AssociatesDataModel;
import hu.user.lis.ui.data.PartnerSelectorDataModel;
import hu.user.lis.ui.event.EventBus;
import lombok.Getter;
@Setter
@VariableResolver(DelegatingVariableResolver.class)
public class ProjectEditorModel extends AbstractValidator implements EventListener {
+ @WireVariable
+ AssociatesDataModel associatesDataModel;
+ @WireVariable
+ ProjectAssociateService projectAssociateServiceImpl;
private Project formDocument;
private Project origDocument;
@WireVariable
private Invoice selectedIncomingInvoice;
private Invoice selectedOutgoingInvoice;
+ private String partialAssociateName;
+
+ private Map<String, Boolean> origAssociates;
+ private Map<String, Boolean> formAssociates;
+
public ProjectEditorModel() {
}
private void validate(Project newData) {
updateFormInvalid(false);
- if (!Objects.isNull(origDocument) && projectServiceImpl.toString(origDocument).equals(projectServiceImpl.toString(newData))) {
- log.info("Document not changed");
- updateFormInvalid(true);
+ if (!Objects.isNull(origDocument)) {
+ boolean invalid = projectServiceImpl.toString(origDocument).equals(projectServiceImpl.toString(newData))
+ && !isAssociatesChanged();
+ updateFormInvalid(invalid);
return;
}
origDocument = (Project) data.get("origDocument");
formDocument = (Project) data.get("formDocument");
BindUtils.postNotifyChange(this, "formDocument");
- //Clients.evalJavaScript(String.format("pushNav('/project/%s')", formDocument.getId()));
+ associatesDataModel.listAll();
}
}
panel.setOpen(!panel.isOpen());
parentPanel.invalidate();
}
+
+ @Command
+ @NotifyChange("associates")
+ public void onAfterRenderAssociates() {
+ formAssociates = new HashMap<>();
+ for (int i = 1; i < associatesDataModel.getSize() + 1; i++) {
+ Associate associate = associatesDataModel.getElementAt(i);
+ boolean exists = projectAssociateServiceImpl.getAll().stream()
+ .anyMatch(
+ pa -> pa.getProjectId().equals(formDocument.getId()) &&
+ pa.getAssociateId().equals(associate.getId())
+ );
+ if (exists) {
+ log.info("{} is on project {}", associate.getName(), formDocument.getName());
+ }
+ formAssociates.put(associate.getId(), exists);
+ }
+ }
+
+ private boolean isAssociatesChanged() {
+ return formAssociates.entrySet().stream()
+ .anyMatch(e -> !e.getValue().equals(origAssociates.get(e.getKey())));
+ }
+
+ @Command
+ public void onAssociateChecked() {
+ log.info("Associate checked");
+ validate(projectServiceImpl.copy(formDocument));
+ }
}
@Getter
@Setter
public class IndexViewModel implements EventListener {
- public static final String PROJECT_EDITOR_PAGE = "~./project-editor.zul";
private static final String PARTNERS_LIST = "~./partners.zul";
private static final String PROJECTS_LIST = "~./projects.zul";
private static final String PROJECT_EDITOR = "~./project-editor.zul";
private static final String ASSOCIATES_LIST = "~./associates.zul";
+ private static final String PROJECT_ASSOCIATES_LIST = "~./project-associates.zul";
+
@WireVariable
BuildProperties buildProperties;
@WireVariable
private Map<String, String> navigation = ImmutableMap.of(
"/projects", PROJECTS_LIST,
"/project", PROJECT_EDITOR,
- "/associates", ASSOCIATES_LIST
+ "/associates", ASSOCIATES_LIST,
+ "/project-associates", PROJECT_ASSOCIATES_LIST
);
@Init
@Override
public void onEvent(Event event) {
if (Constants.SHOW_PROJECT_EDITOR.equals(event.getName())) {
- selectPage(PROJECT_EDITOR_PAGE);
+ selectPage(PROJECT_EDITOR);
eventBus.setProjectEditorData(event.getData());
}
if (Constants.SHOW_PROJECTS_LIST.equals(event.getName())) {
forward="onOK=submit.onClick, onCancel=cancel.onClick"/>
<button iconSclass="z-icon-eye"/>
</hlayout>
- <label value="Óradíj"/>
- <doublebox value="@bind(vm.formDocument.hourlyRate) @validator(vm)"
- format="#.##" instant="true"
+ <label value="Havi önköltség"/>
+ <doublebox value="@bind(vm.formDocument.monthlyCost) @validator(vm)"
+ format="locale:hu-HU" instant="true"
forward="onOK=submit.onClick, onCancel=cancel.onClick"/>
<label value="Aktív"/>
<checkbox mold="switch" checked="@bind(vm.formDocument.active)"/>
<vlayout>
<label value="Nettó összeg"/>
<doublebox value="@bind(vm.formDocument.netAmount) @validator(vm)"
- format="#.##" instant="true"
+ format="locale:hu-HU" instant="true"
onChange="@command('onNetAmountChange')"
forward="onOK=submit.onClick, onCancel=cancel.onClick"/>
</vlayout>
<vlayout>
<label value="Bruttó összeg"/>
<doublebox value="@bind(vm.formDocument.grossAmount) @validator(vm)"
- format="#.##" instant="true"
+ format="locale:hu-HU" instant="true"
forward="onOK=submit.onClick, onCancel=cancel.onClick"/>
</vlayout>
<vlayout>
<label value="ÁFA"/>
<doublebox value="@bind(vm.formDocument.vatAmount) @validator(vm)"
- format="#.##" instant="true"
+ format="locale:hu-HU" instant="true"
forward="onOK=submit.onClick, onCancel=cancel.onClick"/>
</vlayout>
</hlayout>
<hlayout>
<vlayout>
<label value="Kiállítás dátuma"/>
- <datebox instant="true" locale="hu"
+ <datebox instant="true" format="yyyy. MM. dd."
value="@bind(vm.formDocument.createDate) @validator(vm)"
forward="onOK=submit.onClick, onCancel=cancel.onClick"/>
</vlayout>
<vlayout>
<label value="Teljesítés dátuma"/>
- <datebox instant="true" locale="hu"
+ <datebox instant="true" format="yyyy. MM. dd."
value="@bind(vm.formDocument.completionDate) @validator(vm)"
forward="onOK=submit.onClick, onCancel=cancel.onClick"/>
</vlayout>
<vlayout>
<label value="Fizetési határidő"/>
- <datebox instant="true" locale="hu"
+ <datebox instant="true" format="yyyy. MM. dd."
value="@bind(vm.formDocument.paymentDeadline) @validator(vm)"
forward="onOK=submit.onClick, onCancel=cancel.onClick"/>
</vlayout>
<menuseparator/>
<menuitem iconSclass="z-icon-user" label="Munkatársak"
onClick="@command(vm.selectPage('~./associates.zul'))"/>
+ <menuitem iconSclass="z-icon-user" label="Résztvevők"
+ onClick="@command(vm.selectPage('~./project-associates.zul'))"/>
</menubar>
<hbox hflex="min" pack="right">
<textbox value="@bind(vm.searchPhrase)" onOK="@command('search')"></textbox>
<vlayout>
<label value="Nettó összeg"/>
<doublebox value="@bind(vm.formDocument.netAmount) @validator(vm)"
- format="#.##" instant="true"
+ format="locale:hu-HU" instant="true"
onChange="@command('onNetAmountChange')"
forward="onOK=submit.onClick, onCancel=cancel.onClick"/>
</vlayout>
<vlayout>
<label value="Bruttó összeg"/>
<doublebox value="@bind(vm.formDocument.grossAmount) @validator(vm)"
- format="#.##" instant="true"
+ format="locale:hu-HU" instant="true"
forward="onOK=submit.onClick, onCancel=cancel.onClick"/>
</vlayout>
<vlayout>
<label value="ÁFA"/>
<doublebox value="@bind(vm.formDocument.vatAmount) @validator(vm)"
- format="#.##" instant="true"
+ format="locale:hu-HU" instant="true"
forward="onOK=submit.onClick, onCancel=cancel.onClick"/>
</vlayout>
</hlayout>
<hlayout>
<vlayout>
<label value="Kiállítás dátuma"/>
- <datebox instant="true" locale="hu"
+ <datebox instant="true" format="yyyy. MM. dd."
value="@bind(vm.formDocument.createDate) @validator(vm)"
forward="onOK=submit.onClick, onCancel=cancel.onClick"/>
</vlayout>
<vlayout>
<label value="Teljesítés dátuma"/>
- <datebox instant="true" locale="hu"
+ <datebox instant="true" format="yyyy. MM. dd."
value="@bind(vm.formDocument.completionDate) @validator(vm)"
forward="onOK=submit.onClick, onCancel=cancel.onClick"/>
</vlayout>
<vlayout>
<label value="Fizetési határidő"/>
- <datebox instant="true" locale="hu"
+ <datebox instant="true" format="yyyy. MM. dd."
value="@bind(vm.formDocument.paymentDeadline) @validator(vm)"
forward="onOK=submit.onClick, onCancel=cancel.onClick"/>
</vlayout>
</tabpanel>
</tabpanels>
</tabbox>
+ <panel collapsible="true" open="false" border="rounded"
+ onOpen="@command('onOpenInvoicePanel', parentPanel=centerPanel)">
+ <caption label="Kimenő számlák"
+ onClick="@command('onClickInvoicePanel', parentPanel=centerPanel, panel=self.parent)"/>
+ <panelchildren>
+ <vlayout>
+ <toolbar>
+ <toolbarbutton label="Hozzáadás" iconSclass="z-icon-plus"
+ onClick="@command('onAddOutgoing')"/>
+ <toolbarbutton label="Szerkesztés" iconSclass="z-icon-edit"
+ onClick="@command('onEditOutgoing')"
+ disabled="@load(empty vm.selectedOutgoingInvoice)"/>
+ <toolbarbutton label="Törlés" iconSclass="z-icon-remove"
+ onClick="@command('onRemoveOutgoing')"
+ disabled="@load(empty vm.selectedOutgoingInvoice)"/>
+ </toolbar>
+ <listbox model="@load(vm.formDocument.outgoingInvoices)"
+ selectedItem="@bind(vm.selectedOutgoingInvoice)"
+ onDoubleClick="@command('onEditOutgoing')"
+ forward="onOK=submit.onClick, onCancel=cancel.onClick">
+ <listhead>
+ <listheader label="Vevő" align="left"/>
+ <listheader label="Megnevezés" align="left"/>
+ <listheader label="Nettó összeg" align="left"/>
+ <listheader label="Pénznem" align="left"/>
+ <listheader label="Fizetési határidő" align="left"/>
+ </listhead>
+ <template name="model">
+ <listitem>
+ <listcell label="@load(each.partner.name)"/>
+ <listcell label="@load(each.title)"/>
+ <listcell
+ label="@load(each.netAmount) @converter('hu.user.lis.ui.converter.DoubleToStringConverter')"/>
+ <listcell label="@load(each.currency)"/>
+ <listcell
+ label="@load(each.paymentDeadline) @converter('hu.user.lis.ui.converter.DateToStringConverter')"/>
+ </listitem>
+ </template>
+ </listbox>
+ </vlayout>
+ </panelchildren>
+ </panel>
<panel collapsible="true" open="false" border="rounded"
onOpen="@command('onOpenInvoicePanel', parentPanel=centerPanel)">
<listheader label="Megnevezés" align="left"/>
<listheader label="Nettó összeg" align="left"/>
<listheader label="Pénznem" align="left"/>
+ <listheader label="Fizetési határidő" align="left"/>
</listhead>
<template name="model">
<listitem>
<listcell label="@load(each.partner.name)"/>
<listcell label="@load(each.title)"/>
- <listcell label="@load(each.netAmount)"/>
+ <listcell
+ label="@load(each.netAmount) @converter('hu.user.lis.ui.converter.DoubleToStringConverter')"/>
<listcell label="@load(each.currency)"/>
+ <listcell
+ label="@load(each.paymentDeadline) @converter('hu.user.lis.ui.converter.DateToStringConverter')"/>
</listitem>
</template>
</listbox>
</vlayout>
</panelchildren>
-
</panel>
+
<panel collapsible="true" open="false" border="rounded"
onOpen="@command('onOpenInvoicePanel', parentPanel=centerPanel)">
- <caption label="Kimenő számlák"
+ <caption label="Treasury műveletek"
onClick="@command('onClickInvoicePanel', parentPanel=centerPanel, panel=self.parent)"/>
<panelchildren>
<vlayout>
<toolbar>
<toolbarbutton label="Hozzáadás" iconSclass="z-icon-plus"
- onClick="@command('onAddOutgoing')"/>
+ onClick="@command('onAddIncoming')"/>
<toolbarbutton label="Szerkesztés" iconSclass="z-icon-edit"
- onClick="@command('onEditOutgoing')"
- disabled="@load(empty vm.selectedOutgoingInvoice)"/>
+ onClick="@command('onEditIncoming')"
+ disabled="@load(empty vm.selectedIncomingInvoice)"/>
<toolbarbutton label="Törlés" iconSclass="z-icon-remove"
- onClick="@command('onRemoveOutgoing')"
- disabled="@load(empty vm.selectedOutgoingInvoice)"/>
+ onClick="@command('onRemoveIncoming')"
+ disabled="@load(empty vm.selectedIncomingInvoice)"/>
</toolbar>
- <listbox model="@load(vm.formDocument.outgoingInvoices)"
- selectedItem="@bind(vm.selectedOutgoingInvoice)"
- onDoubleClick="@command('onEditOutgoing')"
+
+ <listbox model="@load(vm.formDocument.incomingInvoices)"
+ selectedItem="@bind(vm.selectedIncomingInvoice)"
+ onDoubleClick="@command('onEditIncoming')"
forward="onOK=submit.onClick, onCancel=cancel.onClick">
<listhead>
- <listheader label="Vevő" align="left"/>
+ <listheader label="Szállító" align="left"/>
<listheader label="Megnevezés" align="left"/>
<listheader label="Nettó összeg" align="left"/>
<listheader label="Pénznem" align="left"/>
+ <listheader label="Fizetési határidő" align="left"/>
</listhead>
<template name="model">
<listitem>
<listcell label="@load(each.partner.name)"/>
<listcell label="@load(each.title)"/>
- <listcell label="@load(each.netAmount)"/>
+ <listcell
+ label="@load(each.netAmount) @converter('hu.user.lis.ui.converter.DoubleToStringConverter')"/>
<listcell label="@load(each.currency)"/>
+ <listcell
+ label="@load(each.paymentDeadline) @converter('hu.user.lis.ui.converter.DateToStringConverter')"/>
</listitem>
</template>
</listbox>
</vlayout>
</panelchildren>
+ </panel>
+
+ <panel collapsible="true" open="false" border="rounded"
+ onOpen="@command('onOpenInvoicePanel', parentPanel=centerPanel)">
+ <caption label="Résztvevők"
+ onClick="@command('onClickInvoicePanel', parentPanel=centerPanel, panel=self.parent)"/>
+ <panelchildren>
+ <vlayout>
+ <toolbar>
+ <textbox value="@bind(vm.partialAssociateName)" instant="true"
+ onChanging="@command('searchAssociate')"/>
+ </toolbar>
+ <listbox model="@load(vm.associatesDataModel)"
+ autopaging="true" pagingPosition="top" multiple="false"
+ onAfterRender="@command('onAfterRenderAssociates')">
+ <custom-attributes org.zkoss.zul.listbox.selectOnHighlight.disabled="true"/>
+ <listhead>
+ <listheader hflex="min" label="Tag" align="left"/>
+ <listheader label="Név" align="left"/>
+ <listheader label="Login" align="left"/>
+ </listhead>
+ <template name="model">
+ <listitem>
+ <listcell>
+ <checkbox checked="@bind(vm.formAssociates[each.id])"
+ onCheck="@command('onAssociateChecked')"/>
+ </listcell>
+ <listcell label="@load(each.name)"/>
+ <listcell label="@load(each.login)"/>
+ </listitem>
+ </template>
+ </listbox>
+ </vlayout>
+ </panelchildren>
</panel>
+
</vlayout>
</center>
<south border="none" flex="true" style="text-align: right; padding: 10px;">
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
- <version>2.2.4.RELEASE</version>
+ <version>2.7.7</version>
<relativePath/>
</parent>
<repositories>