/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.rjconsultores.ventaboletos.web.utilerias.render;

import java.text.DecimalFormat;

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

import com.rjconsultores.ventaboletos.entidad.ParamCostoTarjeta;

/**
 * 
 * @author Rafius
 */
public class RenderSendaAmigoParamCostoTarjeta implements ListitemRenderer {

	public void render(Listitem lstm, Object o) throws Exception {
		DecimalFormat df = new DecimalFormat("###,###,##0.00", new java.text.DecimalFormatSymbols(java.util.Locale.US));

		ParamCostoTarjeta pct = (ParamCostoTarjeta) o;

		Listcell lc = new Listcell(pct.getParamcostotarjetaId().toString());
		lc.setParent(lstm);

		lc = new Listcell(pct.getEmpresa().getNombempresa());
		lc.setParent(lstm);

		lc = new Listcell(df.format(pct.getValcostoinicial()));
		lc.setParent(lstm);

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