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); }
protected override void PrintPagoAction() { if (Pago == null) { return; } PaymentReportMng reportMng = new PaymentReportMng(AppContext.ActiveSchema); PaymentRpt report = reportMng.GetDetailReport(Pago, _entity, _invoices); ShowReport(report); }