U požadavků se nyní zobrazuje fakturovaná částka.
Opraveno mazání objednávek- pokud je mazaná objednávka označená jako objednaná, musíme z položek smazat číslo objednávky, aby se nabídly pro další objednávku. closes #193
This commit is contained in:
@@ -200,4 +200,22 @@ public class OrderServiceImpl extends AbstractOwnedService<Order> implements
|
|||||||
|
|
||||||
super.update(order);
|
super.update(order);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
@PreAuthorize("hasPermission(this, 'PERM_DELETE') or hasPermission(#entity, this.getDeleteEntityPermission())")
|
||||||
|
public void delete(Order order) {
|
||||||
|
for (OrderItem item : order.getItems())
|
||||||
|
{
|
||||||
|
RequirementItem rItem = item.getReqItem();
|
||||||
|
|
||||||
|
if (rItem != null)
|
||||||
|
{
|
||||||
|
rItem.setOrderNum(null);
|
||||||
|
requirementItemDao.modify(rItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
super.delete(order);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,4 +26,6 @@ public interface RequirementService extends RequirementBaseService<Requirement>
|
|||||||
public RequirementItem calcItemValuesFromItemTotal(RequirementItem item);
|
public RequirementItem calcItemValuesFromItemTotal(RequirementItem item);
|
||||||
|
|
||||||
public BigDecimal calcSumTotalFromItems(List<RequirementItem> items);
|
public BigDecimal calcSumTotalFromItems(List<RequirementItem> items);
|
||||||
|
|
||||||
|
public BigDecimal getInvoicedAmount(Requirement req);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import java.util.Date;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.hibernate.Hibernate;
|
import org.hibernate.Hibernate;
|
||||||
|
import org.hibernate.Query;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@@ -240,4 +241,15 @@ public class RequirementServiceImpl extends RequirementBaseServiceImpl<Requireme
|
|||||||
invoicingService.add(inv);
|
invoicingService.add(inv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public BigDecimal getInvoicedAmount(Requirement req) {
|
||||||
|
Query query = dao.getQuery("select invoice from Invoicing invoice join invoice.requirement rq where rq.id = :reqId");
|
||||||
|
query.setParameter("reqId", req.getId());
|
||||||
|
|
||||||
|
Invoicing inv = (Invoicing) query.uniqueResult();
|
||||||
|
|
||||||
|
return inv != null ? inv.getTotalInvoiced() : null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import info.bukova.isspst.services.requirement.RequirementService;
|
|||||||
import info.bukova.isspst.services.workgroups.WorkgroupService;
|
import info.bukova.isspst.services.workgroups.WorkgroupService;
|
||||||
import info.bukova.isspst.ui.requirement.RequirementSubpage;
|
import info.bukova.isspst.ui.requirement.RequirementSubpage;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -64,4 +65,18 @@ public class ReqListMyAll extends RequirementSubpage<Requirement>
|
|||||||
protected void beforeSelectViaUrl() {
|
protected void beforeSelectViaUrl() {
|
||||||
BindUtils.postGlobalCommand(null, null, "selectAll", null);
|
BindUtils.postGlobalCommand(null, null, "selectAll", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BigDecimal getInvoicedAmount() {
|
||||||
|
if (getDataBean() != null) {
|
||||||
|
return requirementService.getInvoicedAmount(getDataBean());
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@NotifyChange({ "dataBean", "ableToDelete", "canApprove", "invoicedAmount" })
|
||||||
|
public void setDataBean(Requirement data) {
|
||||||
|
super.setDataBean(data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import info.bukova.isspst.services.requirement.RequirementService;
|
|||||||
import info.bukova.isspst.services.workgroups.WorkgroupService;
|
import info.bukova.isspst.services.workgroups.WorkgroupService;
|
||||||
import info.bukova.isspst.ui.requirement.RequirementSubpage;
|
import info.bukova.isspst.ui.requirement.RequirementSubpage;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -64,4 +65,18 @@ public class ReqListMyCenters extends RequirementSubpage<Requirement>
|
|||||||
protected void beforeSelectViaUrl() {
|
protected void beforeSelectViaUrl() {
|
||||||
BindUtils.postGlobalCommand(null, null, "selectCentre", null);
|
BindUtils.postGlobalCommand(null, null, "selectCentre", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BigDecimal getInvoicedAmount() {
|
||||||
|
if (getDataBean() != null) {
|
||||||
|
return requirementService.getInvoicedAmount(getDataBean());
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@NotifyChange({ "dataBean", "ableToDelete", "canApprove", "invoicedAmount" })
|
||||||
|
public void setDataBean(Requirement data) {
|
||||||
|
super.setDataBean(data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import info.bukova.isspst.services.requirement.RequirementService;
|
|||||||
import info.bukova.isspst.services.workgroups.WorkgroupService;
|
import info.bukova.isspst.services.workgroups.WorkgroupService;
|
||||||
import info.bukova.isspst.ui.requirement.RequirementSubpage;
|
import info.bukova.isspst.ui.requirement.RequirementSubpage;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -64,4 +65,18 @@ public class ReqListMyWorkgroups extends RequirementSubpage<Requirement>
|
|||||||
protected void beforeSelectViaUrl() {
|
protected void beforeSelectViaUrl() {
|
||||||
BindUtils.postGlobalCommand(null, null, "selectWorkgroup", null);
|
BindUtils.postGlobalCommand(null, null, "selectWorkgroup", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BigDecimal getInvoicedAmount() {
|
||||||
|
if (getDataBean() != null) {
|
||||||
|
return requirementService.getInvoicedAmount(getDataBean());
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@NotifyChange({ "dataBean", "ableToDelete", "canApprove", "invoicedAmount" })
|
||||||
|
public void setDataBean(Requirement data) {
|
||||||
|
super.setDataBean(data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ RequirementItemUnitPrice=Jedn. cena
|
|||||||
RequirementItemTotal=Celkem
|
RequirementItemTotal=Celkem
|
||||||
RequirementItemDescription=Poznámka
|
RequirementItemDescription=Poznámka
|
||||||
|
|
||||||
|
RequirementInvoicedAmount=Fakturovaná částka:
|
||||||
|
|
||||||
|
|
||||||
AgendaMyOrders=Aktuální
|
AgendaMyOrders=Aktuální
|
||||||
AgendaOrdersHistory=Ukončené
|
AgendaOrdersHistory=Ukončené
|
||||||
|
|||||||
@@ -188,6 +188,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</listbox>
|
</listbox>
|
||||||
<div hflex="3">
|
<div hflex="3">
|
||||||
|
<vbox>
|
||||||
<include src="/main/approveStatus.zul" />
|
<include src="/main/approveStatus.zul" />
|
||||||
|
|
||||||
|
<hbox visible="@load(not empty vm.invoicedAmount)">
|
||||||
|
<label value="${labels.RequirementInvoicedAmount}"/>
|
||||||
|
<label value="@load(vm.invoicedAmount) @converter(vm.bigDecimalConverter)"/>
|
||||||
|
</hbox>
|
||||||
|
|
||||||
|
</vbox>
|
||||||
</div>
|
</div>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|||||||
@@ -188,6 +188,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</listbox>
|
</listbox>
|
||||||
<div hflex="3">
|
<div hflex="3">
|
||||||
|
<vbox>
|
||||||
<include src="/main/approveStatus.zul" />
|
<include src="/main/approveStatus.zul" />
|
||||||
|
|
||||||
|
<hbox visible="@load(not empty vm.invoicedAmount)">
|
||||||
|
<label value="${labels.RequirementInvoicedAmount}"/>
|
||||||
|
<label value="@load(vm.invoicedAmount) @converter(vm.bigDecimalConverter)"/>
|
||||||
|
</hbox>
|
||||||
|
|
||||||
|
</vbox>
|
||||||
</div>
|
</div>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|||||||
@@ -188,6 +188,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</listbox>
|
</listbox>
|
||||||
<div hflex="3">
|
<div hflex="3">
|
||||||
|
<vbox>
|
||||||
<include src="/main/approveStatus.zul" />
|
<include src="/main/approveStatus.zul" />
|
||||||
|
|
||||||
|
<hbox visible="@load(not empty vm.invoicedAmount)">
|
||||||
|
<label value="${labels.RequirementInvoicedAmount}"/>
|
||||||
|
<label value="@load(vm.invoicedAmount) @converter(vm.bigDecimalConverter)"/>
|
||||||
|
</hbox>
|
||||||
|
|
||||||
|
</vbox>
|
||||||
</div>
|
</div>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|||||||
Reference in New Issue
Block a user