package com.reallinkbilling.utils;

import com.reallinkbilling.DAO.ProductBarcodeDetailsDAO;

public class LabelCapProduct {

	private String productId;
	private String productName;
	private String productNameMar;
	private String productCode;
	private String alias;
	private String lowStockCount;
	private Float purchaseRate;
	private Float customerSalesPrice;
	private Float dealerSalesPrice;
	private Float retailerSalesPrice;
	private String taxId;
	private Float taxPercentage;
	private String purchaseUnit;
	private String salesUnit;
	private String hsnCode;
	private String stockConversionRatio;
	private String rackNumber;
	private Float barcodeMrp;
	private String discountType;
	private Float discount;
	private Float salesPrice;
	private Float defaultBarcodeQty;
	private boolean newlyCreated;

	public ProductBarcodeDetailsDAO toBarcodeDao(float stockQty) {
		ProductBarcodeDetailsDAO dao = new ProductBarcodeDetailsDAO();
		dao.setProductId(this.productId);
		dao.setProductCode(this.productCode);
		dao.setProductNameEn(this.productName);
		dao.setProductNameMr(this.productNameMar);
		int tax = 0;
		try {
			if (this.taxId != null && !this.taxId.equals("")) {
				tax = Integer.parseInt(this.taxId);
			}
		} catch (Exception e) {
			tax = 0;
		}
		dao.setTaxId(tax);
		dao.setTaxPercentage(this.taxPercentage == null ? 0F : this.taxPercentage);
		dao.setSalesUnit(this.salesUnit);
		dao.setHsnSacCode(this.hsnCode);
		dao.setBarcodeMRP(this.barcodeMrp == null ? 0F : this.barcodeMrp);
		dao.setDiscountType(this.discountType);
		dao.setDiscount(this.discount == null ? 0F : this.discount);
		dao.setSalesPrice(this.salesPrice == null ? 0F : this.salesPrice);
		dao.setBarCodeQuantity(this.defaultBarcodeQty == null ? 1F : this.defaultBarcodeQty);
		dao.setProductAlias(this.alias == null ? "NA" : this.alias);
		dao.setInStockQuantity(stockQty);
		dao.setInStockQuantity2(0F);
		dao.setPurchasePrice(this.purchaseRate == null ? 0F : this.purchaseRate);
		dao.setCustomerSalePrice(this.customerSalesPrice == null ? 0F : this.customerSalesPrice);
		return dao;
	}

	public String getProductId() {
		return productId;
	}

	public void setProductId(String productId) {
		this.productId = productId;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public String getProductNameMar() {
		return productNameMar;
	}

	public void setProductNameMar(String productNameMar) {
		this.productNameMar = productNameMar;
	}

	public String getProductCode() {
		return productCode;
	}

	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}

	public String getAlias() {
		return alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public String getLowStockCount() {
		return lowStockCount;
	}

	public void setLowStockCount(String lowStockCount) {
		this.lowStockCount = lowStockCount;
	}

	public Float getPurchaseRate() {
		return purchaseRate;
	}

	public void setPurchaseRate(Float purchaseRate) {
		this.purchaseRate = purchaseRate;
	}

	public Float getCustomerSalesPrice() {
		return customerSalesPrice;
	}

	public void setCustomerSalesPrice(Float customerSalesPrice) {
		this.customerSalesPrice = customerSalesPrice;
	}

	public Float getDealerSalesPrice() {
		return dealerSalesPrice;
	}

	public void setDealerSalesPrice(Float dealerSalesPrice) {
		this.dealerSalesPrice = dealerSalesPrice;
	}

	public Float getRetailerSalesPrice() {
		return retailerSalesPrice;
	}

	public void setRetailerSalesPrice(Float retailerSalesPrice) {
		this.retailerSalesPrice = retailerSalesPrice;
	}

	public String getTaxId() {
		return taxId;
	}

	public void setTaxId(String taxId) {
		this.taxId = taxId;
	}

	public Float getTaxPercentage() {
		return taxPercentage;
	}

	public void setTaxPercentage(Float taxPercentage) {
		this.taxPercentage = taxPercentage;
	}

	public String getPurchaseUnit() {
		return purchaseUnit;
	}

	public void setPurchaseUnit(String purchaseUnit) {
		this.purchaseUnit = purchaseUnit;
	}

	public String getSalesUnit() {
		return salesUnit;
	}

	public void setSalesUnit(String salesUnit) {
		this.salesUnit = salesUnit;
	}

	public String getHsnCode() {
		return hsnCode;
	}

	public void setHsnCode(String hsnCode) {
		this.hsnCode = hsnCode;
	}

	public String getStockConversionRatio() {
		return stockConversionRatio;
	}

	public void setStockConversionRatio(String stockConversionRatio) {
		this.stockConversionRatio = stockConversionRatio;
	}

	public String getRackNumber() {
		return rackNumber;
	}

	public void setRackNumber(String rackNumber) {
		this.rackNumber = rackNumber;
	}

	public Float getBarcodeMrp() {
		return barcodeMrp;
	}

	public void setBarcodeMrp(Float barcodeMrp) {
		this.barcodeMrp = barcodeMrp;
	}

	public String getDiscountType() {
		return discountType;
	}

	public void setDiscountType(String discountType) {
		this.discountType = discountType;
	}

	public Float getDiscount() {
		return discount;
	}

	public void setDiscount(Float discount) {
		this.discount = discount;
	}

	public Float getSalesPrice() {
		return salesPrice;
	}

	public void setSalesPrice(Float salesPrice) {
		this.salesPrice = salesPrice;
	}

	public Float getDefaultBarcodeQty() {
		return defaultBarcodeQty;
	}

	public void setDefaultBarcodeQty(Float defaultBarcodeQty) {
		this.defaultBarcodeQty = defaultBarcodeQty;
	}

	public boolean isNewlyCreated() {
		return newlyCreated;
	}

	public void setNewlyCreated(boolean newlyCreated) {
		this.newlyCreated = newlyCreated;
	}
}
