package com.reallinkbilling.jspRedirect;

import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
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.BillInformationDAO;
import com.reallinkbilling.DAO.BillProductInfoDAO;
import com.reallinkbilling.db.GetDBConnection;
import com.reallinkbilling.resource.GetListResource;
import com.reallinkbilling.utils.GetAccountListForDrCr;

public class ViewBillJsp extends ActionSupport implements SessionAware{

	/**
	 * 
	 */
	private static final long serialVersionUID = 7713193858695407144L;
	
	private HttpSession session;
	private String billDateTime;
	private String operator;
	private String paymentType;
	private String customerName;
	private String customerId;
	private String customerMobileNumber;
	private String customerType;
	private ArrayList<String> customerTypeList = new ArrayList<String>();
	private String customerIdNameAll;
	
	private String billType;
	
	private String transportCharge;
	private String comments;
	
	private String typeOfBill;
	private String billNumber;
	private Map<String,String> taxList = new LinkedHashMap<String,String>();
	private Map<String,String> unitList = new LinkedHashMap<String,String>();
	private Map<String,String> paymentTypeList = new  LinkedHashMap<String,String>();
	private Map<String,String> billTypeList = new  LinkedHashMap<String,String>();
	private List<BillProductInfoDAO> productInfoList ;
	private String defaultValue;
	private String amountPaid;
	private String returnAmount;
	
	private String billSave;
	private String totalAmount;
	private String totalDiscount;
	private String totalAmouAfterDisount;
	
	private String removeVaules="false";
	
	private BillInformationDAO billInfoDAO = null;
	
	private SessionMap<String,Object> sessionMap;
	
	private String viewBill;
	
	
	private List<String> paymentTypeList2 = new ArrayList<String>();
	private String modeOfPayment;
	private String accountId;
	private Map<String,String> accountList = new LinkedHashMap<String,String>();
	
	private Map<String,String> labourChargeTypeList = new LinkedHashMap<String,String>();
	private String labourChargeType;
	private String addLabourCharges;
	private Map<String,String> rateTypeList = new LinkedHashMap<String,String>();
	private String rateType;
	private String billDate2;
	private String dateAsStringType2;
	
	
	
	private String buyerOrderNumber;
	private String dispatchDocNumber;
	private String vehicleNumber;
	private String salesmanId;
	
	
	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");
	    		
	        	
	    			taxList = GetListResource.GetTaxList(this.getSessionMap());
	    	
	        	this.setViewBill("true");
	        	this.setBillSave("true");
	        	unitList = GetListResource.GetUnitList();
	        	billTypeList = GetListResource.GetBillTypeList();
	        	paymentTypeList.put("CASH","CASH");
	        	paymentTypeList.put("CREDIT","CREDIT");
	        	
	        	if(productInfoList == null)
	        	{
	        		productInfoList = new ArrayList<BillProductInfoDAO>();
	        	}
	        	
	        	if(billInfoDAO==null)
	        	{
	        		billInfoDAO = new BillInformationDAO();        		      		
	        		
	        	}
	        	
	        	boolean sourceFromBarcodeBill = false;
	        	boolean sourceFromCompositeBill = false;
	        	
	        	
	        	paymentTypeList2.add("CASH");
	        	paymentTypeList2.add("UPI");
	        	paymentTypeList2.add("RTGS");
	        	paymentTypeList2.add("NEFT");
	        	paymentTypeList2.add("CHEQUE");
	        	
	         	
	           	this.setCustomerTypeList(GetListResource.getCustomerTypeList());
	    	 
	        	
	        	HashMap<String, String> settings = (HashMap<String, String>) this.getSessionMap().get("shop_settings");
		        
	        	this.setAccountId((String) settings.get("default_account_to_collect"));
	        	this.setAccountList(GetAccountListForDrCr.getAccountList((this.getSessionMap()))); 
	        	this.getRateTypeList().put("INCLUDEGST", "WITH GST");
	        	this.getRateTypeList().put("EXCLUDEGST", "WITH-OUT GST");
	        	this.setRateType((String) settings.get("default_rate_type"));
	        	this.getLabourChargeTypeList().put("QUANTITYWISE", "BY QUANTITY");
	        	this.getLabourChargeTypeList().put("PERCENTAGEWISE", "BY PERCENTAGE");
	        	this.setAddLabourCharges((String) settings.get("add_making_charge_column"));
	        	this.setLabourChargeType("QUANTITYWISE");
	        	this.setBillType(settings.get("default_bill_type"));
	        	
	        	Connection connection = null;
	       		PreparedStatement preparedStatement= null;
	       		ResultSet resultSet = null;
	       		
	       		
	       		String sql = "";
	       		String db = (String) this.getSessionMap().get("db");
	       		try {
	       			
					connection = GetDBConnection.getDBConnection(db);
	       			
	       			if(this.getDateAsStringType2() == null)
	       			{
	       				this.setDateAsStringType2(this.getBillDate2());
	       			}
					
					
	       			sql = "SELECT "
	       					+ "DATE_FORMAT(bill_date, '%d-%m-%Y'),"
	       					+ "payment_type,"
	       					+ "bill_type,"
	       					+ "customer_name,"
	       					+ "transportation_charges,"
	       					+ "comments,"
	       					+ "bill_total_amount,"
	       					+ "bill_amount_received,"
	       					+ "bill_amount_retrurn,"
	       					+ "bill_source,"
	       					+ "buyer_order_number,"
		        			+ "dispatch_doc_number,"
		        			+ "vehicle_number "
	       					+ "FROM "
	       					+ "shop_bill_info_master "
	       					+ "WHERE "
	       					+ "bill_type = ? "
	       					+ "AND "
	       					+ "shop_id = ?"
	       					+ "AND "
	       					+ "shop_code = ? "
	       					+ "AND "
	       					+ "bill_number = ? "
	       					+ "AND "
	       					+ "bill_date = STR_TO_DATE(?,'%d-%m-%Y')";
	       			
	       			
	       			
	       			preparedStatement = connection.prepareStatement(sql);
	       			preparedStatement.setString(1, this.getTypeOfBill());
	       			preparedStatement.setString(2, shopId);
	       			preparedStatement.setString(3, shopCode);
	       			preparedStatement.setString(4, this.getBillNumber());
	       			preparedStatement.setString(5, this.getDateAsStringType2());
	       			
	       			resultSet = preparedStatement.executeQuery();
	       			
	       			
	       			resultSet.last();
	       			int rowCount = resultSet.getRow();
	       			resultSet.beforeFirst();
	       			
	       			if(rowCount>0)
	       			{
	       				result = "success";
                        if(resultSet.next())
	       				{
	       					this.setBillDateTime(resultSet.getString(1));
	       					this.setPaymentType(resultSet.getString(2));
	       					this.setDefaultValue(resultSet.getString(2));
	       					
	       					this.setBillType(resultSet.getString(3));
	       					if("COMPOSITE-BILL".equals(resultSet.getString(3)))
	       					{
	       						sourceFromCompositeBill = true;
	       					}
	       					
	       				
	       					this.setTransportCharge(resultSet.getString(5));
	       					this.setComments(resultSet.getString(6));	       			
	       					this.setAmountPaid(resultSet.getString(8));
	       					this.setReturnAmount(""+(resultSet.getFloat(7)-resultSet.getFloat(8)));
	       					this.getBillInfoDAO().setBillNumber(getBillNumber());	        	
	       	        		this.getBillInfoDAO().setPaymentType(getPaymentType());
	       	        		this.getBillInfoDAO().setBillType(getBillType());
	       	        	    		
	       		        	this.getBillInfoDAO().setBillSaved(true);
	       		        	this.getBillInfoDAO().setTransportCharge(resultSet.getFloat(5));
	       		        	this.getBillInfoDAO().setBillInformationInserted(true);
	       		        	this.getBillInfoDAO().setBillDate(resultSet.getString(1));
	       		        	
	       		        	this.setBuyerOrderNumber(resultSet.getString(11));
	       		        	this.setDispatchDocNumber(resultSet.getString(12));
	       		        	this.setVehicleNumber(resultSet.getString(13));
	       		        	
	       		        	this.getBillInfoDAO().setBuyerOrderNumber(resultSet.getString(11));
	       		        	this.getBillInfoDAO().setDispatchDocNumber(resultSet.getString(12));
	       		        	this.getBillInfoDAO().setVehicleNumber(resultSet.getString(13));
	       		        	
	       		        	this.getBillInfoDAO().setCustId(resultSet.getString(4).split("-")[0]);
       		        		this.getBillInfoDAO().setCustomerName(resultSet.getString(4).split("-")[1]);
       		        		this.getBillInfoDAO().setCustomerMobile(resultSet.getString(4).split("-")[2]);
       		        	
       		        		this.getBillInfoDAO().setCustomerIdNameAll(resultSet.getString(4));
       		        		
       		        		this.getBillInfoDAO().setOldCustomerId(resultSet.getString(4).split("-")[0]);
       		        		this.getBillInfoDAO().setOldBillDate(resultSet.getString(1));
       		        		
       		        		
       		        		this.setCustomerIdNameAll(resultSet.getString(4));
       		        		this.setCustomerId(resultSet.getString(4).split("-")[0]);
       		        		this.setCustomerName(resultSet.getString(4).split("-")[1]);
       		        		this.setCustomerMobileNumber(resultSet.getString(4).split("-")[2]);
       		        		
       		        		
       		        		try
       		        		{
       		        			this.getBillInfoDAO().setCustomerType(resultSet.getString(4).split("-")[3]);
       		        			this.setCustomerType(resultSet.getString(4).split("-")[3]);
       		        		}
       		        		catch(Exception e)
       		        		{
       		        			this.getBillInfoDAO().setCustomerType("REGULER");
       		        			this.setCustomerType("REGULER");
       		        		}
	       		        	
	       		        	if(resultSet.getString(10).equals("BARCODEBILL") && !sourceFromCompositeBill)
	       		        	{
	       		        		sourceFromBarcodeBill = true;
	       		        		this.getBillInfoDAO().setCustomerName(resultSet.getString(4));
	       		        		this.setCustomerName(resultSet.getString(4));
                                    // Try to load salesman id from commission table for barcode bills
                                    try{
                                        String ssql = "SELECT employee_id FROM shop_salesman_commission WHERE shop_id=? AND shop_code=? AND bill_number=? AND bill_date=STR_TO_DATE(?,'%d-%m-%Y') AND bill_type=? LIMIT 1";
                                        PreparedStatement sps = connection.prepareStatement(ssql);
                                        sps.setString(1, shopId);
                                        sps.setString(2, shopCode);
                                        sps.setString(3, this.getBillNumber());
                                        sps.setString(4, this.getDateAsStringType2());
                                        sps.setString(5, this.getTypeOfBill());
                                        ResultSet srs = sps.executeQuery();
                                        if(srs.next()){
                                            try{ 
                                            	this.getBillInfoDAO().setSalesmanId(srs.getString(1)); 
                                            
                                            	this.setSalesmanId(srs.getString(1));
                                            }catch(Exception ig){}
                                        }
                                        srs.close(); sps.close();
                                    }catch(Exception ig){}
	       		        	}
	       		        	
	       					
	       		        	if(resultSet != null)
	       		        	{
	       		        		resultSet.close();
	       		        		resultSet = null;
	       		        	}
	       					if(preparedStatement != null)
	       					{
	       						preparedStatement.close();
	       						preparedStatement = null;
	       					}
	       					
	       					sql = "SELECT "
	       							+ "product_id,"
	       							+ "product_name,"
	       							+ "sales_unit,"
	       							+ "id_tax_table,"
	       							+ "sales_rate,"
	       							+ "product_quantity,"
	       							+ "discount_percentage,"
	       							+ "discount_ruppees,"
	       							+ "product_total_amount,"
	       							+ "product_total_amount_aft_discount,"
	       							+ "product_net_amount,"
	       							+ "product_igst_amount,"
	       							+ "product_cgst_amount,"
	       							+ "product_sgst_amount,"
	       							+ "making_labor_charge,"
	       							+ "product_name_in_marathi,"
	       							+ "product_quantity_2,"
	       							+ "product_batch_id,"
	       							+ "product_expiry_date "
	       							+ "FROM "
	       							+ "shop_bill_product_info_master "
	       							+ "WHERE "
	       							+ "bill_type = ? "
	       							+ "AND "
	       							+ "bill_number = ? "
	       							+ "AND "
	       							+ "shop_id = ? "
	       							+ "ANd "
	       							+ "shop_code = ? ";
	       					
	       					
	       					
	       					preparedStatement = connection.prepareStatement(sql);
	       					preparedStatement.setString(1, this.getTypeOfBill());
	       					preparedStatement.setString(2, this.getBillNumber());
	       					preparedStatement.setString(3, shopId);
	       					preparedStatement.setString(4, shopCode);
	       					
	       					resultSet = preparedStatement.executeQuery();
	       					int serialNumber = 1;
	       					while(resultSet.next())
	       					{
	       						BillProductInfoDAO  billProductInfoDAO = new BillProductInfoDAO();
	       						
	       						billProductInfoDAO.setSerialNumber(""+serialNumber);
	       						billProductInfoDAO.setProductId(resultSet.getString(1));
	       						billProductInfoDAO.setProductName(resultSet.getString(2));
	       						billProductInfoDAO.setSalesUnit(resultSet.getString(3));
	       						billProductInfoDAO.setTaxId(resultSet.getString(4));
	       						billProductInfoDAO.setSalesRate(resultSet.getFloat(5));
	       						billProductInfoDAO.setQuantity(resultSet.getFloat(6));
	       						billProductInfoDAO.setDiscountPecentage(resultSet.getFloat(7));
	       						billProductInfoDAO.setDiscountRupees(resultSet.getFloat(8));
	       						billProductInfoDAO.setAmount(resultSet.getFloat(9));
	       						billProductInfoDAO.setAmountAfterDiscount(resultSet.getFloat(10));
	       						billProductInfoDAO.setGrossAmount(resultSet.getFloat(11));
	       						billProductInfoDAO.setIgst(resultSet.getFloat(12));
	       						billProductInfoDAO.setCgst(resultSet.getFloat(13));
	       						billProductInfoDAO.setSgst(resultSet.getFloat(14));
	       						billProductInfoDAO.setMakingLaborCharge(resultSet.getFloat(15));
	       						billProductInfoDAO.setProductNameMarathi(resultSet.getString(16));
	       						billProductInfoDAO.setQuantity2(resultSet.getFloat(17));
	       						billProductInfoDAO.setBatchId(resultSet.getString(18));
	       						billProductInfoDAO.setExpiryDate(resultSet.getString(19));
	       						billProductInfoDAO.setProductReturn(false);
	       						
	       						Map<String,String> taxDetails = GetListResource.GetTaxNamePercentage(resultSet.getString(4), this.getSessionMap());
	       						Float taxPercentage = 0.0F;
	       						try
	       						{
	       							taxPercentage = Float.parseFloat( taxDetails.get("TAX-PERCENTAGE"));
	       						}
	       						catch(Exception e)
	       						{
	       							taxPercentage = 0.0F;
	       						}
	       						billProductInfoDAO.setTaxPercentage(taxPercentage);
	       						
	       			        	float totalProductDiscount = Float.parseFloat(resultSet.getString(9)) - Float.parseFloat(resultSet.getString(10));
	       						
	       			        	billProductInfoDAO.setProductTotalDiscount(totalProductDiscount);
	       			        	
	       						this.getProductInfoList().add(billProductInfoDAO);
	       						serialNumber++;
	       					}
	       					
	       					
	       				}
	       				
	       				
	       			}
	       			
		        	float floatTotalAmount = 0.0F;
		        	float floatTotalDiscount = 0.0F;
		        	float floatTotalAmtAfterDiscount = 0.0F;
		        	
		        	
		        	for(BillProductInfoDAO infoDAO : this.getProductInfoList())
		        	{
		        		floatTotalAmount  = floatTotalAmount+ infoDAO.getAmount();
		        		floatTotalAmtAfterDiscount = floatTotalAmtAfterDiscount + infoDAO.getAmountAfterDiscount();
		        		floatTotalDiscount = floatTotalDiscount + infoDAO.getProductTotalDiscount();
		        		
		        	}
		        	
		        	this.setTotalAmount(""+floatTotalAmount);	        	
		        	this.setTotalDiscount(""+floatTotalDiscount);
		        	this.setTotalAmouAfterDisount(""+floatTotalAmtAfterDiscount);
		        	
	       			this.getSessionMap().put("billInformation", this.getBillInfoDAO());
	       			this.getSessionMap().put("productList", this.getProductInfoList());
		        	
	       			if(sourceFromCompositeBill)
	       			{
	       				result = "COMPOSITE-SUCCESS";
	       			}
	       			else if(sourceFromBarcodeBill)
	       			{
	       				result = "BARCODE-SUCCESS";
	       			}
	       			else
	       			{
	       				result = SUCCESS;
	       			}
	       			
	       		} catch (SQLException e) {
	       			result = ERROR;
	       			e.printStackTrace();
	   				
	   				addActionError(e.getErrorCode()+"||"+e.getMessage()+"|| CANNOT FIND BILL INFOARMATION ! SOME ERROR !");
				
				} catch (IOException e) {
					result = ERROR;
					e.printStackTrace();
					
					addActionError(e.getMessage()+"|| CANNOT FIND BILL INFOARMATION ! SOME ERROR!");
				}	
	   			finally
	   			{
	   				if(resultSet != null)
    				{
    					try {
    						resultSet.close(); resultSet = null;
    					} catch (SQLException e) {
    						
    					}
    				}
	   				if(preparedStatement != null)
	   				{
	   					try {preparedStatement.close(); preparedStatement = null;} catch (SQLException e) {}
	   				}
	   				if(connection != null)
	   				{
	   					try {connection.close(); connection = null;} catch (SQLException e) {}
	   				}
	   				
	   			}
	        	
	        }
	        
	        return result;
	}




	public HttpSession getSession() {
		return session;
	}




	public void setSession(HttpSession session) {
		this.session = session;
	}




	public String getBillDateTime() {
		return billDateTime;
	}




	public void setBillDateTime(String billDateTime) {
		this.billDateTime = billDateTime;
	}




	public String getOperator() {
		return operator;
	}




	public void setOperator(String operator) {
		this.operator = operator;
	}




	public String getPaymentType() {
		return paymentType;
	}




	public void setPaymentType(String paymentType) {
		this.paymentType = paymentType;
	}




	public String getCustomerName() {
		return customerName;
	}




	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}




	public String getTransportCharge() {
		return transportCharge;
	}




	public void setTransportCharge(String transportCharge) {
		this.transportCharge = transportCharge;
	}




	public String getComments() {
		return comments;
	}




	public void setComments(String comments) {
		this.comments = comments;
	}


	public String getBillNumber() {
		return billNumber;
	}




	public void setBillNumber(String billNumber) {
		this.billNumber = billNumber;
	}




	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 Map<String, String> getPaymentTypeList() {
		return paymentTypeList;
	}




	public void setPaymentTypeList(Map<String, String> paymentTypeList) {
		this.paymentTypeList = paymentTypeList;
	}




	public Map<String, String> getBillTypeList() {
		return billTypeList;
	}




	public void setBillTypeList(Map<String, String> billTypeList) {
		this.billTypeList = billTypeList;
	}




	public List<BillProductInfoDAO> getProductInfoList() {
		return productInfoList;
	}




	public void setProductInfoList(List<BillProductInfoDAO> productInfoList) {
		this.productInfoList = productInfoList;
	}




	public String getDefaultValue() {
		return defaultValue;
	}




	public void setDefaultValue(String defaultValue) {
		this.defaultValue = defaultValue;
	}




	public String getTotalAmount() {
		return totalAmount;
	}




	public void setTotalAmount(String totalAmount) {
		this.totalAmount = totalAmount;
	}




	public String getTotalDiscount() {
		return totalDiscount;
	}




	public void setTotalDiscount(String totalDiscount) {
		this.totalDiscount = totalDiscount;
	}




	public String getTotalAmouAfterDisount() {
		return totalAmouAfterDisount;
	}




	public void setTotalAmouAfterDisount(String totalAmouAfterDisount) {
		this.totalAmouAfterDisount = totalAmouAfterDisount;
	}




	public String getRemoveVaules() {
		return removeVaules;
	}




	public void setRemoveVaules(String removeVaules) {
		this.removeVaules = removeVaules;
	}




	public BillInformationDAO getBillInfoDAO() {
		return billInfoDAO;
	}




	public void setBillInfoDAO(BillInformationDAO billInfoDAO) {
		this.billInfoDAO = billInfoDAO;
	}
	
	public SessionMap<String, Object> getSessionMap() {
		return sessionMap;
	}

	public void setSessionMap(SessionMap<String, Object> sessionMap) {
		this.sessionMap = sessionMap;
	}


	public void setSession(Map<String, Object> map) {  
	    sessionMap=(SessionMap<String, Object>)map;  
	}




	public String getBillType() {
		return billType;
	}




	public void setBillType(String billType) {
		this.billType = billType;
	}




	public String getViewBill() {
		return viewBill;
	}




	public void setViewBill(String viewBill) {
		this.viewBill = viewBill;
	}




	public String getBillSave() {
		return billSave;
	}




	public void setBillSave(String billSave) {
		this.billSave = billSave;
	}




	public static long getSerialversionuid() {
		return serialVersionUID;
	}




	public String getTypeOfBill() {
		return typeOfBill;
	}




	public void setTypeOfBill(String typeOfBill) {
		this.typeOfBill = typeOfBill;
	}




	public String getAmountPaid() {
		return amountPaid;
	}




	public void setAmountPaid(String amountPaid) {
		this.amountPaid = amountPaid;
	}




	public String getReturnAmount() {
		return returnAmount;
	}




	public void setReturnAmount(String returnAmount) {
		this.returnAmount = returnAmount;
	}




	public Map<String, String> getLabourChargeTypeList() {
		return labourChargeTypeList;
	}




	public void setLabourChargeTypeList(Map<String, String> labourChargeTypeList) {
		this.labourChargeTypeList = labourChargeTypeList;
	}




	public String getLabourChargeType() {
		return labourChargeType;
	}




	public void setLabourChargeType(String labourChargeType) {
		this.labourChargeType = labourChargeType;
	}




	public String getAddLabourCharges() {
		return addLabourCharges;
	}




	public void setAddLabourCharges(String addLabourCharges) {
		this.addLabourCharges = addLabourCharges;
	}




	public Map<String, String> getRateTypeList() {
		return rateTypeList;
	}




	public void setRateTypeList(Map<String, String> rateTypeList) {
		this.rateTypeList = rateTypeList;
	}




	public String getRateType() {
		return rateType;
	}




	public void setRateType(String rateType) {
		this.rateType = rateType;
	}




	public List<String> getPaymentTypeList2() {
		return paymentTypeList2;
	}




	public void setPaymentTypeList2(List<String> paymentTypeList2) {
		this.paymentTypeList2 = paymentTypeList2;
	}




	public String getModeOfPayment() {
		return modeOfPayment;
	}




	public void setModeOfPayment(String modeOfPayment) {
		this.modeOfPayment = modeOfPayment;
	}




	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 String getBillDate2() {
		return billDate2;
	}




	public void setBillDate2(String billDate2) {
		this.billDate2 = billDate2;
	}




	public String getDateAsStringType2() {
		return dateAsStringType2;
	}




	public void setDateAsStringType2(String dateAsStringType2) {
		this.dateAsStringType2 = dateAsStringType2;
	}




	public String getCustomerId() {
		return customerId;
	}




	public void setCustomerId(String customerId) {
		this.customerId = customerId;
	}




	public String getCustomerMobileNumber() {
		return customerMobileNumber;
	}




	public void setCustomerMobileNumber(String customerMobileNumber) {
		this.customerMobileNumber = customerMobileNumber;
	}




	public String getCustomerType() {
		return customerType;
	}




	public void setCustomerType(String customerType) {
		this.customerType = customerType;
	}




	public ArrayList<String> getCustomerTypeList() {
		return customerTypeList;
	}




	public void setCustomerTypeList(ArrayList<String> customerTypeList) {
		this.customerTypeList = customerTypeList;
	}




	public String getCustomerIdNameAll() {
		return customerIdNameAll;
	}




	public void setCustomerIdNameAll(String customerIdNameAll) {
		this.customerIdNameAll = customerIdNameAll;
	}




	public String getBuyerOrderNumber() {
		return buyerOrderNumber;
	}




	public void setBuyerOrderNumber(String buyerOrderNumber) {
		this.buyerOrderNumber = buyerOrderNumber;
	}




	public String getDispatchDocNumber() {
		return dispatchDocNumber;
	}




	public void setDispatchDocNumber(String dispatchDocNumber) {
		this.dispatchDocNumber = dispatchDocNumber;
	}




	public String getVehicleNumber() {
		return vehicleNumber;
	}




	public void setVehicleNumber(String vehicleNumber) {
		this.vehicleNumber = vehicleNumber;
	}




	public String getSalesmanId() {
		return salesmanId;
	}




	public void setSalesmanId(String salesmanId) {
		this.salesmanId = salesmanId;
	}







	
	
	
	
}
