コード例 #1
0
        public PagoAcreedorDetailRpt GetPagoAcreedorDetailReport(PaymentSummary item, Payments pagos)
        {
            if (item == null)
            {
                return(null);
            }

            PagoAcreedorDetailRpt doc = new PagoAcreedorDetailRpt();

            List <PaymentPrint>   pagosList = new List <PaymentPrint>();
            List <PaymentSummary> pList     = new List <PaymentSummary>();

            foreach (Payment pago in pagos)
            {
                pagosList.Add(PaymentPrint.New(pago.GetInfo(true), null, false));
            }

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

            pList.Add(item);

            doc.SetDataSource(pList);
            doc.Subreports["Cuerpo"].SetDataSource(pagosList);

            FormatHeader(doc);

            return(doc);
        }
コード例 #2
0
        public PaymentRpt GetDetailReport(Payment item,
                                          IAcreedor acreedor,
                                          InputInvoiceList facturas)
        {
            if (item == null)
            {
                return(null);
            }

            PaymentRpt doc = new PaymentRpt();

            List <PaymentPrint>            pList     = new List <PaymentPrint>();
            List <TransactionPaymentPrint> pagosList = new List <TransactionPaymentPrint>();

            foreach (TransactionPayment pagoFactura in item.Operations)
            {
                pagosList.Add(TransactionPaymentPrint.New(pagoFactura.GetInfo(), facturas.GetItem(pagoFactura.OidOperation)));
            }

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

            pList.Add(PaymentPrint.New(item.GetInfo(false), acreedor, false));

            doc.SetDataSource(pList);
            doc.Subreports["Cuerpo"].SetDataSource(pagosList);
            doc.SetParameterValue("Empresa", Schema.Name);

            return(doc);
        }
コード例 #3
0
        public PaymentListRpt GetListReport(PaymentList list, TransactionPaymentList p_facturas)
        {
            if (list == null)
            {
                return(null);
            }

            PaymentListRpt doc = new PaymentListRpt();

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

            foreach (PaymentInfo pago in list)
            {
                if (ShowQRCode)
                {
                    pago.LoadChilds(p_facturas.GetSubList(new FCriteria <long>("OidPago", pago.Oid, Operation.Equal)));
                }

                pList.Add(PaymentPrint.New(pago, null, ShowQRCode));
            }

            doc.SetDataSource(pList);

            FormatHeader(doc);

            doc.QRCodeSection.SectionFormat.EnableSuppress = !ShowQRCode;

            return(doc);
        }