package com.reallinkbilling.jspRedirect;

import java.io.File;
import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;
import org.apache.struts2.dispatcher.SessionMap;
import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionSupport;
import com.reallinkbilling.DAO.PurchaseInvoiceInformationDAO;
import com.reallinkbilling.DAO.PurchaseProductInfoDAO;
import com.reallinkbilling.db.GetDBConnection;
import com.reallinkbilling.resource.GetListResource;
import com.reallinkbilling.utils.GetAccountListForDrCr;

public class ViewPurchaseJsp extends ActionSupport implements SessionAware{

	/**
	 * 
	 */
	private static final long serialVersionUID = 3567874872813915230L;
	
	private HttpSession session;
	private String purchaseNumber;
	private Map<String,String> taxList = new LinkedHashMap<String,String>();
	private Map<String,String> unitList = new LinkedHashMap<String,String>();
	
	private PurchaseInvoiceInformationDAO purchaseInvoiceInformationDAO = null;	
	private List<PurchaseProductInfoDAO> purchaseProductInfoList = null;
	
	private Map<String,String> paymentTypeList = new  LinkedHashMap<String,String>();
	private Map<String,String> rateTypeList = new  LinkedHashMap<String,String>();
	private String purchaseDateTime;
	private Float totalPurchaseAmount;
	private String rateTyprDefaultValue;
	private String discount;
	private Float amountPaid;
	private Float frightCharges;
	private Float otherExpense;
	private File invoiceImage;
	private String comments;
	private DecimalFormat df;
	
	private Float totalNettAmount;
	private Float totalCGST;
	private Float totalSGST;
	private Float totalIGST;
	
	private Float tcsAmount;
	private Float tcsPercentage;
	
	private String productName;
	private Float amount;
	private Float quantity;
	private Float purchaseUnit;
	private Float purchaseRate;
	private String taxId;
	
	private String purchaseId;
	private String supplierName;
	private String invoiceNumber;
	private String paymentDefaultValue;
	private String invoiceImageContentType;
	private boolean addToStock;
	private String purchaseBy;
	private Map<String,String> customerSearchOptionList = new HashMap<String,String>();
	private String customerSearchOption;
	private String defaultValue;
	private SessionMap<String, Object> sessionMap;
	private Float directDiscountAmount;
	
	private String accountId;
	private Map<String,String> accountList = new LinkedHashMap<String,String>();
	private List<String> paymentTypeList2 = new ArrayList<String>();
	
	public String execute() throws IOException{
		 
		String result = "login";
		session=ServletActionContext.getRequest().getSession(false); 
		
	        if(session==null || session.getAttribute("login")==null){ 
	        	addActionMessage("Please Logout and Login again !");
	        	result = "error";
	        }  
	        else{
	        	
	        	String shopId = (String) this.getSessionMap().get("shopId");
	    		String shopCode = (String) this.getSessionMap().get("shopCode");
	    	
	    		this.getRateTypeList().put("INCLUDINGGST", "Including GST");
	        	this.getRateTypeList().put("EXCLUDINGGST", "Excluding GST");
	        	this.setRateTyprDefaultValue("EXCLUDINGGST");
	    		
	        	
	    			taxList = GetListResource.GetTaxList(this.getSessionMap());
	    			
	    		
	        	unitList = GetListResource.GetUnitList();
	        	paymentTypeList.put("CASH","CASH");
	        	paymentTypeList.put("CREDIT","CREDIT");
	        	
	        	paymentTypeList2.add("CASH");
	        	paymentTypeList2.add("UPI");
	        	paymentTypeList2.add("RTGS");
	        	paymentTypeList2.add("NEFT");
	        	
	        	Connection connection = null;
				PreparedStatement preparedStatement= null;
				ResultSet resultSet = null;
				
				String sql = "";
				String db = (String) this.getSessionMap().get("db");
				String purchaseType = "TYPE1";
				
				
				//System.out.println(this.getPurchaseNumber());
				Map<String,Float> taxPercentageInfo = GetListResource.GetTaxIdPercentageList(this.getSessionMap());
	        	
				this.setAccountList(GetAccountListForDrCr.getAccountList(this.getSessionMap()));
	       		
				
	        	if(this.getPurchaseNumber() != null  || !this.getPurchaseNumber().equals(""))
	        	{
	        		try
	        		{
	        			this.setPurchaseProductInfoList(new ArrayList<PurchaseProductInfoDAO>());
	        		
	        			
						connection = GetDBConnection.getDBConnection(db);
	        			
		        		sql = "SELECT "
		        			+ "purchase_invoice_number,"
		        			+ "DATE_FORMAT(purchase_date,'%d-%m-%Y'),"								
							+ "purchase_time,"									
							+ "supplier_id,"
							+ "supplier_name,"
							+ "transportation_charges,"
							+ "comments,"
							+ "other_expenses,"
							+ "total_purchase_amount,"
							+ "purchase_amount_paid,"
							+ "purchase_cgst_amount,"
							+ "purchase_scgst_amount,"
							+ "purchase_igst_amount,"
							+ "purchase_net_amount,"
							+ "payment_type,"
							+ "purchased_by,"
							+ "comments,"
							+ "tcs_percentage,"
							+ "tcs_amount,"
							+ "direct_discount_amount "
							+ "FROM "
							+ "shop_purchase_info_master "
							+ "WHERE "
							+ "shop_id = ? "
							+ "AND "
							+ "shop_code = ? "
							+ "AND "
							+ "purchase_number =? "
							+ "AND "
							+ "purchase_time <> 'null'";
		        			
		        			preparedStatement = connection.prepareStatement(sql);
		        			preparedStatement.setString(1, shopId);		        			
		        			preparedStatement.setString(2, shopCode);
		        			preparedStatement.setString(3, this.getPurchaseNumber());
		        			
		        			//System.out.println(preparedStatement.toString());
		        			resultSet = preparedStatement.executeQuery();
		        			
		        			int rowCount = 0;
		        			resultSet.last();
		        			rowCount = resultSet.getRow();
		        			resultSet.beforeFirst();
		        			
		        			if(rowCount > 0)
		        			{
		        				this.setPurchaseInvoiceInformationDAO(new PurchaseInvoiceInformationDAO());
		        				
		        				while(resultSet.next())
		        				{
		        					this.getPurchaseInvoiceInformationDAO().setPurchaseId(this.getPurchaseNumber());
		        					this.getPurchaseInvoiceInformationDAO().setInvoiceNumber(resultSet.getString(1));
		        					this.getPurchaseInvoiceInformationDAO().setPurchaseDate(resultSet.getString(2));
		        					this.getPurchaseInvoiceInformationDAO().setSupplierId(resultSet.getString(4));
		        					this.getPurchaseInvoiceInformationDAO().setSupplierName(resultSet.getString(5));
		        					this.getPurchaseInvoiceInformationDAO().setFrightCharges(resultSet.getFloat(6));
		        					this.getPurchaseInvoiceInformationDAO().setComments(resultSet.getString(7));
		        					this.getPurchaseInvoiceInformationDAO().setOtherExpense(resultSet.getFloat(8));
		        					this.getPurchaseInvoiceInformationDAO().setPurchaseTotalAmount(resultSet.getFloat(9));
		        					this.getPurchaseInvoiceInformationDAO().setPurchaseAmountPaid(resultSet.getFloat(10));
		        					this.getPurchaseInvoiceInformationDAO().setTotalCGST(resultSet.getFloat(11));
		        					this.getPurchaseInvoiceInformationDAO().setTotalSGST(resultSet.getFloat(12));
		        					this.getPurchaseInvoiceInformationDAO().setTotalIGST(resultSet.getFloat(13));
		        					this.getPurchaseInvoiceInformationDAO().setTotalNettAmount(resultSet.getFloat(14));
		        					this.getPurchaseInvoiceInformationDAO().setPaymentType(resultSet.getString(15));
		        					this.getPurchaseInvoiceInformationDAO().setPurchaseBy(resultSet.getString(16));
		        					this.getPurchaseInvoiceInformationDAO().setComments(resultSet.getString(17));
		        					this.getPurchaseInvoiceInformationDAO().setTcsPercentage(resultSet.getFloat(18));
		        					this.getPurchaseInvoiceInformationDAO().setTcsAmount(resultSet.getFloat(19));
		        					this.getPurchaseInvoiceInformationDAO().setDirectDiscountAmount(resultSet.getFloat(20));
		        					// try to read purchase_type flag
		        					try{
		        						PreparedStatement typePs = connection.prepareStatement("SELECT purchase_type FROM shop_purchase_info_master WHERE shop_id = ? AND shop_code = ? AND purchase_number = ?");
		        						typePs.setString(1, shopId);
		        						typePs.setString(2, shopCode);
		        						typePs.setString(3, this.getPurchaseNumber());
		        						ResultSet typeRs = typePs.executeQuery();
		        						if(typeRs.next())
		        						{
		        							String pt = typeRs.getString(1);
		        							if(pt != null && pt.trim().length()>0) purchaseType = pt.trim().toUpperCase();
		        						}
		        						if(typeRs!=null){ try{ typeRs.close(); }catch(SQLException e){} }
		        						if(typePs!=null){ try{ typePs.close(); }catch(SQLException e){} }
		        					}catch(SQLException ignore){}
			        				
		        					this.getPurchaseInvoiceInformationDAO().setPurchaseSaved(true);
		        					this.getPurchaseInvoiceInformationDAO().setViewPurchaseInvoice(true);
		        					PreparedStatement getProductInfoPSMT = null;
		        					ResultSet getProductInfoRS = null;
		        					
		        					String getPurchaseProductListSQL = "SELECT "
		        							+ "product_id,"
		        							+ "product_name,"
											+ "purchase_unit,"
											+ "tax_id,"
											+ "purchase_rate,"
											+ "puroduct_quantity,"
											+ "product_total_amount,"
											+ "product_net_amount,"
											+ "product_igst_amount,"
											+ "product_cgst_amount,"
											+ "product_sgst_amount,"
											+ "discount,"
											+ "discount_type,"
											+ "serial_no_batch_id "
											+ "FROM "
											+ "shop_purchase_product_info_master "
											+ "WHERE "
											+ "shop_id = ? "
											+ "AND "
											+ "shop_code = ? "
											+ "AND "
											+ "purchase_number = ?";
		        					
		        					getProductInfoPSMT = connection.prepareStatement(getPurchaseProductListSQL);
		        					
		        					getProductInfoPSMT.setString(1, shopId);
		        					getProductInfoPSMT.setString(2, shopCode);
		        					getProductInfoPSMT.setString(3, this.getPurchaseNumber());
		        					
		        					//System.out.println(getProductInfoPSMT.toString());
		        					
		        					getProductInfoRS = getProductInfoPSMT.executeQuery();
		        					
		        					while(getProductInfoRS.next())
		        					{
		        						PurchaseProductInfoDAO productInfoDAO = new PurchaseProductInfoDAO();
		        						
		        						productInfoDAO.setProductId(getProductInfoRS.getString(1));
		        						productInfoDAO.setProductName(getProductInfoRS.getString(2));
		        						productInfoDAO.setPurchaseUnit(getProductInfoRS.getString(3));
		        						productInfoDAO.setTaxId(getProductInfoRS.getString(4));
		        						productInfoDAO.setTaxPercentage(taxPercentageInfo.get(getProductInfoRS.getString(4)));
		        						productInfoDAO.setPurchaseRate(getProductInfoRS.getFloat(5));
		        						productInfoDAO.setQuantity(getProductInfoRS.getFloat(6));
		        						productInfoDAO.setAmount(getProductInfoRS.getFloat(7));
		        						productInfoDAO.setNettAmount(getProductInfoRS.getFloat(8));
		        						productInfoDAO.setIgst(getProductInfoRS.getFloat(9));
		        						productInfoDAO.setCgst(getProductInfoRS.getFloat(10));
		        						productInfoDAO.setSgst(getProductInfoRS.getFloat(11));
		        						productInfoDAO.setGrossAmount(getProductInfoRS.getFloat(8)+getProductInfoRS.getFloat(9)
		        						+getProductInfoRS.getFloat(10)
		        						+getProductInfoRS.getFloat(11));
		        						productInfoDAO.setDiscount(getProductInfoRS.getFloat(12));
		        						productInfoDAO.setDiscountType(getProductInfoRS.getString(13));
		        						productInfoDAO.setSerialBatchNo(getProductInfoRS.getString(14));
		        						this.getPurchaseProductInfoList().add(productInfoDAO);
		        					}
		        					
		        					
		        					
		        					if(getProductInfoRS != null)
		        					{
		        						getProductInfoRS.close();
		        						getProductInfoRS = null;
		        					}
		        					
		        					if(getProductInfoPSMT != null)
		        					{
		        						getProductInfoPSMT.close();
		        						getProductInfoPSMT = null;
		        						
		        					}
		        					
		        					
		        					
		        					
		        				}
		        				
		        				 float floatTotalPurchaseAmount = 0.0F;
		        		       	 float floatTotalCGST = 0.0F;
		        		       	 float floatTotalSGST = 0.0F;
		        		       	 float floatTotalIGST = 0.0F;
		        		       	 float floatTotalNettAmount = 0.0F;
		        		       	 
		        		       	 for (PurchaseProductInfoDAO pProductInfoDAO : this.getPurchaseProductInfoList())
		        		       	 {
		        		       		 floatTotalPurchaseAmount = floatTotalPurchaseAmount + pProductInfoDAO.getAmount();
		        		       		 floatTotalCGST = floatTotalCGST + pProductInfoDAO.getCgst();
		        		       		 floatTotalSGST = floatTotalSGST + pProductInfoDAO.getSgst();
		        		       		 floatTotalIGST = floatTotalIGST + pProductInfoDAO.getIgst();
		        		       		 floatTotalNettAmount = floatTotalNettAmount + pProductInfoDAO.getNettAmount();
		        		       	 }
		        		       	 //System.out.println(floatTotalNettAmount);
		        		       	 
		        		       	 this.setDf(new DecimalFormat("##.##"));
		        		       	 
		        		       	this.setTotalPurchaseAmount(purchaseInvoiceInformationDAO.getPurchaseTotalAmount());
		        		       	this.setTotalNettAmount(floatTotalNettAmount);
		        		       	this.setTotalCGST(floatTotalCGST);
		        		       	this.setTotalSGST(floatTotalSGST);
		        		       	this.setTotalIGST(floatTotalIGST);
		        		       	this.setOtherExpense(purchaseInvoiceInformationDAO.getOtherExpense());
		        		       	this.setFrightCharges(purchaseInvoiceInformationDAO.getFrightCharges());
		        		       	this.setTcsAmount(purchaseInvoiceInformationDAO.getTcsAmount());
		        		       	this.setTcsPercentage(purchaseInvoiceInformationDAO.getTcsPercentage());
		        		   		this.setPaymentDefaultValue(purchaseInvoiceInformationDAO.getPaymentType());
		        		   		this.setPurchaseBy(purchaseInvoiceInformationDAO.getPurchaseBy());
		        		       	this.setPurchaseId(purchaseInvoiceInformationDAO.getPurchaseId());
		        		       	this.setSupplierName(purchaseInvoiceInformationDAO.getSupplierId()+"-"+purchaseInvoiceInformationDAO.getSupplierName());
		        		       	this.setInvoiceNumber(purchaseInvoiceInformationDAO.getInvoiceNumber());
		        		       	this.setPurchaseDateTime(purchaseInvoiceInformationDAO.getPurchaseDate());
		        		       	this.setAddToStock(purchaseInvoiceInformationDAO.isAddToStock());
		        		       	
		        		       	this.setDirectDiscountAmount(this.getPurchaseInvoiceInformationDAO().getDirectDiscountAmount());
		        		       	
		        		       	this.getSession().setAttribute("purchaseInformation", purchaseInvoiceInformationDAO);
		        		       	this.getSession().setAttribute("purchaseProductList", purchaseProductInfoList);
		        				
		        		       	
		        		       	
		        				if("TYPE2".equals(purchaseType))
		        				{
		        					result = "TYPE2-SUCCESS";
		        				}
		        				else
		        				{
		        					result = "success";
		        				}
		        			}
		        			else
		        			{
		        				result = "error";
		        				addActionError("Records not found!");
		        			}
	        		
	        		
	        		}
	        		catch(SQLException sqe)
	        		{
	        			//sqe.printStackTrace();
	        			result = "error";	
						addActionError(sqe.getErrorCode()+" || "+sqe.getMessage() +" || Purchase details can not be loaded!");
				
	        		}catch (Exception e) {
	        			//e.printStackTrace();
	        			result = "error";						
						addActionError(e.getMessage()+" || "+e.getCause()+" || Purchase details can not be loaded!!");
					
					}finally 
					{
						if(resultSet != null)
		   				{
		   					try {resultSet.close(); resultSet = null;}catch(SQLException sqe){}   					
		   				}
						if(preparedStatement != null)
						{
							try {preparedStatement.close(); preparedStatement = null;} catch (SQLException e) {}
						}
						if(connection != null)
						{
							
							try {connection.close(); connection = null;}catch (SQLException e) {}
						}
						
					}
	        		
	        		
	        	}
	        	else
	        	{
	        		result = "error";
	        		addActionError("URL Tampred! Details not found!");
	        	}
	        	
	        	
	        }
	        return result;
	}

	public HttpSession getSession() {
		return session;
	}

	public void setSession(HttpSession session) {
		this.session = session;
	}

	public String getPurchaseNumber() {
		return purchaseNumber;
	}

	public void setPurchaseNumber(String purchaseNumber) {
		this.purchaseNumber = purchaseNumber;
	}

	public Map<String, String> getTaxList() {
		return taxList;
	}

	public void setTaxList(Map<String, String> taxList) {
		this.taxList = taxList;
	}

	public Map<String, String> getUnitList() {
		return unitList;
	}

	public void setUnitList(Map<String, String> unitList) {
		this.unitList = unitList;
	}

	public PurchaseInvoiceInformationDAO getPurchaseInvoiceInformationDAO() {
		return purchaseInvoiceInformationDAO;
	}

	public void setPurchaseInvoiceInformationDAO(PurchaseInvoiceInformationDAO purchaseInvoiceInformationDAO) {
		this.purchaseInvoiceInformationDAO = purchaseInvoiceInformationDAO;
	}

	public List<PurchaseProductInfoDAO> getPurchaseProductInfoList() {
		return purchaseProductInfoList;
	}

	public void setPurchaseProductInfoList(List<PurchaseProductInfoDAO> purchaseProductInfoList) {
		this.purchaseProductInfoList = purchaseProductInfoList;
	}

	
	public Float getTotalPurchaseAmount() {
		return totalPurchaseAmount;
	}

	public void setTotalPurchaseAmount(Float totalPurchaseAmount) {
		this.totalPurchaseAmount = totalPurchaseAmount;
	}

	public File getInvoiceImage() {
		return invoiceImage;
	}

	public void setInvoiceImage(File invoiceImage) {
		this.invoiceImage = invoiceImage;
	}

	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	public DecimalFormat getDf() {
		return df;
	}

	public void setDf(DecimalFormat df) {
		this.df = df;
	}


	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	

	public Float getAmountPaid() {
		return amountPaid;
	}

	public void setAmountPaid(Float amountPaid) {
		this.amountPaid = amountPaid;
	}

	public Float getFrightCharges() {
		return frightCharges;
	}

	public void setFrightCharges(Float frightCharges) {
		this.frightCharges = frightCharges;
	}

	public Float getOtherExpense() {
		return otherExpense;
	}

	public void setOtherExpense(Float otherExpense) {
		this.otherExpense = otherExpense;
	}

	public Float getTotalNettAmount() {
		return totalNettAmount;
	}

	public void setTotalNettAmount(Float totalNettAmount) {
		this.totalNettAmount = totalNettAmount;
	}

	public Float getTotalCGST() {
		return totalCGST;
	}

	public void setTotalCGST(Float totalCGST) {
		this.totalCGST = totalCGST;
	}

	public Float getTotalSGST() {
		return totalSGST;
	}

	public void setTotalSGST(Float totalSGST) {
		this.totalSGST = totalSGST;
	}

	public Float getTotalIGST() {
		return totalIGST;
	}

	public void setTotalIGST(Float totalIGST) {
		this.totalIGST = totalIGST;
	}

	public Float getAmount() {
		return amount;
	}

	public void setAmount(Float amount) {
		this.amount = amount;
	}

	public Float getQuantity() {
		return quantity;
	}

	public void setQuantity(Float quantity) {
		this.quantity = quantity;
	}

	public Float getPurchaseUnit() {
		return purchaseUnit;
	}

	public void setPurchaseUnit(Float purchaseUnit) {
		this.purchaseUnit = purchaseUnit;
	}

	public Float getPurchaseRate() {
		return purchaseRate;
	}

	public void setPurchaseRate(Float purchaseRate) {
		this.purchaseRate = purchaseRate;
	}

	public String getTaxId() {
		return taxId;
	}

	public void setTaxId(String taxId) {
		this.taxId = taxId;
	}

	public String getPurchaseId() {
		return purchaseId;
	}

	public void setPurchaseId(String purchaseId) {
		this.purchaseId = purchaseId;
	}

	public String getSupplierName() {
		return supplierName;
	}

	public void setSupplierName(String supplierName) {
		this.supplierName = supplierName;
	}

	public String getInvoiceNumber() {
		return invoiceNumber;
	}

	public void setInvoiceNumber(String invoiceNumber) {
		this.invoiceNumber = invoiceNumber;
	}

	public String getInvoiceImageContentType() {
		return invoiceImageContentType;
	}

	public void setInvoiceImageContentType(String invoiceImageContentType) {
		this.invoiceImageContentType = invoiceImageContentType;
	}

	public boolean isAddToStock() {
		return addToStock;
	}

	public void setAddToStock(boolean addToStock) {
		this.addToStock = addToStock;
	}

	public Map<String, String> getCustomerSearchOptionList() {
		return customerSearchOptionList;
	}

	public void setCustomerSearchOptionList(Map<String, String> customerSearchOptionList) {
		this.customerSearchOptionList = customerSearchOptionList;
	}

	public String getCustomerSearchOption() {
		return customerSearchOption;
	}

	public void setCustomerSearchOption(String customerSearchOption) {
		this.customerSearchOption = customerSearchOption;
	}

	public String getDefaultValue() {
		return defaultValue;
	}

	public void setDefaultValue(String defaultValue) {
		this.defaultValue = defaultValue;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public Map<String, String> getPaymentTypeList() {
		return paymentTypeList;
	}

	public void setPaymentTypeList(Map<String, String> paymentTypeList) {
		this.paymentTypeList = paymentTypeList;
	}

	public String getPurchaseDateTime() {
		return purchaseDateTime;
	}

	public void setPurchaseDateTime(String purchaseDateTime) {
		this.purchaseDateTime = purchaseDateTime;
	}

	public String getPaymentDefaultValue() {
		return paymentDefaultValue;
	}

	public void setPaymentDefaultValue(String paymentDefaultValue) {
		this.paymentDefaultValue = paymentDefaultValue;
	}

	public String getPurchaseBy() {
		return purchaseBy;
	}

	public void setPurchaseBy(String purchaseBy) {
		this.purchaseBy = purchaseBy;
	}


	public SessionMap<String, Object> getSessionMap() {
		return sessionMap;
	}

	public void setSessionMap(SessionMap<String, Object> sessionMap) {
		this.sessionMap = sessionMap;
	}

	
	public Map<String, String> getRateTypeList() {
		return rateTypeList;
	}

	public void setRateTypeList(Map<String, String> rateTypeList) {
		this.rateTypeList = rateTypeList;
	}

	public String getRateTyprDefaultValue() {
		return rateTyprDefaultValue;
	}

	public void setRateTyprDefaultValue(String rateTyprDefaultValue) {
		this.rateTyprDefaultValue = rateTyprDefaultValue;
	}

	public String getDiscount() {
		return discount;
	}

	public void setDiscount(String discount) {
		this.discount = discount;
	}

	public void setSession(Map<String, Object> map) {  
	    sessionMap=(SessionMap<String, Object>)map;  
	}

	public Float getDirectDiscountAmount() {
		return directDiscountAmount;
	}

	public void setDirectDiscountAmount(Float directDiscountAmount) {
		this.directDiscountAmount = directDiscountAmount;
	}

	public Float getTcsAmount() {
		return tcsAmount;
	}

	public void setTcsAmount(Float tcsAmount) {
		this.tcsAmount = tcsAmount;
	}

	public Float getTcsPercentage() {
		return tcsPercentage;
	}

	public void setTcsPercentage(Float tcsPercentage) {
		this.tcsPercentage = tcsPercentage;
	}

	public String getAccountId() {
		return accountId;
	}

	public void setAccountId(String accountId) {
		this.accountId = accountId;
	}

	public Map<String, String> getAccountList() {
		return accountList;
	}

	public void setAccountList(Map<String, String> accountList) {
		this.accountList = accountList;
	}

	public List<String> getPaymentTypeList2() {
		return paymentTypeList2;
	}

	public void setPaymentTypeList2(List<String> paymentTypeList2) {
		this.paymentTypeList2 = paymentTypeList2;
	}

	
}
