diff --git a/AF/AF.aspx b/AF/AF.aspx index f89764e5b..15b22ec92 100644 --- a/AF/AF.aspx +++ b/AF/AF.aspx @@ -489,6 +489,18 @@ + +
+
+ +
+ +
+
+ +
+
+
diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index 05955771f..c78db8b2b 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -945,6 +945,7 @@ Partial Class AF_AF CargaSubTipoActivoFijo() DdlSubTipoActivoFijo.SelectedValue = ObjActivoFijo.CveSubTipoActivoFijo.ToString() LatLong.Visible = UsuarioActual.CveEmpresa = 158 And ((DdlTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZO") Or (DdlSubTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZO") Or (DdlTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS") Or (DdlSubTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS")) + TxtAgroCuenta.Text = ObjActivoFijo.DtResultados.Rows(0)("AgroCuenta").ToString() TxtLatitud.Text = ObjActivoFijo.DtResultados.Rows(0)("Lat").ToString() TxtLongitud.Text = ObjActivoFijo.DtResultados.Rows(0)("Long").ToString() @@ -2490,7 +2491,7 @@ Partial Class AF_AF DdlEstadoActivoFijo.SelectedValue.ToEntero, DdlCtaContableDepreciacion.SelectedValue.ToEntero, TxtPorDepreciacion.Text.Trim.ToDouble, TxtObservaciones.Text.Trim, Ddlclientes.SelectedValue.ToEntero, CveMovimientoSalidaInv, UsuarioActual.CveUsuario, CveEmpresaActual, CveMarca:=DdlMarcas.SelectedValue.ToEntero, CveModelo:=DdlModelos.SelectedValue.ToEntero, CveGrupo:=DdlGrupo.SelectedValue.ToEntero, CveAFPadre:=DdlAFPadres.SelectedValue.ToEntero, CveDispositivo:=DdlDispositivo.SelectedValue.ToEntero, - FechaBaja:=FechaBaja, Lat:=TxtLatitud.Text, Longi:=TxtLongitud.Text) > 0 Then + FechaBaja:=FechaBaja, Lat:=TxtLatitud.Text, Longi:=TxtLongitud.Text, AgroCuenta:=TxtAgroCuenta.Text) > 0 Then ViewState("CveActivoFijo") = ObjAF.CveActivoFijo Else ErrorGuardar = True @@ -2596,7 +2597,7 @@ Partial Class AF_AF DdlSubProyecto.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.Trim.ToEntero, DdlEstadoActivoFijo.SelectedValue.ToEntero, DdlCtaContableDepreciacion.SelectedValue.ToEntero, TxtPorDepreciacion.Text.Trim.ToDouble, TxtObservaciones.Text.Trim, Ddlclientes.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveEmpresaActual, CveMarca:=DdlMarcas.SelectedValue.ToEntero, CveModelo:=DdlModelos.SelectedValue.ToEntero, CveGrupo:=DdlGrupo.SelectedValue.ToEntero, CveAFPadre:=DdlAFPadres.SelectedValue.ToEntero, CveDispositivo:=DdlDispositivo.SelectedValue.ToEntero, - FechaBaja:=FechaBaja, Lat:=TxtLatitud.Text, Longi:=TxtLongitud.Text) Then + FechaBaja:=FechaBaja, Lat:=TxtLatitud.Text, Longi:=TxtLongitud.Text, AgroCuenta:=TxtAgroCuenta.Text) Then 'Comentado porque te redirecciona no se ocupa - 22 Enero 2016 - Israel Piña 'CargaDatos() diff --git a/App_Code/ClsAF.vb b/App_Code/ClsAF.vb index 9e5a61305..2a68ffb0a 100644 --- a/App_Code/ClsAF.vb +++ b/App_Code/ClsAF.vb @@ -401,7 +401,7 @@ Public Class ClsAF CveSubProyecto As Integer, Cuenta As Integer, CveEstadoActivoFijo As Integer, IdCtaContDepreciacion As Integer, PorDepreciacion As Double, Observaciones As String, CveCliente As Integer, CveMovimiento As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional CveModelo As Integer = -1, Optional CveGrupo As Integer = -1, Optional CveAFPadre As Integer = -1, Optional CveDispositivo As Integer = -1, Optional FechaBaja As Date = MinFecha, - Optional Lat As String = "", Optional Longi As String = "") As Integer + Optional Lat As String = "", Optional Longi As String = "", Optional AgroCuenta As String = "") As Integer Dim Retorno As Integer = -1 @@ -437,6 +437,7 @@ Public Class ClsAF .Add("@Lat", SqlDbType.VarChar).Value = Lat .Add("@Long", SqlDbType.VarChar).Value = Longi + .Add("@AgroCuenta", SqlDbType.VarChar).Value = AgroCuenta .Add("@CveActivoFijo", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue @@ -455,7 +456,7 @@ Public Class ClsAF Alert("Capture un SubTipo de Activo Fijo Valido", TipoMensaje.MsgAdvertencia) Else - Alert("Ya existe un Activo Fijo con el mismo nombre: " & Descripcion & ".", TipoMensaje.MsgAdvertencia) + Alert("Ya existe un Activo Fijo con el mismo nombre: " & Descripcion & ".", TipoMensaje.MsgAdvertencia) End If Else @@ -472,7 +473,7 @@ Public Class ClsAF CveEstadoActivoFijo As Integer, IdCtaContDepreciacion As Integer, PorDepreciacion As Double, Observaciones As String, CveCliente As Integer, CveUsuarioModifico As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional CveModelo As Integer = -1, Optional CveGrupo As Integer = -1, Optional CveAFPadre As Integer = -1, Optional CveDispositivo As Integer = -1, Optional FechaBaja As Date = MinFecha, - Optional Lat As String = "", Optional Longi As String = "") As Boolean + Optional Lat As String = "", Optional Longi As String = "", Optional AgroCuenta As String = "") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_AF_ActivosFijosUpdate") @@ -507,6 +508,7 @@ Public Class ClsAF .Add("@FechaBaja", SqlDbType.Date).Value = FechaBaja .Add("@Lat", SqlDbType.VarChar).Value = Lat .Add("@Long", SqlDbType.VarChar).Value = Longi + .Add("@AgroCuenta", SqlDbType.VarChar).Value = AgroCuenta End With Try diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index f71c30878..e7a7280d6 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -264,7 +264,8 @@ Public Class ClsClientes End Sub Public Function GetClientes(CveCliente As Integer, Nombre As String, Codigo As String, NombreCorto As String, RFC As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional Notificar As String = "-1", Optional CvePrecioLista As Integer = -1, Optional CveClienteClasificacion As Integer = -1, - Optional TipoCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PermiteCreditoFiltro As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveUsuarioConsulta As Integer = -1) As Boolean + Optional TipoCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PermiteCreditoFiltro As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveUsuarioConsulta As Integer = -1, + Optional Cuenta As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ClientesGet") @@ -287,6 +288,8 @@ Public Class ClsClientes .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@PermiteCredito", SqlDbType.Int).Value = PermiteCreditoFiltro .Add("@TopSelect", SqlDbType.Int).Value = TopSelect + .Add("@Cuenta", SqlDbType.VarChar).Value = Cuenta + End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index 5d751b497..e92fdf12d 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -1931,7 +1931,7 @@ Public Class ClsCompras #Region " REFACTURACION " - Public Function GetRefacturacion(CveProveedor As Integer, SubTotal As Double, IVA As Double, Total As Double, Opcion As Integer, CveEmpresa As Integer) As Boolean + Public Function GetRefacturacion(CveProveedor As Integer, SubTotal As Double, IVA As Double, Total As Double, Opcion As Integer, CveEmpresa As Integer, Optional Top As Integer = 100000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_RefacturacionGet") @@ -1942,6 +1942,7 @@ Public Class ClsCompras .Add("@Total", SqlDbType.Float).Value = Total .Add("@Opcion", SqlDbType.Int).Value = Opcion ' 1. Exácta, 2. Con diferencia .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Top", SqlDbType.Int).Value = Top End With Try diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 6af4ed287..77f4301c1 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -4223,15 +4223,16 @@ Public Class ClsGenerales Return Retorno End Function - Public Function AddTipoOrganico(TipoOrganico As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Public Function AddTipoOrganico(TipoOrganico As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_TipoOrganicosAdd") With SqlAdapter.SelectCommand.Parameters .Add("@TipoOrganico", SqlDbType.VarChar).Value = TipoOrganico - .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Estatus", SqlDbType.Bit).Value = Estatus + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try @@ -4317,15 +4318,16 @@ Public Class ClsGenerales Return Retorno End Function - Public Function AddEmpacado(TipoEmpacado As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Public Function AddEmpacado(TipoEmpacado As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_EmpacadosAdd") With SqlAdapter.SelectCommand.Parameters .Add("@TipoEmpacado", SqlDbType.VarChar).Value = TipoEmpacado - .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Estatus", SqlDbType.Bit).Value = Estatus + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 78225137a..8bfdbc021 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -2624,7 +2624,7 @@ Public Class ClsNominas Dim retorno As Boolean = False Try DTSet = New DataSet() - DataAdapter("PA_Nom_NominaEmpleadosz", CommandType.StoredProcedure) + DataAdapter("PA_Nom_NominaEmpleados", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index b351cfde5..38b6db274 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4313,6 +4313,40 @@ Public Class ClsPaginas End Set End Property +#Region "CITRUS GAME" + Property GlobalDTGralEmpacados(CveEmpresa As Integer) As DataTable + Get + Dim AppNombre As String = $"GlobalDTGralEmpacados-{CveEmpresa}" + If Application(AppNombre) Is Nothing Then + Dim ObjGenerales As New ClsGenerales() + If ObjGenerales.GetEmpacados(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados + ObjGenerales.Dispose() + End If + + GlobalDTGralEmpacados = DirectCast(Application(AppNombre), DataTable) + End Get + Set(value As DataTable) + Dim AppNombre As String = $"GlobalDTGralEmpacados-{CveEmpresa}" + Application(AppNombre) = value + End Set + End Property + Property GlobalDTGralTipoOrganicos(CveEmpresa As Integer) As DataTable + Get + Dim AppNombre As String = $"GlobalDTGralTipoOrganicos-{CveEmpresa}" + If Application(AppNombre) Is Nothing Then + Dim ObjGenerales As New ClsGenerales() + If ObjGenerales.GetTipoOrganicos(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados + ObjGenerales.Dispose() + End If + + GlobalDTGralTipoOrganicos = DirectCast(Application(AppNombre), DataTable) + End Get + Set(value As DataTable) + Dim AppNombre As String = $"GlobalDTGralTipoOrganicos-{CveEmpresa}" + Application(AppNombre) = value + End Set + End Property +#End Region #End Region @@ -4321,8 +4355,6 @@ Public Class ClsPaginas DirectorioSitio = 2 eFacturasCaptcha = 3 - - RutaEmpresasJM = 500 RutaEmpresasRM = 501 RutaEmpresasPC = 502 diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index a6c62f462..f3ae17edc 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -762,8 +762,8 @@ Public Class ClsProductosServicios .Add("@VigenciaIndeterminadaRSCO", SqlDbType.Bit).Value = VigenciaIndeterminadaRSCO 'Nuevo MLopez 18/11/2022 - .Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoOrganico - .Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoEmpacado + .Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado + .Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico End With diff --git a/App_GlobalResources/RadScheduler.Main.es-MX.resx b/App_GlobalResources/RadScheduler.Main.es-MX.resx deleted file mode 100644 index 4c9d7a4dd..000000000 --- a/App_GlobalResources/RadScheduler.Main.es-MX.resx +++ /dev/null @@ -1,456 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Please do not remove this key. - - - Todo el día - - - Diario - - - Día - - - día(s) - - - Título - - - Descripción - - - Fin despues - - - Fin en - - - Cada - - - Cada día - - - first - - - fourth - - - Inicio - - - Cada Hora - - - hora(s) - - - last - - - día - - - weekday - - - weekend day - - - Mensual - - - mes(es) - - - Más Detalles - - - Sin Fin - - - Veces - - - de - - - de cada - - - Range of recurrence: - - - Repetir cada - - - Perioricidad - - - Recurring task - - - reset exceptions - - - second - - - The - - - third - - - Fin - - - Semanal - - - semana(s) en - - - Anual - - - todo el día - - - Cancelar - - - Cancelar - - - Are you sure you want to delete this appointment? - - - Confirmar eliminar - - - OK - - - Delete only this occurrence. - - - Delete the series. - - - Deleting a recurring appointment - - - Editar solo la cita. - - - Editar la serie. - - - Editar la cita - - - Modificar la cita. - - - Resize the series. - - - Resizing a recurring appointment - - - Move only this occurrence. - - - Move the series. - - - Moving a recurring appointment - - - Día - - - Mes - - - Timeline - - - Multi-day - - - next day - - - previous day - - - hoy - - - Semana - - - Ver 24 horas... - - - Opciones - - - Ver horas trabajo... - - - más... - - - OK - - - Cancelar - - - Hoy - - - Please provide appointment subject - - - Start time must be before end time - - - Start time is required - - - Start date is required - - - End time is required - - - End date is required - - - Invalid number - - - Cargando... - - - Listo - - - New Cita - - - Editar Cita - - - Close - - - Confirm reset exceptions - - - Do you want to delete all existing recurrence exceptions? - - - Guardar - - - Nueva Cita - - - New Recurring Appointment - - - Delete - - - Editar - - - Go to today - - - Recordatorio - - - Recordatorios - - - due in - - - overdue - - - minuto - - - minutos - - - hora - - - horas - - - día - - - días - - - semana - - - semanas - - - - - - - Snooze - - - Dismiss - - - Dismiss All - - - Open Item - - - Click Snooze to be reminded again in: - - - before start - - - Time zone - - \ No newline at end of file diff --git a/App_GlobalResources/RadScheduler.Main.resx b/App_GlobalResources/RadScheduler.Main.resx deleted file mode 100644 index c2873eac0..000000000 --- a/App_GlobalResources/RadScheduler.Main.resx +++ /dev/null @@ -1,456 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Please do not remove this key. - - - All day - - - Daily - - - Day - - - day(s) - - - Subject - - - Description - - - End after - - - End by - - - Every - - - Every weekday - - - first - - - fourth - - - Start time - - - Hourly - - - hour(s) - - - last - - - day - - - weekday - - - weekend day - - - Monthly - - - month(s) - - - More details - - - No end date - - - occurrences - - - of - - - of every - - - Range of recurrence: - - - Recur every - - - Recurrence - - - Recurring task - - - reset exceptions - - - second - - - The - - - third - - - End time - - - Weekly - - - week(s) on - - - Yearly - - - all day - - - Cancel - - - Cancel - - - Are you sure you want to delete this appointment? - - - Confirm delete - - - OK - - - Delete only this occurrence. - - - Delete the series. - - - Deleting a recurring appointment - - - Edit only this occurrence. - - - Edit the series. - - - Editing a recurring appointment - - - Resize only this occurrence. - - - Resize the series. - - - Resizing a recurring appointment - - - Move only this occurrence. - - - Move the series. - - - Moving a recurring appointment - - - Day - - - Month - - - Timeline - - - Multi-day - - - next day - - - previous day - - - today - - - Week - - - Show 24 hours... - - - Options - - - Show business hours... - - - more... - - - OK - - - Cancel - - - Today - - - Please provide appointment subject - - - Start time must be before end time - - - Start time is required - - - Start date is required - - - End time is required - - - End date is required - - - Invalid number - - - Working... - - - Done - - - New Appointment - - - Edit Appointment - - - Close - - - Confirm reset exceptions - - - Do you want to delete all existing recurrence exceptions? - - - Save - - - New Appointment - - - New Recurring Appointment - - - Delete - - - Edit - - - Go to today - - - Reminder - - - Reminders - - - due in - - - overdue - - - minute - - - minutes - - - hour - - - hours - - - day - - - days - - - week - - - weeks - - - None - - - Snooze - - - Dismiss - - - Dismiss All - - - Open Item - - - Click Snooze to be reminded again in: - - - before start - - - Time zone - - \ No newline at end of file diff --git a/App_GlobalResources/RadSchedulerRecurrenceEditor.resx b/App_GlobalResources/RadSchedulerRecurrenceEditor.resx deleted file mode 100644 index 7baa4911c..000000000 --- a/App_GlobalResources/RadSchedulerRecurrenceEditor.resx +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Please do not remove this key. - - - Recurrence - - - Hourly - - - Daily - - - Weekly - - - Monthly - - - Yearly - - - Every - - - hour(s) - - - day(s) - - - week(s) on - - - month(s) - - - Every weekday - - - Recur every - - - Day - - - of every - - - first - - - second - - - third - - - fourth - - - last - - - day - - - weekday - - - weekend day - - - The - - - of - - - No end date - - - End after - - - End by - - - occurrences - - - OK - - - Cancel - - - Today - - \ No newline at end of file diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 94533a423..d3b746536 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -3850,22 +3850,28 @@ Partial Class Bancos_IE 'Conta ContPAQ If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then - If IDCtaBeneficiario > 0 And IDCtaContable > 0 Then + Dim AutoConta As Boolean = True + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + If Not (IDCtaBeneficiario > 0 And IDCtaContable > 0) Then + AutoConta = False + If IDCtaContable < 1 Then + Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Bancos es invalida", TipoMensaje.MsgAdvertencia) + End If + If IDCtaBeneficiario < 1 Then + Alert("No se puede contabilizar la Prepoliza debido a que las cuenta del Beneficiario es invalida", TipoMensaje.MsgAdvertencia) + End If + End If + End If + + If AutoConta Then If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then IDPoliza = ObjMov.ContaIdPoliza - 'Alert(alertaContabilizacion & ObjMov.AlertaMensaje, ModExtensiones.TipoMensaje.MsgInformacion) Else Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError) MsgError = "Error al contabilizar." End If - Else - If IDCtaContable < 1 Then - Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Bancos es invalida", TipoMensaje.MsgAdvertencia) - End If - If IDCtaBeneficiario < 1 Then - Alert("No se puede contabilizar la Prepoliza debido a que las cuenta del Beneficiario es invalida", TipoMensaje.MsgAdvertencia) - End If End If + End If If MsgError = "" Then diff --git a/Bancos/RepCxCCliente.aspx b/Bancos/RepCxCCliente.aspx index 283a6e5ba..4c4067ef2 100644 --- a/Bancos/RepCxCCliente.aspx +++ b/Bancos/RepCxCCliente.aspx @@ -59,7 +59,7 @@ -
+
@@ -124,10 +124,10 @@
  • Cuenta:     - +
  • Moneda: - +
  • diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index e28e5152e..b68c99bc0 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1084,6 +1084,7 @@ Partial Class Compras_Compras #End Region + Dim DTConceptos As DataTable Private Property EmpresasOC As List(Of Integer) Get @@ -1185,6 +1186,34 @@ Partial Class Compras_Compras End Property + Private Property EsDevolucionApoyoLogistico As Boolean + Get + + If ViewState("EsDevolucionApoyoLogistico") Is Nothing Then + ViewState("EsDevolucionApoyoLogistico") = False + End If + Return CType(ViewState("EsDevolucionApoyoLogistico"), Boolean) + End Get + Set(value As Boolean) + ViewState("EsDevolucionApoyoLogistico") = value + End Set + End Property + + Private Property TipoCompraOriginal As Integer + Get + + If ViewState("TipoCompraOriginal") Is Nothing Then + ViewState("TipoCompraOriginal") = -1 + End If + + Return ViewState("TipoCompraOriginal").ToString.ToEntero + + End Get + Set(value As Integer) + ViewState("TipoCompraOriginal") = value + End Set + End Property + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load @@ -1610,7 +1639,13 @@ Partial Class Compras_Compras NCSeleccionFacturasRelacionadas(UUIDSList) End If + If CveFactura > 0 AndAlso Serie Isnot nothing AndAlso Serie.ToUpper = "NL" AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + EsDevolucionApoyoLogistico = True + DdlTipoComprobante.Items.Clear() + DdlTipoComprobante.Items.Add(New ListItem("Devolución", "DEV")) + DdlTipoComprobante.SelectedValueExist("DEV") + End If End If @@ -2597,6 +2632,7 @@ Partial Class Compras_Compras CvePrePoliza = dr("CvePrePoliza").ToString.ToEntero EstatusAlmacen = dr("EstatusAlmacen").ToString.ToEntero DdlTipoCompra.SelectedValueExist(dr("CveTipoCompra")) + TipoCompraOriginal = dr("CveTipoCompra").ToString.ToEntero CveTipoConcepto = dr("CveTipoConcepto").ToString.ToEntero ChkEsNoDeducible.Checked = Boolean.Parse(dr("NoDeducible").ToString) @@ -5527,6 +5563,8 @@ Partial Class Compras_Compras If DdlTipoComprobante.SelectedValue = "Fac" Then + + For Each tCveAlmacen As Integer In ListAlmacenes If GvInv.Rows(indice).FCDropDownList("DdlRecibirInv").SelectedValue = "1" Then Continue For @@ -5553,7 +5591,7 @@ Partial Class Compras_Compras ListaMovimientosAlmacen.Add(CveMovimientoInventario) - + Dim contadorAlamcen As Integer = 0 For Each Dr As DataRow In DtInv.Rows CveProducto = Dr("CvePS").ToString.ToEntero @@ -5594,22 +5632,26 @@ Partial Class Compras_Compras End If End If - 'si no es por serie lote + ImporteConcepto = If(DdlMoneda.SelectedValue.ToEntero = 1, PUInv, PUInv * TipoCambioGuardar) - If(DdlMoneda.SelectedValue.ToEntero = 1, tDescuento, tDescuento * TipoCambioGuardar) + 'si no es por serie lote ImporteConcepto = If(UsuarioActual.Empresa.UsaAC, ImporteConcepto * IVA, ImporteConcepto) - If Dr("CveAlmacen").ToString.ToEntero = tCveAlmacen Then - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, CantidadInv, CveUnidad, Dr("CvePS").ToString.ToEntero, ImporteConcepto, -1, PUTC:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, Dr("PU").ToString.ToDecimal), CostoIndirecto:=CostoIndirecto, CveCompraDetalle:=Dr("CveCompraDetalle").ToString.ToEntero, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero) Then - ErrorMovInv = True - Exit For + If Dr("CveAlmacen").ToString.ToEntero = tCveAlmacen Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, CantidadInv, CveUnidad, Dr("CvePS").ToString.ToEntero, ImporteConcepto, -1, PUTC:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, Dr("PU").ToString.ToDecimal), CostoIndirecto:=CostoIndirecto, CveCompraDetalle:=Dr("CveCompraDetalle").ToString.ToEntero, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero) Then + ErrorMovInv = True + Exit For + End If End If + End If - End If - - i = i + 1 + i = i + 1 + contadorAlamcen = contadorAlamcen + 1 Next End If + + Next End If @@ -6366,6 +6408,7 @@ Partial Class Compras_Compras 'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN 'SI LA COMPRA ES DE TIPO GASTO CON ALMACEN DEBE REGISTRAR MOVIMIENTO Dim AlmacenSoloExistencia As Boolean = False + If DdlTipoCompra.SelectedValue <> "10" Then For Each Dr As DataRow In DT.Rows If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then @@ -6375,6 +6418,7 @@ Partial Class Compras_Compras Dr.AcceptChanges() Next End If + DT.AcceptChanges() DT = DT.FiltraParametros("ISNULL(CveAlmacen,0) > 0") If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then @@ -9408,6 +9452,8 @@ Partial Class Compras_Compras Msg.Append("La Compra se actualizó correctamente") Alert(Msg.ToString()) + TipoCompraOriginal = DdlTipoCompra.SelectedValue.ToEntero + Else ObjCompra.RollBack() If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() @@ -9443,7 +9489,8 @@ Partial Class Compras_Compras (row1("CveActivoFijo").ToString.ToEntero <> row2("CveActivoFijo").ToString.ToEntero) Or (row1("AFMedida").ToString.ToEntero <> row2("AFMedida").ToString.ToEntero) Or (row1("TipoAF").ToString.ToEntero <> row2("TipoAF").ToString.ToEntero) Or - (row1("CvePS").ToString.ToEntero <> row2("CvePS").ToString.ToEntero) Then + (row1("CvePS").ToString.ToEntero <> row2("CvePS").ToString.ToEntero Or + DdlTipoCompra.SelectedValue.ToEntero <> TipoCompraOriginal) Then Return False End If End If @@ -9557,6 +9604,7 @@ Partial Class Compras_Compras 'Removemos los conceptos de la prepoliza If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 6, CveCompra, 1) Then ErrorPrepoliza = True 'GASTO If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 68, CveCompra, 1) Then ErrorPrepoliza = True 'ALMACEN + If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 95, CveCompra, 1) Then ErrorPrepoliza = True 'GASTO CON ALMACEN RELLENO If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 49, CveCompra, 1) Then ErrorPrepoliza = True 'AF If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 205, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 230, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO @@ -9565,6 +9613,15 @@ Partial Class Compras_Compras If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 228, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 229, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO + + 'SI ES GASTO CON ALMACEN REGISTRA EL CONCEPTO 95 + If DdlTipoCompra.SelectedValue = "10" Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMN, Referencia, 95, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=False) Then + ErrorPrepoliza = True + End If + End If + + 'OBTIENE METODO DE CONTABILIZACIÓN AL GUARDAR Dim ConceptoContabilizacionAlmacen = 0 If ObjCompra.GetCompras(CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then @@ -9634,8 +9691,11 @@ Partial Class Compras_Compras importeMovimiento = 0 IdCtaContable = 0 + + + 'INV [MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA) ] - If UsuarioActual.Empresa.UsaInventarios And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen.Contiene(176, 205) Then + If DdlTipoCompra.SelectedValue.ToEntero <> 10 AndAlso UsuarioActual.Empresa.UsaInventarios And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen.Contiene(176, 205) Then importeMovimiento = TmpDT.SUM("Total", $"ISNULL(TipoAF,0) <> 2 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal importeMN = importeMovimiento * tipoCambioActual * Multiplicador @@ -9688,18 +9748,29 @@ Partial Class Compras_Compras DT.AcceptChanges() DtAlmacenes.Dispose() - 'QUITA 1-[MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA)] 2-[NC CON PRODUCTOS] - If UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen > 0 Then - DT = DT.FiltraParametros("CveTipoPS <> 2") + + If DdlTipoCompra.SelectedValue.ToEntero <> 10 Then + 'QUITA 1-[MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA)] 2-[NC CON PRODUCTOS] + If UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen > 0 Then + DT = DT.FiltraParametros("CveTipoPS <> 2") + End If End If + Dim DTDistinct = DT.Copy - If UsuarioActual.Empresa.Funcionalidad(126) = "1" Then - DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"}) + + If DdlTipoCompra.SelectedValue.ToEntero = 10 Then + DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto", "CveAlmacen"}) Else - DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"}) + + If UsuarioActual.Empresa.Funcionalidad(126) = "1" Then + DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"}) + Else + DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"}) + End If End If + If DTDistinct.Rows.Count > 0 Then For Each Row2 As DataRow In DTDistinct.Rows @@ -9709,6 +9780,12 @@ Partial Class Compras_Compras Else importeMovimiento = DT.SUM("Total", String.Format("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveClasificacion = {0} AND CveSubProyecto = {1} AND ISNULL(CveTipoGasto,0) = {2}", Row2("CveClasificacion").ToString.ToEntero, Row2("CveSubProyecto").ToString.ToEntero, Row2("CveTipoGasto").ToString.ToEntero)).ToString.ToDecimal End If + + If DdlTipoCompra.SelectedValue.ToEntero = 10 Then + importeMovimiento = DT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"CveAlmacen > 0 ").ToString.ToDecimal + TmpDT.SUM("CostoIndirectoAlmacen", $"CveAlmacen > 0").ToString.ToDecimal + End If + + importeMN = importeMovimiento * tipoCambioActual * Multiplicador 'CLASIFICACION @@ -10988,7 +11065,16 @@ Partial Class Compras_Compras e.Row.FCCheckBox("cbInv").Enabled = False End If - e.Row.FCDropDownList("ddlEAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(If(DdlTipoCompra.SelectedValue.ToEntero = 9, "CveTipoAlmacen IN (21)", "CveTipoAlmacen IN (1,2,7,14,19)")) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa) + + If EsDevolucionApoyoLogistico Then + e.Row.FCDropDownList("ddlEAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen = 27") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa) + + Else + e.Row.FCDropDownList("ddlEAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(If(DdlTipoCompra.SelectedValue.ToEntero = 9, "CveTipoAlmacen IN (21)", "CveTipoAlmacen IN (1,2,7,14,19)")) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa) + End If + + + e.Row.FCDropDownList("ddlEAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1")) e.Row.FCDropDownList("ddlEAlmacen").DataBind() 'e.Row.FCDropDownList("ddlEAlmacen").SelectedValue = If(e.Row.DBCampo("CveAlmacen").ToEntero <= 0, "-1", e.Row.DBCampo("CveAlmacen")) @@ -11100,6 +11186,10 @@ Partial Class Compras_Compras StrAlmacenes = $"Modalidad = 0" End If + If EsDevolucionApoyoLogistico Then + StrAlmacenes = " CveTipoAlmacen = 27" + End If + e.Row.FCDropDownList("ddlAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(StrAlmacenes) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa) e.Row.FCDropDownList("ddlAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1")) e.Row.FCDropDownList("ddlAlmacen").DataBind() @@ -17625,6 +17715,8 @@ Partial Class Compras_Compras 'If GlobalDTProductosServiciosEquivalencias(CvePS, CveUM).Rows.Count = 0 Then Row("CveEq") = 1 Else Row("CveEq") = 0 Row("NoDeducible") = NoDeducible + + Total = Math.Round(PU, DecimalesPermitidos) * Cantidad - Descuento Row("PU") = Math.Round(PU, DecimalesPermitidos) If CargaXml And (Version = "3.3" Or Version = "4.0") Then diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 32792b00f..c62b4a2ae 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -2042,7 +2042,7 @@ Partial Class Inventarios_EntradasSalidas If Not ErrorAC And Not ErrorMovInv Then - If Not DdlDireccionEnvio.SelectedValue.ToEntero > 0 Then + If ChkEmitirTimbrado.Checked AndAlso Not DdlDireccionEnvio.SelectedValue.ToEntero > 0 Then ErrorMovInv = True Alert("La direccion destino es requerida.", TipoMensaje.MsgAdvertencia) End If @@ -4404,6 +4404,11 @@ Partial Class Inventarios_EntradasSalidas Exit Sub End If + If Not TxtIFDescripcion.Text.Trim.Length > 0 Then + Alert("La descripción es requerida", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + Dim ObjInventario As New ClsInventarios Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL()) @@ -4426,6 +4431,14 @@ Partial Class Inventarios_EntradasSalidas Dim idCtaContableEntrada As Integer = 0 Dim idCtaContableSalida As Integer = 0 + Dim Prorratear As Boolean = If(UsuarioActual.CveEmpresa = 172 AndAlso DtMovimientosSalidaInvFisico.Rows.Count > 0 AndAlso DtMovimientosEntradaInvFisico.Rows.Count > 0, True, False) + Dim ProPU As Decimal = 0 + 'Dim ImporteSalida As Decimal = + + 'DtMovimientosSalidaInvFisico + 'DtMovimientosEntradaInvFisico + + Dim IdCuentaOtrosIngresos As Integer = UsuarioActual.Empresa.IdCuentaOtrosIngresos Select Case UsuarioActual.CveEmpresa Case 119 @@ -4438,6 +4451,8 @@ Partial Class Inventarios_EntradasSalidas Dim EsContabilizable As Boolean = (CveModalidad = 1) + + 'MOVIMIENTO DE ENTRADA If DtMovimientosEntradaInvFisico.Rows.Count > 0 Then 'FolioEntrada = ObjInventario.GetFolioSiguiente(32, UsuarioActual.CveEmpresa) @@ -4484,9 +4499,35 @@ Partial Class Inventarios_EntradasSalidas End If Next + + + + If Prorratear Then + If Not ErrorMovInv AndAlso CveMovimientoSalida > 0 Then + If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then + + Dim ProTotalSalida As Decimal = ObjInventario.DtResultados.SUMD("Total", "") + Dim ProCantidadEntrada As Decimal = DtMovimientosEntradaInvFisico.SUMD("Cantidad", "") + + ProPU = (ProTotalSalida / ProCantidadEntrada).RoundSQL(6) + + If Not ProPU > 0 Then + ErrorMovInv = True + Mensaje = $"Ocurrió un error al obtener el PU proraterado, pu {ProPU}" + End If + + Else + ErrorMovInv = True + Mensaje = "Ocurrió un error al obtener el PU proraterado" + End If + End If + End If + + + If Not ErrorMovInv Then For Each Dr As DataRow In DtMovimientosEntradaInvFisico.Rows - ImporteConcepto = Dr("PU").ToString.ToDecimal + ImporteConcepto = If(Prorratear, ProPU, Dr("PU").ToString.ToDecimal) If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, -1, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate) Then @@ -4582,12 +4623,16 @@ Partial Class Inventarios_EntradasSalidas tIdCtaGasto = 1321 End Select - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ValorSalida + ValorEntrada, "", 290, tConcepto, Fecha, tIdCtaGasto, -1, CveMovimientoAlmacen:=CveMovimientoSalida, CveClasificacion:=tCveClasificacion, CveSubProyecto:=tCveSubProyectoSalida, ImporteMX:=ValorSalida + ValorEntrada, Contabilizable:=EsContabilizable) Then - ErrorMovInv = True - Mensaje = "Ocurrió un error al guardar los movimientos contables de ajuste de salida" + If Math.Abs((ValorSalida + ValorEntrada)) <> 0 Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ValorSalida + ValorEntrada, "", 290, tConcepto, Fecha, tIdCtaGasto, -1, CveMovimientoAlmacen:=CveMovimientoSalida, CveClasificacion:=tCveClasificacion, CveSubProyecto:=tCveSubProyectoSalida, ImporteMX:=ValorSalida + ValorEntrada, Contabilizable:=EsContabilizable) Then + ErrorMovInv = True + Mensaje = "Ocurrió un error al guardar los movimientos contables de ajuste de salida" + End If End If End If - End If + + + End If If Not ErrorMovInv Then If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then diff --git a/Inventarios/KardexAlmacenHorizontal.aspx.vb b/Inventarios/KardexAlmacenHorizontal.aspx.vb index dc2f229a8..b01a8ac17 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx.vb +++ b/Inventarios/KardexAlmacenHorizontal.aspx.vb @@ -30,6 +30,10 @@ Partial Class Inventarios_KardexAlmacen txtFechaI.Text = Now.ToShortDateString End If + If UsuarioActual.TienePermisoProceso(349) Then + DdlIncluyeTransitorios.Items.RemoveAt(0) 'oculta opción "No" en tránsito + End If + If IfNull(Request("CvePS"), "-1").ToString.ToEntero > 0 Then CargarKardex(Request("CvePS").ToString.ToEntero) ddlProducto2.SelectedValue = If(Request("CvePS") IsNot Nothing, Request("CvePS").ToString, "-1") End If @@ -147,8 +151,9 @@ Partial Class Inventarios_KardexAlmacen Dim CveProveedorCompra As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1) Dim Marcas As String = If(DdlMarca.GetSelectedValuesM = "", "-1", DdlMarca.GetSelectedValuesM) Dim GPO As Integer = Ddlgrupo.SelectedValue.ToEntero + Dim IncluyeTransitorios As Integer = DdlIncluyeTransitorios.SelectedValue.ToEntero - If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, -1, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), DdlIncluyeTransitorios.SelectedValue.ToEntero(), + If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, -1, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), IncluyeTransitorios, DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue, Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes, GPO:=GPO) Then If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 2bf50e4a2..186a58525 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -492,7 +492,12 @@ public partial class Nomina_Nomina2 : ClsPaginas CveTipoTrabajador = DdlTipoTrabajador.SelectedValue.ToEntero(); HypPDFSTimbrados.Attributes.Add("onclick", string.Format("GETPDF({0},{1})", -1, FiltCvePeriodo)); cargaDatos(); - LtlPeriodoseleccionado.Text = string.Format("{0} ({1} Empleados)", DdlPeriodo.SelectedItem.Text, dtempleados.COUNT("CvePersonal", " CvePersonal >0 ")); + int empleados = 0; + if(dtempleados != null && dtempleados.Rows.Count>0) + { + empleados = dtempleados.COUNT("CvePersonal", " CvePersonal >0 "); + } + LtlPeriodoseleccionado.Text = string.Format("{0} ({1} Empleados)", DdlPeriodo.SelectedItem.Text, empleados); LtlPeriodoseleccionadoASis.Text = LtlPeriodoseleccionado.Text; } diff --git a/OS/RepServicioDomicilio.aspx b/OS/RepServicioDomicilio.aspx index 8b9b087d3..cca9c7ac9 100644 --- a/OS/RepServicioDomicilio.aspx +++ b/OS/RepServicioDomicilio.aspx @@ -1180,24 +1180,10 @@ function InitCalendar() { $(document).ready(function () { - //$("#TxtModalFechaOS").on("change paste keyup", function () { - // console.log('TxtModalFechaOS Modificado'); - //}); - - //jQuery('#TxtModalFechaOS').on('input', function () { - // console.log('TxtModalFechaOS Modificado'); - //}); - - //$("#TxtModalFechaOS").change(function () { - // console.log('TxtModalFechaOS Modificado'); - //}); + Calendario(); - - // CargaPickers(); - - - // $("#TxtModalFechaOS").val("" + start.format("DD/MM/YYYY 08:00 tt")); + }); diff --git a/OS/RepServicioDomicilio.aspx.vb b/OS/RepServicioDomicilio.aspx.vb index 2b5459bb0..33a77efd2 100644 --- a/OS/RepServicioDomicilio.aspx.vb +++ b/OS/RepServicioDomicilio.aspx.vb @@ -1358,11 +1358,6 @@ Partial Class OS_RepServicioDomicilio If DdlTecnicoAsignar.SelectedValue.ToEntero > 0 Then - 'If ViewState("Validando") Is Nothing Then - ' ViewState("Validando") = True - 'Else - ' Exit Sub - 'End If Dim objOS As New ClsOS diff --git a/RH/CatDocumentos.aspx b/RH/CatDocumentos.aspx index 39c160e78..8b286199b 100644 --- a/RH/CatDocumentos.aspx +++ b/RH/CatDocumentos.aspx @@ -50,7 +50,8 @@ + DataKeyNames="CveDocumentacion,Documentacion,DocumentacionFormato,Orden,Estatus,CveDocumentacionTipo,DocumentacionTipo,Requerido,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento" + EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall" GridLines="None" > @@ -111,7 +112,8 @@ - + diff --git a/RH/CatDocumentos.aspx.vb b/RH/CatDocumentos.aspx.vb index 61d32c97d..530066dbc 100644 --- a/RH/CatDocumentos.aspx.vb +++ b/RH/CatDocumentos.aspx.vb @@ -418,8 +418,11 @@ Partial Class RH_CatDocumentos If e.Row.RowType = DataControlRowType.DataRow Then Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString.ToEntero - Dim DocumetacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString - Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad") + Dim DocumetacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString + + 'Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad") + Dim ImgDownLoadFormato As LinkButton = e.Row.FCLinkButton("ImgDownLoadFormato") + Dim separado As Char() = {"."} Dim array() As String = DocumetacionFormato.Split(separado) Dim extencion As String = "" @@ -430,27 +433,50 @@ Partial Class RH_CatDocumentos If DocumetacionFormato.Trim.Length > 0 Then - Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Formatos/" & _CveDocumentacion & "_" & DocumetacionFormato - Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "\Formatos\" & _CveDocumentacion & "_" & DocumetacionFormato - If File.Exists(linkDescargaArchivo) Then - ImgDownLoad.Visible = True - If extencion.Length > 0 Then - ImgDownLoad.Text = String.Format(" ", linkDescarga, DocumetacionFormato) - Else - ImgDownLoad.Text = String.Format(" ", linkDescarga, DocumetacionFormato) - End If - Else - ImgDownLoad.Visible = False - End If - - Else - ImgDownLoad.Visible = False - End If + Dim PathDescargaArchivo = UsuarioActual.Empresa.Ruta & "\Formatos\" & _CveDocumentacion & "_" & DocumetacionFormato + Dim FileD = New FileInfo(PathDescargaArchivo) + If FileD.Exists Then + ImgDownLoadFormato.Visible = True + ScriptManager.GetCurrent(Me).RegisterPostBackControl(ImgDownLoadFormato) + End If + + + End If + + + End If End Sub + Public Sub DownLoadFormato_ClickDocumentacion(sender As Object, e As EventArgs) + + + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + 'Dim Adjunto As String = GvRow.DataKey("Adjunto") + + Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString.ToEntero + Dim DocumetacionFormato As String = GvRow.DataKey("DocumentacionFormato").ToString + + Dim PathDescargaArchivo = UsuarioActual.Empresa.Ruta & "\Formatos\" & _CveDocumentacion & "_" & DocumetacionFormato + + Dim FileD = New FileInfo(PathDescargaArchivo) + + If FileD.Exists Then + + Response.Clear() + Response.AddHeader("Content-Disposition", "attachment; filename=" + FileD.Name) + Response.AddHeader("Content-Length", FileD.Length.ToString()) + Response.ContentType = "text/octet-stream" + Response.Flush() + Response.TransmitFile(FileD.FullName) + Response.End() + + End If + + End Sub + #End Region @@ -670,5 +696,7 @@ Partial Class RH_CatDocumentos RegistraScript(String.Format("$('#{0}').modal('show');", "DVParametros")) End Sub + + End Class diff --git a/SAT/SolicitudesIngresoSat.aspx.cs b/SAT/SolicitudesIngresoSat.aspx.cs index 4e9d4ba09..6b5e5f4df 100644 --- a/SAT/SolicitudesIngresoSat.aspx.cs +++ b/SAT/SolicitudesIngresoSat.aspx.cs @@ -616,6 +616,7 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas } catch (Exception ex) { + string a = ex.Message; try { var oReader = new System.IO.StreamReader(f.FullName, System.Text.Encoding.GetEncoding("ISO-8859-1")); @@ -859,6 +860,7 @@ namespace ADSNetLibraryzI.HelpersI.ConexionesI.SIGAPII } catch (Exception e) { + string a = e.Message; //ModExtensiones.GuardaLog(string.Format("{0}{1}{2}{1}{3}{1}{4}{1}", tituloLog, ModVars.NewLine, route, e, strjsonreq), ModVars.ADSNetLibraryLog); } diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index b638c446e..97e44ab27 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1641,17 +1641,22 @@
    -
    + + +
    - Parametros + Parametros
    -
    + +
    +
    +
    @@ -1659,87 +1664,88 @@