From 79c2edf1feadb96d7ac3370ede5101019c8a7d63 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Sat, 4 Jan 2020 14:18:57 -0700 Subject: [PATCH 1/8] cambios en el reporte de trasaldo --- Compras/PopUpVerFactura.aspx.vb | 14 +- Empresas/Grales/Formatos/Traslado.rdlc | 309 +++++++++++++++++++++++-- 2 files changed, 303 insertions(+), 20 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 00ce5db51..5adbdbc87 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1884,14 +1884,24 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("CveConcepto", "8")) 'FolioTraspaso.ToString 'params.Add(New ReportParameter("TipoTraslado", "AVISO")) 'FolioTraspaso.ToString - params.Add(New ReportParameter("SubProyecto", String.Format("Traslado de: {0} A {1}", Almacen, AlmacenDestino))) 'DdlAlmacenDestino.SelectedItem.ToString + params.Add(New ReportParameter("SubProyecto", "Traslado de: ")) 'DdlAlmacenDestino.SelectedItem.ToString + params.Add(New ReportParameter("Origen", Almacen)) + params.Add(New ReportParameter("Destino", AlmacenDestino)) params.Add(New ReportParameter("Folio", Folio)) 'FolioTraspaso.ToString params.Add(New ReportParameter("Fecha", Fecha)) 'TxtFecha.Text params.Add(New ReportParameter("NombreEntrego", Capturo)) 'UsuarioActual.Nombre params.Add(New ReportParameter("NombreAccion", Recibio)) 'TxtResponsable.Text - params.Add(New ReportParameter("Accion", "Recibió")) 'Antes Trasladó + params.Add(New ReportParameter("Accion", "RECIBE")) 'Antes Trasladó params.Add(New ReportParameter("Observaciones", Observaciones)) + Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) + Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + + If Imagen.Exists Then + params.Add(New ReportParameter("LogoPath", logouri)) + Else + params.Add(New ReportParameter("LogoPath", "")) + End If Dim DTCliente As New DataTable Dim SBDireccionO As New StringBuilder() diff --git a/Empresas/Grales/Formatos/Traslado.rdlc b/Empresas/Grales/Formatos/Traslado.rdlc index 382e09b90..626b3516a 100644 --- a/Empresas/Grales/Formatos/Traslado.rdlc +++ b/Empresas/Grales/Formatos/Traslado.rdlc @@ -15,7 +15,13 @@ 2.19837cm - 12.15373cm + 9.27592cm + + + 1.41521cm + + + 1.45633cm @@ -190,6 +196,90 @@ + + + + true + true + + + + + Costo + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Valor + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + @@ -207,7 +297,7 @@ =Fields!Cantidad.Value @@ -330,6 +420,74 @@ + + + + true + true + + + + + =Fields!PU.Value + + + + + + + PU + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + Total + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + @@ -340,6 +498,8 @@ + + @@ -356,7 +516,7 @@ 0.07056cm 0.00711cm 0.73434cm - 19.57434cm + 19.56807cm @@ -370,7 +530,7 @@ 7.70923in - 2.09944cm + 5.08094cm true true @@ -392,9 +552,10 @@ Textbox2 - 0.00711cm - 0.6cm - 16.69653cm + 0.03803cm + 4.37423cm + 2.04667cm + 12.55984cm @@ -424,8 +585,8 @@ Textbox4 - 1.34069cm - 17.81839cm + 4.48094cm + 17.3888cm 0.6cm 1.76305cm 1 @@ -456,8 +617,8 @@ Textbox5 - 1.34067cm - 16.70363cm + 4.48092cm + 16.27404cm 0.6cm 1.11476cm 2 @@ -487,8 +648,8 @@ Textbox4 - 1.34066cm - 15.46894cm + 0.63803cm + 17.07518cm 0.6cm 1.2347cm 3 @@ -517,8 +678,8 @@ Textbox5 - 1.34066cm - 14.2869cm + 0.03803cm + 17.07518cm 0.6cm 1.18203cm 4 @@ -549,7 +710,7 @@ Textbox2 - 0.7407cm + 2.6457cm 0.00711cm 0.6cm 7.66226cm @@ -582,7 +743,7 @@ Textbox2 - 1.34066cm + 3.24566cm 0.00711cm 0.6cm 14.27979cm @@ -597,6 +758,101 @@ 2pt + + true + true + + + + + Origen: + + + + =Parameters!Origen.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Destino: + + + + =Parameters!Destino.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.03803cm + 0.1121cm + 2.53711cm + 4.08574cm + 9 + + + + @@ -1324,6 +1580,23 @@ true ReportParameter1 + + String + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + From 2062dbdb0519af81152b4b09dff1ba27b989a380 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Sun, 5 Jan 2020 18:46:55 -0700 Subject: [PATCH 2/8] Iva 6% boton agregar ps se agrego valdia si se muest5ra boton de 6 % --- Compras/Compras.aspx.vb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 5fac2308b..3d24b5aef 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -2237,6 +2237,11 @@ Partial Class Compras_Compras If UsuarioActual.Empresa.Funcionalidad(577).ToString = "1" Then + 'If UsuarioActual.CveRol = 1 Then + ' Alert("Ok funcionalidad 577") + 'End If + + If RetencionIVA = 0 And IVAOriginal > 0 Then For Each dRow As DataRow In TmpDT.Rows If dRow("CveTipoPS").ToString.ToEntero = 1 Then @@ -16988,6 +16993,26 @@ Partial Class Compras_Compras CompruebaAgregar() GuardaAC() End If + + If UsuarioActual.Empresa.Funcionalidad(577).ToString = "1" Then + + 'If UsuarioActual.CveRol = 1 Then + ' Alert($"Ok funcionalidad 577 RetencionIVA { RetencionIVA} IVAOriginal {IVAOriginal}") + 'End If + + If RetencionIVA = 0 And IVAOriginal > 0 Then + For Each dRow As DataRow In TmpDT.Rows + If dRow("CveTipoPS").ToString.ToEntero = 1 Then + tdIVA6.Visible = True + Exit For + End If + Next + End If + + End If + + + UpPS.Update() CargaGvPersonal() End Sub From 892e4dff87e26b9658b4631df74786d09557312c Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 6 Jan 2020 09:49:02 -0700 Subject: [PATCH 3/8] correccion en el formato de traslado --- Compras/PopUpVerFactura.aspx.vb | 34 +++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 5adbdbc87..afd814184 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1884,9 +1884,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("CveConcepto", "8")) 'FolioTraspaso.ToString 'params.Add(New ReportParameter("TipoTraslado", "AVISO")) 'FolioTraspaso.ToString - params.Add(New ReportParameter("SubProyecto", "Traslado de: ")) 'DdlAlmacenDestino.SelectedItem.ToString - params.Add(New ReportParameter("Origen", Almacen)) - params.Add(New ReportParameter("Destino", AlmacenDestino)) + params.Add(New ReportParameter("SubProyecto", String.Format("Traslado de: {0} A {1}", Almacen, AlmacenDestino))) 'DdlAlmacenDestino.SelectedItem.ToString params.Add(New ReportParameter("Folio", Folio)) 'FolioTraspaso.ToString params.Add(New ReportParameter("Fecha", Fecha)) 'TxtFecha.Text params.Add(New ReportParameter("NombreEntrego", Capturo)) 'UsuarioActual.Nombre @@ -1894,15 +1892,6 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Accion", "RECIBE")) 'Antes Trasladó params.Add(New ReportParameter("Observaciones", Observaciones)) - Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) - Else - params.Add(New ReportParameter("LogoPath", "")) - End If - Dim DTCliente As New DataTable Dim SBDireccionO As New StringBuilder() Dim SBDireccionD As New StringBuilder() @@ -2013,6 +2002,16 @@ Partial Class PopUpVerFactura ImprimirPDF(String.Format(RutaFormato, UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios") Else + Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) + Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + + If Imagen.Exists Then + params.Add(New ReportParameter("LogoPath", logouri)) + Else + params.Add(New ReportParameter("LogoPath", "")) + End If + params.Add(New ReportParameter("Origen", Almacen)) + params.Add(New ReportParameter("Destino", AlmacenDestino)) params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) @@ -2052,6 +2051,17 @@ Partial Class PopUpVerFactura ImprimirPDF(String.Format("{0}Formatos\Traslado.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Recepción de Traslado - {0}", Folio), RDSName:="DsInventarios") Else + Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) + Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + + If Imagen.Exists Then + params.Add(New ReportParameter("LogoPath", logouri)) + Else + params.Add(New ReportParameter("LogoPath", "")) + End If + params.Add(New ReportParameter("Origen", Almacen)) + params.Add(New ReportParameter("Destino", AlmacenDestino)) + params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) From cded13030a3e6ca8717f966ab62a26af0c9804f4 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 6 Jan 2020 09:52:18 -0700 Subject: [PATCH 4/8] correccion en la fecha de reporte --- Acumuladores/RepEntradasUsadosClientes.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Acumuladores/RepEntradasUsadosClientes.aspx.vb b/Acumuladores/RepEntradasUsadosClientes.aspx.vb index 58fbe6141..f20abeef3 100644 --- a/Acumuladores/RepEntradasUsadosClientes.aspx.vb +++ b/Acumuladores/RepEntradasUsadosClientes.aspx.vb @@ -74,7 +74,7 @@ Partial Class Acumuladores_RepEntradasUsadosClientes Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2)) Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1) - Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Month(Today), Mes, Year(Today)) + Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today)) Dim params As New List(Of ReportParameter) From 397e3131d3ebb2dae9c90d3ecadb9a41a449a24e Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Mon, 6 Jan 2020 10:45:15 -0700 Subject: [PATCH 5/8] Se agrego funcionalidad 578 Cuenta Contable Servicios 6% --- Compras/Compras.aspx.vb | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 3d24b5aef..530715b2b 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -8472,7 +8472,9 @@ Partial Class Compras_Compras If DdlRetIVAConcepto.Items.Count > 0 Then If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) - importeMN = ImporteMovimiento * tipoCambio + importeMN = ImporteMovimiento * tipoCambio + + If CtaProveedorRetIVA > 0 Then IdCtaContable = CtaProveedorRetIVA CveCuenta = CveCuentaProveedorRetIVA @@ -8486,10 +8488,19 @@ Partial Class Compras_Compras End If End If End If - End If + + + If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then + IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero + End If + + + End If End If + End If + Case 183 'RetIVA x Acreditar Fletes P.F. If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then If DdlRetIVAConcepto.Items.Count > 0 Then From 7d5b9c4f9e994a646d094348b12ff8b90a7f006a Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 6 Jan 2020 10:55:17 -0700 Subject: [PATCH 6/8] correcciones en formatos de fecha --- Acumuladores/EntradasUsadosResumenRep.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Acumuladores/EntradasUsadosResumenRep.aspx.vb b/Acumuladores/EntradasUsadosResumenRep.aspx.vb index 1aa15ed02..799484355 100644 --- a/Acumuladores/EntradasUsadosResumenRep.aspx.vb +++ b/Acumuladores/EntradasUsadosResumenRep.aspx.vb @@ -49,7 +49,7 @@ Partial Class Acumuladores_RepEntradasUsados Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2)) Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1) - Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Month(Today), Mes, Year(Today)) + Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today)) Dim params As New List(Of ReportParameter) From a94811fe93e044598e800f41e870a44911778d7e Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Mon, 6 Jan 2020 13:13:57 -0700 Subject: [PATCH 7/8] RegPrePoliza actualizar fecha, concepto --- Compras/Compras.aspx.vb | 12 +++++++++--- Contabilidad/RegPrePoliza.aspx.vb | 29 +++++++++++++++++++++++++---- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 530715b2b..cc7f2c705 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -5833,9 +5833,15 @@ Partial Class Compras_Compras CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero End If End If - End If - - 'Agregamos el Opuesto del 22 -> 15 + End If + + + If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then + IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero + End If + + + 'Agregamos el Opuesto del 22 -> 15 If importeMovimiento <> 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 15, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then ErrorPrepoliza = True diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index d867a4a8e..623229efd 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -817,7 +817,11 @@ Partial Class ContabilidadC_RegPrePoliza If CvePrePoliza > 0 Then 'Nuevo Modulo Charlie - ActualizarPrePoliza() + ActualizarPrePoliza() + + + + Else Dim MensajeAlert = New StringBuilder Dim ObjIE As New ClsBancos() @@ -966,10 +970,19 @@ Partial Class ContabilidadC_RegPrePoliza Dim OcurrioError As Boolean = False Dim ObjContabilidad As New ClsContabilidad - ObjContabilidad.IniciaTransacSQL() + ObjContabilidad.IniciaTransacSQL() + + + + If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then + OcurrioError = True + End If + + ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate) + For Each row As GridViewRow In GvPrePoliza.Rows If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then If Not ObjContabilidad.UpdatePrepolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCTextBox("TxtConcepto").Text, row.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, @@ -996,13 +1009,20 @@ Partial Class ContabilidadC_RegPrePoliza If Not OcurrioError Then ObjContabilidad.Commit() Alert("La PrePoliza se actualizó correctamente.", TipoMensaje.MsgInformacion) - Else + Else ObjContabilidad.RollBack() Alert("Ocurrio un error al actualizar la PrePoliza.", TipoMensaje.MsgError) End If ObjContabilidad.Dispose() CargaPrePoliza() + + If Not OcurrioError Then + If IdPoliza > 0 Then + BtnContabilizar_Click(Nothing, Nothing) + End If + + End If End Sub Protected Sub GvPrePoliza_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvPrePoliza.RowUpdating RegistraScript(String.Format("$('#{0}').modal();", "DivEditConcepto")) @@ -1463,13 +1483,14 @@ Partial Class ContabilidadC_RegPrePoliza End Sub Private Sub Contabilizar() + Dim ObjConta As New ClsContabilidad If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) End If - If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1)) Then + If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1), Concepto:=TxtConcepto.Text, Fecha:=TxtFechaDocumento.Text.ToDateTime) Then Alert(String.Format("Prepóliza contabilizada.

Folio:Ver Póliza", ObjConta.ContaIdPoliza), ModExtensiones.TipoMensaje.MsgInformacion) Else From 036b81b240d8b0a69bbcf2d621021bdff9c61594 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Mon, 6 Jan 2020 18:28:02 -0700 Subject: [PATCH 8/8] facturassat --- App_Code/ClsGenerales.vb | 36 +++ App_Code/ClsPaginas.vb | 2 + Compras/RepRembolsoComprobaciones.aspx | 3 +- Ventas/RepConciliacionSat.aspx | 199 +++++++++++++- Ventas/RepConciliacionSat.aspx.cs | 53 +++- Ventas/SolicitudesSAT.aspx | 344 +++++++++++++++++++++++++ Ventas/SolicitudesSAT.aspx.cs | 128 +++++++++ 7 files changed, 750 insertions(+), 15 deletions(-) create mode 100644 Ventas/SolicitudesSAT.aspx create mode 100644 Ventas/SolicitudesSAT.aspx.cs diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 23bdee732..79167e0a2 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -134,6 +134,42 @@ Public Class ClsGenerales End Sub + Public Function RepConciliacionSatGET(cveEmpresa As Int32, tipoDocto As String, fechaI As String, fechaF As String) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_RepConciliacionSatGET", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@TipoDocto", SqlDbType.VarChar).Value = tipoDocto + .Add("@FechaI", SqlDbType.VarChar).Value = fechaI + .Add("@FechaF", SqlDbType.VarChar).Value = fechaF + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los registros de Conciliaciones SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function SAT_DescargaSolicitudesGET(CveEmpresa As Int32, tipo As Int32, fIngInicio As String, fIngFin As String, fSolInicio As String, fSolFin As String) As Boolean + Dim retorno As Boolean = False + DataAdapter("[PA_SAT_DescargaSolicitudesGET]", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Tipo", SqlDbType.Int).Value = tipo + .Add("@FIngInicio", SqlDbType.VarChar).Value = fIngInicio + .Add("@FIngFin", SqlDbType.VarChar).Value = fIngFin + .Add("@FSolInicio", SqlDbType.VarChar).Value = fSolInicio + .Add("@FSolFin", SqlDbType.VarChar).Value = fSolFin + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function #Region " I N D I C A D O R E S Y G R A F I C A S" Public Function GetIndicadores(CveEmpresa As Integer) As DataSet 'Dim Retorno As Boolean = False diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index ae2a6e5ca..4f5286d59 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -3473,6 +3473,8 @@ Public Class ClsPaginas PaginaDict.Add("/Inicio.aspx".ToUpper(), -1) PaginaDict.Add("/Ventas/RepConciliacionEmitidosSat.aspx".ToUpper(), -1) + PaginaDict.Add("/Ventas/RepConciliacionSat.aspx".ToUpper(), 716) + PaginaDict.Add("/Ventas/SolicitudesSAT.aspx".ToUpper(), 717) PaginaDict.Add("/Nomina/CatConceptos2.aspx".ToUpper(), -1) PaginaDict.Add("/Nomina/Aguinaldo.aspx".ToUpper(), -1) diff --git a/Compras/RepRembolsoComprobaciones.aspx b/Compras/RepRembolsoComprobaciones.aspx index e55f48af0..854a49898 100644 --- a/Compras/RepRembolsoComprobaciones.aspx +++ b/Compras/RepRembolsoComprobaciones.aspx @@ -106,6 +106,7 @@
+
@@ -120,7 +121,7 @@
- +
diff --git a/Ventas/RepConciliacionSat.aspx b/Ventas/RepConciliacionSat.aspx index 234fbe0c8..77d257d1d 100644 --- a/Ventas/RepConciliacionSat.aspx +++ b/Ventas/RepConciliacionSat.aspx @@ -1,15 +1,188 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RepConciliacionSat.aspx.cs" Inherits="Ventas_RepConciliacionSat" %> +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepConciliacionSat.aspx.cs" Inherits="Ventas_RepConciliacionSat" %> - + + + + + + + Conciliación CFDI SAT + + + + +
  • Solicitudes SAT
  • + +
    + + + + + + +
    +
    +
    + + +
    +
    +
    + + +
    + Fecha Inicio: +
    +
    +
    + + + + +
    + + + + + + +
    +
    + Fecha Fin: +
    +
    +
    + + + + +
    + + + + + + +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + - - - - - -
    -
    -
    -
    - - diff --git a/Ventas/RepConciliacionSat.aspx.cs b/Ventas/RepConciliacionSat.aspx.cs index d0acae9eb..0ab06995d 100644 --- a/Ventas/RepConciliacionSat.aspx.cs +++ b/Ventas/RepConciliacionSat.aspx.cs @@ -4,11 +4,62 @@ using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; +using Extensiones; -public partial class Ventas_RepConciliacionSat : System.Web.UI.Page +public partial class Ventas_RepConciliacionSat : ClsPaginas { + const string rqFechaInicio = "FechaInicio"; + const string rqFechaFin = "FechaFin"; protected void Page_Load(object sender, EventArgs e) { + if (!IsPostBack) + { + DateTime fecha; + DateTime fechaInicio = DateTime.Now; + DateTime fechaFin = DateTime.Now; + if (fechaInicio.Day < 5) { fechaInicio = fechaInicio.AddMonths(-1); } + fechaInicio = fechaInicio.AddDays(1 - fechaInicio.DayOfYear); + fechaFin = fechaInicio.AddYears(1).AddDays(-1); + if (Request[rqFechaInicio] != null) { DateTime.TryParse(Request[rqFechaInicio], out fecha); fechaInicio = fecha.Year > 1900 ? fecha : fechaInicio; } + if (Request[rqFechaFin] != null) { DateTime.TryParse(Request[rqFechaFin], out fecha); fechaFin = fecha.Year > 1900 ? fecha : fechaFin; } + txtFechaI.Text = string.Format("{0:dd/MM/yyyy}", fechaInicio); + txtFechaF.Text = string.Format("{0:dd/MM/yyyy}", fechaFin); + + } + CargaRepConciliacionSatGET(); + } + + + protected void CargaRepConciliacionSatGET() + { + string RtipoDocto, RfechaI, RfechaF; + RtipoDocto = "I"; + RfechaI = txtFechaI.Text.ToDateTime().ToString(); + RfechaF = txtFechaF.Text.ToDateTime().ToString(); + using (ClsGenerales ObjRepC = new ClsGenerales()) + { + ObjRepC.RepConciliacionSatGET(UsuarioActual.CveEmpresa, RtipoDocto, RfechaI, RfechaF); + GVRepConciliacionSatGET.DataSource = ObjRepC.DtResultados; + ObjRepC.Dispose(); + + } + GVRepConciliacionSatGET.DataBind(); + upDatosRepC.Update(); + } + + protected void BtnConsultar_Click(object sender, EventArgs e) + { + CargaRepConciliacionSatGET(); + } + + protected void GVRepConciliacionSatGET_RowDataBound(object sender, GridViewRowEventArgs e) + { + if(e.Row.RowType == DataControlRowType.DataRow) + { + e.Row.CssClass = string.Format("Grupo{0}", e.Row.DBCampo("GRUPOCve")); + e.Row.Attributes.Add("ganio", string.Format("{0}", e.Row.DBCampo("anio"))); + e.Row.Attributes.Add("gMes", string.Format("{0}", e.Row.DBCampo("Mes"))); + } } } \ No newline at end of file diff --git a/Ventas/SolicitudesSAT.aspx b/Ventas/SolicitudesSAT.aspx new file mode 100644 index 000000000..209472801 --- /dev/null +++ b/Ventas/SolicitudesSAT.aspx @@ -0,0 +1,344 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="SolicitudesSAT.aspx.cs" Inherits="Ventas_SolicitudesSAT" %> + + + + + + + Solicitudes CFDI SAT + + + + + + +
  • + Verificar Solicitudes
  • +
  • + Solicitar SAT
  • +
    +
    +
    + + + + + +
    +
    +
    + + <%----%> +
    +
    +
    +
    + Tipo: +
    +
    + + + + + +
    +
    + Fecha Inicio(ing.): +
    +
    +
    + + + + +
    + + + + + + +
    +
    + Fecha Fin(ing.): +
    +
    +
    + + + + +
    + + + + + + +
    +
    + Fecha Inicio(Sol.): +
    +
    +
    + + + + +
    + + + + + + +
    +
    + Fecha Fin(Sol.): +
    +
    +
    + + + + +
    + + + + + + +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + diff --git a/Ventas/SolicitudesSAT.aspx.cs b/Ventas/SolicitudesSAT.aspx.cs new file mode 100644 index 000000000..12aad683c --- /dev/null +++ b/Ventas/SolicitudesSAT.aspx.cs @@ -0,0 +1,128 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using Extensiones; + +public partial class Ventas_SolicitudesSAT : ClsPaginas +{ + protected void Page_Load(object sender, EventArgs e) + { + + if (!IsPostBack) + { + //this.RegistraScript("$('#ModalSolicitarSat').modal();"); + int rtipo = Request["tipo"] == null ? -1 : Request["tipo"].ToString().ToEntero(); + string rfIngInicio = Request["fIngInicio"] == null ? "" : Request["fIngInicio"].ToString().Trim(); + string rfIngFin = Request["fIngFin"] == null ? "" : Request["fIngFin"].ToString().Trim(); + string rfSolInicio = Request["fSolInicio"] == null ? "" : Request["fSolInicio"].ToString().Trim(); + string rfSolFin = Request["fSolFin"] == null ? "" : Request["fSolFin"].ToString().Trim(); + + DateTime dValor = DateTime.Now; + dValor = DateTime.Now; if (DateTime.TryParse(rfIngInicio, out dValor)) { rfIngInicio = string.Format("{0:dd/MM/yyyy}", dValor); } else { rfIngInicio = ""; } + dValor = DateTime.Now; if (DateTime.TryParse(rfIngFin, out dValor)) { rfIngFin = string.Format("{0:dd/MM/yyyy}", dValor); } else { rfIngFin = ""; } + dValor = DateTime.Now; if (DateTime.TryParse(rfSolInicio, out dValor)) { rfSolInicio = string.Format("{0:dd/MM/yyyy}", dValor); } else { rfSolInicio = ""; } + dValor = DateTime.Now; if (DateTime.TryParse(rfSolFin, out dValor)) { rfSolFin = string.Format("{0:dd/MM/yyyy}", dValor); } else { rfSolFin = ""; } + + DdlTipo.SelectedValueExist(rtipo); + txtFechaI.Text = rfIngInicio; + txtFechaF.Text = rfIngFin; + txtFechaISol.Text = rfSolInicio; + txtFechaFSol.Text = rfSolFin; + cargarDatos(); + } + } + + + private void cargarDatos() + { + int rtipo = DdlTipo.SelectedValue.ToEntero(); + string rfIngInicio = txtFechaI.Text; + string rfIngFin = txtFechaF.Text; + string rfSolInicio = txtFechaISol.Text; + string rfSolFin = txtFechaFSol.Text; + using (ClsGenerales objgral = new ClsGenerales()) + { + objgral.SAT_DescargaSolicitudesGET(UsuarioActual.CveEmpresa, rtipo, rfIngInicio, rfIngFin, rfSolInicio, rfSolFin); + GVSAT_DescargaSolicitudes.DataSource = objgral.DtResultados; + GVSAT_DescargaSolicitudes.DataBind(); + } + upDatosSAT.Update(); + } + + protected void BtnConsultar_Click(object sender, EventArgs e) + { + cargarDatos(); + } + + protected void LnkVerificarSolicitudes_Click(object sender, EventArgs e) + { + string direxe = string.Format("{0}{1}",AppDomain.CurrentDomain.BaseDirectory, "Utilerias\\ADSUtilerias.exe"); + + String json = string.Format("{{cveTareaProgramada:{0},cveEmpresa:{1},CveTareaProgramadaHistorial:{2},recursividad:{3},Resultado:{4},parametros:'Tipo=SP'}}", 1, UsuarioActual.CveEmpresa,-1, 0, 1);//Mod.ToLiteral(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(tarea)); + //this.Alert(string.Format("json:{0} : --mod TareaProgramada --Item {1}", DateTime.Now, json)); + try + { + string Mensajes = ""; + System.Diagnostics.Process ObjProcess = null; + { + ObjProcess = new System.Diagnostics.Process(); + ObjProcess.StartInfo.RedirectStandardOutput = true; + ObjProcess.StartInfo.FileName = direxe;//System.Configuration.ConfigurationManager.AppSettings["DirUtilerias"].ToString(); + ObjProcess.StartInfo.Arguments = $"--mod TareaProgramada --Item {json} "; + ObjProcess.StartInfo.UseShellExecute = false; + ObjProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal; + ObjProcess.Start(); + } + using (System.IO.StreamReader myStreamReader = ObjProcess.StandardOutput) + { + Mensajes = myStreamReader.ReadLine(); + + } + } + catch (Exception ex) + { + ex.ToString().GuardaLog(); + } + cargarDatos(); + Alert("La solicitud ha sido enviada"); + } + + protected void LnkSolicitarCFDI_Click(object sender, EventArgs e) + { + string FechaI = string.Format("{0:yyyy-MM-ddTHH}:{0:mm}:{0:ss}", txtFechaIAdd.Text.ToDateTime()); + string FechaF = string.Format("{0:yyyy-MM-ddTHH}:{0:mm}:{0:ss}", txtFechaFAdd.Text.ToDateTime()); + + string direxe = string.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, "Utilerias\\ADSUtilerias.exe"); + + String json = string.Format("{{cveTareaProgramada:{0},cveEmpresa:{1},CveTareaProgramadaHistorial:{2},recursividad:{3},Resultado:{4},parametros:'Tipo={5}&fechai={6}&fechaf={7}'}}", 1, UsuarioActual.CveEmpresa, -1, 0, 1,DdlTipoAdd.SelectedValue, FechaI, FechaF);//Mod.ToLiteral(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(tarea)); + //this.Alert(string.Format("json:{0} : --mod TareaProgramada --Item {1}", DateTime.Now, json)); + try + { + string Mensajes = ""; + System.Diagnostics.Process ObjProcess = null; + { + ObjProcess = new System.Diagnostics.Process(); + ObjProcess.StartInfo.RedirectStandardOutput = true; + ObjProcess.StartInfo.FileName = direxe;//System.Configuration.ConfigurationManager.AppSettings["DirUtilerias"].ToString(); + ObjProcess.StartInfo.Arguments = $"--mod TareaProgramada --Item {json} "; + ObjProcess.StartInfo.UseShellExecute = false; + ObjProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal; + ObjProcess.Start(); + } + using (System.IO.StreamReader myStreamReader = ObjProcess.StandardOutput) + { + Mensajes = myStreamReader.ReadLine(); + + } + } + catch (Exception ex) + { + ex.ToString().GuardaLog(); + } + cargarDatos(); + Alert("La solicitud ha sido enviada"); + } +} \ No newline at end of file