package com.dev.swms.server.action.formatter;

import java.util.List;

import com.dev.energy.server.format.Formatter;

public class ColourChangeFormat implements Formatter {

	public String format(String property, Object cellValue, List origenData,
			 String referenceModel, String locale) {
		double qty=Double.parseDouble(origenData.get(11).toString());
		double reQty=Double.parseDouble(origenData.get(12).toString());
		if(reQty>=qty){
			return "<div style='background-color:red' >" + cellValue + "</div>";
		}else if(reQty>0){
			return "<div style='background-color:green' >" + cellValue + "</div>";
		}else{
			return cellValue.toString();
		}
		
	}

}
