diff --git a/src/main/java/info/bukova/isspst/Constants.java b/src/main/java/info/bukova/isspst/Constants.java index 36febdb0..9578e056 100644 --- a/src/main/java/info/bukova/isspst/Constants.java +++ b/src/main/java/info/bukova/isspst/Constants.java @@ -7,10 +7,11 @@ import info.bukova.isspst.data.Role; import info.bukova.isspst.reporting.Report; import info.bukova.isspst.reporting.ReportMapping; import info.bukova.isspst.services.addressbook.AdbService; -import info.bukova.isspst.services.approved.ApprovedService; -import info.bukova.isspst.services.approved.OrderService; import info.bukova.isspst.services.buildings.BuildingService; +import info.bukova.isspst.services.invoicing.InvoicingService; import info.bukova.isspst.services.munits.MUnitService; +import info.bukova.isspst.services.orders.ApprovedService; +import info.bukova.isspst.services.orders.OrderService; import info.bukova.isspst.services.reqsubjects.MaterialService; import info.bukova.isspst.services.reqsubjects.ServiceItemService; import info.bukova.isspst.services.requirement.RequirementService; @@ -71,6 +72,7 @@ public class Constants { public final static String MOD_TRIPBILL = "TRIPBILL"; public final static String MOD_APPROVED = "APPROVED"; public final static String MOD_ORDER = "ORDER"; + public final static String MOD_INVOICING = "INVOICING"; public final static Module MODULES[] = { new Module(MOD_USERS, "Uživatelé", UserService.class), new Module(MOD_PERMISSIONS, "Práva", RoleService.class), @@ -85,7 +87,8 @@ public class Constants { new Module(MOD_WORKFLOW, "Procesy schválení", RequirementTypeService.class), new Module(MOD_TRIPBILL, "Cestovní příkazy", TripBillService.class), new Module(MOD_APPROVED, "Schválené položky požadavků", ApprovedService.class), - new Module(MOD_ORDER, "Objednávky", OrderService.class) }; + new Module(MOD_ORDER, "Objednávky", OrderService.class), + new Module(MOD_INVOICING, "Fakturace požadavků", InvoicingService.class) }; public final static String PERM_APPROVE = "PERM_APPROVE"; public final static String PERM_SHOW_WORKGROUP_REQ = "PERM_SHOW_WORKGROUP_REQ"; diff --git a/src/main/java/info/bukova/isspst/dao/InvoicingDao.java b/src/main/java/info/bukova/isspst/dao/InvoicingDao.java new file mode 100644 index 00000000..0994cddc --- /dev/null +++ b/src/main/java/info/bukova/isspst/dao/InvoicingDao.java @@ -0,0 +1,7 @@ +package info.bukova.isspst.dao; + +import info.bukova.isspst.data.Invoicing; + +public interface InvoicingDao extends BaseDao { + +} diff --git a/src/main/java/info/bukova/isspst/dao/jpa/InvoicingDaoJPA.java b/src/main/java/info/bukova/isspst/dao/jpa/InvoicingDaoJPA.java new file mode 100644 index 00000000..2b229e3b --- /dev/null +++ b/src/main/java/info/bukova/isspst/dao/jpa/InvoicingDaoJPA.java @@ -0,0 +1,9 @@ +package info.bukova.isspst.dao.jpa; + +import info.bukova.isspst.dao.InvoicingDao; +import info.bukova.isspst.data.Invoicing; + +public class InvoicingDaoJPA extends BaseDaoJPA implements InvoicingDao { + + +} diff --git a/src/main/java/info/bukova/isspst/data/Invoicing.java b/src/main/java/info/bukova/isspst/data/Invoicing.java new file mode 100644 index 00000000..6f5666c1 --- /dev/null +++ b/src/main/java/info/bukova/isspst/data/Invoicing.java @@ -0,0 +1,58 @@ +package info.bukova.isspst.data; + +import java.math.BigDecimal; +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.JoinColumn; +import javax.persistence.OneToMany; +import javax.persistence.OneToOne; +import javax.persistence.Table; + +import org.hibernate.annotations.LazyCollection; +import org.hibernate.annotations.LazyCollectionOption; + +@Entity +@Table(name = "INVOICING") +public class Invoicing extends BaseData { + + @OneToOne(fetch = FetchType.EAGER) + @JoinColumn(name = "REQUIREMENT_ID") + private Requirement requirement; + + @OneToMany(cascade = CascadeType.ALL, orphanRemoval = true) + @LazyCollection(LazyCollectionOption.TRUE) + @JoinColumn(name = "INVOICING_ID") + private List items; + + @Column(name = "TOTAL_INVOICED", precision = 15, scale = 4) + private BigDecimal totalInvoiced; + + public Requirement getRequirement() { + return requirement; + } + + public void setRequirement(Requirement requirement) { + this.requirement = requirement; + } + + public List getItems() { + return items; + } + + public void setItems(List items) { + this.items = items; + } + + public BigDecimal getTotalInvoiced() { + return totalInvoiced; + } + + public void setTotalInvoiced(BigDecimal totalInvoiced) { + this.totalInvoiced = totalInvoiced; + } + +} diff --git a/src/main/java/info/bukova/isspst/data/InvoicingItem.java b/src/main/java/info/bukova/isspst/data/InvoicingItem.java new file mode 100644 index 00000000..2dc0d360 --- /dev/null +++ b/src/main/java/info/bukova/isspst/data/InvoicingItem.java @@ -0,0 +1,87 @@ +package info.bukova.isspst.data; + +import java.math.BigDecimal; +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; + +@Entity +@Table(name = "INVOICING_ITEM") +public class InvoicingItem { + + @Id + @Column(name = "ID") + @GeneratedValue + private int id; + + @Column(name = "INVOICE_DATE") + private Date invoiceDate; + + @Column(name = "INVOICE_NUMBER") + private String invoiceNumber; + + @Column(name = "AMOUNT", precision = 15, scale = 4) + private BigDecimal amount; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public Date getInvoiceDate() { + return invoiceDate; + } + + public void setInvoiceDate(Date invoiceDate) { + this.invoiceDate = invoiceDate; + } + + public String getInvoiceNumber() { + return invoiceNumber; + } + + public void setInvoiceNumber(String invoiceNumber) { + this.invoiceNumber = invoiceNumber; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + @Override + public boolean equals(Object obj) + { + if (obj != null) + { + if (obj instanceof InvoicingItem) + { + InvoicingItem item = (InvoicingItem)obj; + + int thisId = this.getId(); + int itemId = item.getId(); + boolean equalsId = (thisId == itemId); + + if (equalsId && (thisId == 0)) + { + return super.equals(obj); + } + + return equalsId; + } + } + + return false; + } + +} diff --git a/src/main/java/info/bukova/isspst/services/invoicing/InvoicingService.java b/src/main/java/info/bukova/isspst/services/invoicing/InvoicingService.java new file mode 100644 index 00000000..d56dba55 --- /dev/null +++ b/src/main/java/info/bukova/isspst/services/invoicing/InvoicingService.java @@ -0,0 +1,19 @@ +package info.bukova.isspst.services.invoicing; + +import java.math.BigDecimal; + +import info.bukova.isspst.data.Invoicing; +import info.bukova.isspst.data.Workgroup; +import info.bukova.isspst.services.Service; + +public interface InvoicingService extends Service { + + public BigDecimal totalInvoicedForWorkgroup(Workgroup workgroup); + + public void loadReqItems(Invoicing invoicing); + + public void loadItems(Invoicing invoicing); + + public void calculate(Invoicing invoicing); + +} diff --git a/src/main/java/info/bukova/isspst/services/invoicing/InvoicingServiceImpl.java b/src/main/java/info/bukova/isspst/services/invoicing/InvoicingServiceImpl.java new file mode 100644 index 00000000..0f1bb35e --- /dev/null +++ b/src/main/java/info/bukova/isspst/services/invoicing/InvoicingServiceImpl.java @@ -0,0 +1,52 @@ +package info.bukova.isspst.services.invoicing; + +import info.bukova.isspst.data.Invoicing; +import info.bukova.isspst.data.InvoicingItem; +import info.bukova.isspst.data.Workgroup; +import info.bukova.isspst.services.AbstractOwnedService; +import info.bukova.isspst.services.LazyLoader; + +import java.math.BigDecimal; + +import org.hibernate.Hibernate; +import org.springframework.transaction.annotation.Transactional; + +public class InvoicingServiceImpl extends AbstractOwnedService implements + InvoicingService { + + @Override + public BigDecimal totalInvoicedForWorkgroup(Workgroup workgroup) { + // TODO Auto-generated method stub + return null; + } + + @Override + @Transactional + @LazyLoader("form") + public void loadReqItems(Invoicing invoicing) { + Invoicing inv = getById(invoicing.getId()); + Hibernate.initialize(inv.getRequirement().getItems()); + invoicing.getRequirement().setItems(inv.getRequirement().getItems()); + } + + @Override + @Transactional + @LazyLoader({"form", "grid"}) + public void loadItems(Invoicing invoicing) { + Invoicing inv = getById(invoicing.getId()); + Hibernate.initialize(inv.getItems()); + invoicing.setItems(inv.getItems()); + } + + @Override + public void calculate(Invoicing invoicing) { + BigDecimal total = BigDecimal.ZERO; + + for (InvoicingItem item : invoicing.getItems()) { + total = total.add(item.getAmount()); + } + + invoicing.setTotalInvoiced(total); + } + +} diff --git a/src/main/java/info/bukova/isspst/services/approved/ApprovedService.java b/src/main/java/info/bukova/isspst/services/orders/ApprovedService.java similarity index 77% rename from src/main/java/info/bukova/isspst/services/approved/ApprovedService.java rename to src/main/java/info/bukova/isspst/services/orders/ApprovedService.java index a992b985..01615a65 100644 --- a/src/main/java/info/bukova/isspst/services/approved/ApprovedService.java +++ b/src/main/java/info/bukova/isspst/services/orders/ApprovedService.java @@ -1,4 +1,4 @@ -package info.bukova.isspst.services.approved; +package info.bukova.isspst.services.orders; import info.bukova.isspst.data.JoinedItem; import info.bukova.isspst.services.Service; diff --git a/src/main/java/info/bukova/isspst/services/approved/ApprovedServiceImpl.java b/src/main/java/info/bukova/isspst/services/orders/ApprovedServiceImpl.java similarity index 97% rename from src/main/java/info/bukova/isspst/services/approved/ApprovedServiceImpl.java rename to src/main/java/info/bukova/isspst/services/orders/ApprovedServiceImpl.java index 8234267d..ab9e21d5 100644 --- a/src/main/java/info/bukova/isspst/services/approved/ApprovedServiceImpl.java +++ b/src/main/java/info/bukova/isspst/services/orders/ApprovedServiceImpl.java @@ -1,4 +1,4 @@ -package info.bukova.isspst.services.approved; +package info.bukova.isspst.services.orders; import info.bukova.isspst.data.JoinedItem; import info.bukova.isspst.data.RequirementItem; diff --git a/src/main/java/info/bukova/isspst/services/approved/OrderService.java b/src/main/java/info/bukova/isspst/services/orders/OrderService.java similarity index 94% rename from src/main/java/info/bukova/isspst/services/approved/OrderService.java rename to src/main/java/info/bukova/isspst/services/orders/OrderService.java index 0966403c..1fe1e0c2 100644 --- a/src/main/java/info/bukova/isspst/services/approved/OrderService.java +++ b/src/main/java/info/bukova/isspst/services/orders/OrderService.java @@ -1,4 +1,4 @@ -package info.bukova.isspst.services.approved; +package info.bukova.isspst.services.orders; import info.bukova.isspst.data.JoinedItem; import info.bukova.isspst.data.Order; diff --git a/src/main/java/info/bukova/isspst/services/approved/OrderServiceImpl.java b/src/main/java/info/bukova/isspst/services/orders/OrderServiceImpl.java similarity index 98% rename from src/main/java/info/bukova/isspst/services/approved/OrderServiceImpl.java rename to src/main/java/info/bukova/isspst/services/orders/OrderServiceImpl.java index 7d4cf2b6..52a37706 100644 --- a/src/main/java/info/bukova/isspst/services/approved/OrderServiceImpl.java +++ b/src/main/java/info/bukova/isspst/services/orders/OrderServiceImpl.java @@ -1,4 +1,4 @@ -package info.bukova.isspst.services.approved; +package info.bukova.isspst.services.orders; import info.bukova.isspst.dao.RequirementItemDao; import info.bukova.isspst.data.AddressEmb; diff --git a/src/main/java/info/bukova/isspst/services/requirement/RequirementBaseService.java b/src/main/java/info/bukova/isspst/services/requirement/RequirementBaseService.java index 61eb2a0f..02d320d5 100644 --- a/src/main/java/info/bukova/isspst/services/requirement/RequirementBaseService.java +++ b/src/main/java/info/bukova/isspst/services/requirement/RequirementBaseService.java @@ -6,6 +6,14 @@ import info.bukova.isspst.services.Service; import java.util.List; +/** + * @author Pepa Rokos + * @author Franta Přibyl + * + * Základní rozhraní všech požadavků. + * + * @param Třída požadavku. + */ public interface RequirementBaseService extends Service { diff --git a/src/main/java/info/bukova/isspst/services/requirement/RequirementBaseServiceImpl.java b/src/main/java/info/bukova/isspst/services/requirement/RequirementBaseServiceImpl.java index 82881c0f..7a40b444 100644 --- a/src/main/java/info/bukova/isspst/services/requirement/RequirementBaseServiceImpl.java +++ b/src/main/java/info/bukova/isspst/services/requirement/RequirementBaseServiceImpl.java @@ -30,6 +30,14 @@ import org.springframework.security.access.prepost.PostFilter; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.transaction.annotation.Transactional; +/** + * @author Pepa Rokos + * @author Franta Přibyl + * + * Abstraktní bázová třída všech požadavků + * + * @param Třída požadavku + */ public abstract class RequirementBaseServiceImpl extends AbstractOwnedService implements RequirementBaseService { @@ -249,6 +257,8 @@ public abstract class RequirementBaseServiceImpl exte } } } + + postApprove(e); } @Override @@ -257,10 +267,25 @@ public abstract class RequirementBaseServiceImpl exte public void approve(T entity) { approve(entity, getLoggedInUser()); } - + + /** + * Volá se z metody approve pro automatické schválení dalším schvalovatelem v pořadí. Metoda z báze nedělá nic. + * + * @param entity Požadavek + * @return true pokud se provedlo automatické schválení. + */ protected boolean autoApprove(T entity) { return false; } + + /** + * Činnost prováděná po schválení požadavku (i dílčím schválení). + * + * @param entity Požadavek + */ + protected void postApprove(T entity) { + + } @Override @Transactional diff --git a/src/main/java/info/bukova/isspst/services/requirement/RequirementService.java b/src/main/java/info/bukova/isspst/services/requirement/RequirementService.java index bb15c84d..770e69d1 100644 --- a/src/main/java/info/bukova/isspst/services/requirement/RequirementService.java +++ b/src/main/java/info/bukova/isspst/services/requirement/RequirementService.java @@ -6,6 +6,13 @@ import info.bukova.isspst.data.RequirementItem; import java.math.BigDecimal; import java.util.List; +/** + * @author Pepa Rokos + * @author Franta Přibyl + * + * Základní rozhraní požadavků na služby a materiál. + * + */ public interface RequirementService extends RequirementBaseService { public void loadGroups(Requirement req); diff --git a/src/main/java/info/bukova/isspst/services/requirement/RequirementServiceImpl.java b/src/main/java/info/bukova/isspst/services/requirement/RequirementServiceImpl.java index 1a0df9cd..67e66537 100644 --- a/src/main/java/info/bukova/isspst/services/requirement/RequirementServiceImpl.java +++ b/src/main/java/info/bukova/isspst/services/requirement/RequirementServiceImpl.java @@ -1,6 +1,7 @@ package info.bukova.isspst.services.requirement; import info.bukova.isspst.Constants; +import info.bukova.isspst.data.Invoicing; import info.bukova.isspst.data.Requirement; import info.bukova.isspst.data.RequirementItem; import info.bukova.isspst.data.RequirementState; @@ -8,7 +9,7 @@ import info.bukova.isspst.data.RequirementSubject; import info.bukova.isspst.data.User; import info.bukova.isspst.data.Workflow; import info.bukova.isspst.services.LazyLoader; -import info.bukova.isspst.services.approved.OrderService; +import info.bukova.isspst.services.invoicing.InvoicingService; import java.math.BigDecimal; import java.util.Date; @@ -18,13 +19,20 @@ import org.hibernate.Hibernate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; +/** + * @author Pepa Rokos + * @author Franta Přibyl + * + * Bázová třída požadavků na materiál a služby. + * + */ public class RequirementServiceImpl extends RequirementBaseServiceImpl implements RequirementService, RequirementBaseService { @Autowired private RequirementTypeService reqTypeService; @Autowired - private OrderService orderService; + private InvoicingService invoicingService; @Override protected Requirement createEntity() @@ -64,7 +72,7 @@ public class RequirementServiceImpl extends RequirementBaseServiceImpl @@ -54,11 +53,7 @@ public class TripRequirementServiceImpl extends RequirementBaseServiceImpl extends DocumentViewModel { return this.isRecordSelected(); } + + public boolean isAbleToAdd() + { + return true; + } } diff --git a/src/main/java/info/bukova/isspst/ui/dashboard/DashBoardVM.java b/src/main/java/info/bukova/isspst/ui/dashboard/DashBoardVM.java index 7be10133..44982a6b 100644 --- a/src/main/java/info/bukova/isspst/ui/dashboard/DashBoardVM.java +++ b/src/main/java/info/bukova/isspst/ui/dashboard/DashBoardVM.java @@ -3,7 +3,7 @@ package info.bukova.isspst.ui.dashboard; import info.bukova.isspst.data.Role; import info.bukova.isspst.data.User; import info.bukova.isspst.data.Workgroup; -import info.bukova.isspst.services.approved.OrderService; +import info.bukova.isspst.services.orders.OrderService; import info.bukova.isspst.services.users.UserService; import info.bukova.isspst.services.workgroups.WorkgroupService; import info.bukova.isspst.ui.DocumentViewModel; diff --git a/src/main/java/info/bukova/isspst/ui/main/approved/ApprovedList.java b/src/main/java/info/bukova/isspst/ui/main/approved/ApprovedList.java index 60369b4f..f708fab5 100644 --- a/src/main/java/info/bukova/isspst/ui/main/approved/ApprovedList.java +++ b/src/main/java/info/bukova/isspst/ui/main/approved/ApprovedList.java @@ -5,8 +5,8 @@ import info.bukova.isspst.data.Order; import info.bukova.isspst.data.User; import info.bukova.isspst.data.Workgroup; import info.bukova.isspst.filters.JoinedItemFilter; -import info.bukova.isspst.services.approved.ApprovedService; -import info.bukova.isspst.services.approved.OrderService; +import info.bukova.isspst.services.orders.ApprovedService; +import info.bukova.isspst.services.orders.OrderService; import info.bukova.isspst.services.users.UserService; import info.bukova.isspst.services.workgroups.WorkgroupService; import info.bukova.isspst.ui.BigDecimalConverter; diff --git a/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingForm.java b/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingForm.java new file mode 100644 index 00000000..09038f0b --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingForm.java @@ -0,0 +1,79 @@ +package info.bukova.isspst.ui.main.invoicing; + +import info.bukova.isspst.data.Invoicing; +import info.bukova.isspst.data.InvoicingItem; +import info.bukova.isspst.services.invoicing.InvoicingService; +import info.bukova.isspst.ui.FormViewModel; + +import org.zkoss.bind.annotation.BindingParam; +import org.zkoss.bind.annotation.Command; +import org.zkoss.bind.annotation.Init; +import org.zkoss.bind.annotation.NotifyChange; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +public class InvoicingForm extends FormViewModel { + + private InvoicingItem selectedItem; + private int selectedIndex; + @WireVariable + private InvoicingService invoicingService; + + @Init(superclass = true) + public void init() { + + } + + private void selectItem(InvoicingItem item) { + if (item != null) { + selectedItem = item; + selectedIndex = getDataBean().getItems().indexOf(item); + } else { + selectedItem = null; + selectedIndex = -1; + } + } + + @Command + @NotifyChange({"dataBean", "selectedItem", "selectedIndex"}) + public void addItem() { + InvoicingItem item = new InvoicingItem(); + getDataBean().getItems().add(item); + selectItem(item); + } + + @Command + @NotifyChange({"dataBean", "selectedItem", "selectedIndex"}) + public void removeItem(@BindingParam("item") InvoicingItem item) { + getDataBean().getItems().remove(item); + selectItem(null); + } + + @Command + @NotifyChange({"selectedItem", "selectedIndex"}) + public void onFocus(@BindingParam("item") InvoicingItem item) { + selectItem(item); + } + + @Command + @NotifyChange("dataBean") + public void calculate() { + invoicingService.calculate(getDataBean()); + } + + public InvoicingItem getSelectedItem() { + return selectedItem; + } + + public void setSelectedItem(InvoicingItem selectedItem) { + this.selectedItem = selectedItem; + } + + public int getSelectedIndex() { + return selectedIndex; + } + + public void setSelectedIndex(int selectedIndex) { + this.selectedIndex = selectedIndex; + } + +} diff --git a/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingList.java b/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingList.java new file mode 100644 index 00000000..6a5c97e8 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingList.java @@ -0,0 +1,33 @@ +package info.bukova.isspst.ui.main.invoicing; + +import info.bukova.isspst.data.Invoicing; +import info.bukova.isspst.services.invoicing.InvoicingService; +import info.bukova.isspst.ui.ListViewModel; + +import org.zkoss.bind.annotation.Init; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +public class InvoicingList extends ListViewModel { + + @WireVariable + private InvoicingService invoicingService; + + @Init(superclass = true) + public void initInvoicing() { + service = invoicingService; + dataClass = Invoicing.class; + formZul = "invoicingForm.zul"; + //dataFilter = new BuildingFilter(getFilterTemplate()); + } + + @Override + public boolean isAbleToAdd() { + return false; + } + + @Override + public boolean isAbleToDelete() { + return false; + } + +} diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/created/OrderForm.java b/src/main/java/info/bukova/isspst/ui/main/orders/created/OrderForm.java index 7177ed89..4d013a57 100644 --- a/src/main/java/info/bukova/isspst/ui/main/orders/created/OrderForm.java +++ b/src/main/java/info/bukova/isspst/ui/main/orders/created/OrderForm.java @@ -5,7 +5,7 @@ import info.bukova.isspst.data.AddressEmb; import info.bukova.isspst.data.Order; import info.bukova.isspst.data.OrderItem; import info.bukova.isspst.services.addressbook.AdbService; -import info.bukova.isspst.services.approved.OrderService; +import info.bukova.isspst.services.orders.OrderService; import info.bukova.isspst.services.settings.GlobalSettingsService; import info.bukova.isspst.ui.FormViewModel; import info.bukova.isspst.validators.OrderFormValidator; diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/created/OrderList.java b/src/main/java/info/bukova/isspst/ui/main/orders/created/OrderList.java index dd4b3403..547a0ec3 100644 --- a/src/main/java/info/bukova/isspst/ui/main/orders/created/OrderList.java +++ b/src/main/java/info/bukova/isspst/ui/main/orders/created/OrderList.java @@ -9,7 +9,7 @@ import info.bukova.isspst.data.SettingsData; import info.bukova.isspst.data.User; import info.bukova.isspst.filters.OrderFilter; import info.bukova.isspst.services.addressbook.AdbService; -import info.bukova.isspst.services.approved.OrderService; +import info.bukova.isspst.services.orders.OrderService; import info.bukova.isspst.services.settings.GlobalSettingsService; import info.bukova.isspst.services.users.UserService; import info.bukova.isspst.ui.ListViewModel; diff --git a/src/main/resources/hibernate.cfg.xml b/src/main/resources/hibernate.cfg.xml index e2aec8cd..70d8f8ef 100644 --- a/src/main/resources/hibernate.cfg.xml +++ b/src/main/resources/hibernate.cfg.xml @@ -30,5 +30,7 @@ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/locales/zk-label.properties b/src/main/webapp/WEB-INF/locales/zk-label.properties index a1fae789..85e4516a 100644 --- a/src/main/webapp/WEB-INF/locales/zk-label.properties +++ b/src/main/webapp/WEB-INF/locales/zk-label.properties @@ -330,6 +330,17 @@ OrderFormInvoiceNumber=Číslo faktury OrderFormInvoiceTotal=Částka faktury OrderPrintPrices=Tisknout ceny +Invoicing=Fakturace požadavků +InvoicingRequirementNumber=Číslo požadavku +InvoicingRequirementPrice=Cena požadavku +InvoicingInvoicedPrice=Vyfakturovaná cena +InvoicingFormTitle=Zadání fakturace +InvoicingAdd=Přidat fakturaci +InvoicingDate=Datum +InvoicingInvoiceNumber=Číslo faktury +InvoicingAmount=Částka +InvoicingDescription=Popis + HandleComboKeyFilter=#del HandleComboKey=$#del diff --git a/src/main/webapp/WEB-INF/spring/root-context.xml b/src/main/webapp/WEB-INF/spring/root-context.xml index dc990d89..aa91bad8 100644 --- a/src/main/webapp/WEB-INF/spring/root-context.xml +++ b/src/main/webapp/WEB-INF/spring/root-context.xml @@ -251,6 +251,10 @@ + + + + @@ -317,7 +321,7 @@ - + @@ -408,10 +412,15 @@ - + + + + + + diff --git a/src/main/webapp/app/mainMenu.zul b/src/main/webapp/app/mainMenu.zul index d09878c0..d78fb2fe 100644 --- a/src/main/webapp/app/mainMenu.zul +++ b/src/main/webapp/app/mainMenu.zul @@ -9,7 +9,7 @@ autodrop="true"> + href="/app/" /> @@ -34,6 +34,12 @@ label="${labels.CreatedOrders}" href="/main/orders/created/" disabled="${not sec:isAllGranted('PERM_READ_ORDER')}" /> + + diff --git a/src/main/webapp/app/toolbar.zul b/src/main/webapp/app/toolbar.zul index 74b08ea7..fca0ddb6 100644 --- a/src/main/webapp/app/toolbar.zul +++ b/src/main/webapp/app/toolbar.zul @@ -1,7 +1,7 @@ - + diff --git a/src/main/webapp/img/invoicing-016.png b/src/main/webapp/img/invoicing-016.png new file mode 100644 index 00000000..27cb359e Binary files /dev/null and b/src/main/webapp/img/invoicing-016.png differ diff --git a/src/main/webapp/img/invoicing-032.png b/src/main/webapp/img/invoicing-032.png new file mode 100644 index 00000000..6bc02a5a Binary files /dev/null and b/src/main/webapp/img/invoicing-032.png differ diff --git a/src/main/webapp/main/invoicing/index.zul b/src/main/webapp/main/invoicing/index.zul new file mode 100644 index 00000000..6a397a7b --- /dev/null +++ b/src/main/webapp/main/invoicing/index.zul @@ -0,0 +1,10 @@ + + + + + String gridZul = "invoicingGrid.zul"; + + + + + \ No newline at end of file diff --git a/src/main/webapp/main/invoicing/invoicingForm.zul b/src/main/webapp/main/invoicing/invoicingForm.zul new file mode 100644 index 00000000..5f5d546a --- /dev/null +++ b/src/main/webapp/main/invoicing/invoicingForm.zul @@ -0,0 +1,191 @@ + + + + + + + + +