/*
 * 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.Banco;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;

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

    public void render(Listitem lstm, Object o) throws Exception {
        Banco banco = (Banco) o;

        Listcell lc = new Listcell(banco.getBancoId().toString());
        lc.setParent(lstm);

        lc = new Listcell(banco.getPuntoVenta() == null ? "" : banco.getPuntoVenta().getNombpuntoventa());
        lc.setParent(lstm);

        //CVE Sucursal
        lc = new Listcell(banco.getEmpresa() == null ? "" : banco.getEmpresa().getNombempresa());
        lc.setParent(lstm);
        
      //CVE Sucursal
        lc = new Listcell(banco.getMoneda() == null ? "" : banco.getMoneda().getDescmoneda());
        lc.setParent(lstm);

        //Banco
        lc = new Listcell(banco.getNombbanco() == null ? "" : banco.getNombbanco());
        lc.setParent(lstm);

        //N Conta
        lc = new Listcell(banco.getNumcuenta() == null ? "" : banco.getNumcuenta().toString());
        lc.setParent(lstm);

        //Algo REF
        //lc = new Listcell(banco.getAlgoritmoref() == null ? "" : banco.getAlgoritmoref());
        //lc.setParent(lstm);

        //Concepto
        //lc = new Listcell(banco.getConcepto() == null ? "" : banco.getConcepto());
        //lc.setParent(lstm);

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