protected void PrintListAction(Cash caja, CashLineList lista)
        {
            string filtro = GetFilterValues();

            CashReportMng reportMng = new CashReportMng(AppContext.ActiveSchema, Resources.Labels.CAJA_REPORT_TITLE, filtro);
            CashRpt       report    = reportMng.GetDetailReport(caja.GetInfo(), lista, FInicial_DTP.Value, FFinal_DTP.Value);

            ShowReport(report);
        }
Exemple #2
0
        public CashRpt GetDetailReport(CashInfo item,
                                       CashLineList list,
                                       DateTime f_ini,
                                       DateTime f_fin)
        {
            if (item == null)
            {
                return(null);
            }
            if (list.Count == 0)
            {
                return(null);
            }

            CashRpt doc = new CashRpt();

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

            int index = item.Lines.IndexOf(list[0]);

            item.DebeAcumulado  = item.GetDebeAcumulado(index);
            item.HaberAcumulado = item.GetHaberAcumulado(index);

            CajaPrint obj = CajaPrint.New(item);

            List <LineaCajaPrint> pLineaCajas = new List <LineaCajaPrint>();

            obj.HaberTotal = obj.HaberAcumulado;
            obj.DebeTotal  = obj.DebeAcumulado;

            foreach (CashLineInfo child in list)
            {
                pLineaCajas.Add(LineaCajaPrint.New(child));
                if (child.EEstado != Common.EEstado.Anulado)
                {
                    obj.HaberTotal += child.Haber;
                    obj.DebeTotal  += child.Debe;
                }
            }

            pList.Add(obj);
            doc.SetDataSource(pList);
            doc.Subreports["SubLineasCaja"].SetDataSource(pLineaCajas);

            FormatHeader(doc);

            return(doc);
        }
Exemple #3
0
 private static void FormatReport(CashRpt rpt, string logo)
 {
     /*string path = Images.GetRootPath() + "\\" + Resources.Paths.LOGO_EMPRESAS + logo;
      *
      * if (File.Exists(path))
      * {
      *  Image image = Image.FromFile(path);
      *  int width = rpt.Section1.ReportObjects["Logo"].Width;
      *  int height = rpt.Section1.ReportObjects["Logo"].Height;
      *
      *  rpt.Section1.ReportObjects["Logo"].Width = 15 * image.Width;
      *  rpt.Section1.ReportObjects["Logo"].Height = 15 * image.Height;
      *  rpt.Section1.ReportObjects["Logo"].Left += (width - 15 * image.Width) / 2;
      *  rpt.Section1.ReportObjects["Logo"].Top += (height - 15 * image.Height) / 2;
      * }*/
 }