package shop.backend;


/*
Cart Pos speichert die Menge der Products ---> bekommt product und menge (quantity)
 */

public class CartPosition {
    //Produkt ist eine referenz auf product
    private Product product;
    //Die menge der produkte die gekauft werden sollen
    private int quantity;

    public CartPosition(Product product, int quantity) {
        this.product = product;
        this.quantity = quantity;
    }
    public double getTotalPrice(){
        return product.getNetPrice() * quantity;
    }
    //Habe Brutto getter vergessen
    public double getTotalBruttoPrice(){
        return product.getNetPrice() * quantity;
    }
    public double getMwstAmount() {
        return getTotalBruttoPrice() - getTotalPrice();
    }
    public double getMwstRate(){
        return product.getMwst();
    }

    public Product getProduct(){
        return product;
    }
    public int getQuantity(){
        return quantity;
    }
    public void setQuantity(int quantity){
       this.quantity = quantity;
    }
    public double getProductWeight(){
        return product.getTransportWeight();
    }



}

