public CobroClienteDetailRpt GetCobroClienteDetailReport(ClienteInfo item, ChargeSummary resumen)
        {
            if (item == null)
            {
                return(null);
            }

            CobroClienteDetailRpt doc = new CobroClienteDetailRpt();

            List <CobroPrint>   cobros = new List <CobroPrint>();
            List <ClientePrint> pList  = new List <ClientePrint>();

            foreach (ChargeInfo cobro in item.Cobros)
            {
                if ((cobro.EEstado != Common.EEstado.Anulado))
                {
                    cobros.Add(CobroPrint.New(cobro, ShowQRCode));
                }
            }

            //Si no existen conceptos, no tiene sentido un informe detallado. Además, falla en Crystal Reports
            if (cobros.Count <= 0)
            {
                return(null);
            }

            pList.Add(ClientePrint.New(item, resumen));
            doc.SetDataSource(pList);
            doc.Subreports["Cuerpo"].SetDataSource(cobros);

            FormatHeader(doc);

            return(doc);
        }
        public HistoriaClienteRpt GetHistoriaClienteRpt(ClienteInfo item)
        {
            if (item == null)
            {
                return(null);
            }

            HistoriaClienteRpt doc = new HistoriaClienteRpt();

            List <ClientePrint> pList = new List <ClientePrint>();

            pList.Add(ClientePrint.New(item));

            doc.SetDataSource(pList);

            FormatHeader(doc);

            return(doc);
        }
        public ClienteListRpt GetListReport(ClienteList list)
        {
            if (list.Count == 0)
            {
                return(null);
            }

            ClienteListRpt doc = new ClienteListRpt();

            List <ClientePrint> pList = new List <ClientePrint>();

            foreach (ClienteInfo item in list)
            {
                pList.Add(ClientePrint.New(item));
            }

            doc.SetDataSource(pList);

            FormatHeader(doc);

            return(doc);
        }
Exemple #4
0
 public ClientePrint GetPrintObject()
 {
     return(ClientePrint.New(this));
 }