Пример #1
0
        /// <summary>
        /// Exibe DAVs emitidos.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDAVsEmitidos_Click(object sender, EventArgs e)
        {
            if (MessageBox.AskYesNo("Deseja imprimir os DAVs Emitidos?","DAVs Emitidos!")
                == System.Windows.Forms.DialogResult.No) return;

            try
            {
                SelecionaPeriodoResult result = SelecionaPeriodo.Show();

                if (result.OK)
                {
                    Wait.Show();

                    using (IRelatorioGerencial relatorio = new OpenPOS.ECF.RelatorioGerencial())
                    {
                        relatorio.ImprimeDAVEmitidos(result.DataInicial, result.DataFinal);
                    }

                    MessageBox.Show("Verique se os DAVs foram impressos com sucesso.");
                }
            }
            catch (Exception ex)
            {
                MessageBox.ShowError(ex, false);
            }
            finally
            {
                Wait.Close();
            }
        }
Пример #2
0
        private void mnuMenuFiscalParametroConfig_Click(object sender, EventArgs e)
        {
            if(MessageBox.AskYesNo("Deseja imprimir os parâmetros de configuração?",
               "Parâmetros de configuração!") == System.Windows.Forms.DialogResult.No)
                return;

            try
            {
                Wait.Show();

                using(IRelatorioGerencial relatorio = new OpenPOS.ECF.RelatorioGerencial())
                {
                    relatorio.ParametroConfiguracao();
                }

                MessageBox.Show(String.Format("Verifique se os parâmetros de configuração foram impressos corretamente."));
            }
            catch(Exception ex)
            {
                MessageBox.ShowError(ex, false);
            }
            finally
            {
                Wait.Close();
            }
        }
Пример #3
0
 private void mnuMenuFiscalID_PAFECF_Click(object sender, EventArgs e)
 {
     try
     {
         Wait.Show();
         using(IRelatorioGerencial relatorio = new OpenPOS.ECF.RelatorioGerencial())
         {
             relatorio.IdentificacaoPAF();
         }
     }
     catch(Exception ex)
     {
         MessageBox.ShowError(ex, false);
     }
     finally
     {
         Wait.Close();
     }
 }
Пример #4
0
        /// <summary>
        /// Imprime as parcelas do faturamento
        /// </summary>
        /// <param name="venda">Venda que contem as parcelas</param>
        private void ImprimeParcela(IVendaCF venda, string mensagem = "")
        {
            using (IRelatorioGerencial rel = new OpenPOS.ECF.RelatorioGerencial(Settings.ECF.ECFAtual.ModeloACBR, Settings.ECF.ECFAtual.Porta))
            {
                string modeloecf = rel.SubModeloECF.ToString();
                string marcaecf = rel.Modelo.ToString();
                string versaoecf = rel.NumeroVersao;
                string numecf = rel.NumeroECF;

                rel.AbreRelatorioGerencial();
                WriteLine(string.Empty);
                WriteLine(string.Empty);
                WriteLine("{0} {1}", marcaecf, modeloecf);
                WriteLine(Settings.EmpresaAtual.NomeFantasia);
                WriteLine(string.Format("{0}, {1}", Settings.EmpresaAtual.Enderecos[0].Endereco.Logradouro, Settings.EmpresaAtual.Enderecos[0].Numero));
                WriteLine("CEP: {0} {1} {2}", Settings.EmpresaAtual.Enderecos[0].Endereco.CEP, Settings.EmpresaAtual.Enderecos[0].Endereco.Cidade, Settings.EmpresaAtual.Enderecos[0].Endereco.Estado);
                WriteLine("CNPJ: {0}", Settings.EmpresaAtual.Juridica.CNPJ);
                WriteLine("IE: {0}", Settings.EmpresaAtual.Juridica.IE);
                DrawLine();
                WriteLine("{0:dd/mm/yyyy} {0:hh:mm:ss} GNF: {1} COO: {2}", rel.DataHora, rel.GNF.ToString().PadLeft(6, '0'), rel.COO.ToString().PadLeft(6, '0'));
                WriteLine("         NÃO É UM DOCUMENTO FISCAL");
                WriteLine("             RELATÓRIO GERENCIAL");

                rel.LinhaRelatorioGerencial(string.Format("REFERENTE AO CUPOM FISCAL NÚMERO: {0}", venda.COO.ToString().PadLeft(6, '0')));
                WriteLine(string.Format("REFERENTE AO CUPOM FISCAL NÚMERO: {0}", venda.COO.ToString().PadLeft(6, '0')));

                rel.LinhaRelatorioGerencial(string.Format("{0}", venda.DadoPessoa.Cliente.NomeFantasia));
                WriteLine(string.Format("{0}", venda.DadoPessoa.Cliente.NomeFantasia));

                rel.LinhaRelatorioGerencial(string.Format("DT EMI: {0:dd/MM/yyyy} DT COMPRA: {1:dd/MM/yyyy}", venda.DataEmissao, venda.DataHoraMovimento));
                WriteLine(string.Format("DT EMI: {0:dd/MM/yyyy} DT COMPRA: {1:dd/MM/yyyy}", venda.DataEmissao, venda.DataHoraMovimento));

                rel.LinhaRelatorioGerencial(string.Format("VALOR DA COMPRA: R$ {0:N2}", venda.ValorTotalLiquido));
                WriteLine(string.Format("VALOR DA COMPRA: R$ {0:N2}", venda.ValorTotalLiquido));

                rel.LinhaRelatorioGerencial(string.Format("+--------------------------------------+"));
                WriteLine(string.Format("+--------------------------------------+"));

                rel.LinhaRelatorioGerencial(string.Format("                PARCELAS                "));
                WriteLine(string.Format("                PARCELAS                "));

                rel.LinhaRelatorioGerencial(string.Format("+--------------------------------------+"));
                WriteLine(string.Format("+--------------------------------------+"));

                rel.LinhaRelatorioGerencial(string.Format("PARCELA        DT DO VECTO         VALOR"));
                WriteLine(string.Format("PARCELA        DT DO VECTO         VALOR"));

                rel.LinhaRelatorioGerencial(string.Format("+--------------------------------------+"));
                WriteLine(string.Format("+--------------------------------------+"));

                foreach (Model.Financeiro.Lancamento.IParcela item in venda.Parcelas)
                {
                    rel.LinhaRelatorioGerencial(string.Format("{0} {1:dd/MM/yyyy} {2,14:0.00}", item.Parcela.ToString().PadLeft(2, '0').PadRight(14), item.DataVencimento, Unimake.Format.Currency(item.Valor)));
                    WriteLine(string.Format("{0} {1:dd/MM/yyyy} {2,14:0.00}", item.Parcela.ToString().PadLeft(2, '0').PadRight(14), item.DataVencimento, Unimake.Format.Currency(item.Valor)));

                    rel.LinhaRelatorioGerencial(string.Format("+--------------------------------------+"));
                    WriteLine(string.Format("+--------------------------------------+"));
                }

                rel.LinhaRelatorioGerencial("");
                WriteLine("");
                rel.LinhaRelatorioGerencial("________________________________________");
                WriteLine("________________________________________");
                rel.LinhaRelatorioGerencial("               Assinatura               ");
                WriteLine("               Assinatura               ");

                if (!String.IsNullOrEmpty(mensagem))
                {
                    rel.LinhaRelatorioGerencial(mensagem);
                    WriteLine(mensagem);
                }

                rel.FechaRelatorio(Enuns.ECF.TipoOutrosDocumentos.RG);

                DrawLine();
                WriteLine("{0} {1}", marcaecf, modeloecf);
                WriteLine("VERSÃO:{0} ECF:{1} LJ:{2}", versaoecf, numecf, venda.Empresa.EGUID);
                string serieECF = String.Format("FAB:{0}", venda.NumeroSerieECF);
                WriteLine(serieECF + " BR".PadLeft(25));
            }
        }