Esempio n. 1
0
        public override void PrintDetailAction()
        {
            if (ActiveItem == null)
            {
                return;
            }

            InputInvoiceReportMng reportMng = new InputInvoiceReportMng(AppContext.ActiveSchema, this.Text, this.FilterValues);

            InputInvoiceInfo item = InputInvoiceInfo.Get(ActiveOID, ActiveItem.ETipoAcreedor, true);

            FormatConfFacturaAlbaranReport conf = new FormatConfFacturaAlbaranReport();

            ProviderBaseInfo provider = ProviderBaseInfo.Get(ActiveItem.OidAcreedor, ActiveItem.ETipoAcreedor, false);
            SerieInfo        serie    = SerieInfo.Get(ActiveItem.OidSerie, false);

            conf.nota            = (provider.OidImpuesto == 1) ? Library.Invoice.Resources.Messages.NOTA_EXENTO_IGIC : string.Empty;
            conf.nota           += (conf.nota != string.Empty) ? Environment.NewLine : string.Empty;
            conf.nota           += (ActiveItem.Nota ? serie.Cabecera : "");
            conf.cuenta_bancaria = ActiveItem.CuentaBancaria;
            PgMng.Grow();

            ReportClass report = reportMng.GetDetailReport(item, conf);

            if (SettingsMng.Instance.GetUseDefaultPrinter())
            {
                int n_copias = SettingsMng.Instance.GetDefaultNCopies();
                PrintReport(report, n_copias);
            }
            else
            {
                ShowReport(report);
            }
        }
        public override void PrintObject()
        {
            /*InputInvoiceReportMng reportMng = new InputInvoiceReportMng(AppContext.ActiveSchema);
             *
             *          FormatConfFacturaProveedorAlbaranReport conf = new FormatConfFacturaProveedorAlbaranReport();
             * conf.nota = EntityInfo.Nota ? Nota_TB.Text : "";
             * conf.cabecera = Cabecera_CB.SelectedItem == null ? "FACTURA" : Cabecera_CB.SelectedItem.ToString();
             * conf.copia = Copia_CKB.Checked ? "COPIA" : "";
             * conf.cuenta_bancaria = Cuenta_TB.Text;
             * conf.forma_pago = "";
             *
             * ReportViewer.SetReport(reportMng.GetFacturaProveedorReport(EntityInfo, conf));
             * ReportViewer.ShowDialog();
             *
             * ReportClass report = reportMng.GetQRCodeReport(EntityInfo);
             *
             * if (SettingsMng.Instance.GetUseDefaultPrinter())
             * {
             *  int n_copias = SettingsMng.Instance.GetDefaultNCopies();
             *  PrintReport(report, n_copias);
             * }
             * else
             *  ShowReport(report);*/

            InputInvoiceReportMng reportMng = new InputInvoiceReportMng(AppContext.ActiveSchema);

            FormatConfFacturaAlbaranReport conf = new FormatConfFacturaAlbaranReport();

            ProviderBaseInfo provider = ProviderBaseInfo.Get(EntityInfo.OidAcreedor, EntityInfo.ETipoAcreedor, false);
            SerieInfo        serie    = SerieInfo.Get(EntityInfo.OidSerie, false);

            conf.nota            = (provider.OidImpuesto == 1) ? Library.Invoice.Resources.Messages.NOTA_EXENTO_IGIC : string.Empty;
            conf.nota           += (conf.nota != string.Empty) ? Environment.NewLine : string.Empty;
            conf.nota           += (EntityInfo.Nota ? serie.Cabecera : "");
            conf.cuenta_bancaria = EntityInfo.CuentaBancaria;
            PgMng.Grow();

            ReportClass report = reportMng.GetDetailReport(EntityInfo, conf);

            if (SettingsMng.Instance.GetUseDefaultPrinter())
            {
                int n_copias = SettingsMng.Instance.GetDefaultNCopies();
                PrintReport(report, n_copias);
            }
            else
            {
                ShowReport(report);
            }
        }