diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 81a59e8f0..6bc4d1389 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -5963,7 +5963,7 @@ Public Class ClsInventarios - Public Function RepCompuestosVigencia(CveCompuesto As Integer, CveProveedor As Integer, FechaI As Date, FechaF As Date, VigenciaIndeterminada As Boolean, CveEmpresa As Integer) As Boolean + Public Function RepCompuestosVigencia(CveCompuesto As Integer, CveProveedor As Integer, FechaI As Date, FechaF As Date, VigenciaIndeterminada As Boolean, CveEmpresa As Integer, Optional ConCaducidad As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CompuestosVigenciaRep") @@ -5976,6 +5976,8 @@ Public Class ClsInventarios .Add("@FechaF", SqlDbType.Date).Value = FechaF .Add("@VigenciaIndeterminada", SqlDbType.Int).Value = VigenciaIndeterminada .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@ConCaducidad", SqlDbType.Bit).Value = ConCaducidad + End With Try diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 10f9a0250..8a2a42d6a 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -3209,6 +3209,34 @@ Public Class ClsNominas retorno = RunQuery("Ocurrió un error al obtener el Calculo ISR anual.") Return retorno End Function + + + Public Function SATSolicitudTimbreIngresosRep(CveEmpresa As Integer, FechaInicio As Date, FechaFin As DateTime, Opcion As Integer) As Boolean + + + Dim retorno As Boolean = False + Try + DataAdapter("PA_SAT_SolicitudTimbreIngresosRep", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio + .Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin + .Add("@Opcion", SqlDbType.Int).Value = Opcion + End With + SqlAdapter.Fill(Data) + + retorno = True + + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al consultar el reporte de CFDI contra ingreso.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return retorno + + + End Function + #Region "CRUD_SolicitudesNominas" Public Function SolicitudesGet(CveSolicitud As Integer, CveEmpresa As Integer, Optional CveTipoSolicitud As Integer = 1) As Boolean Dim retorno As Boolean = False diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 618a4b02b..ea843f582 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5393,7 +5393,9 @@ Public Class ClsPaginas PaginaDict.Add("/RH/MiPerfil.aspx".ToUpper(), -1) ' se dejará libre el módulo para que cualquier que tenga cvepersonal, pueda acceder PaginaDict.Add("/RH/CatChecadores.aspx".ToUpper(), 694) PaginaDict.Add("/RH/CatRegistroPatronal.aspx".ToUpper(), 1324) + PaginaDict.Add("/SAT/SolicitudesNominaSat.aspx".ToUpper(), 545) + PaginaDict.Add("/SAT/SolicitudesIngresoSat.aspx".ToUpper(), 1329) #End Region #Region "Sistema" 'Cargo las páginas que deben tener restricción diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 13be2dac8..9afe72256 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -753,8 +753,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Dim DtRetorno As DataTable = Nothing Dim ColumnaNombre As String = "NombreComercial" 'Abreviaturas. N. Nombre, NC. NombreComercial,... - If IfNull(context.Request("ColTexto"), "") = "N" Then - ColumnaNombre = "Nombre" + If context.Request("ColTexto") IsNot Nothing AndAlso context.Request("ColTexto").Contiene("N", "CodigoNombre") Then + ColumnaNombre = IIf(context.Request("ColTexto") = "N", "Nombre", context.Request("ColTexto")) End If Dim EsDistribuidor As Integer = IfNull(context.Request("esdistribuidor"), "-1").ToString.ToEntero diff --git a/Bancos/PrestamoPersonal.aspx.cs b/Bancos/PrestamoPersonal.aspx.cs index 09dbde1c3..3798fed6a 100644 --- a/Bancos/PrestamoPersonal.aspx.cs +++ b/Bancos/PrestamoPersonal.aspx.cs @@ -583,8 +583,6 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas } - - if (CveIE > 0) { //GUARDA COMPROBANTE diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index a3c44fd31..5fc0f6dcc 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -2175,24 +2175,7 @@ Partial Class Compras_Compras If Cambio Then DdlRetIVAConcepto.Items.Clear() - If RFCProv.Length = 13 Then ' personal moral - If DIOTCveTipoOperacion = 1 Then '03 - Prestación de Servicios Profesionales - DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) - End If - - If DIOTCveTipoOperacion = 2 Then ' 06 - Arrendamiento de inmuebles - DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) - End If - - If DIOTCveTipoOperacion.Contiene(0, 3) Then ' 85 - Otros - DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) - DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) - DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.M.", "3")) - DdlRetIVAConcepto.Items.Add(New ListItem("General", "6")) - End If - - - ElseIf RFCProv.Length = 12 Then + If RFCProv.Length = 13 Then ' personal fisica If DIOTCveTipoOperacion = 1 Then '03 - Prestación de Servicios Profesionales DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) End If @@ -2205,10 +2188,26 @@ Partial Class Compras_Compras DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.F.", "2")) - DdlRetIVAConcepto.Items.Add(New ListItem("General.", "6")) + DdlRetIVAConcepto.Items.Add(New ListItem("Resico", "5")) + DdlRetIVAConcepto.Items.Add(New ListItem("General", "6")) End If + ElseIf RFCProv.Length = 12 Then ' persona moral + If DIOTCveTipoOperacion = 1 Then '03 - Prestación de Servicios Profesionales + DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) + End If + If DIOTCveTipoOperacion = 2 Then ' 06 - Arrendamiento de inmuebles + DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) + End If + + If DIOTCveTipoOperacion.Contiene(0, 3) Then ' 85 - Otros + DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) + DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) + DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.M.", "3")) + DdlRetIVAConcepto.Items.Add(New ListItem("Resico", "5")) + DdlRetIVAConcepto.Items.Add(New ListItem("General.", "6")) + End If End If @@ -5936,8 +5935,6 @@ Partial Class Compras_Compras Next - - Dim CveClasificacionDT As Integer = -1 Dim CveSubProyectoDT As Integer = -1 Dim CveTipoGastoDT As Integer = -1 @@ -6022,54 +6019,6 @@ Partial Class Compras_Compras IdCtaContable = IdCuentaBancaria End If - - 'Case 19 'IVA Acreditable - ' If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then - ' If importePagoProv = importeProv Then - ' importeMovimiento = TxtIVA.Text.ToDecimal - ' Else - ' importeMovimiento = 0 - ' End If - ' Else - ' importeMovimiento = importeIVAAcreditable - ' End If - - ' importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador - - ' PorcentajeImpuesto = PorcentajeIVA - ' IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0) - ' If chkImportacion.Checked Then - ' ConceptoContable = 288 - ' End If - - ' If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then - ' If ObjConta.DtResultados.Rows.Count > 0 Then - ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero - ' End If - ' End If - - ' 'Agregamos el Opuesto del 19 -> 14 - ' If importeMovimiento <> 0 Then - ' Dim IdCtaIva As Integer = 0 - ' IdCtaIva = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0) - ' Dim ttConceptoContable As Integer = 14 - - ' If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ttConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaIva > 0 Then - ' If ObjConta.DtResultados.Rows.Count > 0 Then - ' IdCtaIva = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero - ' End If - ' End If - - ' If chkImportacion.Checked Then - ' ttConceptoContable = 287 - ' End If - - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, ttConceptoContable, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaIva, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then - ' ErrorPrepoliza = True - ' End If - ' End If - - ' If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" Case 14 'IVA X Acreditar importeMovimiento = CompraActual.IVA importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL @@ -6109,21 +6058,6 @@ Partial Class Compras_Compras importeMN = 0 End If - - - 'Case 287 'IVA X Acreditar - ' importeMovimiento = CompraActual.IVA - ' importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador - ' If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" - ' PorcentajeImpuesto = PorcentajeIVA - ' IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0) - ' If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then - ' If ObjConta.DtResultados.Rows.Count > 0 Then - ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero - ' End If - ' End If - - Case 25 'IEPS X Acreditar If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then CveSubProyectoInsertar = CveSubProyecto @@ -6144,33 +6078,7 @@ Partial Class Compras_Compras If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" IdCtaContable = If(UsuarioActual.CveEmpresa = 119, 1171, -1) End If - 'Case 26 'IEPS Acreditable - ' If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then - ' importeMovimiento = ImporteIEPSAcreditable - ' importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador - ' If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjConta.DtResultados.Rows.Count > 0 Then - ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero - ' End If - ' End If - ' 'Agregamos el Opuesto del 26 -> 25 - ' If importeMovimiento <> 0 Then - ' Dim IdCtaIEPS As Integer = 0 - ' If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(25, UsuarioActual.CveEmpresa) Then - ' If ObjConta.DtResultados.Rows.Count > 0 Then - ' IdCtaIEPS = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero - ' End If - ' End If - - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 25, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaIEPS, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then - ' ErrorPrepoliza = True - ' End If - ' End If - - ' If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" - - ' End If Case 15 'RetIVA X Acreditar Honorarios/Serv. Prof. If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then If DdlRetIVAConcepto.Items.Count > 0 AndAlso DdlRetIVAConcepto.SelectedValue.ToEntero() > 0 Then @@ -6217,119 +6125,6 @@ Partial Class Compras_Compras End If End If - 'Case 22 'RetIVA Acreditable Honorarios/Serv. Prof. - ' If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then - ' If DdlRetIVAConcepto.Items.Count > 0 AndAlso DdlRetIVAConcepto.SelectedValue.ToEntero > 0 Then - ' Dim Funcionalidad As Integer = 0 - ' Dim ConceptoContableContra As Integer = 0 - - ' If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then - ' Funcionalidad = 308 - ' ConceptoContable = 22 - ' ConceptoContableContra = 15 - ' ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 2 Then - ' Funcionalidad = 310 - ' ConceptoContable = 184 - ' ConceptoContableContra = 183 - - ' ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then - ' Funcionalidad = 312 - ' ConceptoContable = 186 - ' ConceptoContableContra = 185 - - ' ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 4 Then - ' Funcionalidad = 314 - ' ConceptoContable = 249 - ' ConceptoContableContra = 248 - - ' ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then - ' Funcionalidad = 578 - ' ConceptoContable = 286 - ' ConceptoContableContra = 285 - ' ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 6 Then - ' Funcionalidad = 578 - ' ConceptoContable = 333 - ' ConceptoContableContra = 334 - ' End If - - ' importeMovimiento = importeRetIVAAcreditable - ' importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL - - ' If UsuarioActual.Empresa.TipoContabilidad = 2 Then - - ' If CtaProveedorRetIVA > 0 Then - ' IdCtaContable = CtaProveedorRetIVA - ' ElseIf UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then - ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero - ' Else - ' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjConta.DtResultados.Rows.Count > 0 Then - ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero - ' End If - ' End If - ' End If - ' End If - - ' 'Agregamos el Opuesto del 22 -> 15 - ' If importeMovimiento <> 0 Then - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, ConceptoContableContra, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then - ' ErrorPrepoliza = True - ' End If - ' End If - - ' If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" - ' End If - ' End If - - 'Case 23 'RetISR Acreditable - ' If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then - ' If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero > 0 Then - - ' Dim funcionalidad As Integer = 0 - ' Dim ConceptoContableContra As Integer = 0 - - ' If DdlRetISRConcepto.SelectedValue.ToEntero = 1 Then - ' funcionalidad = 316 - ' ConceptoContable = 23 - ' ConceptoContableContra = 16 - ' ElseIf DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then - ' funcionalidad = 318 - ' ConceptoContable = 244 - ' ConceptoContableContra = 243 - ' ElseIf DdlRetISRConcepto.SelectedValue.ToEntero = 3 Then - ' funcionalidad = 348 - ' ConceptoContable = 328 - ' ConceptoContableContra = 327 - ' End If - - ' importeMovimiento = importeRetISRAcreditable - ' importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL - - ' If UsuarioActual.Empresa.TipoContabilidad = 2 Then - ' If CtaProveedorRetISR > 0 Then - ' IdCtaContable = CtaProveedorRetISR - ' ElseIf UsuarioActual.Empresa.Funcionalidad(funcionalidad).ToEntero > 0 Then - ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(funcionalidad).ToEntero - ' Else - ' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjConta.DtResultados.Rows.Count > 0 Then - ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero - ' End If - ' End If - ' End If - ' End If - - - ' 'Agregamos el Opuesto del 23 -> 16 - ' If importeMovimiento <> 0 Then - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, ConceptoContableContra, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then - ' ErrorPrepoliza = True - ' End If - ' End If - - ' If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" - ' End If - ' End If Case 16 'Ret ISR X Acreditar If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero > 0 Then @@ -6397,27 +6192,6 @@ Partial Class Compras_Compras importeMovimiento = 0 End If - 'Case 65 'Perdida - - ' CveSubProyectoInsertar = CveSubProyecto - ' If CveSubProyectoInsertar <= 0 Then - ' ErrorPrepoliza = True - ' Alert("Concepto perdida cambiaria sin sub proyecto", TipoMensaje.MsgAdvertencia) - ' End If - - ' If TCPago > 0 AndAlso TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then - ' IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria - ' If TCPago < TipoCambioCompra Then - ' importeMovimiento = Math.Abs(TCPago - TipoCambioCompra) * importePagoProv - ' importeMovimiento -= Math.Abs(TCPago - TipoCambioCompra) * importeIVAAcreditable - ' importeMovimiento += Math.Abs(TCPago - TipoCambioCompra) * importeRetIVAAcreditable - ' importeMovimiento += Math.Abs(TCPago - TipoCambioCompra) * importeRetISRAcreditable - ' importeMN = importeMovimiento - ' End If - ' Else - ' importeMovimiento = 0 - ' End If - Case 6 'Compra Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 145, 141, 152, 153, 154, 158, 159, 160, 161, 162, 163) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 0b6f58bdc..adea81f2d 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -852,6 +852,11 @@ Partial Class Compras_ReembolsosComprobaciones ConceptoContableRetIVAAcreditable = 249 CveFunc = 313 CveFuncAcreditable = 314 + Case 5 + ConceptoContableRetIVAXAcreditar = 285 + ConceptoContableRetIVAAcreditable = 286 + CveFunc = 578 + CveFuncAcreditable = 578 End Select If UsuarioActual.Empresa.TipoContabilidad = 2 Then diff --git a/Compras/eFacturas.aspx b/Compras/eFacturas.aspx index 153b98772..a113abc55 100644 --- a/Compras/eFacturas.aspx +++ b/Compras/eFacturas.aspx @@ -59,10 +59,10 @@
  • Validación Masiva
  • -
  • - <%----%> + <%--
  • + Descarga Facturas SAT -
  • + --%>
  • Solicitudes SAT
  • diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index cbe08a479..85d745c64 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -6,11 +6,16 @@ Imports System.Diagnostics Imports System.Globalization Imports System.IO Imports System.IO.Compression +Imports System.Net.Http +Imports System.Net.Http.Headers +Imports System.Threading +Imports System.Threading.Tasks Imports System.Xml Imports ADSistemaLibrary.SatXml Imports ADSistemaLibrary.SatXml.XmlSatCFDI Imports Extensiones Imports Microsoft.Reporting.WebForms +Imports Newtonsoft.Json.Linq Partial Class Compras_eFacturas Inherits ClsPaginas @@ -760,7 +765,7 @@ Partial Class Compras_eFacturas If UsuarioActual.Sesion("eFact-Proveedor").ToString <> "" Then TxtProveedor.Text = UsuarioActual.Sesion("eFact-Proveedor").ToString.Trim If UsuarioActual.Sesion("eFact-FI").ToString <> "" Then txtFechaI.Text = UsuarioActual.Sesion("eFact-FI").ToString.Trim If UsuarioActual.Sesion("eFact-FF").ToString <> "" Then txtFechaF.Text = UsuarioActual.Sesion("eFact-FF").ToString.Trim - If UsuarioActual.CveUsuario = 100 Then lbDescargar.Visible = True + 'If UsuarioActual.CveUsuario = 100 Then lbDescargar.Visible = True 'If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(11).Visible = True : GvD.Columns(12).Visible = True 'If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(10).Visible = False @@ -2563,6 +2568,31 @@ Partial Class Compras_eFacturas End Sub Protected Sub LnkSolicitarSat_Click(ByVal sender As Object, ByVal e As EventArgs) + 'Dim idSolicitudCFDI As Integer = 0 + 'Dim idSolicitudMetadata As Integer = 0 + 'Dim estatus As Integer = 0 + 'Dim observaciones As String = "" + 'Dim fechaInicio As DateTime = txtFechaIAdd.Text.ToDateTime() + 'Dim fechaFin As DateTime = txtFechaFAdd.Text.ToDateTime() + 'Dim cveUsuarioIng As Integer = UsuarioActual.CveUsuario + 'Dim cveEmpresa As Integer = UsuarioActual.CveEmpresa + 'Dim Continuar As Boolean = False + + 'Using nom As ClsNominas = New ClsNominas() + ' Continuar = nom.SolicitudesAdd(idSolicitudCFDI, idSolicitudMetadata, estatus, observaciones, fechaInicio, fechaFin, cveUsuarioIng, cveEmpresa, 2) + ' Dim api = New GeneralesAPIeFacturas() + ' api.GeneraSolicitud() + ' api.VerificaSolicitudesNominas() + 'End Using + + 'If Continuar Then + ' txtFechaIAdd.Text = "" + ' txtFechaFAdd.Text = "" + ' Me.RegistraScript("$('#DModalSolicitudesNominas').modal('hide');") + ' cargasolicitudes() + ' Me.Alert("se a envia la solicitud al sat, le enviaremos un correo en cuanto tengamos una respuesta", ModExtensiones.TipoMensaje.ToastInformacion) + 'End If + Dim idSolicitudCFDI As Integer = 0 Dim idSolicitudMetadata As Integer = 0 Dim estatus As Integer = 0 @@ -2574,115 +2604,215 @@ Partial Class Compras_eFacturas Dim Continuar As Boolean = False Using nom As ClsNominas = New ClsNominas() - Continuar = nom.SolicitudesAdd(idSolicitudCFDI, idSolicitudMetadata, estatus, observaciones, fechaInicio, fechaFin, cveUsuarioIng, cveEmpresa, 2) - 'Dim api = New GeneralesAPI() - 'api.GeneraSolicitud() - 'api.VerificaSolicitudesNominas() + Continuar = nom.SolicitudesAdd(idSolicitudCFDI, idSolicitudMetadata, estatus, observaciones, fechaInicio, fechaFin, cveUsuarioIng, cveEmpresa, CveTipoSolicitud:=3) End Using + If Continuar Then + Dim sbResultado As StringBuilder = New StringBuilder() + Dim api = New GeneralesAPIeFacturas() + Dim ObjApiSolicitud As JToken = CType(api.GeneraSolicitud(UsuarioActual.CveEmpresa, 3), JToken) + Dim resultSolicitud As List(Of String) = New List(Of String)() + Dim resultVerificacion As List(Of String) = New List(Of String)() + Dim ResultadoVerificaionOK = False + Dim SeVerifico = False + Dim TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion + Dim ResultadoSolicitudOK = False + + If Not (ObjApiSolicitud Is Nothing) Then + resultSolicitud = ObjApiSolicitud.[Select](Function(token) token.Values().Aggregate(Function(i, j) $"{i}|{j}").Value(Of String)()).ToList() + ResultadoSolicitudOK = Boolean.Parse(resultSolicitud(0)) + Else + TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia + End If + + If ResultadoSolicitudOK Then + Dim ObjApiVerificacion As JToken = CType(api.VerificaSolicitudesNominas(UsuarioActual.CveEmpresa, 3), JToken) + + If Not (ObjApiVerificacion Is Nothing) Then + resultVerificacion = ObjApiVerificacion.[Select](Function(token) token.Values().Aggregate(Function(i, j) $"{i}|{j}").Value(Of String)()).ToList() + ResultadoVerificaionOK = Boolean.Parse(resultVerificacion(0)) + SeVerifico = True + Else + TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia + End If + End If + + If resultSolicitud.Count = 4 Then + + If ResultadoSolicitudOK Then + + If resultSolicitud(1).ToString().Trim().Length > 0 Then + sbResultado.Append($"{resultSolicitud(1)}
    ") + Else + sbResultado.Append($"Solicitud Generada Correctamente") + sbResultado.Append($"Se presento un error al verificar las solicitudes
    {resultSolicitud(2)}
    ") + End If + Else + sbResultado.Append($"{resultSolicitud(2)}") + TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia + End If + Else + sbResultado.AppendLine("Se presento un error al generar la solicitud (API)
    ") + TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia + End If + + If SeVerifico AndAlso resultVerificacion.Count = 4 Then + + If ResultadoVerificaionOK Then + sbResultado.Append($"{resultVerificacion(1)}
    ") + Else + sbResultado.Append($"Se presento un error al verificar las solicitudes {resultVerificacion(1)}
    ") + TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia + End If + Else + sbResultado.AppendLine("Se presento un error al verificar las solicitudes (API)
    ") + TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia + End If + + Alert(sbResultado.ToString(), TipoMensaje) + End If + If Continuar Then txtFechaIAdd.Text = "" txtFechaFAdd.Text = "" - Me.RegistraScript("$('#DModalSolicitudesNominas').modal('hide');") + Me.RegistraScript("$('#ModalAgregarSolicitud').modal('hide');") cargasolicitudes() - Me.Alert("se a envia la solicitud al sat, le enviaremos un correo en cuanto tengamos una respuesta", ModExtensiones.TipoMensaje.ToastInformacion) End If + End Sub Protected Sub LnkverificarSolicitudes_Click(ByVal sender As Object, ByVal e As EventArgs) - 'Dim api = New GeneralesAPI() - 'api.GeneraSolicitud() - 'api.VerificaSolicitudesNominas() + + + + + Dim sbResultado As StringBuilder = New StringBuilder() + Dim api = New GeneralesAPIeFacturas() + Dim ObjApiSolicitud As JToken = CType(api.GeneraSolicitud(UsuarioActual.CveEmpresa, 3), JToken) + Dim resultSolicitud As List(Of String) = New List(Of String)() + Dim resultVerificacion As List(Of String) = New List(Of String)() + Dim ResultadoVerificaionOK = False + Dim SeVerifico = False + Dim TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion + Dim ResultadoSolicitudOK = False + + If Not (ObjApiSolicitud Is Nothing) Then + resultSolicitud = ObjApiSolicitud.[Select](Function(token) token.Values().Aggregate(Function(i, j) $"{i}|{j}").Value(Of String)()).ToList() + ResultadoSolicitudOK = Boolean.Parse(resultSolicitud(0)) + Else + TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia + End If + + If ResultadoSolicitudOK Then + Dim ObjApiVerificacion As JToken = CType(api.VerificaSolicitudesNominas(UsuarioActual.CveEmpresa, 3), JToken) + + If Not (ObjApiVerificacion Is Nothing) Then + resultVerificacion = ObjApiVerificacion.[Select](Function(token) token.Values().Aggregate(Function(i, j) $"{i}|{j}").Value(Of String)()).ToList() + ResultadoVerificaionOK = Boolean.Parse(resultVerificacion(0)) + SeVerifico = True + Else + TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia + End If + End If + + If resultSolicitud.Count = 4 Then + + If ResultadoSolicitudOK Then + + If resultSolicitud(2).ToString().Trim().Length > 0 Then + sbResultado.Append($"{resultSolicitud(2)}
    ") + Else + sbResultado.Append($"Solicitud Generada Correctamente") + sbResultado.Append($"Se presento un error al verificar las solicitudes
    {resultSolicitud(2)}
    ") + End If + Else + sbResultado.Append($"{resultSolicitud(2)}") + TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia + End If + Else + sbResultado.AppendLine("Se presento un error al generar la solicitud (API)
    ") + TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia + End If + + If SeVerifico AndAlso resultVerificacion.Count = 4 Then + + If ResultadoVerificaionOK Then + sbResultado.Append($"{resultVerificacion(2)}
    ") + Else + sbResultado.Append($"Se presento un error al verificar las solicitudes {resultVerificacion(2)}
    ") + TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia + End If + Else + sbResultado.AppendLine("Se presento un error al verificar las solicitudes (API)
    ") + TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia + End If + + Alert(sbResultado.ToString(), TipoMensaje) cargasolicitudes() + + + End Sub #End Region #Region "D E S C A R G A R - F A C T U R A " - Protected Sub lbDescargar_Click(sender As Object, e As EventArgs) Handles lbDescargar.Click + 'Protected Sub lbDescargar_Click(sender As Object, e As EventArgs) Handles lbDescargar.Click - Dim Retorno As Boolean = False + ' Dim Retorno As Boolean = False - Dim ObjProcess As Process = Nothing - Dim Mensajes As String = "" - Dim error1 As Boolean = False - Dim CountProcesados As Integer = 0 + ' Dim ObjProcess As Process = Nothing + ' Dim Mensajes As String = "" + ' Dim error1 As Boolean = False + ' Dim CountProcesados As Integer = 0 - Try - ObjProcess = New Process() - ObjProcess.StartInfo.RedirectStandardOutput = True - ObjProcess.StartInfo.FileName = Ejecutable - ObjProcess.StartInfo.Arguments = $"--mod dsat2 --cveemp {UsuarioActual.CveEmpresa} --rfc {UsuarioActual.Empresa.RFC} --ciec {UsuarioActual.Empresa.CIEC} --razon {UsuarioActual.Empresa.Empresa} --fi {txtFechaI.Text} --ff {txtFechaF.Text}" - ObjProcess.StartInfo.UseShellExecute = False - ObjProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal - ObjProcess.Start() + ' Try + ' ObjProcess = New Process() + ' ObjProcess.StartInfo.RedirectStandardOutput = True + ' ObjProcess.StartInfo.FileName = Ejecutable + ' ObjProcess.StartInfo.Arguments = $"--mod dsat2 --cveemp {UsuarioActual.CveEmpresa} --rfc {UsuarioActual.Empresa.RFC} --ciec {UsuarioActual.Empresa.CIEC} --razon {UsuarioActual.Empresa.Empresa} --fi {txtFechaI.Text} --ff {txtFechaF.Text}" + ' ObjProcess.StartInfo.UseShellExecute = False + ' ObjProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal + ' ObjProcess.Start() - Dim myStreamReader As StreamReader = ObjProcess.StandardOutput + ' Dim myStreamReader As StreamReader = ObjProcess.StandardOutput - 'Read the standard output of the spawned process. - Mensajes = myStreamReader.ReadLine() - If Mensajes.Length > 0 Then + ' 'Read the standard output of the spawned process. + ' Mensajes = myStreamReader.ReadLine() + ' If Mensajes.Length > 0 Then - Dim msgs As String() = Mensajes.Split("|"c) - Dim NFacturas As Integer = 0 + ' Dim msgs As String() = Mensajes.Split("|"c) + ' Dim NFacturas As Integer = 0 - If msgs.Length >= 2 Then - Try - NFacturas = msgs(0).ToEntero - CountProcesados = msgs(0).ToEntero - Mensajes = $"La actualización se realizó correctamente.
    Facturas agregadas: { NFacturas }" - Catch ex As Exception - NFacturas = 0 - Mensajes = "La actualización se realizó correctamente" - End Try - Else - Mensajes = "La descarga se realizó correctamente" - End If - End If - ObjProcess.WaitForExit() - ObjProcess.Close() - Retorno = True - Catch ex As Exception - error1 = True - OnError("Ocurrió un error al ejecutar el actualizador.", ex) - End Try + ' If msgs.Length >= 2 Then + ' Try + ' NFacturas = msgs(0).ToEntero + ' CountProcesados = msgs(0).ToEntero + ' Mensajes = $"La actualización se realizó correctamente.
    Facturas agregadas: { NFacturas }" + ' Catch ex As Exception + ' NFacturas = 0 + ' Mensajes = "La actualización se realizó correctamente" + ' End Try + ' Else + ' Mensajes = "La descarga se realizó correctamente" + ' End If + ' End If + ' ObjProcess.WaitForExit() + ' ObjProcess.Close() + ' Retorno = True + ' Catch ex As Exception + ' error1 = True + ' OnError("Ocurrió un error al ejecutar el actualizador.", ex) + ' End Try - If Retorno Then CargaDatos() + ' If Retorno Then CargaDatos() - 'Dim Retorno As Boolean = False - ''Codigo anterior no borrar puede hacer el paro - 'Dim ObjProcess As Process = Nothing - 'Dim Mensajes As String = "" - 'Dim EjecutableUtilerias = Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Utilerias\UtileriasAD.exe") - 'Dim Folder = Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas\") - 'Dim error1 As Boolean = False - 'Dim en As New CultureInfo("en-US") - 'Dim fechai = txtFechaI.Text.Trim.ToDate.ToString("d", en) - 'Dim fechaf = txtFechaF.Text.Trim.ToDate.ToString("d", en) - 'Try - ' ObjProcess = New Process() - ' ObjProcess.StartInfo.RedirectStandardOutput = True - ' ObjProcess.StartInfo.FileName = EjecutableUtilerias - ' ObjProcess.StartInfo.Verb = "runas" - ' ObjProcess.StartInfo.Arguments = $"{UsuarioActual.CveEmpresa} {Folder} 1 {fechai} {fechaf}" - ' ObjProcess.StartInfo.UseShellExecute = False - ' ObjProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal - ' ObjProcess.Start() - ' ObjProcess.WaitForExit() - ' ObjProcess.Close() - 'Catch ex As Exception - ' error1 = True - ' OnError("Ocurrió un error al ejecutar el actualizador.", ex) - 'End Try - - '' ProcesaBuzon() - - End Sub + 'End Sub 'Private Sub ProcesaBuzon() @@ -4626,18 +4756,123 @@ End Class -Public Class GeneralesAPI - Inherits ADSNetLibrary.Helpers.Conexiones.SIGAPI.BaseSIGAPI +Public Class GeneralesAPIeFacturas + + Inherits ADSNetLibraryzdE.HelpersE.ConexionesE.SIGAPIE.BaseSIGAPIeFacturas Public Sub New(ByVal Optional domainApi As String = "http://localhost:4001/", ByVal Optional token As String = "") MyBase.New(domainApi, token) End Sub - Public Function GeneraSolicitud() As Object - Return getData(Of Object)("GeneraSolicitud", Nothing, ADSNetLibrary.Helpers.Conexiones.SIGAPI.requestMethod.[GET], False) + Public Function GeneraSolicitud(CveEmpresa As Integer, CveTipoSolicitud As Integer) As Object + Return getData(Of Object)($"GeneraSolicitud/{CveEmpresa}/{CveTipoSolicitud}", Nothing, ADSNetLibraryzdE.HelpersE.ConexionesE.SIGAPIE.requestMethod.[GET], False) End Function - Public Function VerificaSolicitudesNominas() As Object - Return getData(Of Object)("VerificaSolicitudesNominas", Nothing, ADSNetLibrary.Helpers.Conexiones.SIGAPI.requestMethod.[GET], False) + Public Function VerificaSolicitudesNominas(CveEmpresa As Integer, CveTipoSolicitud As Integer) As Object + Return getData(Of Object)($"VerificaSolicitudesNominas/{CveEmpresa}/{CveTipoSolicitud}", Nothing, ADSNetLibraryzdE.HelpersE.ConexionesE.SIGAPIE.requestMethod.[GET], False) End Function End Class + + +Namespace ADSNetLibraryzdE.HelpersE.ConexionesE.SIGAPIE + Public Enum requestMethod + POST = 1 + [GET] = 2 + End Enum + + Public Class BaseSIGAPIeFacturas + Private Const tituloLog As String = "ADSNetLibrary.Helpers.Conexiones.SIGAPI" + Public domainApi As String + Public authorization As String + Protected RouteController As String = "" + Protected FullRoute As String = "" + + Public Function GetRoutbyclass() As String + Dim classname As String = Me.[GetType]().Name + Return classname.Substring(0, classname.Length - 12) + End Function + + Public Function GetRoute(ByVal path As String) As String + If String.IsNullOrEmpty(FullRoute) Then + Return String.Format("api/{0}/{1}", (If(String.IsNullOrEmpty(RouteController), GetRoutbyclass(), RouteController)), path) + Else + Return String.Format("{0}{1}", FullRoute, path) + End If + End Function + + Public Sub New(ByVal domainApi As String, ByVal Optional authorization As String = Nothing, ByVal Optional fullRoute As String = Nothing) + If String.IsNullOrEmpty(domainApi) Then + domainApi = "http://localhost:4001/" + End If + + Me.authorization = authorization + Me.domainApi = domainApi + Me.FullRoute = fullRoute + End Sub + + Public Async Function getDataAsync(Of T As {Class, New})(ByVal path As String, ByVal requestobject As Object, ByVal Optional reqmet As requestMethod = requestMethod.POST, ByVal Optional needauthorization As Boolean = True, ByVal Optional isfullpath As Boolean = False) As Task(Of T) + Dim objreturn As T = Nothing + + Using client As HttpClient = New HttpClient() + client.BaseAddress = New Uri(domainApi) + client.DefaultRequestHeaders.Accept.Add(New MediaTypeWithQualityHeaderValue("application/json")) + + If needauthorization Then + client.DefaultRequestHeaders.Authorization = New AuthenticationHeaderValue("Bearer", authorization) + End If + + client.Timeout = TimeSpan.FromMinutes(15) + Dim response As HttpResponseMessage = New HttpResponseMessage() + Dim strjsonreq = Newtonsoft.Json.JsonConvert.SerializeObject(requestobject) + Dim content As StringContent = New StringContent(strjsonreq, Encoding.UTF8, "application/json") + Dim route As String = If(isfullpath, path, GetRoute(path)) + + Try + + Select Case reqmet + Case requestMethod.POST + response = Await client.PostAsync(route, content) + Case requestMethod.[GET] + response = Await client.GetAsync(route) + End Select + + If response.IsSuccessStatusCode Then + Dim jsondata As String = Await response.Content.ReadAsStringAsync() + Dim settings As Newtonsoft.Json.JsonSerializerSettings = New Newtonsoft.Json.JsonSerializerSettings With { + .NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + .MissingMemberHandling = Newtonsoft.Json.MissingMemberHandling.Ignore + } + objreturn = Newtonsoft.Json.JsonConvert.DeserializeObject(Of T)(jsondata, settings) + Else + End If + + Catch e As Exception + End Try + End Using + + Return objreturn + End Function + + Public Function getData(Of T As {Class, New})(ByVal path As String, ByVal requestobject As Object, ByVal Optional reqmet As requestMethod = requestMethod.POST, ByVal Optional needauthorization As Boolean = True, ByVal Optional isfullpath As Boolean = False) As T + Return AsyncHelper.RunSync(Of T)(Function() getDataAsync(Of T)(path, requestobject, reqmet, needauthorization, isfullpath)) + End Function + End Class + + Friend Module AsyncHelper + Private ReadOnly _myTaskFactory As TaskFactory = New TaskFactory(CancellationToken.None, TaskCreationOptions.None, TaskContinuationOptions.None, TaskScheduler.[Default]) + + Function RunSync(Of TResult)(ByVal func As Func(Of Task(Of TResult))) As TResult + + 'Return AsyncHelper._myTaskFactory.StartNew(Of Task(Of TResult))(func).Unwrap(Of TResult)().GetAwaiter().GetResult() + Return AsyncHelper._myTaskFactory.StartNew(Of Task(Of TResult))(func).Unwrap().GetAwaiter().GetResult() + + + + End Function + + Sub RunSync(ByVal func As Func(Of Task)) + AsyncHelper._myTaskFactory.StartNew(Of Task)(func).Unwrap().GetAwaiter().GetResult() + End Sub + End Module +End Namespace + diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index 18169a79c..23aab310d 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -562,7 +562,7 @@ - diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 3965abdfb..5ee75e444 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -999,9 +999,12 @@ Partial Class ContabilidadC_RegPrePolizaS 'End If 'Registra movimieno bancario - If gvr.DataKey("CveConceptoContable").ToEntero = 30 AndAlso gvr.DataKey("ContadoImporte").ToDecimal <> 0 Then + If gvr.DataKey("CveConceptoContable").ToEntero = 30 AndAlso (gvr.DataKey("ContadoImporte").ToDecimal <> 0 OrElse TipoGrid = 1) Then + Dim tFolio As String = gvr.DataKey("ContadoNumeroFolio").ToString + If tFolio.ToEntero = 0 Then tFolio = SiguienteFolioBancos(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero) - CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, gvr.DataKey("ContadoNumeroFolio"), + + CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, tFolio, gvr.DataKey("ContadoBeneficiario"), gvr.DataKey("ContadoImporte").ToDecimal, CveMoneda, 0, gvr.DataKey("ContadoObservaciones"), "", False, False, 0, CvePrePolizaInsertada, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CveIE < 0 Then @@ -1063,7 +1066,7 @@ Partial Class ContabilidadC_RegPrePolizaS If idCuentaContabilizacion = 1 AndAlso (IdCtaContable = 0) Then idCuentaContabilizacion = 0 End If - If Importe <> 0 Then + If Importe <> 0 OrElse TipoGrid = 1 Then 'si es diferente de cero o si viene de grid prepolizas, que registre todo Dim tCveCuenta As Integer = gvr.DataKey("CveCuenta").ToEntero Dim tReferencia, tConcepto As String Dim tCveSubProyecto, tCveTipoGasto As Integer @@ -1490,6 +1493,8 @@ Partial Class ContabilidadC_RegPrePolizaS End If If AplicaBancos AndAlso Not AplicaComplementaria Then + TxtCargoE.AutoPostBack = True + TxtAbonoE.AutoPostBack = True CargaModalConceptoTipoTransaccion("Egs") 'DivModalConceptoAncho.Attributes.Add("style", "width:1000px") DvMoldalConceptoSeccion1.Attributes.Add("class", "col-md-6") @@ -1500,6 +1505,8 @@ Partial Class ContabilidadC_RegPrePolizaS DvMoldalConceptoSeccion1.Attributes.Add("class", "col-md-12") RegistraScript("$('#DivModalConceptoAncho').attr('style','width:450px');") DvMoldalConceptoSeccion2.Visible = False + TxtCargoE.AutoPostBack = False + TxtAbonoE.AutoPostBack = False End If If AplicaTC Then @@ -2932,11 +2939,12 @@ Partial Class ContabilidadC_RegPrePolizaS End If - If gvr.DataKey("CveConceptoContable").ToEntero = 30 Then + Dim tFolio As String = gvr.DataKey("ContadoNumeroFolio").ToString + If tFolio.ToEntero = 0 Then tFolio = SiguienteFolioBancos(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero) - CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, gvr.DataKey("ContadoNumeroFolio").ToString, + CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, tFolio, gvr.DataKey("ContadoBeneficiario").ToString, Importe, CveMoneda, 0, gvr.DataKey("ContadoObservaciones").ToString, "", False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) FolioIE = gvr.DataKey("ContadoNumeroFolio").ToString @@ -2947,9 +2955,6 @@ Partial Class ContabilidadC_RegPrePolizaS End If - - - If gvr.DataKey("CveConceptoContable").ToEntero <> 30 Then If gvr.DataKey("CveConceptoContable").ToEntero = 41 Then @@ -2960,15 +2965,12 @@ Partial Class ContabilidadC_RegPrePolizaS End If - If idCuentaContabilizacion = 1 AndAlso (IdCtaContable = 0) Then idCuentaContabilizacion = 0 End If If Importe <> 0 Then Dim tCveCuenta As Integer = gvr.DataKey("CveCuenta").ToEntero - - If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, gvr.DataKey("Referencia"), gvr.DataKey("CveConceptoContable").ToEntero, gvr.DataKey("Concepto"), TxtFechaDocumento.Text.ToDate, IdCtaContable, -1, CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, CveIE:=CveIE, CveProveedor:=gvr.DataKey("CveProveedor").ToEntero, CveCompra:=gvr.DataKey("CveCompra").ToEntero, @@ -2976,7 +2978,6 @@ Partial Class ContabilidadC_RegPrePolizaS ImporteMX:=Importe, ImporteME:=ImporteME, TipoCambio:=TipoCambio, CveTipoGasto:=gvr.DataKey("CveTipoGasto").ToEntero, CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCuenta:=tCveCuenta) Then - Else MsgError = "No se pudo insertar el detalle de la póliza2" Exit For @@ -3008,11 +3009,8 @@ Partial Class ContabilidadC_RegPrePolizaS If MsgError = "" Then - Alert(If(MensajeAlert.ToString = "", $"Se registro con exito. {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}", $"Se registro con exito. {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}
    " & MensajeAlert.ToString), TipoMensaje.MsgInformacion, $"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={CvePrePoliza}""") - - ObjIE.Commit() If Conta IsNot Nothing Then Conta.Commit() @@ -3045,6 +3043,11 @@ Partial Class ContabilidadC_RegPrePolizaS GvPrePoliza.DataSource = DtMovimientos GvPrePoliza.DataBind() + TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero + TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero + UpTotalCargo.Update() + UpTotalAbono.Update() + UpPrePoliza.Update() End Sub @@ -3069,20 +3072,15 @@ Partial Class ContabilidadC_RegPrePolizaS DdlModalConceptoCuenta.DataBind() DdlModalConceptoCuenta.Items.Insert(0, New ListItem("Seleccione", "-1")) - - End Sub #End Region - - Private Sub BtnDescontabilizar_Click(sender As Object, e As EventArgs) Handles BtnDescontabilizar.Click Dim ObjConta As New ClsContabilidad - If ObjConta.ContabilizaDesContabilizaPrePoliza(CvePrePoliza, False, UsuarioActual.CveEmpresa) Then Alert("Descontabilizado Correctamente.", TipoMensaje.MsgInformacion) @@ -3118,5 +3116,13 @@ Partial Class ContabilidadC_RegPrePolizaS Venta.Dispose() End Sub + + Private Sub TxtCargoE_TextChanged(sender As Object, e As EventArgs) Handles TxtCargoE.TextChanged + If TxtCargoE.Text.ToDecimal <> 0 Then CargaModalConceptoTipoTransaccion("Ing") + End Sub + + Private Sub TxtAbonoE_TextChanged(sender As Object, e As EventArgs) Handles TxtAbonoE.TextChanged + If TxtAbonoE.Text.ToDecimal <> 0 Then CargaModalConceptoTipoTransaccion("Egs") + End Sub End Class diff --git a/CxC/RepCxCDetalle.aspx b/CxC/RepCxCDetalle.aspx index b91380685..8f38e0930 100644 --- a/CxC/RepCxCDetalle.aspx +++ b/CxC/RepCxCDetalle.aspx @@ -331,12 +331,14 @@
    - + - - - - + + + +
    diff --git a/CxC/RepCxCDetalle.aspx.vb b/CxC/RepCxCDetalle.aspx.vb index ccc1b969a..e6a841ce5 100644 --- a/CxC/RepCxCDetalle.aspx.vb +++ b/CxC/RepCxCDetalle.aspx.vb @@ -236,7 +236,7 @@ Partial Class RepCxCDetalle CargaAsignarCobranza() TxtFechaCobranza.Text = Now.ToShortDateString - If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso UsuarioActual.CveRol = 1 Then + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then DVCartera.Visible = True End If @@ -1068,9 +1068,17 @@ Partial Class RepCxCDetalle DdlClientesWS.DataBind() DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1")) End If - End Sub - - + End Sub + + Private Sub GvCartera_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCartera.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + If e.Row.DataKey("Rango") = "Total" Then + e.Row.Font.Bold = True + End If + End If + End Sub + + #End Region - + End Class diff --git a/Empresas/119/Formatos/Nomina.rdlc b/Empresas/119/Formatos/Nomina.rdlc index 84d07c8ba..871861e56 100644 --- a/Empresas/119/Formatos/Nomina.rdlc +++ b/Empresas/119/Formatos/Nomina.rdlc @@ -1966,7 +1966,7 @@ Lugar de expedición: 83220 Hermosillo DsOC 9.86624cm 0.15979cm - 1.71208cm + 1.71209cm 19.89025cm 3 @@ -4674,14 +4674,14 @@ Lugar de expedición: 83220 Hermosillo - + true true - =Parameters!FormaPago.Value + @@ -4704,6 +4704,7 @@ Lugar de expedición: 83220 Hermosillo 2 + true @@ -5285,7 +5286,7 @@ Lugar de expedición: 83220 Hermosillo 2.51578cm 0.15979cm 5.0304cm - 19.84967cm + 19.84968cm 9 - pagos:@bdhbaterias.com + pagos@bdhbaterias.com diff --git a/Inicio.aspx b/Inicio.aspx index 1beef0b6d..a83974a0a 100644 --- a/Inicio.aspx +++ b/Inicio.aspx @@ -1480,6 +1480,141 @@
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Inicio.aspx.vb b/Inicio.aspx.vb index 7c10fc6f8..e919fbee7 100644 --- a/Inicio.aspx.vb +++ b/Inicio.aspx.vb @@ -205,6 +205,11 @@ Partial Class Inicio If UsuarioActual.TienePermisoProceso(271) Then MuestraVentasPUE() If UsuarioActual.TienePermisoProceso(270) Then MuestraComprasPUE() + + If UsuarioActual.TienePermisoProceso(343) Then MuestraPsProximosAVencer() + If UsuarioActual.TienePermisoProceso(344) Then MuestraRSCOProximosAVencer() + + Dim EsDEV = Not UsuarioActual.Empresa.FacturaProduccion If Not EsDEV Then If UsuarioActual.CveUsuario.Contiene(93, 1425, 2, 1606, 1472, 100, 1918) Then MuestraInconsistencias() '100 @@ -329,6 +334,49 @@ Partial Class Inicio GvVentasEmail.DataBind() End Sub + Private Sub MuestraPsProximosAVencer() + + Dim ObjInventarios = New ClsInventarios + If ObjInventarios.GetProductosCaducidad(-1, MinFecha, Now.AddDays(30), -1, -1, -1, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Opcion:=2, CveCompuesto:=-1) Then + + If ObjInventarios.DtResultados.Rows.Count > 0 Then + GvModalPSPorCaducar.DataSource = ObjInventarios.DtResultados + RegistraScript("$('#DVModalPSPorCaducar').modal('show');") + Else + GvModalPSPorCaducar.DataSource = Nothing + End If + + Else + GvModalPSPorCaducar.DataSource = Nothing + End If + + ObjInventarios.Dispose() + GvModalPSPorCaducar.DataBind() + + End Sub + + Private Sub MuestraRSCOProximosAVencer() + + Dim ObjInventarios As New ClsInventarios + + If ObjInventarios.RepCompuestosVigencia(-1, -1, MinFecha, Now.AddDays(30), 1, UsuarioActual.CveEmpresa, True) Then + + If ObjInventarios.DtResultados.Rows.Count > 0 Then + GvModalRSCOPorCaducar.DataSource = ObjInventarios.DtResultados + RegistraScript("$('#DVModalRSCOPorCaducar').modal('show');") + Else + GvModalRSCOPorCaducar.DataSource = Nothing + End If + + Else + GvModalRSCOPorCaducar.DataSource = Nothing + End If + + ObjInventarios.Dispose() + GvModalRSCOPorCaducar.DataBind() + + End Sub + Private Sub CargaSubProyectos() DdlSubproyectos.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) DdlSubproyectos.DataBind() diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index 3385a7bfa..22e264f22 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -374,6 +374,7 @@ Partial Class Inventarios_RecepcionUsados EsConsumoInterno = False Correo = "" FolioCorreo = "" + DdlClientes.ddlWS.Attributes.Add("data-coltexto", "CodigoNombre") If IfNull(Request("Opc"), "").ToString = "S" Then RBLOpcion.SelectedValue = "3" diff --git a/Inventarios/RepExistenciasCostos.aspx b/Inventarios/RepExistenciasCostos.aspx index 607edb4a9..5cdfa9106 100644 --- a/Inventarios/RepExistenciasCostos.aspx +++ b/Inventarios/RepExistenciasCostos.aspx @@ -82,7 +82,8 @@
    - + <%----%> +
    diff --git a/Inventarios/RepExistenciasCostos.aspx.vb b/Inventarios/RepExistenciasCostos.aspx.vb index d09aab823..f3cdfe821 100644 --- a/Inventarios/RepExistenciasCostos.aspx.vb +++ b/Inventarios/RepExistenciasCostos.aspx.vb @@ -125,19 +125,32 @@ Partial Class Inventarios_RepExistenciasCostos DdlProductows.Visible = False End If - DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1")) + 'DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1")) - DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1) + 'DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1) + 'DdlAlmacen.DataBind() + 'DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1")) + 'DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) + + 'If Not IsNothing(Request("CveAlmacen")) Then + ' If DdlAlmacen.Items.FindByValue(Request("CveAlmacen").ToString) Is Nothing Then + ' Dim CveAlmacen = Request("CveAlmacen").ToString + ' Dim Almacen As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {Request("CveAlmacen").ToString}").Rows(0)("Almacen").ToString + ' DdlAlmacen.Items.Insert(0, New ListItem(Almacen, CveAlmacen)) + ' End If + 'End If + + DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa) DdlAlmacen.DataBind() DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1")) - DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) - If Not IsNothing(Request("CveAlmacen")) Then If DdlAlmacen.Items.FindByValue(Request("CveAlmacen").ToString) Is Nothing Then Dim CveAlmacen = Request("CveAlmacen").ToString - Dim Almacen As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {Request("CveAlmacen").ToString}").Rows(0)("Almacen").ToString + Dim Almacen As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {Request("CveAlmacen").ToString}") DdlAlmacen.Items.Insert(0, New ListItem(Almacen, CveAlmacen)) End If + Else + DdlAlmacen.SelectedValuesIfExistM("-1") End If ddlProducto.Items.Insert(0, New ListItem("----", "-1")) @@ -169,21 +182,23 @@ Partial Class Inventarios_RepExistenciasCostos Dim CveMoneda As Integer = DdlMoneda.SelectedValue.ToEntero Dim CveConcepto As Integer = DdlTipoMovimiento.SelectedValue.ToEntero Dim CvePS As Integer = If(HFProducto.Value.ToEntero > 0, HFProducto.Value.ToEntero, -1) - Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero + 'Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero Dim CveClasificacion As Integer = DdlClasificacion.SelectedValue.ToEntero + Dim CveAlmacen As String = If(DdlAlmacen.GetSelectedValuesM = "", "-1", DdlAlmacen.GetSelectedValuesM) + Dim fechaI As Date = If(TxtFechaI.Text <> "", TxtFechaI.Text.ToDateTime, MinFecha) Dim fechaF As Date = If(TxtFechaF.Text <> "", TxtFechaF.Text.ToDateTime, MaxFecha) CargaDatos(CvePS, CveProveedor, CveMoneda, CveConcepto, fechaI, fechaF, CveAlmacen, CveClasificacion, DdlPersonal.SelectedValue.ToEntero, DdlMovs.SelectedValue.ToEntero) End Sub Protected Sub CargaDatos(CvePS As Integer, CveProveedor As Integer, CveMoneda As Integer, CveConcepto As Integer, FechaI As Date, FechaF As Date, CveAlmacen As String, CveClasificacion As Integer, CvePersonal As Integer, Tipo As Integer) + If CvePS > 0 Then LnkKardex.Visible = True LnkKardex.NavigateUrl = String.Format("/Inventarios/Kardex.aspx?CvePS={0}", CvePS) End If - Dim ObjInventarios As New ClsInventarios If ObjInventarios.RepExistenciasCostos(FechaI, FechaF, CveMoneda, CveProveedor, CveConcepto, CvePS, UsuarioActual.CveEmpresa, CveAlmacen, UsuarioActual.CveUsuario, CveClasificacion, CvePersonal, Tipo) Then DtData = ObjInventarios.DtResultados diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 03ae2fa79..2bda09324 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -1024,7 +1024,7 @@ Partial Class Inventarios_TraspasoAlmacen Dim FolioVirtualEntrada As Integer = 0 Dim FolioVirtualSalida As Integer = 0 Dim FolioEntrada As Integer = 0 - Dim Fecha As Date = TxtFecha.Text.ToDate + Dim Fecha As DateTime = TxtFecha.Text.ToDate Dim ErrorMovInv As Boolean = False Dim ErrorAC As Boolean = False Dim TextoError = "" @@ -1120,7 +1120,7 @@ Partial Class Inventarios_TraspasoAlmacen End If 'VIRTUAL SALIDA/ENTRADA - If RealizarMovimientoVirtual AndAlso CveAlmacenVirtualSalida > 0 AndAlso Not ErrorMovInv Then + If RealizarMovimientoVirtual AndAlso CveMovimientoSalida > 0 AndAlso Not ErrorMovInv Then Dim dtvirtual As DataTable = Nothing @@ -1129,7 +1129,7 @@ Partial Class Inventarios_TraspasoAlmacen dtvirtual = ObjInventario.DtResultados If dtvirtual.Rows.Count > 0 Then - CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida, CveAlmacenDestino:=CveAlmacenVirtualEntrada) + CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 37, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida, CveAlmacenDestino:=CveAlmacenVirtualEntrada) FolioVirtualSalida = ObjInventario.Folio Dim Contabilizable As Boolean = False Dim Concepto As String = TxtObservaciones.Text @@ -1150,7 +1150,7 @@ Partial Class Inventarios_TraspasoAlmacen 'SALIDA VIRTUAL Dim importevirtual As Decimal = 0 - CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/S3", CveMovimientoRelacionado:=CveMovimientoEntrada, CveAlmacenDestino:=CveAlmacenVirtualEntrada) + CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 36, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/S3", CveMovimientoRelacionado:=CveMovimientoEntrada, CveAlmacenDestino:=CveAlmacenVirtualEntrada) FolioVirtualEntrada = ObjInventario.Folio If CveMovimientoVirtualEntrada > 0 Then Dim DtCostosVirtual As DataTable @@ -2182,9 +2182,10 @@ Partial Class Inventarios_TraspasoAlmacen Dim FolioVirtualEntrada, FolioVirtualSalida As Integer If RealizarMovimientoVirtual AndAlso Not ErrorMovInv Then - Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenEntrada).FiltroPrimeroValor("CveAlmacenVirtual", "").ToEntero() + Dim CveAlmacenVirtualSalida As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenEntrada).FiltroPrimeroValor("CveAlmacenVirtual", "").ToEntero() + Dim CveAlmacenVirtualEntrada As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenSalida).FiltroPrimeroValor("CveAlmacenVirtual", "").ToEntero() - If CveAlmacenVirtual > 0 Then + If CveAlmacenVirtualSalida > 0 Then Dim dtvirtual As DataTable = Nothing @@ -2192,7 +2193,7 @@ Partial Class Inventarios_TraspasoAlmacen dtvirtual = ObjInventario.DtResultados If dtvirtual.Rows.Count > 0 Then - CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveMovimientoRelacionado:=CveMovimientoSalidaTransitorio, Modulo:="TA/S22") + CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveMovimientoRelacionado:=CveMovimientoSalidaTransitorio, Modulo:="TA/S22") FolioVirtualSalida = ObjInventario.Folio For Each RowVirtual As DataRow In dtvirtual.Rows Dim CvePS = RowVirtual("CvePS").ToString().ToEntero() @@ -2212,7 +2213,7 @@ Partial Class Inventarios_TraspasoAlmacen Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TA22", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtualSalida, UsuarioActual.CveEmpresa) Then Dim resultado As DataTable = ObjInventario.DtResultados - CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtual, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/S23") + CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtualEntrada, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/S23") FolioVirtualEntrada = ObjInventario.Folio For Each RowVirtual As DataRow In resultado.Rows diff --git a/SAT/SolicitudesIngresoSat.aspx b/SAT/SolicitudesIngresoSat.aspx new file mode 100644 index 000000000..a8b5ff7e0 --- /dev/null +++ b/SAT/SolicitudesIngresoSat.aspx @@ -0,0 +1,680 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="SolicitudesIngresoSat.aspx.cs" Inherits="SAT_SolicitudesIngresoSat" %> + + + + + + + + Visor solicitudes Ingreso + + + + +
  • + <%-- Descargar--%> +
  • + + +
  • + Solicitudes +
  • +
    +
    +
    + + + + + + +
    +
    +
    +
    + +
    + + + + +
    + +
    + <%----%> + +
    + + + + + + + + +
    +
    + +
    + <%----%> +
    + + + + + + + + +
    +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    + + +
    +
    + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    +
    + + + + + + + + + + + + +