package com.rjconsultores.ventaboletos.web.utilerias.render;

import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;

import com.rjconsultores.ventaboletos.entidad.PricingOcupaAntecipa;

public class RenderPricingOcupaAntecipa implements ListitemRenderer {

	public void render(Listitem lstm, Object o) throws Exception {
		PricingOcupaAntecipa pm = (PricingOcupaAntecipa) o;

		Listcell lc = new Listcell();

		lc = new Listcell(pm.getOcupacioninicial() == null ? "" : pm.getOcupacioninicial().toString());
		lc.setParent(lstm);
		
		lc = new Listcell(pm.getOcupacionfinal() == null ? "" : pm.getOcupacionfinal().toString());
		lc.setParent(lstm);
		
		lc = new Listcell(pm.getCantasientosmin() == null ? "" : pm.getCantasientosmin().toString());
		lc.setParent(lstm);

		lc = new Listcell(pm.getCantasientosmax() == null ? "" : pm.getCantasientosmax().toString());
		lc.setParent(lstm);

		lc = new Listcell(pm.getCantdiasmin() == null ? "" : pm.getCantdiasmin().toString());
		lc.setParent(lstm);

		lc = new Listcell(pm.getCantdiasmax() == null ? "" : pm.getCantdiasmax().toString());
		lc.setParent(lstm);

		lc = new Listcell(pm.getPorcentaje() == null ? "" : pm.getPorcentaje().toString());
		lc.setParent(lstm);

		lc = new Listcell(pm.getImporte() == null ? "" : pm.getImporte().toString());
		lc.setParent(lstm);
		
		lc = new Listcell(pm.getPricingClasseTarifaria() == null ? "" : pm.getPricingClasseTarifaria().getSigla());
		lc.setParent(lstm);

		lstm.setAttribute("data", pm);
	}
}
