예제 #1
0
        private void CarregaMeiosDePagamento()
        {
            int count = ACBrECFInterop.ECF_DadosReducaoZClass_GetFPGCount(this.Handle);

            CheckResult(count);

            formasPagamento = new FormaPagamento[count];
            for (int i = 0; i < count; i++)
            {
                var record = new ACBrECFInterop.FormaPagamentoRec();
                int ret    = ACBrECFInterop.ECF_DadosReducaoZClass_GetFPG(this.Handle, ref record, i);
                CheckResult(ret);

                FormaPagamento formaPagamento = new FormaPagamento();
                formaPagamento.Indice           = FromUTF8(record.Indice);
                formaPagamento.Descricao        = FromUTF8(record.Descricao);
                formaPagamento.PermiteVinculado = record.PermiteVinculado;
                formaPagamento.Total            = Convert.ToDecimal(record.Total);
                formaPagamento.Data             = DateTime.FromOADate(record.Data);
                formaPagamento.TipoDoc          = FromUTF8(record.TipoDoc);

                formasPagamento[i] = formaPagamento;
            }
        }
예제 #2
0
		private void ImprimeMeiosPgto()
		{
			var fPgto = new List<FormaPagamento>();

		    var item = new FormaPagamento
		    {
		        Data = DateTime.Now,
		        Descricao = "Dinheiro",
		        Indice = "01",
		        PermiteVinculado = false,
		        TipoDoc = "Cumpom Fiscal",
		        Total = 10.30m
		    };

		    fPgto.Add(item);
            acbrECF.PafMF_RelMeiosPagamento(fPgto, "Forma de Pagamento", 0);
		}
예제 #3
0
        private void CarregaFormasPagamento(int count)
        {
            formasPagamento = new FormaPagamento[count];
            for (int i = 0; i < count; i++)
            {
                var record = new ACBrECFInterop.FormaPagamentoRec();
                int ret = ACBrECFInterop.ECF_GetFormaPagamento(this.Handle, ref record, i);
                CheckResult(ret);

                FormaPagamento formaPagamento = new FormaPagamento
                {
                    Indice = FromUTF8(record.Indice),
                    Descricao = FromUTF8(record.Descricao),
                    PermiteVinculado = record.PermiteVinculado,
                    Total = Convert.ToDecimal(record.Total),
                    Data = DateTime.FromOADate(record.Data),
                    TipoDoc = FromUTF8(record.TipoDoc)
                };

                formasPagamento[i] = formaPagamento;
            }
        }
예제 #4
0
        public FormaPagamento AchaFPGIndice(string indice)
        {
            ACBrECFInterop.FormaPagamentoRec FormaRec = new ACBrECFInterop.FormaPagamentoRec();
            int ret = ACBrECFInterop.ECF_AchaFPGIndice(this.Handle, ToUTF8(indice), ref FormaRec);
            CheckResult(ret);

            if (ret == 0)
                return null;

            FormaPagamento Forma = new FormaPagamento
            {
                Data = DateTime.FromOADate(FormaRec.Data),
                Descricao = FromUTF8(FormaRec.Descricao),
                Indice = FromUTF8(FormaRec.Indice),
                PermiteVinculado = FormaRec.PermiteVinculado,
                TipoDoc = FromUTF8(FormaRec.TipoDoc),
                Total = Convert.ToDecimal(FormaRec.Total)
            };

            int count = GetInt32(ACBrECFInterop.ECF_GetFPGCount);
            CheckResult(count);
            CarregaFormasPagamento(count);
            return Forma;
        }
예제 #5
0
        public void PafMF_RelMeiosPagamento(FormaPagamento[] formasPagamento, string TituloRelatorio, int indiceRelatorio)
#endif
        {
            ACBrECFInterop.FormaPagamentoRec[] record = new ACBrECFInterop.FormaPagamentoRec[formasPagamento.Length];
            for (int i = 0; i < formasPagamento.Length; i++)
            {
                record[i].Indice = formasPagamento[i].Indice;
                record[i].Descricao = ToUTF8(formasPagamento[i].Descricao);
                record[i].PermiteVinculado = formasPagamento[i].PermiteVinculado;
                record[i].Total = Convert.ToDouble(formasPagamento[i].Total);
                record[i].Data = formasPagamento[i].Data.ToOADate();
                record[i].TipoDoc = ToUTF8(formasPagamento[i].TipoDoc);
            }

            int ret = ACBrECFInterop.ECF_PafMF_RelMeiosPagamento(this.Handle, record, record.Length, ToUTF8(TituloRelatorio), indiceRelatorio);
            CheckResult(ret);
        }
예제 #6
0
 public void PafMF_RelMeiosPagamento(ref FormaPagamento[] formasPagamento, string TituloRelatorio, int indiceRelatorio)
예제 #7
0
		private void CarregaMeiosDePagamento()
		{
			int count = ACBrECFInterop.ECF_DadosReducaoZClass_GetFPGCount(this.Handle);
			CheckResult(count);

			formasPagamento = new FormaPagamento[count];
			for (int i = 0; i < count; i++)
			{
				var record = new ACBrECFInterop.FormaPagamentoRec();
				int ret = ACBrECFInterop.ECF_DadosReducaoZClass_GetFPG(this.Handle, ref record, i);
				CheckResult(ret);

				FormaPagamento formaPagamento = new FormaPagamento();
				formaPagamento.Indice = FromUTF8(record.Indice);
				formaPagamento.Descricao = FromUTF8(record.Descricao);
				formaPagamento.PermiteVinculado = record.PermiteVinculado;
				formaPagamento.Total = Convert.ToDecimal(record.Total);
				formaPagamento.Data = DateTime.FromOADate(record.Data);
				formaPagamento.TipoDoc = FromUTF8(record.TipoDoc);

				formasPagamento[i] = formaPagamento;
			}
		}