コード例 #1
0
        public RetornoBancoBoletoBE BaixaManual(int id, string comentario, string formapagamento, string jurosparamento, int userId, int conf_id)
        {
            if (formapagamento == "Deposito")
            {
                formapagamento = "DEP";
            }
            if (formapagamento == "Transferencia")
            {
                formapagamento = "TFB";
            }

            var nota = new NotasBLL().SelectId(new NotasBE {
                not_numero = id, conf_id = conf_id
            });
            var cliente = new ClienteBLL().SelectId(nota.cli_id);
            var total   = Convert.ToDecimal(jurosparamento) + nota.not_totalliquido;
            var obj     = new RetornoBancoBoletoBE(id, "", nota.not_dtVencimento, DateTime.Now, nota.not_totalliquido, total, Convert.ToDecimal(jurosparamento), cliente.cli_razaoSocial, "--", formapagamento, userId);

            obj.retBol_comentarios = comentario;
            //) { retBol_comentarios = comentario, retBol_seuBanco = id, retBol_nossoNumero = "", retBol_formapagamento = formapagamento, retBol_ociliacao = jurosparamento }
            obj.retBol_id = new RetornoBancoBoletoDao().Insert(obj);
            return(obj);
        }
コード例 #2
0
        public void ImportarNotas()
        {
            ImportarDadosDao _i = new ImportarDadosDao();
            NotasBLL         _n = new NotasBLL();
            ClienteBLL       _c = new ClienteBLL();

            foreach (var item in _i.ImportarNotas())
            {
                var nota = item.a.Split('.');
                //===========================================
                //-----ADICIONAR O NOME DA EMPRESA--
                //===========================================
                var cliente = _c.SelectBuscaNomeFantasia(item.b, 1);


                NotasBE n = new NotasBE();
                n.not_numero       = Convert.ToInt32(nota[0]);
                n.cli_id           = cliente.cli_id;
                n.not_tipoReceita  = item.c;
                n.not_codReceita   = item.d;
                n.not_dtEmissao    = Convert.ToDateTime(item.e);
                n.not_dtVencimento = Convert.ToDateTime(item.f);
                n.not_pis          = Convert.ToDecimal(item.g);
                n.not_confins      = Convert.ToDecimal(item.h);
                n.not_cssl         = Convert.ToDecimal(item.i);
                n.not_irrf         = Convert.ToDecimal(item.j);
                n.not_totalbruto   = Convert.ToDecimal(item.k);
                n.not_totalliquido = Convert.ToDecimal(item.l);
                n.not_preenchida   = item.m == "1" ? 1 : 0;
                n.not_emitida      = item.n == "1" ? true : false;
                n.not_situacao     = item.o;


                _n.Insert(n);
            }
        }