コード例 #1
0
        private void CerrarVenta()
        {
            if (cambio < 0)
            {
                Ambiente.Mensaje("Liquida el documento o mándalo a cuentas por cobrar");
                return;
            }

            if (tipoDoc.Equals("FAC") && Ambiente.Estacion.SolicitarFmpago)
            {
                using (var form = new FrmMetodoPago())
                {
                    if (form.ShowDialog() == DialogResult.OK)
                    {
                        metodoPago = form.MetodoPago;
                    }
                    else
                    {
                        metodoPago = "PUE";
                    }
                }
            }
            CobroConPuntos = ChkCobrarConPtos.Checked;
            totalLetra     = moneda.Convertir(total.ToString(), true);
            DialogResult   = DialogResult.OK;
            Close();
        }
コード例 #2
0
 private bool InsertaVenta()
 {
     using (var form = new FrmFormaPago())
     {
         if (form.ShowDialog() == DialogResult.OK)
         {
             venta                   = new Venta();
             venta.NoRef             = Ambiente.TraeSiguiente("FAC");
             venta.TipoDocId         = "FAC";
             venta.FechaDoc          = DateTime.Now;
             venta.ClienteId         = "SYS";
             venta.Descuento         = 0;
             venta.NoPrecio          = 1;
             venta.MonedaId          = "MXN";
             venta.DatosCliente      = "PUBLICO EN GENERAL";
             venta.EnFactCierre      = false;
             venta.Anulada           = false;
             venta.EsConversiondeTaF = false;
             venta.VentaOrigen       = null;
             venta.CxcId             = null;
             venta.Pago1             = total;
             venta.FormaPago1        = form.formapago == null ? "01" : form.formapago.FormaPagoId;
             venta.EstacionId        = Ambiente.Estacion.EstacionId;
             venta.Cortada           = false;
             venta.CreatedAt         = DateTime.Now;
             venta.CreatedBy         = Ambiente.LoggedUser.UsuarioId;
             venta.EstadoDocId       = "PEN";
             venta.SubTotal          = 0;
             venta.Impuesto          = 0;
             venta.Total             = 0;
             venta.TotalConLetra     = moneda.Convertir(venta.Total.ToString(), true);
             venta.DescXpuntos       = 0;
             venta.PuntosAplicados   = false;
             venta.Cambio            = 0;
             //venta.Unidades = ventas.Count;
             venta.UsoCfdi    = "P01";
             venta.MetodoPago = "PUE";
             venta.EsCxc      = false;
             return(ventaController.InsertOne(venta));
         }
         return(false);
     }
 }
コード例 #3
0
 private void Confirmar()
 {
     venta.EstadoDocId   = "CON";
     venta.Pago1         = venta.Total;
     venta.TotalConLetra = moneda.Convertir(venta.Total.ToString(), true);
     if (ventaController.UpdateOne(venta))
     {
         Ambiente.UpdateSiguiente("FAC");
         Ambiente.Mensaje("Proceso concluido con exito, sólo timbra la factura");
         BtnAceptar.Enabled = false;
     }
 }
コード例 #4
0
        private void CerrarVenta()
        {
            if (cambio < 0)
            {
                Ambiente.Mensaje("Liquida el documento o mándalo a cuentas por cobrar");
                return;
            }

            if ((TxtPago1.Text.Trim().Length > 0 && formaPago1 == null))
            {
                Ambiente.Mensaje("Busque y seleccione la forma de pago 1");
                DialogResult = DialogResult.Cancel;
                return;
            }
            if ((TxtPago2.Text.Trim().Length > 0 && formaPago2 == null))
            {
                Ambiente.Mensaje("Busque y seleccione la forma de pago 2");
                DialogResult = DialogResult.Cancel;
                return;
            }
            if ((TxtPago3.Text.Trim().Length > 0 && formaPago3 == null))
            {
                Ambiente.Mensaje("Busque y seleccione la forma de pago 3");
                DialogResult = DialogResult.Cancel;
                return;
            }
            //if (tipoDoc.Equals("FAC") && Ambiente.Estacion.SolicitarFmpago)
            //{
            //    using (var form = new FrmMetodoPago())
            //    {
            //        if (form.ShowDialog() == DialogResult.OK)
            //            metodoPago = form.MetodoPago;
            //        else
            //            metodoPago = "PUE";
            //    }
            //}



            CobroConPuntos = ChkCobrarConPtos.Checked;
            totalLetra     = moneda.Convertir(total.ToString(), true);
            DialogResult   = DialogResult.OK;
            Close();
        }
コード例 #5
0
        public async Task <ReciboDto> GeneraReciboDto(long recibo)
        {
            ReciboDto                    result                     = new ReciboDto();
            CobGeneralCobranza           cobGeneralCobranza         = new CobGeneralCobranza();
            List <CobGrabacionCobranzas> listaCobGrabacionCobranzas = new List <CobGrabacionCobranzas>();

            try
            {
                //Crea Objeto General cobranzas
                cobGeneralCobranza = await GetGeneralCobranzaPorDocumento(recibo);

                CobGeneralCobranzaDto generalCobranzasDtos = _mapper.Map <CobGeneralCobranzaDto>(cobGeneralCobranza);

                MtrCliente cliente = await _mtrClienteService.GetByIdAsync(generalCobranzasDtos.IdCliente);

                MtrVendedor vendedor = await _mtrVendedorService.GetByIdAsync(cliente.Vendedor1);

                generalCobranzasDtos.NombreCliente          = cliente.NoRegTribut + " " + cliente.Nombre.Trim();
                generalCobranzasDtos.IdCliente              = generalCobranzasDtos.IdCliente.Trim();
                generalCobranzasDtos.FechaTransaccionString = generalCobranzasDtos.FechaTransaccion.ToShortDateString();
                generalCobranzasDtos.NombreVendedor         = vendedor.Nombre;
                generalCobranzasDtos.vendedor         = vendedor.Codigo;
                generalCobranzasDtos.CorreoVendedor   = vendedor.EMail;
                generalCobranzasDtos.TelefonoVendedor = vendedor.TlfCelular;



                decimal decimalValue = generalCobranzasDtos.MontoTransaccion;
                generalCobranzasDtos.MontoTransaccionString = string.Format("{0:N}", decimalValue); // 1,234,567.00


                //creamos el objeto
                Moneda oMoneda = new Moneda();

                //primer parametro es la cantidad en string
                //segundo parametro es si queremos que sea mayuscula
                //tercer parametro la moneda


                MtrTipoMoneda tipoMoneda = await _mtrTipoMonedaService.GetById((long)cobGeneralCobranza.IdMtrTipoMoneda);

                string MonedaString = tipoMoneda.Descripcion;



                string resultado = oMoneda.Convertir(generalCobranzasDtos.MontoTransaccion.ToString(), true, MonedaString);
                generalCobranzasDtos.MontoLetras = resultado;


                decimal?detalleValue = generalCobranzasDtos.TotalDetalleCobrado;
                generalCobranzasDtos.TotalDetalleCobradoString = string.Format("{0:N}", detalleValue);
                generalCobranzasDtos.Status = EstatusRecibo(cobGeneralCobranza);

                MtrBancos banco = await _mtrBancosService.GetByCodigo(generalCobranzasDtos.IdBanco);

                generalCobranzasDtos.NombreBanco = banco.Nombre;

                CobTipoTransaccion tipoTransaccion = await _cobTipoTransaccionService.GetById(generalCobranzasDtos.IdTipoTransaccion);

                generalCobranzasDtos.NombreTipoTransaccion = tipoTransaccion.NombreTipoTransaccion;
                generalCobranzasDtos.FlagImpuesto          = tipoTransaccion.FlagImpuesto;


                MtrTipoMoneda mtrTipoMoneda = await _mtrTipoMonedaService.GetById((long)generalCobranzasDtos.IdMtrTipoMoneda);

                generalCobranzasDtos.NombreTipoMoneda = mtrTipoMoneda.Descripcion;



                listaCobGrabacionCobranzas = _unitOfWork.CobGrabacionCobranzasRepository.GetByDocumento(recibo);
                listaCobGrabacionCobranzas = listaCobGrabacionCobranzas.Where(x => x.DocumentoSap == "").ToList();

                List <CobGrabacionCobranzaDto> listaCobGrabacionCobranzasDto = _mapper.Map <List <CobGrabacionCobranzaDto> >(listaCobGrabacionCobranzas);

                foreach (CobGrabacionCobranzaDto item in listaCobGrabacionCobranzasDto)
                {
                    item.CuentaBancaria = banco.CodContable;
                    item.Moneda         = mtrTipoMoneda.Descripcion;
                    if (item.Transaccion == "RU")
                    {
                        item.DocAfectaMostrar = item.Cotizacion;
                    }
                    else
                    {
                        item.DocAfectaMostrar = item.DocAfectaSap;
                    }

                    decimalValue      = (decimal)item.Monto;
                    item.MontoMostrar = string.Format("{0:N}", decimalValue); // 1,234,567.00

                    CobEstadoDeCuenta cobEstadoDeCuenta = await _cobEstadoCuentaService.GetEstadoCuentaById(item.DocAfecta);

                    if (cobEstadoDeCuenta != null)
                    {
                        decimalValue              = (decimal)cobEstadoDeCuenta.BaseImponible;
                        item.BaseImponible        = (decimal)cobEstadoDeCuenta.BaseImponible;
                        item.BaseImponibleMostrar = string.Format("{0:N}", decimalValue); // 1,234,567.00
                        decimalValue              = (decimal)cobEstadoDeCuenta.Iva;
                        item.Iva        = (decimal)cobEstadoDeCuenta.Iva;
                        item.IvaMostrar = string.Format("{0:N}", decimalValue); // 1,234,567.00
                        decimalValue    = (decimal)cobEstadoDeCuenta.MontoOriginal;

                        item.MontoOriginalMostrar = string.Format("{0:N}", decimalValue); // 1,234,567.00
                        item.FechaDocumento       = cobEstadoDeCuenta.FechaDocumento;
                        DateTime fechaDocumento = (DateTime)cobEstadoDeCuenta.FechaDocumento;
                        item.FechaDocumentoString = fechaDocumento.ToShortDateString();
                    }

                    //List<CobPagosRetencionesDto> listCobPagosRetencionesDto = new List<CobPagosRetencionesDto>();
                    List <CobPagosRetenciones> listCobPagosRetenciones = _unitOfWork.CobPagosRetencionesRepository.GetByIdCobranzas(item.Id);

                    List <CobPagosRetencionesDto> listCobPagosRetencionesDto = _mapper.Map <List <CobPagosRetencionesDto> >(listCobPagosRetenciones);

                    if (listCobPagosRetencionesDto != null && listCobPagosRetencionesDto.Count > 0)
                    {
                        foreach (CobPagosRetencionesDto itemRet in listCobPagosRetencionesDto)
                        {
                            decimalValue        = itemRet.Monto;
                            itemRet.MontoString = string.Format("{0:N}", decimalValue); // 1,234,567.00

                            CobTransacciones transaccion = await _cobTransaccionesService.GetById(itemRet.IdTransaccion);

                            if (transaccion != null)
                            {
                                itemRet.NombreTransaccion = transaccion.NombreTransaccion;
                                itemRet.TxOrigen          = transaccion.TipoSap;
                            }
                            itemRet.FechaComprobanteString = itemRet.FechaComprobante.ToShortDateString();
                        }
                    }


                    item.CobPagosRetencionesDto = listCobPagosRetencionesDto;
                }



                result.CobGeneralCobranzaDto   = generalCobranzasDtos;
                result.CobGrabacionCobranzaDto = listaCobGrabacionCobranzasDto;

                return(result);
            }
            catch (Exception e)
            {
                string message = e.Message;
                throw;
            }
        }
コード例 #6
0
        public ActionResult ConsultarReciboCreditoR(string _idCredito, string _idAso)
        {
            string _mensaje = "<div class='alert alert-danger text-center' role='alert'>OCURRIÓ UN ERROR INESPERADO</div>";
            bool   _validar = false;

            try
            {
                int    _idCredEntero = Convert.ToInt32(_idCredito);
                var    _objCredito = clscred.mostrarobjCred(_idCredEntero);
                Moneda oMoneda = new Moneda();
                int    _idAsoEntero = Convert.ToInt32(_idAso);
                var    _objAso = clsaso.mostrar().Where(c => c.id_asociacion == _idAsoEntero).FirstOrDefault();
                string aso = ""; string prs = ""; string tsrr = "";
                if (_objAso.descripcion == "AETPAM")
                {
                    aso  += "ASOCIACIÓN DE EMPLEADOS Y TRABAJADORES DE LA ESCUELA SUPERIOR POLITÉCNICA AGROPECURIA DE MANABÍ “MANUEL FÉLIX LÓPEZ”";
                    prs  += "Ing. Fabián Álava Rade";
                    tsrr += "Lcda. Talia Saavedra Escalante";
                }
                else
                {
                    aso  += "ASOCIACIÓN DE PROFESORES DE LA ESCUELA SUPERIOR POLITÉCNICA AGROPECURIA DE MANABÍ “MANUEL FÉLIX LÓPEZ”";
                    prs  += "Ing. Gabriel Navarrete";
                    tsrr += "Lcda. Maricela Gonzales";
                }

                string resultado = oMoneda.Convertir((_objCredito.cantidad).ToString(), true, "DOLARES");

                string _tablaFinal = "<table class='table' width='80%' cellspacing='0' cellpadding='0' style='margin: 0 auto;'>" +
                                     "<thead>" +
                                     "<tr>" +
                                     "<td colspan='5' style='text-align:right;'><h4><b><br/><br/><br/><br/> N°: ______. </b></h4></td><br/>" +
                                     "</tr> " +
                                     "<tr>" +
                                     "<th colspan='5'><h2><center><br/>RECIBO<br/></center></h2></th>" +
                                     "</tr> " +
                                     "<tr>" +
                                     "<td colspan='1'></td>" +
                                     "<td colspan='3' style='text-align: justify;'><br/><br/><h4> Yo, <b>" + _objCredito.persona + "</b>," +
                                     "  con cédula de ciudadanía Nº: <b>" + _objCredito.cedula + "</b> recibí " +
                                     "de la " + aso + " la Cantidad de <b> $ " + _objCredito.cantidad + "</b> (" + resultado + " de" +
                                     " los Estados Unidos de Norte América), en calidad de PRÉSTAMO, mismos que me comprometo a " +
                                     "cancelar por medio de <b> DESCUENTOS POR ROL,</b> en " + _objCredito.numero_cuota + " cuotas de <b>$ " + _objCredito.desc_mensual +
                                     "</b> dólares  a partir del mes de <b>______/" + DateTime.Now.Year + "</b>.</h4></td>" +
                                     "<td colspan='1'></td>" +
                                     "</tr>" +
                                     "<tr>" +
                                     "<th colspan='10'></th>" +
                                     "</tr> " +
                                     "<tr>" +
                                     "<th colspan='10'><h4>Calceta, " + DateTime.Now.ToString("MMMM dd, yyyy") + "</h4></th>" +
                                     "</tr> " +
                                     "<tr>" +
                                     "<th colspan='10'><br/><br/><br/></th>" +
                                     "</tr> " +
                                     "<tr>" +
                                     "<td colspan='1'></td>" +
                                     "<td colspan='1' style='background-color:#f7f5f5'><center><b> ________________<br/></b></center></th>" +
                                     "<td colspan='1' style='background-color:#f7f5f5'><center><b> ________________<br/></b></center></th>" +
                                     "<td colspan='1' style='background-color:#f7f5f5'><center><b> ________________<br/></b></center></th>" +
                                     "<td colspan='1'></td>" +
                                     "</tr>" +
                                     "<tr>" +
                                     "<td colspan='1'></td>" +
                                     "<td colspan='1' style='background-color:#f7f5f5'><center><b> RECIBÍ CONFORME <br/></b></center></th>" +
                                     "<td colspan='1' style='background-color:#f7f5f5'><center><b> ENTREGUÉ CONFORME<br/></b></center></th>" +
                                     "<td colspan='1' style='background-color:#f7f5f5'><center><b> ENTREGUÉ CONFORME<br/></b></center></th>" +
                                     "<td colspan='1'></td>" +
                                     "</tr>" +
                                     "<tr>" +
                                     "<td colspan='1'></td>" +
                                     "<td colspan='1'><center>" + _objCredito.persona + "</center></th>" +
                                     "<td colspan='1'><center>" + prs + "</center></th>" +
                                     "<td colspan='1'><center>" + tsrr + "</center></th>" +
                                     "<td colspan='1'></td>" +
                                     "</tr>" +
                                     "<tr>" +
                                     "<td colspan='1'></td>" +
                                     "<td colspan='1'><center><b> C.C.:" + _objCredito.cedula + " </b></center></th>" +
                                     "<td colspan='1'><center><b> PRESIDENTE - " + _objAso.descripcion + "</b></center></th>" +
                                     "<td colspan='1'><center><b> TESORERA - " + _objAso.descripcion + "</b></center></th>" +
                                     "<td colspan='1'></td>" +
                                     "</tr>" +
                                     "</thead>" +
                                     "</table>";

                _mensaje = "";
                _validar = true;
                return(Json(new { mensaje = _mensaje, validar = _validar, tabla = _tablaFinal }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                _mensaje = "<div class='alert alert-danger text-center' role='alert'>ERROR INTERNO DEL SISTEMA: " + ex.Message + "</div>";
            }
            return(Json(new { mensaje = _mensaje, validar = _validar }, JsonRequestBehavior.AllowGet));
        }
コード例 #7
0
        private void printDocument1_PrintPage(object sender, PrintPageEventArgs e)
        {
            try
            {
                StringFormat formato = new StringFormat();
                formato.Alignment     = StringAlignment.Near;
                formato.LineAlignment = StringAlignment.Near;

                e.Graphics.PageUnit    = GraphicsUnit.Millimeter;
                e.PageSettings.Margins = new Margins(0, 0, 0, 0);

                Pen  blackPen   = new Pen(Color.Black, (float)0.2);
                Font fontNormal = new Font("Arial", 9, FontStyle.Regular);
                Font fontSmall  = new Font("Arial", 8, FontStyle.Regular);

                Font fontBold = new Font("Arial", 9, FontStyle.Bold);

                Brush brocha = Brushes.Black;

                Point point1 = new Point(5, 5);
                Point point2 = new Point(205, 5);
                //  e.Graphics.DrawLine(blackPen, point1, point2);

                point1 = new Point(5, 5);
                point2 = new Point(5, 274);
                // e.Graphics.DrawLine(blackPen, point1, point2);

                point1 = new Point(5, 274);
                point2 = new Point(205, 274);
                //  e.Graphics.DrawLine(blackPen, point1, point2);

                point1 = new Point(205, 274);
                point2 = new Point(205, 5);
                // e.Graphics.DrawLine(blackPen, point1, point2);

                ////////////////////////////////////////////////////////////////
                ////                  row1 pictures, Tel, NFact               //
                ////////////////////////////////////////////////////////////////

                int row1PosY = 12, row1Cell0PosX = 10, row1Cell1PosX = 79, row1Cell2PosX = 167;
                e.Graphics.DrawImage(GOLLSYSTEM.Properties.Resources.Goll_Logo_Black, row1Cell0PosX, row1PosY, 60, 24);
                e.Graphics.DrawImage(GOLLSYSTEM.Properties.Resources.Logo_goll_center, row1Cell1PosX, row1PosY, 60, 18);
                e.Graphics.DrawString("TEL.: " + GOLLSYSTEM.Properties.Settings.Default.Tel, fontSmall, brocha, row1Cell1PosX + 18, row1PosY + 15);
                e.Graphics.DrawImage(GOLLSYSTEM.Properties.Resources.box_bill, row1Cell2PosX, row1PosY - 5, 38, 16);

                //   e.Graphics.DrawRectangle(new Pen(Brushes.Black, 1f), Rectangle.FromLTRB(row1Cell2PosX, row1PosY, 205, 25));
                e.Graphics.DrawString(currentFactura.NFactura, fontBold, brocha, row1Cell2PosX + 10, row1PosY + 1);

                ////////////////////////////////////////////////////////////////
                ////                  row2 total                              //
                ////////////////////////////////////////////////////////////////

                int row2PosY = 36, row2Cell0PosX = 8, row2Cell1PosX = 147;
                e.Graphics.DrawString("RECIBO DE INGRESO", fontNormal, brocha, row2Cell0PosX, row2PosY);
                decimal total = 0;
                foreach (Detfactura det in currentFactura.DetsFactura)
                {
                    total += det.Total - det.Descuento;
                }
                e.Graphics.DrawString("POR$ " + Decimal.Round(total, 2), fontNormal, brocha, row2Cell1PosX, row2PosY);
                point1 = new Point(row2Cell1PosX + 10, row2PosY + 4);
                point2 = new Point(190, row2PosY + 4);
                e.Graphics.DrawLine(blackPen, point1, point2);

                ////////////////////////////////////////////////////////////////
                ////                  row3 cliente                              //
                ////////////////////////////////////////////////////////////////

                int row3PosY = 48, row3Cell0PosX = 10;
                e.Graphics.DrawString("RECIBI DEL SR(ES):  " + PersonaDAL.getPersonaById(currentFactura.IdPersona).Nombre.ToUpper(), fontNormal, brocha, row3Cell0PosX, row3PosY);
                point1 = new Point(row3Cell0PosX + 32, row3PosY + 4);
                point2 = new Point(190, row3PosY + 4);
                e.Graphics.DrawLine(blackPen, point1, point2);

                ////////////////////////////////////////////////////////////////
                ////                  row4 datos del cliente                  //
                ////////////////////////////////////////////////////////////////

                int row4PosY = 56, row4Cell0PosX = 10, row4Cell1PosX = 64, row4Cell2PosX = 121;
                e.Graphics.DrawString("TEL.:", fontNormal, brocha, row4Cell0PosX, row4PosY);

                point1 = new Point(row4Cell0PosX + 9, row4PosY + 4);
                point2 = new Point(60, row4PosY + 4);
                e.Graphics.DrawLine(blackPen, point1, point2);

                e.Graphics.DrawString("CEL.:", fontNormal, brocha, row4Cell1PosX, row4PosY);
                point1 = new Point(row4Cell1PosX + 10, row4PosY + 4);
                point2 = new Point(118, row4PosY + 4);
                e.Graphics.DrawLine(blackPen, point1, point2);

                e.Graphics.DrawString("E-MAIL.:", fontNormal, brocha, row4Cell2PosX, row4PosY);
                point1 = new Point(row4Cell2PosX + 14, row4PosY + 4);
                point2 = new Point(190, row4PosY + 4);
                e.Graphics.DrawLine(blackPen, point1, point2);

                ////////////////////////////////////////////////////////////////
                ////                  row5 cantidad de                        //
                ////////////////////////////////////////////////////////////////

                int    row5PosY = 64, row5Cell0PosX = 10;
                Moneda moneda   = new Moneda();
                string Dolares  = Decimal.Round(total, 2).ToString().Substring(0, Decimal.Round(total, 2).ToString().Length - 3);
                string Centavos = Decimal.Round(total, 2).ToString().Substring(Decimal.Round(total, 2).ToString().Length - 2, 2);

                e.Graphics.DrawString("LA CANTIDAD DE:    " + moneda.Convertir(Dolares, true, "DOLARES").Substring(0, moneda.Convertir(Dolares, true, "DOLARES").Length - 6) + (Centavos == "00" ? "" : " CON " + moneda.Convertir(Centavos, true, "CENTAVOS").Substring(0, moneda.Convertir(Centavos, true, "CENTAVOS").Length - 6)), fontNormal, brocha, row5Cell0PosX, row5PosY);
                point1 = new Point(row5Cell0PosX + 32, row5PosY + 4);
                point2 = new Point(190, row5PosY + 4);
                e.Graphics.DrawLine(blackPen, point1, point2);

                ////////////////////////////////////////////////////////////////
                ////                  row6 concepto de                        //
                ////////////////////////////////////////////////////////////////

                int    row6PosY = 72, row6Cell0PosX = 10;
                string concepto = "";
                foreach (Detfactura det in currentFactura.DetsFactura)
                {
                    concepto = concepto + (det.Producto.Nombre + (det.Tipo == "M" ? " \"" + Convert.ToDateTime(CuotaDAL.getCuotaById(det.Matricdetfac.IdCuota).FhRegistro).ToString("MMMM", new CultureInfo("es-ES")) + "\"" : "") + (currentFactura.DetsFactura.Count > 1 ? currentFactura.DetsFactura.Last().Id == det.Id ? "." : ", " : ".") + "");
                }

                e.Graphics.DrawString("EN CONCEPTO DE:  " + concepto.ToUpper(), fontNormal, brocha, row6Cell0PosX, row6PosY);
                point1 = new Point(row6Cell0PosX + 32, row6PosY + 4);
                point2 = new Point(190, row6PosY + 4);
                e.Graphics.DrawLine(blackPen, point1, point2);

                ////////////////////////////////////////////////////////////////
                ////                  row7 total                              //
                ////////////////////////////////////////////////////////////////

                int row7PosY = 80, row7Cell0PosX = 10, row7Cell1PosX = 64, row7Cell2PosX = 121;

                e.Graphics.DrawString("RESERVACION", fontNormal, brocha, row7Cell0PosX, row7PosY);
                e.Graphics.DrawRectangle(new Pen(Brushes.Black, 0.5f), Rectangle.FromLTRB(row7Cell0PosX + 30, row7PosY, row7Cell0PosX + 40, row7PosY + 5));
                foreach (Detfactura det in currentFactura.DetsFactura)
                {
                    if (det.Tipo == "R")
                    {
                        e.Graphics.DrawImage(GOLLSYSTEM.Properties.Resources.marca_de_verificacion, row7Cell0PosX + 33, row7PosY, 5, 5);
                    }
                }


                e.Graphics.DrawString("MENSUALIDAD", fontNormal, brocha, row7Cell1PosX, row7PosY);
                e.Graphics.DrawRectangle(new Pen(Brushes.Black, 0.5f), Rectangle.FromLTRB(row7Cell1PosX + 30, row7PosY, row7Cell1PosX + 40, row7PosY + 5));
                foreach (Detfactura det in currentFactura.DetsFactura)
                {
                    if (det.Tipo == "M")
                    {
                        e.Graphics.DrawImage(GOLLSYSTEM.Properties.Resources.marca_de_verificacion, row7Cell1PosX + 33, row7PosY, 5, 5);
                    }
                }


                e.Graphics.DrawString("CANCELACION", fontNormal, brocha, row7Cell2PosX, row7PosY);
                e.Graphics.DrawRectangle(new Pen(Brushes.Black, 0.5f), Rectangle.FromLTRB(row7Cell2PosX + 30, row7PosY, row7Cell2PosX + 40, row7PosY + 5));
                foreach (Detfactura det in currentFactura.DetsFactura)
                {
                    if (det.Tipo == "C" || det.Tipo == "F")
                    {
                        e.Graphics.DrawImage(GOLLSYSTEM.Properties.Resources.marca_de_verificacion, row7Cell2PosX + 33, row7PosY, 5, 5);
                    }
                }


                ////////////////////////////////////////////////////////////////
                ////                  row8 Observacion                        //
                ////////////////////////////////////////////////////////////////

                int    row8PosY = 89, row8Cell0PosX = 10;
                string Obs1   = "";
                string Obs2   = "";
                string Obs3   = "";
                char[] letras = currentFactura.Observacion.ToArray();
                foreach (char letra in letras)
                {
                    if (Obs1.Length < 81)
                    {
                        Obs1 += letra;
                    }
                    else
                    if (Obs2.Length < 91)
                    {
                        Obs2 += letra;
                    }
                    else
                    if (Obs3.Length < 91)
                    {
                        Obs3 += letra;
                    }
                }
                e.Graphics.DrawString("OBSERVACION ", fontNormal, brocha, row8Cell0PosX, row8PosY);
                point1 = new Point(row8Cell0PosX + 28, row8PosY + 4);
                point2 = new Point(190, row8PosY + 4);
                e.Graphics.DrawLine(blackPen, point1, point2);
                e.Graphics.DrawString(Obs1.ToUpper(), fontSmall, brocha, row8Cell0PosX + 28, row8PosY);

                point1 = new Point(row8Cell0PosX, row8PosY + 4 + 7);
                point2 = new Point(190, row8PosY + 4 + 7);
                e.Graphics.DrawLine(blackPen, point1, point2);
                e.Graphics.DrawString(Obs2.ToUpper(), fontSmall, brocha, row8Cell0PosX, row8PosY + 7);

                point1 = new Point(row8Cell0PosX, row8PosY + 4 + 7 + 7);
                point2 = new Point(190, row8PosY + 4 + 7 + 7);
                e.Graphics.DrawLine(blackPen, point1, point2);
                e.Graphics.DrawString(Obs3.ToUpper(), fontSmall, brocha, row8Cell0PosX, row8PosY + 7 + 7);

                ////////////////////////////////////////////////////////////////
                ////                  row9 mora                               //
                ////////////////////////////////////////////////////////////////

                int row9PosY = 110, row9Cell0PosX = 57;

                e.Graphics.DrawString("NOTA: DESPUES DE " + Properties.Settings.Default.DaysMora + " DIAS SE COBRARA $" + Properties.Settings.Default.Mora + " POR MORA", fontNormal, brocha, row9Cell0PosX, row9PosY);

                ////////////////////////////////////////////////////////////////
                ////                  row10 recibo, fwcha                     //
                ////////////////////////////////////////////////////////////////

                int row10PosY = 128, row10Cell0PosX = 14, row10Cell1PosX = 149;

                point1 = new Point(row10Cell0PosX, row10PosY);
                point2 = new Point(54, row10PosY);
                e.Graphics.DrawLine(blackPen, point1, point2);

                e.Graphics.DrawString("RECIBO", fontNormal, brocha, row10Cell0PosX + 13, row10PosY + 1);

                point1 = new Point(row10Cell1PosX, row10PosY);
                point2 = new Point(190, row10PosY);
                e.Graphics.DrawLine(blackPen, point1, point2);

                e.Graphics.DrawString(YearDAL.getServerDate().ToString("dd/MM/yyyy"), fontBold, brocha, row10Cell1PosX + 11, row10PosY - 4);
                e.Graphics.DrawString("FECHA", fontNormal, brocha, row10Cell1PosX + 14, row10PosY + 1);

                ////////////////////////////////////////////////////////////////
                ////                  Duplicado                               //
                ////////////////////////////////////////////////////////////////
                point1 = new Point(5, 137);
                point2 = new Point(205, 137);
                e.Graphics.DrawLine(blackPen, point1, point2);
                int duplicatedTop = 137;
                ////////////////////////////////////////////////////////////////
                ////                  row1 pictures, Tel, NFact               //
                ////////////////////////////////////////////////////////////////

                row1PosY = 12 + duplicatedTop;
                e.Graphics.DrawImage(GOLLSYSTEM.Properties.Resources.Goll_Logo_Black, row1Cell0PosX, row1PosY, 60, 24);
                e.Graphics.DrawImage(GOLLSYSTEM.Properties.Resources.Logo_goll_center, row1Cell1PosX, row1PosY, 60, 18);
                e.Graphics.DrawString("TEL.: " + GOLLSYSTEM.Properties.Settings.Default.Tel, fontNormal, brocha, row1Cell1PosX + 18, row1PosY + 15);
                e.Graphics.DrawImage(GOLLSYSTEM.Properties.Resources.box_bill, row1Cell2PosX, row1PosY - 5, 38, 16);

                //   e.Graphics.DrawRectangle(new Pen(Brushes.Black, 1f), Rectangle.FromLTRB(row1Cell2PosX, row1PosY, 205, 25));
                e.Graphics.DrawString(currentFactura.NFactura, fontBold, brocha, row1Cell2PosX + 10, row1PosY + 1);

                ////////////////////////////////////////////////////////////////
                ////                  row2 total                              //
                ////////////////////////////////////////////////////////////////

                row2PosY = 36 + duplicatedTop;
                e.Graphics.DrawString("RECIBO DE INGRESO", fontNormal, brocha, row2Cell0PosX, row2PosY);
                e.Graphics.DrawString("POR$ " + Decimal.Round(total, 2), fontNormal, brocha, row2Cell1PosX, row2PosY);
                point1 = new Point(row2Cell1PosX + 10, row2PosY + 4);
                point2 = new Point(190, row2PosY + 4);
                e.Graphics.DrawLine(blackPen, point1, point2);

                ////////////////////////////////////////////////////////////////
                ////                  row3 cliente                              //
                ////////////////////////////////////////////////////////////////

                row3PosY = 48 + duplicatedTop;
                e.Graphics.DrawString("RECIBI DEL SR(ES):  " + PersonaDAL.getPersonaById(currentFactura.IdPersona).Nombre.ToUpper(), fontNormal, brocha, row3Cell0PosX, row3PosY);
                point1 = new Point(row3Cell0PosX + 32, row3PosY + 4);
                point2 = new Point(190, row3PosY + 4);
                e.Graphics.DrawLine(blackPen, point1, point2);

                ////////////////////////////////////////////////////////////////
                ////                  row4 datos del cliente                  //
                ////////////////////////////////////////////////////////////////

                row4PosY = 56 + duplicatedTop;
                e.Graphics.DrawString("TEL.:", fontNormal, brocha, row4Cell0PosX, row4PosY);

                point1 = new Point(row4Cell0PosX + 9, row4PosY + 4);
                point2 = new Point(60, row4PosY + 4);
                e.Graphics.DrawLine(blackPen, point1, point2);

                e.Graphics.DrawString("CEL.:", fontNormal, brocha, row4Cell1PosX, row4PosY);
                point1 = new Point(row4Cell1PosX + 10, row4PosY + 4);
                point2 = new Point(118, row4PosY + 4);
                e.Graphics.DrawLine(blackPen, point1, point2);

                e.Graphics.DrawString("E-MAIL.:", fontNormal, brocha, row4Cell2PosX, row4PosY);
                point1 = new Point(row4Cell2PosX + 14, row4PosY + 4);
                point2 = new Point(190, row4PosY + 4);
                e.Graphics.DrawLine(blackPen, point1, point2);

                ////////////////////////////////////////////////////////////////
                ////                  row5 cantidad de                        //
                ////////////////////////////////////////////////////////////////

                row5PosY = 64 + duplicatedTop;
                e.Graphics.DrawString("LA CANTIDAD DE:    " + moneda.Convertir(Dolares, true, "DOLARES").Substring(0, moneda.Convertir(Dolares, true, "DOLARES").Length - 6) + (Centavos == "00" ? "" : " CON " + moneda.Convertir(Centavos, true, "CENTAVOS").Substring(0, moneda.Convertir(Centavos, true, "CENTAVOS").Length - 6)), fontNormal, brocha, row5Cell0PosX, row5PosY);
                point1 = new Point(row5Cell0PosX + 32, row5PosY + 4);
                point2 = new Point(190, row5PosY + 4);
                e.Graphics.DrawLine(blackPen, point1, point2);

                ////////////////////////////////////////////////////////////////
                ////                  row6 concepto de                        //
                ////////////////////////////////////////////////////////////////

                row6PosY = 72 + duplicatedTop;
                e.Graphics.DrawString("EN CONCEPTO DE:  " + concepto.ToUpper(), fontNormal, brocha, row6Cell0PosX, row6PosY);
                point1 = new Point(row6Cell0PosX + 32, row6PosY + 4);
                point2 = new Point(190, row6PosY + 4);
                e.Graphics.DrawLine(blackPen, point1, point2);

                ////////////////////////////////////////////////////////////////
                ////                  row7 total                              //
                ////////////////////////////////////////////////////////////////

                row7PosY = 80 + duplicatedTop;

                e.Graphics.DrawString("RESERVACION", fontNormal, brocha, row7Cell0PosX, row7PosY);
                e.Graphics.DrawRectangle(new Pen(Brushes.Black, 0.5f), Rectangle.FromLTRB(row7Cell0PosX + 30, row7PosY, row7Cell0PosX + 40, row7PosY + 5));
                foreach (Detfactura det in currentFactura.DetsFactura)
                {
                    if (det.Tipo == "R")
                    {
                        e.Graphics.DrawImage(GOLLSYSTEM.Properties.Resources.marca_de_verificacion, row7Cell0PosX + 33, row7PosY, 5, 5);
                    }
                }


                e.Graphics.DrawString("MENSUALIDAD", fontNormal, brocha, row7Cell1PosX, row7PosY);
                e.Graphics.DrawRectangle(new Pen(Brushes.Black, 0.5f), Rectangle.FromLTRB(row7Cell1PosX + 30, row7PosY, row7Cell1PosX + 40, row7PosY + 5));
                foreach (Detfactura det in currentFactura.DetsFactura)
                {
                    if (det.Tipo == "M")
                    {
                        e.Graphics.DrawImage(GOLLSYSTEM.Properties.Resources.marca_de_verificacion, row7Cell1PosX + 33, row7PosY, 5, 5);
                    }
                }


                e.Graphics.DrawString("CANCELACION", fontNormal, brocha, row7Cell2PosX, row7PosY);
                e.Graphics.DrawRectangle(new Pen(Brushes.Black, 0.5f), Rectangle.FromLTRB(row7Cell2PosX + 30, row7PosY, row7Cell2PosX + 40, row7PosY + 5));
                foreach (Detfactura det in currentFactura.DetsFactura)
                {
                    if (det.Tipo == "C" || det.Tipo == "F")
                    {
                        e.Graphics.DrawImage(GOLLSYSTEM.Properties.Resources.marca_de_verificacion, row7Cell2PosX + 33, row7PosY, 5, 5);
                    }
                }


                ////////////////////////////////////////////////////////////////
                ////                  row8 Observacion                        //
                ////////////////////////////////////////////////////////////////

                row8PosY = 89 + duplicatedTop;

                e.Graphics.DrawString("OBSERVACION ", fontNormal, brocha, row8Cell0PosX, row8PosY);
                point1 = new Point(row8Cell0PosX + 28, row8PosY + 4);
                point2 = new Point(190, row8PosY + 4);
                e.Graphics.DrawLine(blackPen, point1, point2);
                e.Graphics.DrawString(Obs1.ToUpper(), fontSmall, brocha, row8Cell0PosX + 28, row8PosY);

                point1 = new Point(row8Cell0PosX, row8PosY + 4 + 7);
                point2 = new Point(190, row8PosY + 4 + 7);
                e.Graphics.DrawLine(blackPen, point1, point2);
                e.Graphics.DrawString(Obs2.ToUpper(), fontSmall, brocha, row8Cell0PosX, row8PosY + 7);

                point1 = new Point(row8Cell0PosX, row8PosY + 4 + 7 + 7);
                point2 = new Point(190, row8PosY + 4 + 7 + 7);
                e.Graphics.DrawLine(blackPen, point1, point2);
                e.Graphics.DrawString(Obs3.ToUpper(), fontSmall, brocha, row8Cell0PosX, row8PosY + 7 + 7);

                ////////////////////////////////////////////////////////////////
                ////                  row9 mora                               //
                ////////////////////////////////////////////////////////////////

                row9PosY = 110 + duplicatedTop;

                e.Graphics.DrawString("NOTA: DESPUES DE " + Properties.Settings.Default.DaysMora + " DIAS SE COBRARA $" + Properties.Settings.Default.Mora + " POR MORA", fontNormal, brocha, row9Cell0PosX, row9PosY);

                ////////////////////////////////////////////////////////////////
                ////                  row10 recibo, fwcha                     //
                ////////////////////////////////////////////////////////////////

                row10PosY = 128 + duplicatedTop;

                point1 = new Point(row10Cell0PosX, row10PosY);
                point2 = new Point(54, row10PosY);
                e.Graphics.DrawLine(blackPen, point1, point2);

                e.Graphics.DrawString("RECIBO", fontNormal, brocha, row10Cell0PosX + 13, row10PosY + 1);

                point1 = new Point(row10Cell1PosX, row10PosY);
                point2 = new Point(190, row10PosY);
                e.Graphics.DrawLine(blackPen, point1, point2);

                e.Graphics.DrawString(YearDAL.getServerDate().ToString("dd/MM/yyyy"), fontBold, brocha, row10Cell1PosX + 11, row10PosY - 4);
                e.Graphics.DrawString("FECHA", fontNormal, brocha, row10Cell1PosX + 14, row10PosY + 1);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.ToString());
            }
        }