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

import com.rjconsultores.ventaboletos.entidad.FormaPagoDet;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;

/**
 *
 * @author Administrador
 */
public class FormaPagoDetRender implements ListitemRenderer {

    public void render(Listitem lstm, Object o) throws Exception {
        FormaPagoDet formaPagoDet = (FormaPagoDet) o;

        Listcell lc = new Listcell(formaPagoDet.getEmpresa() != null ? formaPagoDet.getEmpresa().getNombempresa() : "");
        lc.setParent(lstm);

        lc = new Listcell(formaPagoDet.getFormaPago() != null ? formaPagoDet.getFormaPago().getDescpago() : "TODOS");
        lc.setParent(lstm);
        
        lc = new Listcell(formaPagoDet.getIndTotalBus() != null ? formaPagoDet.getIndTotalBus() ? "Sim" : "Não" : "Não");
        lc.setParent(lstm);
        
        lc = new Listcell(formaPagoDet.getIndEmbarcada() != null ? formaPagoDet.getIndEmbarcada() ? "Sim" : "Não" : "Não");
        lc.setParent(lstm);
        

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