package info.bukova.isspst.services.orders;

import info.bukova.isspst.data.JoinedItem;
import info.bukova.isspst.data.Order;
import info.bukova.isspst.data.OrderItem;
import info.bukova.isspst.data.Workgroup;
import info.bukova.isspst.services.Service;

import java.math.BigDecimal;
import java.util.List;

public interface OrderService extends Service<Order> {
	
	public Order createOrder(List<JoinedItem> items);
	public BigDecimal totalOrderedForWorkgroup(Workgroup workgroup);

	public BigDecimal calcTotalFromItem(OrderItem item);

	public OrderItem calcTotalInItem(OrderItem item);

	public OrderItem calcItemValuesFromItemTotal(OrderItem item);

	public BigDecimal calcSumTotalFromItems(List<OrderItem> items);

	public void addApprovedItems(Order order, boolean orderedChanged);

	public void updateApprovedItems(Order order, boolean orderedChanged);
}
