diff --git a/.gitignore b/.gitignore index 567748c29..fea5190bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. web.config +WebOldFail.config *.txt Log.txt LogMail.txt diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 077de40dc..a8393d12b 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -579,7 +579,7 @@ Public Class ClsNominas End If retorno = True Catch ex As Exception - OnError("Ocurrió un error al registrar la provisión de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al registrar la provisión de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -594,7 +594,7 @@ Public Class ClsNominas SqlAdapter.Fill(Data) retorno = True Catch ex As Exception - OnError("Ocurrió un error al obtener el layout de nominas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener el layout de nóminas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -814,7 +814,7 @@ Public Class ClsNominas SqlAdapter.Fill(Data) Retorno = True Catch Ex1 As SqlException - Me.OnError("Ocurrió un error al Guardar el Movimiento de Nomina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al Guardar el Movimiento de nómina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno @@ -839,7 +839,7 @@ Public Class ClsNominas ' SqlAdapter.Fill(Data) ' Retorno = True ' Catch Ex1 As SqlException - ' Me.OnError("Ocurrió un error al Guardar el Movimiento de Nomina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' Me.OnError("Ocurrió un error al Guardar el Movimiento de nómina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) ' End Try ' Return Retorno @@ -862,9 +862,9 @@ Public Class ClsNominas ' ' ' Catch sqlex As SqlException ' If sqlex.Message.Contains("x5010") Then - ' Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina(Timbrada).", sqlex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' Me.OnError("Ocurrió un error al eliminar el Movimiento de nómina(Timbrada).", sqlex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) ' Else - ' Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina.", sqlex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' Me.OnError("Ocurrió un error al eliminar el Movimiento de nómina.", sqlex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) ' End If ' End Try @@ -883,7 +883,7 @@ Public Class ClsNominas SqlAdapter.Fill(Data) Retorno = True Catch ex As Exception - Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al eliminar el Movimiento de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno @@ -898,7 +898,7 @@ Public Class ClsNominas SqlAdapter.Fill(Data) Retorno = True Catch ex As Exception - Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al eliminar el Movimiento de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno @@ -972,7 +972,7 @@ Public Class ClsNominas SqlAdapter.Fill(Data) Retorno = True Catch ex As Exception - OnError("Ocurrió un error al autorizar la nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + OnError("Ocurrió un error al autorizar la nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno @@ -1000,7 +1000,7 @@ Public Class ClsNominas SqlAdapter.Fill(Data) Retorno = True Catch ex As Exception - OnError("Ocurrió un error al autorizar la nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + OnError("Ocurrió un error al autorizar la nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return retorno End Function @@ -1113,13 +1113,13 @@ Public Class ClsNominas Catch sqlex As SqlException If sqlex.Message.Contains("Número: 50001x") Then - Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina(Timbrada).", sqlex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al eliminar el Movimiento de nómina(Timbrada).", sqlex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Else - Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina.", sqlex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al eliminar el Movimiento de nómina.", sqlex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End If Catch ex As Exception - Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al eliminar el Movimiento de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno @@ -1282,7 +1282,7 @@ Public Class ClsNominas SqlAdapter.Fill(Data) Retorno = True Catch Ex1 As SqlException - Me.OnError("Ocurrió un error al realizar actualización masiva en Nomina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al realizar actualización masiva en nómina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno @@ -1368,14 +1368,14 @@ Public Class ClsNominas If Ex1.Message.Contains("Número: 2627;") Then - Alert("Ya existe un Concepto de Nomina con el mismo nombre: " & Codigo & ".", TipoMensaje.MsgAdvertencia) + Alert("Ya existe un concepto de nómina con el mismo nombre: " & Codigo & ".", TipoMensaje.MsgAdvertencia) ElseIf Ex1.Message.Contains("UK_Nom_Conceptos_CveEmpresa_Codigo") Then - Alert("Ya existe un Concepto de Nomina con el mismo Código: " & Codigo & ".", TipoMensaje.MsgAdvertencia) + Alert("Ya existe un concepto de nómina con el mismo Código: " & Codigo & ".", TipoMensaje.MsgAdvertencia) Else - Me.OnError("Ocurrió un error al Guardar el Concepto de Nomina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al Guardar el Concepto de nómina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End If Catch ex As Exception - OnError("Ocurrió un error al Guardar el Concepto de Nomina", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + OnError("Ocurrió un error al Guardar el concepto de nómina", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno @@ -1416,14 +1416,14 @@ Public Class ClsNominas Retorno = True Catch Ex1 As SqlException If Ex1.Message.Contains("Número: 2627;") Then - Alert("Ya existe un Concepto de Nomina con el mismo nombre: " & Codigo & ".", TipoMensaje.MsgAdvertencia) + Alert("Ya existe un concepto de nómina con el mismo nombre: " & Codigo & ".", TipoMensaje.MsgAdvertencia) ElseIf Ex1.Message.Contains("UK_Nom_Conceptos_CveEmpresa_Codigo") Then - Alert("Ya existe un Concepto de Nomina con el mismo Código: " & Codigo & ".", TipoMensaje.MsgAdvertencia) + Alert("Ya existe un concepto de nómina con el mismo Código: " & Codigo & ".", TipoMensaje.MsgAdvertencia) Else - Me.OnError("Ocurrió un error el Concepto de Nomina", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error el concepto de nómina", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End If Catch ex As Exception - OnError("Ocurrió un error al guardar los cambios en el Concepto de Nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + OnError("Ocurrió un error al guardar los cambios en el concepto de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno @@ -1442,12 +1442,12 @@ Public Class ClsNominas Retorno = True Catch Ex1 As SqlException If Ex1.Message.Contains("Número: 2627;") Then - Alert("Ya existe un Concepto de Nomina con el mismo nombre: " & Codigo & ".", TipoMensaje.MsgAdvertencia) + Alert("Ya existe un concepto de nómina con el mismo nombre: " & Codigo & ".", TipoMensaje.MsgAdvertencia) Else - Me.OnError("Ocurrió un error el Concepto de Nomina", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error el concepto de nómina", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End If Catch ex As Exception - OnError("Ocurrió un error al guardar los cambios en el Concepto de Nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + OnError("Ocurrió un error al guardar los cambios en el concepto de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno End Function @@ -1463,12 +1463,12 @@ Public Class ClsNominas Retorno = True Catch Ex1 As SqlException If Ex1.Message.Contains("Número: 547;") Then - Alert("El Concepto de Nomina no se pudo eliminar porque está siendo usado por un registro.", TipoMensaje.MsgAdvertencia) + Alert("El concepto de nómina no se pudo eliminar porque está siendo usado por un registro.", TipoMensaje.MsgAdvertencia) Else - Me.OnError("Ocurrió un error al eliminar el Concepto de Nomina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al eliminar el concepto de nómina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End If Catch ex As Exception - Me.OnError("Ocurrió un error al eliminar el Concepto de Nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al eliminar el concepto de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno @@ -2376,7 +2376,7 @@ Public Class ClsNominas End If Retorno = True Catch Ex1 As SqlException - Me.OnError("Ocurrió un error al obtener el reporte de inversión de nomina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al obtener el reporte de inversión de nómina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno End Function @@ -2417,10 +2417,10 @@ Public Class ClsNominas retorno = True Catch sqEx As SqlException retorno = False - OnError("Ocurrió un error al realizar el calculo de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al realizar el calculo de nómina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception retorno = False - OnError("Ocurrió un error al realizar el calculo de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al realizar el calculo de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -2439,10 +2439,10 @@ Public Class ClsNominas retorno = True Catch sqEx As SqlException retorno = False - OnError("Ocurrió un error al obtener la nomina sin timbrar.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener la nómina sin timbrar.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception retorno = False - OnError("Ocurrió un error al obtener la nomina sin timbrar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener la nómina sin timbrar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -2543,10 +2543,10 @@ Public Class ClsNominas retorno = True Catch sqEx As SqlException retorno = False - OnError("Ocurrió un error al Realizar el calculo de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al Realizar el cálculo de nómina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception retorno = False - OnError("Ocurrió un error al Realizar el calculo de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al Realizar el cálculo de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -2608,10 +2608,10 @@ Public Class ClsNominas retorno = True Catch sqEx As SqlException retorno = False - OnError("Ocurrió un error al Realizar el calculo de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al realizar el cálculo de nómina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception retorno = False - OnError("Ocurrió un error al Realizar el calculo de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al realizar el cáculo de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -2637,10 +2637,10 @@ Public Class ClsNominas retorno = True Catch sqEx As SqlException retorno = False - OnError("Ocurrió un error al Realizar el calculo de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al Realizar el cálculo de nómina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception retorno = False - OnError("Ocurrió un error al Realizar el calculo de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al Realizar el cálculo de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -2661,10 +2661,10 @@ Public Class ClsNominas retorno = True Catch sqEx As SqlException retorno = False - OnError("Ocurrió un error al actualizar las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al actualizar las tablas de nómina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception retorno = False - OnError("Ocurrió un error al actualizar las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al actualizar las tablas de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -2682,10 +2682,10 @@ Public Class ClsNominas retorno = True Catch sqEx As SqlException retorno = False - OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener las tablas de nómina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception retorno = False - OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener las tablas de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -2750,10 +2750,10 @@ Public Class ClsNominas retorno = True Catch sqEx As SqlException retorno = False - OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener las tablas de nómina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception retorno = False - OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener las tablas de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -2787,7 +2787,7 @@ Public Class ClsNominas End If Catch ex As Exception retorno = False - OnError("Ocurrió un error al agregar las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al agregar las tablas de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -2821,7 +2821,7 @@ Public Class ClsNominas End If Catch ex As Exception retorno = False - OnError("Ocurrió un error al actualizar las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al actualizar las tablas de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -2844,7 +2844,7 @@ Public Class ClsNominas End If Catch ex As Exception retorno = False - OnError("Ocurrió un error al eliminar las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al eliminar las tablas de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -3037,7 +3037,7 @@ Public Class ClsNominas Catch sqEx As SqlException retorno = False If (sqEx.Message.Contains("FK_Conta_CuentasAsignaciones_Conta_ConceptosContables")) Then - OnError("Es necesario asignar el concepto contable al concepto de nomina para poder realizar la vinculacion de la cuenta.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Es necesario asignar el concepto contable al concepto de nómina para poder realizar la vinculacion de la cuenta.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Else OnError("Ocurrió un error al actualizar los movimientos permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End If @@ -3083,10 +3083,10 @@ Public Class ClsNominas retorno = True Catch sqEx As SqlException retorno = False - OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener las tablas de nómina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception retorno = False - OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener las tablas de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -3106,10 +3106,10 @@ Public Class ClsNominas retorno = True Catch sqEx As SqlException retorno = False - OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener las tablas de nómina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception retorno = False - OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener las tablas de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -3129,10 +3129,10 @@ Public Class ClsNominas retorno = True Catch sqEx As SqlException retorno = False - OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener las tablas de nómina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception retorno = False - OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener las tablas de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -3150,10 +3150,10 @@ Public Class ClsNominas retorno = True Catch sqEx As SqlException retorno = False - OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener las tablas de nómina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception retorno = False - OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener las tablas de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -3174,10 +3174,10 @@ Public Class ClsNominas retorno = True Catch sqEx As SqlException retorno = False - OnError("Ocurrió un error al obtener la asistencia de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener la asistencia de nómina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception retorno = False - OnError("Ocurrió un error al obtener la asistencia de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener la asistencia de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -3289,7 +3289,7 @@ Public Class ClsNominas addParameters("@CveTipoSolicitud", SqlDbType.Int, CveTipoSolicitud) addParameters("@Estatus", SqlDbType.Int, Estatus) addParameters("@Top", SqlDbType.Int, Top) - retorno = RunQuery("Ocurrió un error al obtener el SolicitudesNominas.") + retorno = RunQuery("Ocurrió un error al obtener las solicitudes de nómina.") Return retorno End Function Public Function SolicitudesAdd(CveSolicitudCFDI As Integer, CveSolicitudMetadata As Integer, estatus As Integer, observaciones As String, fechaInicio As DateTime, fechaFin As DateTime, cveUsuarioIng As Int32, cveEmpresa As Int32, Optional CveTipoSolicitud As Integer = 1) As Boolean @@ -3305,7 +3305,7 @@ Public Class ClsNominas addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa) addParameters("@CveTipoSolicitud", SqlDbType.Int, CveTipoSolicitud) - retorno = RunQuery("Ocurrió un error al agregar el SolicitudesNominas.") + retorno = RunQuery("Ocurrió un error al agregar las solicitudes de nómina.") Return retorno End Function @@ -3395,7 +3395,7 @@ Public Class ClsNominas addParameters("@Estatus", SqlDbType.Int, estatus) addParameters("@Observaciones", SqlDbType.VarChar, observaciones) addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa) - retorno = RunQuery("Ocurrió un error al actualizar el SolicitudesNominas.") + retorno = RunQuery("Ocurrió un error al actualizar las Solicitudes de nómina.") Return retorno End Function Public Function SolicitudesRemove(CveSolicitud As Int32, CveEmpresa As Integer) As Boolean @@ -3403,7 +3403,7 @@ Public Class ClsNominas DataAdapter("PA_Gral_SAT_SolicitudesRemove", CommandType.StoredProcedure) addParameters("@CveSolicitud", SqlDbType.Int, CveSolicitud) addParameters("@CveEmpresa", SqlDbType.Int, CveEmpresa) - retorno = RunQuery("Ocurrió un error al eliminar el SolicitudesNominas.") + retorno = RunQuery("Ocurrió un error al eliminar las Solicitudes de nómina.") Return retorno End Function #End Region @@ -3422,7 +3422,7 @@ Public Class ClsNominas SqlAdapter.Fill(Data) retorno = True Catch ex As Exception - OnError("Ocurrió un error al obtener el layout de nominas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener el layout de nóminas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index c3e21f987..7f8ceb36f 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -6411,7 +6411,8 @@ Public Class ClsPaginas Else Response.ContentType = mimeType End If - Response.AddHeader("content-disposition", String.Format("{0}; filename={1}.{2}", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xls"))) + Response.ClearHeaders() + Response.AddHeader("content-disposition", String.Format("{0}; filename=""{1}.{2}""", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xls"))) Response.BinaryWrite(bytes) ' create the file Response.Flush() ' send it to the client to download bytes = Nothing @@ -9815,13 +9816,13 @@ Public Class ClsPaginas Dim Ret As New ConceptosRetenciones If Pago.CveMonedaPago > 1 Then 'Agregamos la Extranjera - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 60, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 342, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 235, Pago.Referencia, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=Pago.CveCompraAmortizacion, CveVentaAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, 235, Pago.Referencia, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=Pago.CveCompraAmortizacion, CveVentaAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True Else 'Agregamos Nacional - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 60, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveCompra:=Pago.CveCompraAmortizacion, CveVentaAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 60, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveCompra:=Pago.CveCompraAmortizacion, CveVentaAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True End If @@ -9836,13 +9837,13 @@ Public Class ClsPaginas If Pago.CveMonedaPago > 1 Then 'Agregamos la Extranjera - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 207, Pago.Referencia, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=Pago.CveCompraAmortizacion, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, 207, Pago.Referencia, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=Pago.CveCompraAmortizacion, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True Else 'Agregamos Nacional - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveVenta:=Pago.CveCompraAmortizacion, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveVenta:=Pago.CveCompraAmortizacion, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True End If End If diff --git a/CRM/CatTipoProceso.aspx b/CRM/CatTipoProceso.aspx index 4c5b7f802..1523b8fad 100644 --- a/CRM/CatTipoProceso.aspx +++ b/CRM/CatTipoProceso.aspx @@ -74,7 +74,7 @@ - +
+ DataKeyNames="CveCompra,TipoCambio,CveTipoConcepto,UUID,Saldo,SerieFolio" runat="server" AutoGenerateColumns="false" GridLines="None" CssClass="table table-striped table-hover Widthall ScrollAD"> diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 272927469..4a52fe946 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -10,6 +10,7 @@ Imports System.Threading.Tasks Imports Newtonsoft.Json Imports Extensiones Imports System.Activities.Expressions +Imports iText.Barcodes.Dmcode Partial Class Compras_Compras Inherits ClsPaginas @@ -1316,18 +1317,14 @@ Partial Class Compras_Compras 'CARGA PERSONAL - Dim ObjPersonal As New ClsRH - ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa) - DdlPersonal.DataSource = ObjPersonal.DtResultados - - If UsuarioActual.CveEmpresa = 119 Then - DdlPersonalReembolso.DataSource = ObjPersonal.DtResultados - Else - DdlPersonalReembolso.DataSource = ObjPersonal.DtResultados.FiltraParametros("CveEstatusPersonal = 1") - End If + 'Dim ObjPersonal As New ClsRH + 'ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa) + Dim dtpersonal As DataTable = GlobalDTRHPersonal(UsuarioActual.CveEmpresa) + DdlPersonal.DataSource = dtpersonal 'ObjPersonal.DtResultados + DdlPersonalReembolso.DataSource = dtpersonal.FiltraParametros("CveEstatusPersonal = 1") - ObjPersonal.Dispose() + 'ObjPersonal.Dispose() DdlPersonal.DataBind() DdlPersonalReembolso.DataBind() @@ -7138,11 +7135,15 @@ Partial Class Compras_Compras GuardoConcepto18 = True If DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119, 158) Then - 'PROVISION + 'PROVISION de NC IdCtaContable = CtaProveedorExtranjera - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza) Then + Dim CveCon As Integer = ObtConceptoContableProvisionCompra(CveTipoConcepto, DdlTipoComprobante.selectedvalue, ddlmoneda.selectedvalue.toentero, False) + + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, CveCon, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza) Then IdCtaContable = CtaProveedorComplementaria - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMN - importeMovimiento, Referencia, 234, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN - importeMovimiento, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then + CveCon = ObtConceptoContableProvisionCompra(CveTipoConcepto, DdlTipoComprobante.selectedvalue, ddlmoneda.selectedvalue.toentero, True) + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMN - importeMovimiento, Referencia, CveCon, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN - importeMovimiento, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then ErrorPrepoliza = True Exit Select End If @@ -7158,61 +7159,80 @@ Partial Class Compras_Compras Dim importeMovimientoNC = Gvr.FCTextBox("TxtImporte").Text.ToDecimal Dim TipoCambioFactura = Gvr.DataKey("TipoCambio").ToDecimal ' RMF. falta aplicar si está generada su TC de la última fluctuación Dim importeMNNC = importeMovimientoNC * TipoCambioFactura * Multiplicador + Dim CveMonedaNC As Integer = If(TipoCambioFactura = 1, 1, 2) IdCtaContable = CtaProveedorExtranjera - Dim CveCon As Integer = 272 - If TipoCambioFactura > 1 Then CveCon = 304 - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, CveCon, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then + CveCon = ObtConceptoContableProvisionCompra(Gvr.DataKey("CveTipoConcepto").ToEntero, "NC", CveMonedaNC, False) - Dim CveConceptoContableComplementaria As Integer = 206 - If Gvr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContableComplementaria = 310 'cuando es acreedor + CompraActual.CveCompra = Gvr.DataKey("CveCompra").ToEntero + CompraActual.SerieFolio = Gvr.DataKey("SerieFolio") - IdCtaContable = CtaProveedorComplementaria - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMNNC - importeMovimientoNC, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then - ErrorPrepoliza = True - Exit For - End If - Else - ErrorPrepoliza = True - Exit For - End If + Dim Pago As New CompraPago + Pago.ImportePago = importeMovimientoNC + Pago.CveMonedaPago = CveMonedaNC + Pago.CveCompraAmortizacion = CveCompra + Pago.CveConceptoPago = 272 + Pago.Referencia = CompraActual.SerieFolio + Pago.TCPago = TipoCambioFactura + Pago.AplicaAcreditable = False + Pago.TipoPago = "NC" - importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador - IdCtaContable = CtaProveedorExtranjera - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then - IdCtaContable = CtaProveedorComplementaria - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMNNC - importeMovimientoNC, Referencia, 235, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then - ErrorPrepoliza = True - Exit For - End If - Else - ErrorPrepoliza = True - Exit For - Exit For - End If + ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) - ' FLUCTUACION CAMBIARIA - If tipoCambioActual <> TipoCambioFactura AndAlso Not ChkNCInvNC.Checked Then ' que no se esté afectando mercancía en tránsto - importeMovimiento = (importeMovimientoNC * TipoCambioFactura) - (importeMovimientoNC * tipoCambioActual) + ''CveCon = 272 + '''PAGO A FACTURA POR NC + 'If TipoCambioFactura > 1 Then CveCon = 304 + 'If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, CveCon, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then - If importeMovimiento > 0 Then - ConceptoContable = 64 : TipoMovimiento = True - IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria - ElseIf importeMovimiento < 0 Then - ConceptoContable = 65 : TipoMovimiento = False - IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria - End If + ' Dim CveConceptoContableComplementaria As Integer = 206 + ' If Gvr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContableComplementaria = 310 'cuando es acreedor - importeMovimiento = importeMovimiento.Abs.RoundSQL() - importeMN = importeMovimiento - If importeMovimiento <> 0 Then + ' IdCtaContable = CtaProveedorComplementaria + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMNNC - importeMovimientoNC, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then + ' ErrorPrepoliza = True + ' Exit For + ' End If + 'Else + ' ErrorPrepoliza = True + ' Exit For + 'End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then - ErrorPrepoliza = True - Exit For - End If - End If - End If + 'importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador + 'IdCtaContable = CtaProveedorExtranjera + 'If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + ' IdCtaContable = CtaProveedorComplementaria + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMNNC - importeMovimientoNC, Referencia, 235, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + ' ErrorPrepoliza = True + ' Exit For + ' End If + 'Else + ' ErrorPrepoliza = True + ' Exit For + ' Exit For + 'End If + + '' FLUCTUACION CAMBIARIA + 'If tipoCambioActual <> TipoCambioFactura AndAlso Not ChkNCInvNC.Checked Then ' que no se esté afectando mercancía en tránsto + ' importeMovimiento = (importeMovimientoNC * TipoCambioFactura) - (importeMovimientoNC * tipoCambioActual) + + ' If importeMovimiento > 0 Then + ' ConceptoContable = 64 : TipoMovimiento = True + ' IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria + ' ElseIf importeMovimiento < 0 Then + ' ConceptoContable = 65 : TipoMovimiento = False + ' IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria + ' End If + + ' importeMovimiento = importeMovimiento.Abs.RoundSQL() + ' importeMN = importeMovimiento + ' If importeMovimiento <> 0 Then + + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then + ' ErrorPrepoliza = True + ' Exit For + ' End If + ' End If + 'End If End If Next @@ -8258,7 +8278,7 @@ Partial Class Compras_Compras For Each dRow As DataRow In TmpDT.Rows Dim DttPS As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=dRow("CvePS").ToString.ToEntero) - If DttPS.Rows.Count > 0 Then + If DttPS IsNot Nothing AndAlso DttPS.Rows.Count > 0 Then Dim DrPS As DataRow = DttPS.Rows(0) dRow("AplicaIEPS") = Boolean.Parse(DrPS("AplicaIEPS").ToString) dRow("IEPSGrabaIVA") = Boolean.Parse(DrPS("IEPSGrabaIVA").ToString) @@ -20467,6 +20487,35 @@ Partial Class Compras_Compras End Sub + Private Function ObtConceptoContableProvisionCompra(CveTipoConcepto As Integer, TipoDocto As String, CveMoneda As Integer, Optional EsComplementaria As Boolean = False) As Integer + Dim Retorno As Integer = -1 + + If CveTipoConcepto = 1 Then ''PROVEEDOR + If EsComplementaria Then + Retorno = If(TipoDocto = "Fac", 201, 234) + Return Retorno + End If + If CveMoneda = 1 Then + Retorno = If(TipoDocto = "Fac", 5, 18) + Else + Retorno = If(TipoDocto = "Fac", 311, 341) + End If + Else ''ACREEDOR + If EsComplementaria Then + Retorno = If(TipoDocto = "Fac", -1, -1) + Return Retorno + End If + If CveMoneda = 1 Then + Retorno = If(TipoDocto = "Fac", 305, 323) + Else + Retorno = If(TipoDocto = "Fac", 306, 309) + End If + End If + + Return Retorno + + End Function + End Class diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index aa810b9d4..f82113bc3 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -5,7 +5,6 @@ Imports System.Data Imports System.IO Imports System.Xml Imports Extensiones -Imports iText.Kernel.Pdf Imports Microsoft.Reporting.WebForms Imports Stimulsoft.Report Imports Stimulsoft.Report.Web @@ -288,14 +287,14 @@ Partial Class PopUpVerFactura End If lrds.Add(New ReportDataSource With {.Name = "DataSet1", .Value = dt}) - End If + End If End Using 'endimg '"Empresas/Grales/Formatos/EquiposGPS.rdlc" '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc" - ImprimirPDF("GPS/ReciboNom.rdlc", lrds, params, "Pallet", Content_Disposition:="Inline") + ImprimirPDF("GPS/ReciboNom.rdlc", lrds, params, "Pallet") ', Content_Disposition:="Inline") End Sub Private Sub rfctxtvalidar() Dim numeroPeriodo As Integer = 0 @@ -469,7 +468,7 @@ Partial Class PopUpVerFactura If Not IsNothing(tablaReporte.FiltroPrimero("TipoManifiesto=1")) Then rutardlc = "GPS/EmbarqueManifiesto2.rdlc" End If - ImprimirPDF(rutardlc, lrds, params, "Manifesto", Content_Disposition:="Inline") + ImprimirPDF(rutardlc, lrds, params, "Manifesto") ', Content_Disposition:="Inline") End Sub Private Sub imprimirManifiestoRemision(cveEmbarqueManifiesto As Integer) @@ -623,7 +622,7 @@ Partial Class PopUpVerFactura lrds.Add(rds) '"Empresas/Grales/Formatos/EquiposGPS.rdlc" '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc" - ImprimirPDF("GPS/EmbarqueManifiestoRemision.rdlc", lrds, params, "Remisión", Content_Disposition:="Inline") + ImprimirPDF("GPS/EmbarqueManifiestoRemision.rdlc", lrds, params, "Remisión") ', Content_Disposition:="Inline") End Sub Private Sub imprimirManifiestoCartaPorte(cveEmbarqueManifiesto As Integer) @@ -789,7 +788,7 @@ Partial Class PopUpVerFactura 'GuardaLogFacturacion($"Ruta XML {ArchivoXML}") 'ResultadoMail = 3 End If - ImprimirPDF("GPS/EmbarqueManifiestoCartaPorte.rdlc", lrds, params, "DatosCartaPorte", Content_Disposition:="Inline") + ImprimirPDF("GPS/EmbarqueManifiestoCartaPorte.rdlc", lrds, params, "DatosCartaPorte") ', Content_Disposition:="Inline") End Sub @@ -857,7 +856,7 @@ Partial Class PopUpVerFactura 'endimg '"Empresas/Grales/Formatos/EquiposGPS.rdlc" '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc" - ImprimirPDF("GPS/PalletEtiqueta2.rdlc", lrds, params, "Pallet", Content_Disposition:="Inline") + ImprimirPDF("GPS/PalletEtiqueta2.rdlc", lrds, params, "Pallet") ', Content_Disposition:="Inline") End Sub @@ -991,7 +990,7 @@ Partial Class PopUpVerFactura 'If CvetypeImpresion = 2 Then ' ruta = "GPS/PalletEtiqueta_2.rdlc" 'End If - ImprimirPDF(ruta, lrds, params, "Pallet Caja", Content_Disposition:="Inline") + ImprimirPDF(ruta, lrds, params, "Pallet Caja") ', Content_Disposition:="Inline") End Sub Private Sub imprimirpallet(cvePallet As Integer) @@ -1089,7 +1088,7 @@ Partial Class PopUpVerFactura 'If CvetypeImpresion = 2 Then ' ruta = "GPS/PalletEtiqueta_2.rdlc" 'End If - ImprimirPDF(ruta, lrds, params, "Pallet Caja", Content_Disposition:="Inline") + ImprimirPDF(ruta, lrds, params, "Pallet Caja") ', Content_Disposition:="Inline") End Sub #Region "U S U A R I O - T O K E N" @@ -6572,7 +6571,7 @@ Partial Class PopUpVerFactura Dim PS As String = "" Dim All As Byte() Using ms As New MemoryStream - Using pdfdoc As New PdfDocument(New PdfReader(ms)) + Using pdfdoc As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfWriter(ms)) pdfdoc.InitializeOutlines() If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then If ObjInventarios.DtResultados IsNot Nothing Then @@ -6584,7 +6583,7 @@ Partial Class PopUpVerFactura If Modalidad = "Individual" Then Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)) - Dim docEtiqueta As New PdfDocument(New PdfReader(reporteByte)) + Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte)) docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc) docEtiqueta.Close() Else @@ -6593,7 +6592,7 @@ Partial Class PopUpVerFactura For i As Integer = 0 To Cant Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)) - Dim docEtiqueta As New PdfDocument(New PdfReader(reporteByte)) + Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte)) docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc) docEtiqueta.Close() Next @@ -6622,7 +6621,7 @@ Partial Class PopUpVerFactura Dim All As Byte() Using ms As New MemoryStream - Using pdfdoc As New PdfDocument(New PdfReader(ms)) + Using pdfdoc As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfWriter(ms)) pdfdoc.InitializeOutlines() If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveAlmacen.ToString) Then If ObjInventarios.DtResultados IsNot Nothing Then @@ -6632,7 +6631,7 @@ Partial Class PopUpVerFactura If Modalidad = "Individual" Then Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)) - Dim docEtiqueta As New PdfDocument(New PdfReader(reporteByte)) + Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte)) docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc) docEtiqueta.Close() Else @@ -6641,7 +6640,7 @@ Partial Class PopUpVerFactura For i As Integer = 0 To Cant Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)) - Dim docEtiqueta As New PdfDocument(New PdfReader(reporteByte)) + Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte)) docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc) docEtiqueta.Close() Next diff --git a/Empresas/140/Formatos/Remision.rdlc b/Empresas/140/Formatos/Remision.rdlc index 052dfa688..0f7b15135 100644 --- a/Empresas/140/Formatos/Remision.rdlc +++ b/Empresas/140/Formatos/Remision.rdlc @@ -2447,6 +2447,18 @@ true ReportParameter1 + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + diff --git a/General/CONTRATO.doc b/General/CONTRATO.doc index 47e90f754..21322b44b 100644 Binary files a/General/CONTRATO.doc and b/General/CONTRATO.doc differ diff --git a/General/CONTRATOINVERNADERO.doc b/General/CONTRATOINVERNADERO.doc new file mode 100644 index 000000000..cd1e8b787 Binary files /dev/null and b/General/CONTRATOINVERNADERO.doc differ diff --git a/General/RepIndicadorResumen.aspx b/General/RepIndicadorResumen.aspx index 4d18b8fc9..31e334953 100644 --- a/General/RepIndicadorResumen.aspx +++ b/General/RepIndicadorResumen.aspx @@ -612,7 +612,7 @@ //newData.sort(function (a, b) { // return a[0] > b[0] ? 1 : -1; //}); - console.log(JSON.stringify(newData)) + //console.log(JSON.stringify(newData)) return newData; } diff --git a/General/RepIndicadorResumen.aspx.vb b/General/RepIndicadorResumen.aspx.vb index 5f26ee141..0566e31e4 100644 --- a/General/RepIndicadorResumen.aspx.vb +++ b/General/RepIndicadorResumen.aspx.vb @@ -37,6 +37,13 @@ Partial Class General_RepIndicadorResumen Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles btnConsultar.Click CargaDatos() End Sub + Protected Sub LnkExportarPDF_Click(sender As Object, e As EventArgs) Handles LnkExportarPDF.Click + UPPMov.GenerarReportePDF("Reporte Resumen de Indicadores", TxtFechaI.Text, TxtFechaF.Text) + End Sub + 'No quitar porque no funciona el exporta PDF + Public Overrides Sub VerifyRenderingInServerForm(control As Control) + ' Verifies that the control is rendered + End Sub Private Sub CargaDatos() Dim ObjVentas As New ClsVentas @@ -51,7 +58,7 @@ Partial Class General_RepIndicadorResumen If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa, TxtFechaI.Text, TxtFechaF.Text, UsuarioActual.CveUsuario, DdlSubProyecto.SelectedValue.ToEntero) Then 'Compras Productores - GvCompProductores.DataSource = ObjCitrus.DTSetResultados.Tables(0).FiltraParametros("", "RazonSocial DESC") + GvCompProductores.DataSource = ObjCitrus.DTSetResultados.Tables(0).FiltraParametros("", "RazonSocial ASC") 'CxP Productores GvCxP192.DataSource = ObjCitrus.DTSetResultados.Tables(1).FiltraParametros("", "CveMoneda,Saldo DESC") 'CxP NO productores @@ -218,7 +225,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_vxp = top_vxp.Union(group_resto_vxp) + Dim query_vxp = top_vxp.Union(group_resto_vxp).OrderByDescending(Function(x) x.Valor) 'Dim query_vxp = top_vxp.Concat(From e In resto_vxp Group e By e.Texto Into gpo = Group) 'Dim group_resto_vxp = From e In resto_vxp Group e By e.Texto Into gpo = Group 'Dim group_resto_vxp = resto_vxp.GroupBy(Function(e) New With {Key e.Texto, Key e.Valor, Key e.Color, Key e.Unidad}).ToList() @@ -248,7 +255,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_comp_productores = top_comp_productores.Union(group_resto_comp_productores) + Dim query_comp_productores = top_comp_productores.Union(group_resto_comp_productores).OrderByDescending(Function(x) x.Valor) 'Compras TipoProveedor=1 Acreedores (Gastos) DtCompAcreed.Reset() @@ -277,7 +284,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_comp_acreed = top_comp_acreed.Union(group_resto_comp_acreed) + Dim query_comp_acreed = top_comp_acreed.Union(group_resto_comp_acreed).OrderByDescending(Function(x) x.Valor) 'Cuentas por cobrar x Cliente -- Saldo DtCxC.Reset() @@ -306,7 +313,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_cxc = top_cxc.Union(group_resto_cxc) + Dim query_cxc = top_cxc.Union(group_resto_cxc) '.OrderByDescending(Function(x) x.Valor) 'Alert(Newtonsoft.Json.JsonConvert.SerializeObject(CxC.Rows)) 'Cuentas por cobrar x Cliente -- Recuperado @@ -336,7 +343,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_cxcr = top_cxcr.Union(group_resto_cxcr) + Dim query_cxcr = top_cxcr.Union(group_resto_cxcr) '.OrderByDescending(Function(x) x.Valor) 'CxP proveedores DtCxP192.Reset() @@ -365,7 +372,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_cxp192 = top_cxp192.Union(group_resto_cxp192) + Dim query_cxp192 = top_cxp192.Union(group_resto_cxp192).OrderByDescending(Function(x) x.Valor) 'CxP NO proveedor DtCxP.Reset() @@ -394,7 +401,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_cxp = top_cxp.Union(group_resto_cxp) + Dim query_cxp = top_cxp.Union(group_resto_cxp).OrderByDescending(Function(x) x.Valor) 'Serializar datos agrupándolos por su respectivo DataTable, todos en un solo JSON Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CompProductores = query_comp_productores, .CompAcreed = query_comp_acreed, .CxC = query_cxc, .CxCR = query_cxcr, .CxP192 = query_cxp192, .CxP = query_cxp}) diff --git a/Inventarios/EntregaAlmacen.aspx b/Inventarios/EntregaAlmacen.aspx index d23155cc2..4a3ee93ec 100644 --- a/Inventarios/EntregaAlmacen.aspx +++ b/Inventarios/EntregaAlmacen.aspx @@ -48,6 +48,14 @@ Entrega Almacén (Surtir Mercancia) + + +
  • + Cargar Bitácora +
  • +
    +
    +
  • diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index ef402e041..bbe6bc894 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -268,7 +268,30 @@ Partial Class Inventarios_EntregaAlmacen ViewState("FormaPaqueteria") = value End Set End Property - + 'Private Property IndexSeccionAlmacen As Integer + ' Get + ' Return CType(ViewState("IndexSeccionAlmacen"), Integer) + ' End Get + ' Set(value As Integer) + ' ViewState("IndexSeccionAlmacen") = value + ' End Set + 'End Property + Private Property ArchivoBitacora As String + Get + Return CType(ViewState("ArchivoBitacora"), String) + End Get + Set(value As String) + ViewState("ArchivoBitacora") = value + End Set + End Property + Private Property ArchivoBitacoraDetalle As String + Get + Return CType(ViewState("ArchivoBitacoraDetalle"), String) + End Get + Set(value As String) + ViewState("ArchivoBitacoraDetalle") = value + End Set + End Property #End Region @@ -318,7 +341,10 @@ Partial Class Inventarios_EntregaAlmacen DdlAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1")) DdlAlmacen.SelectedValue = "-1" DdlAlmacen.DataBind() - DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) + If UsuarioActual.CveAlmacen > 0 Then + DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) + RecargaporAlmacenes() + End If DdlAlmacenTransitorio.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 3) DdlAlmacenTransitorio.DataBind() @@ -551,6 +577,15 @@ Partial Class Inventarios_EntregaAlmacen If ObjInventario.EntregaAlmacenGet(CveVenta, CveAlmacen) Then If ObjInventario.DtResultados IsNot Nothing AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then + ArchivoBitacora = String.Format("{0}Temp\EntregaDT_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta) + ArchivoBitacoraDetalle = String.Format("{0}Temp\EntregaDTD_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta) + If ArchivoBitacora <> "" Then + Dim Archivo = New System.IO.FileInfo(ArchivoBitacora) + If Archivo.Exists() Then + HplCargaBitacora.Visible = True + uppCargaBitacora.Update() + End If + End If DtDatos = ObjInventario.DtResultados If Not DtDatos.Columns.Contains("Consec") Then DtDatos.Columns.Add("Consec", GetType(Integer)) @@ -1280,6 +1315,7 @@ Partial Class Inventarios_EntregaAlmacen Row("FechaCaducidad") = If(AplicaCaducidad, TxtFechaCaducidad.Text, MinFecha.ToShortDateString) DtDatosDetalle.Rows.Add(Row) + ActualizaBitacora() RegistraScript("playsonidito('beep-07.wav')", "Sonidito") If Tipo = 1 Then @@ -1307,11 +1343,44 @@ Partial Class Inventarios_EntregaAlmacen End Try DtDatosDetalle.AcceptChanges() + ActualizaBitacora() CargaSerie() End Sub #End Region +#Region "Bitacora" + Private Sub ActualizaBitacora(Optional Eliminar As Boolean = False) + If Not Eliminar Then + DtDatos.TableName = "DtDatos" + DtDatosDetalle.TableName = "DtDatosDetalle" + DtDatos.WriteXml(ArchivoBitacora, XmlWriteMode.WriteSchema) + DtDatosDetalle.WriteXml(ArchivoBitacoraDetalle, XmlWriteMode.WriteSchema) + Else + File.Delete(ArchivoBitacora) + End If + End Sub + + Protected Sub HplCargaBitacora_Click(sender As Object, e As EventArgs) + + If IO.File.Exists(ArchivoBitacora) Then + 'DtInv.Clear() + 'DtDatosDetalle.Clear() + DtDatos.ReadXml(ArchivoBitacora) + If IO.File.Exists(ArchivoBitacoraDetalle) Then + Dim dtt As New DataTable + dtt.ReadXml(ArchivoBitacoraDetalle) + DtDatosDetalle = dtt + Alert("Registro(s) Recuperados", TipoMensaje.ToastInformacion) + End If + CargaGvDatos() + + Else + Alert("No hay bitácora para recuperar.", TipoMensaje.ToastInformacion) + End If + + End Sub +#End Region #Region " AGREGA CON LOTE BATCH " Private Sub CreaDtDetalleLote() @@ -3894,7 +3963,11 @@ Partial Class Inventarios_EntregaAlmacen RegistraScript("$('#ModalVerSugerencias').modal('hide')") End Sub - Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlAlmacen.SelectedIndexChanged + Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs) 'Handles DdlAlmacen.SelectedIndexChanged + RecargaporAlmacenes() + End Sub + + Private Sub RecargaporAlmacenes() If DdlAlmacen.SelectedValue <> "-1" Then CargaGvDatos(DdlAlmacen.SelectedValue.ToEntero) End If diff --git a/Inventarios/RecepcionAlmacen.aspx b/Inventarios/RecepcionAlmacen.aspx index bdd49fea6..35fdb222e 100644 --- a/Inventarios/RecepcionAlmacen.aspx +++ b/Inventarios/RecepcionAlmacen.aspx @@ -17,13 +17,15 @@
  • Cargar Excel
  • - - -
  • - Cargar Bitácora + + + +
  • + Cargar Bitácora
  • -
    - + + +
    Recepción Almacén diff --git a/Nomina/Aguinaldo.aspx b/Nomina/Aguinaldo.aspx index 1d9214177..3ae3ad2d4 100644 --- a/Nomina/Aguinaldo.aspx +++ b/Nomina/Aguinaldo.aspx @@ -1,4 +1,5 @@ <%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Aguinaldo.aspx.cs" Inherits="Nomina_Aguinaldo" %> +<%@ Import Namespace="Extensiones" %> @@ -135,11 +136,12 @@
    + DataKeyNames="Nombre,Codigo,CvePersonal,CveSubProyecto,CveNomina,CveMetodoPago" OnRowDataBound="GVCalcularAguinaldo_RowDataBound"> - + + @@ -161,6 +163,16 @@
    + + + Salario
    Aguinaldo +
    + + + + + +
    Días
    laborados @@ -170,6 +182,24 @@
    + + + Días
    Faltados +
    + + + + +
    + + + Días
    Incapacidad +
    + + + + +
    Días
    base diff --git a/Nomina/Aguinaldo.aspx.cs b/Nomina/Aguinaldo.aspx.cs index 42d288914..8380ef03e 100644 --- a/Nomina/Aguinaldo.aspx.cs +++ b/Nomina/Aguinaldo.aspx.cs @@ -333,10 +333,15 @@ public partial class Nomina_Aguinaldo : ClsPaginas { e.Row.FCTextBox("TxtsueldoDiario").Visible = (CvePersonal > 0); e.Row.FCLabel("lblsueldoDiario").Visible = false; - }else + e.Row.FCTextBox("TxtSalarioAguinaldo").Visible = (CvePersonal > 0); + e.Row.FCLabel("lblSalarioAguinaldo").Visible = false; + } + else { e.Row.FCTextBox("TxtsueldoDiario").Visible = false; e.Row.FCLabel("lblsueldoDiario").Visible = true; + e.Row.FCTextBox("TxtSalarioAguinaldo").Visible = false; + e.Row.FCLabel("lblSalarioAguinaldo").Visible = true; } } } @@ -345,6 +350,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas { decimal uma = LtlUma.Text.ToDecimal(); decimal aguiexentogral = uma * 30; + decimal salarioAguinaldo = 0; decimal salariodiario = 0; decimal diasanio = 365; decimal diaslaborados = 0; @@ -354,7 +360,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas decimal aguinaldo = 0; decimal aguinaldoexcento = 0; decimal aguinaldogravado = 0; - decimal diasmes = 30.5m; + decimal diasmes = 30.4m; decimal FraccionI = 0; decimal FraccionII_1 = 0; decimal FraccionII_2 = 0; @@ -392,6 +398,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas { CveSubProyecto = gvrow.DataKey("CveSubProyecto").ToEntero(); CvePersonal = gvrow.DataKey("CvePersonal").ToEntero(); + salarioAguinaldo = gvrow.FCTextBox("TxtSalarioAguinaldo").Text.ToDecimal(); salariodiario = gvrow.FCTextBox("TxtsueldoDiario").Text.ToDecimal(); diaslaborados = gvrow.FCLabel("TxtdiasLaborados").Text.ToDecimal(); diasaguinaldo = gvrow.FCLabel("TxtdiasAguinaldo").Text.ToDecimal(); @@ -406,7 +413,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas diasaguipago = (diaslaborados / diasanio) * diasaguinaldo; salariomensual = salariodiario * 30; - aguinaldo = diasaguipago * salariodiario; + aguinaldo = diasaguipago * salarioAguinaldo; /*if (gvrow.FCTextBox("TxtAguinaldoExento").Text.Length > 0) { aguinaldoexcento = (aguinaldoExcentoreg > aguinaldo ? aguinaldo : aguinaldoExcentoreg); @@ -542,25 +549,30 @@ public partial class Nomina_Aguinaldo : ClsPaginas fila = fila + 1; int filatitulo = fila; libro.SheetView.Freeze(filatitulo, 1); - libro.Cell(fila, 1).Value = "Empleado"; - libro.Cell(fila, 2).Value = "Fecha ingreso";//lblfechaingreso - libro.Cell(fila, 3).Value = "Salario diario"; - libro.Cell(fila, 4).Value = "Días laborados"; - libro.Cell(fila, 5).Value = "Días base"; - libro.Cell(fila, 6).Value = "Días aguinaldo";//lbldiasAguinaldoprop - libro.Cell(fila, 7).Value = "Aguinaldo completo"; - libro.Cell(fila, 8).Value = "Aguinaldo gravado"; - libro.Cell(fila, 9).Value = "Aguinaldo exento"; - libro.Cell(fila, 10).Value = "Fraccion I"; //lblFraccion1 - libro.Cell(fila, 11).Value = "Fraccion II"; //lblFraccion2 - libro.Cell(fila, 12).Value = "Fraccion III"; //lblFraccion3 - libro.Cell(fila, 13).Value = "Fraccion IV"; //lblFraccion4 - libro.Cell(fila, 14).Value = "I.S.R."; - libro.Cell(fila, 15).Value = "Descuento"; //TxtDescuento - libro.Cell(fila, 16).Value = "Aguinaldo por pagar"; + int cxc = 1; + libro.Cell(fila, cxc++).Value = "Código"; + libro.Cell(fila, cxc++).Value = "Empleado"; + libro.Cell(fila, cxc++).Value = "Fecha ingreso";//lblfechaingreso + libro.Cell(fila, cxc++).Value = "Salario diario"; + libro.Cell(fila, cxc++).Value = "Salario Aguinaldo"; + libro.Cell(fila, cxc++).Value = "Días laborados"; + libro.Cell(fila, cxc++).Value = "Días Faltados";//lbldiasAguinaldoprop + libro.Cell(fila, cxc++).Value = "Días Incapacidad";//lbldiasAguinaldoprop + libro.Cell(fila, cxc++).Value = "Días base"; + libro.Cell(fila, cxc++).Value = "Días aguinaldo";//lbldiasAguinaldoprop + libro.Cell(fila, cxc++).Value = "Aguinaldo completo"; + libro.Cell(fila, cxc++).Value = "Aguinaldo gravado"; + libro.Cell(fila, cxc++).Value = "Aguinaldo exento"; + libro.Cell(fila, cxc++).Value = "Fraccion I"; //lblFraccion1 + libro.Cell(fila, cxc++).Value = "Fraccion II"; //lblFraccion2 + libro.Cell(fila, cxc++).Value = "Fraccion III"; //lblFraccion3 + libro.Cell(fila, cxc++).Value = "Fraccion IV"; //lblFraccion4 + libro.Cell(fila, cxc++).Value = "I.S.R."; + libro.Cell(fila, cxc++).Value = "Descuento"; //TxtDescuento + libro.Cell(fila, cxc++).Value = "Aguinaldo por pagar"; - libro.Range(fila, 1, fila, 16).Style.Font.FontColor = ClosedXML.Excel.XLColor.White; - libro.Range(fila, 1, fila, 16).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189)); + libro.Range(fila, 1, fila, 20).Style.Font.FontColor = ClosedXML.Excel.XLColor.White; + libro.Range(fila, 1, fila, 20).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189)); foreach (GridViewRow gvrow in GVCalcularAguinaldo.Rows) { fila = fila + 1; @@ -570,42 +582,46 @@ public partial class Nomina_Aguinaldo : ClsPaginas { if (gvrow.DataKey("CveSubProyecto").ToEntero() > 0) { - libro.Range(fila, 1, fila, 16).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 217, 217)); + libro.Range(fila, 1, fila, 20).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 217, 217)); } else { - libro.Range(fila, 1, fila, 16).Style.Font.FontColor = ClosedXML.Excel.XLColor.White; - libro.Range(fila, 1, fila, 16).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(128, 128, 128)); + libro.Range(fila, 1, fila, 20).Style.Font.FontColor = ClosedXML.Excel.XLColor.White; + libro.Range(fila, 1, fila, 20).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(128, 128, 128)); } } + cxc = 1; + libro.Cell(fila, cxc++).Value = string.Format("'{0}",gvrow.DataKey("Codigo")); + libro.Cell(fila, cxc++).Value = gvrow.FCLabel("lblnombreCompleto").Text; + libro.Cell(fila, cxc++).Value = gvrow.FCLabel("lblfechaingreso").Text; + libro.Cell(fila, cxc++).Value = gvrow.FCTextBox("TxtsueldoDiario").Text.ToDecimal(); + libro.Cell(fila, cxc++).Value = gvrow.FCTextBox("TxtSalarioAguinaldo").Text.ToDecimal(); + libro.Cell(fila, cxc++).Value = gvrow.FCLabel("TxtdiasLaborados").Text.ToDecimal(); + libro.Cell(fila, cxc++).Value = gvrow.FCLabel("TxtdiasFaltados").Text.ToDecimal(); + libro.Cell(fila, cxc++).Value = gvrow.FCLabel("TxtdiasIncapacidad").Text.ToDecimal(); + libro.Cell(fila, cxc++).Value = gvrow.FCLabel("TxtdiasAguinaldo").Text.ToDecimal(); + libro.Cell(fila, cxc++).Value = gvrow.FCLabel("lbldiasAguinaldoprop").Text.ToDecimal(); + libro.Cell(fila, cxc++).Value = gvrow.FCLabel("lblsueldoAguinaldoCompleto").Text.ToDecimal(); + libro.Cell(fila, cxc++).Value = gvrow.FCLabel("lblAguinaldoGravado").Text.ToDecimal(); + libro.Cell(fila, cxc++).Value = gvrow.FCLabel("lblsueldoAguinaldoCompleto").Text.ToDecimal() - gvrow.FCLabel("lblAguinaldoGravado").Text.ToDecimal(); - libro.Cell(fila, 1).Value = gvrow.FCLabel("lblnombreCompleto").Text; - libro.Cell(fila, 2).Value = gvrow.FCLabel("lblfechaingreso").Text; - libro.Cell(fila, 3).Value = gvrow.FCTextBox("TxtsueldoDiario").Text.ToDecimal(); - libro.Cell(fila, 4).Value = gvrow.FCLabel("TxtdiasLaborados").Text.ToDecimal(); - libro.Cell(fila, 5).Value = gvrow.FCLabel("TxtdiasAguinaldo").Text.ToDecimal(); - libro.Cell(fila, 6).Value = gvrow.FCLabel("lbldiasAguinaldoprop").Text.ToDecimal(); - libro.Cell(fila, 7).Value = gvrow.FCLabel("lblsueldoAguinaldoCompleto").Text.ToDecimal(); - libro.Cell(fila, 8).Value = gvrow.FCLabel("lblAguinaldoGravado").Text.ToDecimal(); - libro.Cell(fila, 9).Value = gvrow.FCLabel("lblsueldoAguinaldoCompleto").Text.ToDecimal() - gvrow.FCLabel("lblAguinaldoGravado").Text.ToDecimal(); - - libro.Cell(fila, 10).Value = gvrow.FCLabel("lblFraccion1").Text.ToDecimal(); - libro.Cell(fila, 11).Value = gvrow.FCLabel("lblFraccion2").Text.ToDecimal(); - libro.Cell(fila, 12).Value = gvrow.FCLabel("lblFraccion3").Text.ToDecimal(); - libro.Cell(fila, 13).Value = gvrow.FCLabel("lblFraccion4").Text.ToDecimal(); + libro.Cell(fila, cxc++).Value = gvrow.FCLabel("lblFraccion1").Text.ToDecimal(); + libro.Cell(fila, cxc++).Value = gvrow.FCLabel("lblFraccion2").Text.ToDecimal(); + libro.Cell(fila, cxc++).Value = gvrow.FCLabel("lblFraccion3").Text.ToDecimal(); + libro.Cell(fila, cxc++).Value = gvrow.FCLabel("lblFraccion4").Text.ToDecimal(); - libro.Cell(fila, 14).Value = gvrow.FCLabel("lblISRAguinaldo").Text.ToDecimal(); - libro.Cell(fila, 15).Value = gvrow.FCTextBox("TxtDescuento").Text.ToDecimal(); - libro.Cell(fila, 16).Value = gvrow.FCLabel("lblAguinaldo").Text.ToDecimal(); + libro.Cell(fila, cxc++).Value = gvrow.FCLabel("lblISRAguinaldo").Text.ToDecimal(); + libro.Cell(fila, cxc++).Value = gvrow.FCTextBox("TxtDescuento").Text.ToDecimal(); + libro.Cell(fila, cxc++).Value = gvrow.FCLabel("lblAguinaldo").Text.ToDecimal(); } - libro.Range(filatitulo, 1, fila, 16).Columns(); - libro.Range(filatitulo + 1, 3, fila + 1, 16).DataType = ClosedXML.Excel.XLDataType.Number; - libro.Range(filatitulo + 1, 3, fila + 1, 3).Style.NumberFormat.Format = "$###,###,###,##0.00"; - libro.Range(filatitulo + 1, 7, fila + 1, 16).Style.NumberFormat.Format = "$###,###,###,##0.00"; + libro.Range(filatitulo, 1, fila, 18).Columns(); + libro.Range(filatitulo + 1, 4, fila + 1, 20).DataType = ClosedXML.Excel.XLDataType.Number; + libro.Range(filatitulo + 1, 4, fila + 1,5).Style.NumberFormat.Format = "$###,###,###,##0.00"; + libro.Range(filatitulo + 1, 11, fila + 1, 20).Style.NumberFormat.Format = "$###,###,###,##0.00"; libro.ColumnsUsed().AdjustToContents(); System.IO.Stream fs = new System.IO.MemoryStream(); diff --git a/Nomina/Finiquito.aspx b/Nomina/Finiquito.aspx index 4a84be62e..845e0eb40 100644 --- a/Nomina/Finiquito.aspx +++ b/Nomina/Finiquito.aspx @@ -77,8 +77,9 @@ - -
  • Generar otro finiquito
  • + +
  • + Generar otro finiquito
  • done_allAutorizar
  • @@ -285,6 +286,11 @@
    + +
    + + +
    <%--
    @@ -498,7 +504,7 @@
    - +
    + + + +
    @@ -302,6 +307,12 @@
    + +
    + + + +