diff --git a/AF/CatAF.aspx b/AF/CatAF.aspx index 7b11dbbb3..2477b9e6d 100644 --- a/AF/CatAF.aspx +++ b/AF/CatAF.aspx @@ -36,7 +36,54 @@ padding-right: 4px !important; padding-left: 4px !important; } + + img.cbp-img-ajustada { + max-width: 150px; + max-height: 150px; + height: auto; + width: auto; + object-fit: contain; + display: block; + cursor: pointer; +} + + @@ -370,6 +417,39 @@ + + + <%-- 20 --%> + + + + +
+
+
+
+ +
+
+
+ + <%----%> +
+
+
+
+
+
+
+
+
+
+
+
+
+ @@ -436,30 +516,18 @@ - - - - - + + + + + + - + - - - - - - - + - - - - - - - @@ -496,7 +564,10 @@ - +
+ × + Vista ampliada +
@@ -516,4 +587,57 @@ } --%> + + <%----%> + + + + + diff --git a/AF/CatAF.aspx.vb b/AF/CatAF.aspx.vb index 6feb748f4..d50f844b9 100644 --- a/AF/CatAF.aspx.vb +++ b/AF/CatAF.aspx.vb @@ -53,6 +53,14 @@ Partial Class AF_CatAF CargaCombos() CargaCaracteristicas() + If UsuarioActual.CveEmpresa = 13 Then + ChkUltimaImagen.Checked = True + ChkMarcaActivoFijo.Checked = True + ChkModeloActivoFijo.Checked = True + ChkNoSerie.Checked = True + ChkObservaciones.Checked = True + End If + If (Request("GPO") IsNot Nothing AndAlso Request("GPO").ToEntero() > 0) Then CargaParametrosInicial() Else @@ -62,6 +70,7 @@ Partial Class AF_CatAF CargaPersonalizacion() + End If End Sub @@ -598,6 +607,8 @@ Partial Class AF_CatAF If ChkObservaciones.Checked Then ListPersonalizada.Add("Observaciones") + If ChkUltimaImagen.Checked Then ListPersonalizada.Add("UltimaImagen") + If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "CatAF.aspx", String.Join("|", ListPersonalizada)) Then 'Alert("Personalizacion guardada") @@ -638,6 +649,15 @@ Partial Class AF_CatAF 'ChkSubProyecto.Checked = False ChkNombreCliente.Checked = False ChkObservaciones.Checked = False + ChkUltimaImagen.Checked = False + + If UsuarioActual.CveEmpresa = 13 Then + ChkUltimaImagen.Checked = True + ChkMarcaActivoFijo.Checked = True + ChkModeloActivoFijo.Checked = True + ChkNoSerie.Checked = True + ChkObservaciones.Checked = True + End If Dim Personalizaciones As String() = strBasePersonalizacion.Split("|"c) @@ -703,6 +723,9 @@ Partial Class AF_CatAF Case "Observaciones" ChkObservaciones.Checked = True Exit Select + Case "UltimaImagen" + ChkUltimaImagen.Checked = True + Exit Select Case Else Exit Select End Select @@ -762,6 +785,7 @@ Partial Class AF_CatAF 'GvDatos.Columns(18).Visible = ChkSubProyecto.Checked GvDatos.Columns(18).Visible = ChkNombreCliente.Checked GvDatos.Columns(19).Visible = ChkObservaciones.Checked + GvDatos.Columns(20).Visible = ChkUltimaImagen.Checked diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 145843325..135d41b25 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -1593,7 +1593,14 @@ Public Class ClsBancos ' Me.OnError("Ocurrió un error al guardar los cambios en el Banco", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) ' End If Catch ex As Exception - OnError("Ocurrió un error al guardar los cambios en el Banco IE Conciliar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + + If ex.Message.Contains("Número: 2601;") Then + Alert("Ya existe un movimiento bancario con el mismo Folio: " & Folio & ".", TipoMensaje.MsgAdvertencia) + Me.OnError("Ocurrió un error al Guardar el Movimiento. Ya existe un movimiento bancario con el mismo Folio: " & Folio & ".", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Else + OnError("Ocurrió un error al guardar los cambios en el Banco IE Conciliar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End If + End Try Return Retorno diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 0bc7b8015..3b385fd37 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -406,7 +406,7 @@ Public Class ClsPaginas End Property #Region "ordenes de producción" - Property GlobalDTOPEstatus(CveEmpresa As Integer, Optional Estatus As Integer = -1) As DataTable + Property GlobalDTOPEstatus(CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveTipoEstatus As Integer = -1) As DataTable Get Dim AppNombre As String = $"GlobalDTOPEstatus-{CveEmpresa}" If HttpContext.Current.Application(AppNombre) Is Nothing Then @@ -417,6 +417,8 @@ Public Class ClsPaginas Dim filtros As New List(Of String) If Estatus <> -1 Then filtros.Add($"Estatus = {Estatus}") + If CveTipoEstatus <> -1 Then filtros.Add($"CveTipoEstatus = {CveTipoEstatus}") + If filtros.Count > 0 Then Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows) GlobalDTOPEstatus = Dv.ToTable @@ -1020,7 +1022,7 @@ Public Class ClsPaginas For Each file As String In files Dim fi As IO.FileInfo = New IO.FileInfo(file) - If fi.LastAccessTime < DateTime.Now.AddMonths(-6) Then fi.Delete() + If fi.LastAccessTime - + - + - - - - - - - - - - + + + + + + + + + + - + - - - - - - - - - - - - + + + + + + + + + + + + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - + + + + + + + + + + - + - - - - - - - - - - - + + + + + + + + + + + - + - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - + + + + - + - - - + + + diff --git a/App_Code/DtDatos.xss b/App_Code/DtDatos.xss index 12eb8d1df..af01e0090 100644 --- a/App_Code/DtDatos.xss +++ b/App_Code/DtDatos.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + @@ -18,7 +18,7 @@ - + diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index f0837a637..97a59218f 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -7977,7 +7977,7 @@ Partial Class Compras_Compras If ObjCompras.DtResultados.FiltroPrimeroValor("FolioPoliza").ToEntero > 0 Then TieneError = True ErrorPrepoliza = True - Alert($"La Comprobación con folio '{TxtNumeroReembolso.Text.Trim}' está previamente contabilizada. No se puede asociar.", TipoMensaje.MsgError) + Alert($"La Comprobación con folio '{TxtNumeroReembolso.Text.Trim}' está previamente contabilizada. No se puede asociar al folio, verifique que sea el correcto", TipoMensaje.MsgError) Else Alert("Factura agregada a una comprobación ya creada.", TipoMensaje.ToastInformacion) End If diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index c6e5e4842..59ece46c1 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -3538,7 +3538,12 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) params.Add(New ReportParameter("FacturaProveedor", FolioVenta)) - params.Add(New ReportParameter("FacturadoA", If(DtMovimientos(0)("Nombre").ToString <> "", DtMovimientos(0)("Nombre").ToString, NombreCliente))) + If NombreCliente = "" Then + params.Add(New ReportParameter("FacturadoA", Recibio)) + Else + params.Add(New ReportParameter("FacturadoA", If(DtMovimientos(0)("Nombre").ToString <> "", DtMovimientos(0)("Nombre").ToString, NombreCliente))) + End If + params.Add(New ReportParameter("Observaciones", Observaciones)) params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index fb5d7c9be..cc1892977 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -4180,18 +4180,14 @@ Partial Class Compras_Proveedores Dim ObjPro As New ClsCompProveedores If ObjPro.UpdateProveedorLimiteCredito(CveProveedor, TxtLimiteCredito.Text.ToDecimal, TxtPlazoCobranza.Text.ToEntero, ChkUsaLimiteCredito.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTipoFechaVencimiento.SelectedValue.ToEntero) Then - - Alert("Limite de crédito modificado correctamente.") + Alert("Límite de crédito modificado correctamente.") RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddParametros")) + GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing End If ObjPro.Dispose() Else RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddParametros")) End If - - - - UPPCxP.Update() UpParametros.Update() diff --git a/Contabilidad/RepIVA.aspx b/Contabilidad/RepIVA.aspx index 243f59c2b..334824b57 100644 --- a/Contabilidad/RepIVA.aspx +++ b/Contabilidad/RepIVA.aspx @@ -219,7 +219,7 @@ SubTotal
16%
- + @@ -228,7 +228,7 @@ SubTotal
Imp. 16%
- + <%-- --%> @@ -237,7 +237,7 @@ SubTotal
8%
- + <%-- --%> @@ -286,8 +286,15 @@ - - + + + Actos ND
16%
+
+ + + +
+ IVA ND
16%
@@ -295,6 +302,14 @@
+ + + Actos ND
8%
+
+ + + +
IVA ND
8%
diff --git a/Empresas/119/Formatos/RepIVAAcreditable.rpt b/Empresas/119/Formatos/RepIVAAcreditable.rpt index dcfbc35fd..189c43bba 100644 Binary files a/Empresas/119/Formatos/RepIVAAcreditable.rpt and b/Empresas/119/Formatos/RepIVAAcreditable.rpt differ diff --git a/Empresas/Grales/Formatos/Salida.rdlc b/Empresas/Grales/Formatos/Salida.rdlc index ec108c2e6..3428967bb 100644 --- a/Empresas/Grales/Formatos/Salida.rdlc +++ b/Empresas/Grales/Formatos/Salida.rdlc @@ -1104,7 +1104,7 @@ 0.79361cm 11.65255cm 0.6cm - 9.5262cm + 9.15694cm 4 - +
@@ -913,398 +918,354 @@
- - -
-
-
+ + + +
+
+
-
-
-
- - Utilidad +
+
+
+ + Utilidad +
+
+
+ + + + + + + + + + + +
-
- - +
- - +
- +
-
-
 
-
 
-
- - - - <%# Eval("Sucursal") %> - - +
+
- - - -
-
Venta
-
Utilidad
-
-
- -
-
<%# String.Format("{0:N2}", Eval("VentaAnual")) %>
-
<%# String.Format("{0:N2}", Eval("UtilidadAnual")) %>
-
-
-
- - - - - -
-
Venta
-
Utilidad
-
-
- -
-
<%# String.Format("{0:N2}", Eval("VentaMensual")) %>
-
<%# String.Format("{0:N2}", Eval("UtilidadMensual")) %>
-
-
-
- - +
+
+
+
+ Ventas por sucursal +
+
+
+ + + + <%# Eval("Sucursal") %> + + + <%# Eval("Año", "{0:N2}") %> + + + <%# Eval("Mes", "{0:N2}") %> + + + <%# Eval("Semana", "{0:N2}") %> + + + <%# Eval("Día", "{0:N2}") %> + + + +
-
-
+
+
+
+
+ Ventas por vendedor +
+
+
+ + + + <%# Eval("Vendedor") %> -
- -
- -
- -
-
-
-
- Ventas por sucursal + + + <%# Eval("Año", "{0:N2}") %> + + + <%# Eval("Mes", "{0:N2}") %> + + + <%# Eval("Semana", "{0:N2}") %> + + + <%# Eval("Día", "{0:N2}") %> + + +
-
- - - - <%# Eval("Sucursal") %> - - - <%# Eval("Año", "{0:N2}") %> - - - <%# Eval("Mes", "{0:N2}") %> - - - <%# Eval("Semana", "{0:N2}") %> - - - <%# Eval("Día", "{0:N2}") %> - - - +
+ + +
+
+
+
+ Ventas por clasificación +
+
+
+ + + + <%# Eval("Clasificacion") %> + + + + <%# Eval("Año", "{0:N2}") %> + + + <%# Eval("Mes", "{0:N2}") %> + + + <%# Eval("Semana", "{0:N2}") %> + + + <%# Eval("Día", "{0:N2}") %> + + + +
+
+
+ + +
+
+
+
+ Ventas por marca +
+
+
+ + + + <%# Eval("Marca") %> + + + + <%# Eval("Año", "{0:N2}") %> + + + <%# Eval("Mes", "{0:N2}") %> + + + <%# Eval("Semana", "{0:N2}") %> + + + <%# Eval("Día", "{0:N2}") %> + + + +
+
+
+ +
+
+
+
+ Ventas por PS +
+
+
+ + + + <%# Eval("ProductoServicio") %> + + + + <%# Eval("Año", "{0:N2}") %> + + + <%# Eval("Mes", "{0:N2}") %> + + + <%# Eval("Semana", "{0:N2}") %> + + + <%# Eval("Día", "{0:N2}") %> + + + +
+
+
+ +
+
+
+
+ Ventas por Cliente +
+
+
+ + + + <%# Eval("NombreCliente") %> + + + + <%# Eval("Año", "{0:N2}") %> + + + <%# Eval("Mes", "{0:N2}") %> + + + <%# Eval("Semana", "{0:N2}") %> + + + <%# Eval("Día", "{0:N2}") %> + + + +
+
+
+ +
+
+
+
+ Ventas por Proveedor +
+
+
+ + + + <%# Eval("NombreProveedor") %> + + + + <%# Eval("Año", "{0:N2}") %> + + + <%# Eval("Mes", "{0:N2}") %> + + + <%# Eval("Semana", "{0:N2}") %> + + + <%# Eval("Día", "{0:N2}") %> + + + +
- -
-
-
-
- Ventas por vendedor -
-
-
- - - - <%# Eval("Vendedor") %> - - - - <%# Eval("Año", "{0:N2}") %> - - - <%# Eval("Mes", "{0:N2}") %> - - - <%# Eval("Semana", "{0:N2}") %> - - - <%# Eval("Día", "{0:N2}") %> - - - -
-
-
+ -
-
-
-
- Ventas por clasificación -
-
-
- - - - <%# Eval("Clasificacion") %> - - - - <%# Eval("Año", "{0:N2}") %> - - - <%# Eval("Mes", "{0:N2}") %> - - - <%# Eval("Semana", "{0:N2}") %> - - - <%# Eval("Día", "{0:N2}") %> - - - -
-
-
+ + -
-
-
-
- Ventas por marca -
-
-
- - - - <%# Eval("Marca") %> - - - - <%# Eval("Año", "{0:N2}") %> - - - <%# Eval("Mes", "{0:N2}") %> - - - <%# Eval("Semana", "{0:N2}") %> - - - <%# Eval("Día", "{0:N2}") %> - - - -
-
-
- -
-
-
-
- Ventas por PS -
-
-
- - - - <%# Eval("ProductoServicio") %> - - - - <%# Eval("Año", "{0:N2}") %> - - - <%# Eval("Mes", "{0:N2}") %> - - - <%# Eval("Semana", "{0:N2}") %> - - - <%# Eval("Día", "{0:N2}") %> - - - -
-
-
- -
-
-
-
- Ventas por Cliente -
-
-
- - - - <%# Eval("NombreCliente") %> - - - - <%# Eval("Año", "{0:N2}") %> - - - <%# Eval("Mes", "{0:N2}") %> - - - <%# Eval("Semana", "{0:N2}") %> - - - <%# Eval("Día", "{0:N2}") %> - - - -
-
-
- -
-
-
-
- Ventas por Proveedor -
-
-
- - - - <%# Eval("NombreProveedor") %> - - - - <%# Eval("Año", "{0:N2}") %> - - - <%# Eval("Mes", "{0:N2}") %> - - - <%# Eval("Semana", "{0:N2}") %> - - - <%# Eval("Día", "{0:N2}") %> - - - -
-
-
-
- - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + - - - - - - - - - - - - + + + + + diff --git a/General/Dashboard.aspx.vb b/General/Dashboard.aspx.vb index d2c1284eb..21ba073fa 100644 --- a/General/Dashboard.aspx.vb +++ b/General/Dashboard.aspx.vb @@ -17,6 +17,7 @@ Partial Class General_Dashboard ddlDashboardOption.SelectedValue = "1" ' Opción por defecto: Ingresos LoadDashboard() End If + ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkExportarPDF) End Sub Protected Sub ddlDashboardOption_SelectedIndexChanged(sender As Object, e As EventArgs) @@ -28,6 +29,11 @@ Partial Class General_Dashboard ' Aquí podrías cargar dinámicamente si lo deseas en el futuro End Sub + Public Overrides Sub VerifyRenderingInServerForm(control As Control) + ' No hagas nada aquí. Sólo con esta firma el GridView deja de quejarse. + End Sub + + Private Sub LoadDashboard() Dim opcion As Integer = Integer.Parse(ddlDashboardOption.SelectedValue) Dim hoy As DateTime = DateTime.Now @@ -89,17 +95,13 @@ Partial Class General_Dashboard End Sub Protected Sub LnkExportarPDF_Click(sender As Object, e As EventArgs) Handles LnkExportarPDF.Click - UPDashboard.Update() - - ' Clonar todo el UpdatePanel - Dim clonedPanel As New UpdatePanel() - clonedPanel.ID = "ClonedDashboard" - clonedPanel.ContentTemplateContainer.Controls.Add(UPDashboard.ContentTemplateContainer) - - ' Usar el método mejorado - clonedPanel.GenerarReportePDF("Reporte_Dashboard") + DivIndicadoresLeft.InnerHtml &= DivIndicadoresRight.InnerHtml + DivIndicadoresRight.InnerHtml = String.Empty + pnlDashboard.GenerarReportePDF("Reporte Resumen de Indicadores") End Sub + + Private Sub CargarIndicadores(dt As DataTable) If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then ProcesarDatosIndicadores(dt) @@ -234,6 +236,53 @@ Partial Class General_Dashboard End Sub + Protected Sub gvResumenSucursales_RowCreated(sender As Object, e As GridViewRowEventArgs) + If e.Row.RowType = DataControlRowType.Header Then + ' Limpiar celdas originales + e.Row.Cells.Clear() + + ' Crear primera fila de encabezado (grupos) + Dim headerRow As New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Normal) + + ' Celda para "Sucursal" (ocupa 2 filas) + Dim cellSucursal As New TableHeaderCell() + cellSucursal.RowSpan = 2 + cellSucursal.Text = "Sucursal" + headerRow.Cells.Add(cellSucursal) + + ' Celda para "Año" (abarca 2 columnas) + Dim cellAño As New TableHeaderCell() + cellAño.ColumnSpan = 2 + cellAño.Text = "Año" + headerRow.Cells.Add(cellAño) + + ' Celda para "Mes" (abarca 2 columnas) + Dim cellMes As New TableHeaderCell() + cellMes.ColumnSpan = 2 + cellMes.Text = "Mes" + headerRow.Cells.Add(cellMes) + + ' Añadir fila al GridView + Dim grid As GridView = DirectCast(sender, GridView) + grid.Controls(0).Controls.AddAt(0, headerRow) + + ' Crear segunda fila de encabezado (subtítulos) + Dim subHeaderRow As New GridViewRow(1, 0, DataControlRowType.Header, DataControlRowState.Normal) + + ' Subtítulos para "Año" + subHeaderRow.Cells.Add(New TableHeaderCell() With {.Text = "Venta"}) + subHeaderRow.Cells.Add(New TableHeaderCell() With {.Text = "Utilidad"}) + + ' Subtítulos para "Mes" + subHeaderRow.Cells.Add(New TableHeaderCell() With {.Text = "Venta"}) + subHeaderRow.Cells.Add(New TableHeaderCell() With {.Text = "Utilidad"}) + + grid.Controls(0).Controls.AddAt(1, subHeaderRow) + + End If + End Sub + + Private Sub CargarVentasPorSucursal(dt As DataTable) If dt Is Nothing OrElse dt.Rows.Count = 0 Then Return diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index 42612ffdd..3b9285795 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -259,13 +259,14 @@
-
- -
- - <%----%> -
-
+ +
+
+ + +
+ +
diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 39d80b543..383615019 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -722,6 +722,8 @@ Partial Class Inventarios_EntradasSalidas DdlConcepto.DataSource = GlobalDTInvConceptos.FiltraParametros(IIf(UsuarioActual.CveEmpresa.Contiene(72, 80, 1), "CveConcepto NOT IN (4,5,10)", "CveConcepto NOT IN (1,2,4,5,8,9,10,12,26,27,29)").ToString) DdlConcepto.DataBind() + + 'Llenar el dropdownlist de almacén If Not IfNull(Request("CI"), -1).ToString.ToEntero > 0 AndAlso Not IfNull(Request("CveEntregaAlmacen"), -1).ToString.ToEntero > 0 Then DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (9,11)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa) @@ -2589,6 +2591,9 @@ Partial Class Inventarios_EntradasSalidas If CveMovimiento > 0 And Not EsNuevoMov Then + If Not DdlConcepto.SelectedValue.Contiene("10", "28") Then + TrResponsable.Visible = True + End If Exit Sub End If diff --git a/Nomina/CatSatConceptos.aspx.vb b/Nomina/CatSatConceptos.aspx.vb index b4b2cfb60..52f085ff2 100644 --- a/Nomina/CatSatConceptos.aspx.vb +++ b/Nomina/CatSatConceptos.aspx.vb @@ -17,14 +17,14 @@ Partial Class Nom_CatSatConceptos Public Sub CargaDatos() Dim GetConceptoSAT As New ClsNominas - If ObjConceptos.GetConceptos() Then - ViewState("DTConceptos") = ObjConceptos.DtResultados - GlobalDTNomSatConceptos = ObjConceptos.DtResultados + If GetConceptoSAT.GetConceptos(UsuarioActual.CveEmpresa) Then + ViewState("DTConceptos") = GetConceptoSAT.DtResultados + GlobalDTNomSatConceptos = GetConceptoSAT.DtResultados Else Me.GvDatos.DataSource = Nothing End If - ObjConceptos.Dispose() + GetConceptoSAT.Dispose() If ViewState("Orden").ToString() <> String.Empty Then CargaGrid(ViewState("Orden").ToString()) diff --git a/OP/OP.aspx.vb b/OP/OP.aspx.vb index da0815cfa..2396263f4 100644 --- a/OP/OP.aspx.vb +++ b/OP/OP.aspx.vb @@ -921,12 +921,29 @@ Partial Class OP_OP End Sub Protected Sub BtnAceptarCancelacion_Click(sender As Object, e As EventArgs) + Dim EstatusCancelacion As String = GlobalDTOPEstatus(UsuarioActual.CveEmpresa).FiltroPrimeroValor("EstatusOP", "TipoEstatus=4") + Dim CveEstatusCancelacion As Integer = GlobalDTOPEstatus(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOP", "TipoEstatus=4").ToEntero() + If Not CveEstatusCancelacion > 0 Then + Alert("No se encontró el estatus de finalización de la OP.", TipoMensaje.MsgError) + Exit Sub + End If + Dim ObjInventario As New ClsInventarios() + Dim CveMovimientoSalida As Integer = 1 + Dim CveMovEntradaDev As Integer = 0 + Dim CveMovMerma As Integer = 1 Dim TieneError As Boolean = False Dim MensajeError As String = "" ObjInventario.IniciaTransacSQL() Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL()) Dim ObjOP As New ClsOP(ObjInventario.IniciaTransacSQL()) + Dim TipoMovimientoSalida As Integer = 26 + Dim TipoMovimientoEntrada As Integer = 27 + Dim TotalMP As Decimal = 0 + Dim TotalDevoluciones As Decimal = 0 + Dim TotalMermas As Decimal = 0 + + Dim Fecha As DateTime = NowADS() Try @@ -938,15 +955,10 @@ Partial Class OP_OP End If ' 1. Movimiento de Salida MP - Dim CveMovSalida As Integer = ObjInventario.AddMovimiento( - DdlAlmacenSalidaMP.SelectedValue.ToEntero(), 26, 1, NowADS, -1, - UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, - Observaciones:="Cancelación OP #" & LblFolio.Text) + CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacenSalidaMP.SelectedValue.ToEntero(), TipoMovimientoSalida, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="Cancelación OP #" & LblFolio.Text, Modulo:="OP/CancelanciónSalida") ' 2. Movimiento de Entrada Devoluciones - Dim CveMovEntradaDev As Integer = ObjInventario.AddMovimiento( - DdlAlmacenDevolucionCancel.SelectedValue.ToEntero(), 27, 1, NowADS, -1, - UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CveMovEntradaDev = ObjInventario.AddMovimiento(DdlAlmacenDevolucionCancel.SelectedValue.ToEntero(), TipoMovimientoEntrada, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Modulo:="OP/CancelaciónEntrada", CveMovimientoRelacionado:=CveMovimientoSalida) ' 3. Procesar cada material For Each row As GridViewRow In GvMPCancelacion.Rows @@ -958,11 +970,16 @@ Partial Class OP_OP Throw New Exception("La suma de merma y devolución no puede exceder la cantidad") End If - Dim CvePS As Integer = GvMPCancelacion.DataKeys(row.RowIndex).Values(0) - Dim CveUM As Integer = GvMPCancelacion.DataKeys(row.RowIndex).Values(1) + TotalMP += Cantidad + TotalDevoluciones += Devolucion + TotalMermas += Merma + + Dim CvePS As Integer = row.DataKey("CvePSMateriaPrima").ToEntero + Dim CveUM As Integer = row.DataKey("CveUMMateriaPrima").ToEntero + ' Registrar salida - ObjInventario.AddMovimientoDetalle(CveMovSalida, Cantidad, CveUM, CvePS, 0) + ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, CveUM, CvePS, 0) ' Registrar devolución If Devolucion > 0 Then @@ -971,17 +988,15 @@ Partial Class OP_OP Next ' 4. Registrar mermas si existen - Dim TotalMermas As Decimal = 0 + If DdlAlmacenMermas.SelectedValue <> "-1" Then - Dim CveMovMerma As Integer = ObjInventario.AddMovimiento( - DdlAlmacenMermas.SelectedValue.ToEntero(), 26, 1, NowADS, -1, - UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CveMovMerma = ObjInventario.AddMovimiento(DdlAlmacenMermas.SelectedValue.ToEntero(), TipoMovimientoSalida, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Modulo:="OP/CancelaciónMerma", CveMovimientoRelacionado:=CveMovimientoSalida) For Each row As GridViewRow In GvMPCancelacion.Rows Dim Merma As Decimal = row.FCTextBox("TxtMerma").Text.ToDecimal() If Merma > 0 Then - Dim CvePS As Integer = GvMPCancelacion.DataKeys(row.RowIndex).Values(0) - Dim CveUM As Integer = GvMPCancelacion.DataKeys(row.RowIndex).Values(1) + Dim CvePS As Integer = row.DataKey("CvePSMateriaPrima").ToEntero + Dim CveUM As Integer = row.DataKey("CveUMMateriaPrima").ToEntero ObjInventario.AddMovimientoDetalle(CveMovMerma, Merma, CveUM, CvePS, 0) TotalMermas += Merma End If @@ -989,26 +1004,26 @@ Partial Class OP_OP End If ' 5. Generar pólizas contables - Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("OP/Cancelacion", 53, 0, 0, 1, NowADS, + Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("OP/Cancelacion", 53, 0, 0, 1, Fecha, "Cancelación OP #" & LblFolio.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) ' Salida MP (Abono 68) - ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TotalMP, TotalMP, 68, "Salida MP Cancelación") + ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TotalMP, TotalMP, 68, "Cancelación MP OP #" & LblFolio.Text, "Cancelación MP OP #" & LblFolio.Text, CveMovimientoAlmacen:=CveMovimientoSalida) ' Entrada Devoluciones (Cargo 68) - ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalDevoluciones, TotalDevoluciones, 68, "Devoluciones Cancelación") + ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalDevoluciones, TotalDevoluciones, 68, "Devoluciones Cancelación OP #" & LblFolio.Text, "Devoluciones Cancelación OP #" & LblFolio.Text, CveMovimientoAlmacen:=CveMovEntradaDev) If TotalMermas > 0 Then ' Salida Mermas (Abono 68) - ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TotalMermas, TotalMermas, 68, "Mermas Cancelación") + ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TotalMermas, TotalMermas, 68, "Mermas Cancelación OP #" & LblFolio.Text, "Mermas Cancelación OP #" & LblFolio.Text, CveMovimientoAlmacen:=CveMovMerma) ' Cargo Mermas (95) - ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalMermas, TotalMermas, 95, "Ajuste por Mermas") + ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalMermas, TotalMermas, 95, "Ajuste Mermas Cancelación OP #" & LblFolio.Text, "Ajuste Mermas Cancelación OP #" & LblFolio.Text) End If ' 6. Actualizar estatus OP - If ObjOP.UpdateEstatusOP(CveOP, 4, UsuarioActual.CveEmpresa) Then + If ObjOP.UpdateEstatusOP(CveOP, CveEstatusCancelacion, UsuarioActual.CveEmpresa) Then ObjInventario.Commit() TxtEstatus.Text = "Cancelado" BtnCancelarOP.Visible = False diff --git a/RH/CatPuesto.aspx b/RH/CatPuesto.aspx index e17c81fcb..767a65228 100644 --- a/RH/CatPuesto.aspx +++ b/RH/CatPuesto.aspx @@ -33,7 +33,7 @@ @@ -50,6 +50,11 @@ + + + + + @@ -129,6 +134,13 @@
+
+ + <%-- + --%> + +
+
diff --git a/RH/CatPuesto.aspx.vb b/RH/CatPuesto.aspx.vb index 7a3b71d3e..b386a540c 100644 --- a/RH/CatPuesto.aspx.vb +++ b/RH/CatPuesto.aspx.vb @@ -64,9 +64,6 @@ Partial Class RH_CatPuesto End Set End Property - - - Private Property DTArea As DataTable Get If ViewState("DTArea") Is Nothing Then @@ -134,17 +131,18 @@ Partial Class RH_CatPuesto CargaCatalogoOcupaciones() - If ObjPuestos.GetPuestos(UsuarioActual.CveEmpresa) Then - GvPuestos.DataSource = ObjPuestos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) - - GlobalDTRHPuestos(UsuarioActual.CveEmpresa) = ObjPuestos.DtResultados + GvPuestos.DataSource = ObjPuestos.DtResultados Else Me.GvPuestos.DataSource = Nothing End If ObjPuestos.Dispose() GvPuestos.DataBind() + If UsuarioActual.CveEmpresa = 153 Then + GvPuestos.Columns(3).Visible = True + divValorxhora.Visible = True + End If UpDatos.Update() End Sub @@ -294,8 +292,6 @@ Partial Class RH_CatPuesto End If - - UpModalPuesto.Update() End Sub @@ -343,13 +339,13 @@ Partial Class RH_CatPuesto End If If CvePuesto = -1 And Actualizar = False Then - If ObjPuestos.AddPuesto(TxtPuesto.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlOcupacion.SelectedValue.ToEntero) Then - If ObjPuestos.GetPuestos(UsuarioActual.CveEmpresa) Then Application("GlobalDTRHPuestos") = ObjPuestos.DtResultados Else Application("GlobalDTRHPuestos") = Nothing + If ObjPuestos.AddPuesto(TxtPuesto.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlOcupacion.SelectedValue.ToEntero, TxtValorXHora.text.todecimal) Then + GlobalDTRHPuestos(UsuarioActual.CveEmpresa) = Nothing Alert("Puesto agregado correctamente.") End If Else - If ObjPuestos.UpdatePuesto(CvePuesto, TxtPuesto.Text.Trim, estatus, UsuarioActual.CveUsuario, DdlOcupacion.SelectedValue.ToEntero) Then - If ObjPuestos.GetPuestos(UsuarioActual.CveEmpresa) Then Application("GlobalDTRHPuestos") = ObjPuestos.DtResultados Else Application("GlobalDTRHPuestos") = Nothing + If ObjPuestos.UpdatePuesto(CvePuesto, TxtPuesto.Text.Trim, estatus, UsuarioActual.CveUsuario, DdlOcupacion.SelectedValue.ToEntero, TxtValorXHora.Text.ToDecimal) Then + GlobalDTRHPuestos(UsuarioActual.CveEmpresa) = Nothing Alert("Puesto actualizado correctamente.") End If End If @@ -388,6 +384,7 @@ Partial Class RH_CatPuesto CvePuesto = GvRow.DataKey("CvePuesto").ToEntero TxtPuesto.Text = GvRow.DataKey("Puesto") + TxtValorXHora.Text = GvRow.DataKey("ValorXHora").ToString LtlTituloModalPuesto.Text = "Editar Puesto" If Boolean.Parse(GvRow.DataKey("Estatus")) Then diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index b519e3528..6a1f26e93 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -23139,7 +23139,7 @@ Partial Class Ventas Dim CantidadRemision As Decimal = DtRemisionesTmpDT.FiltroPrimeroValor("Cantidad", $"CveVentaDetalleRemision={MovDet("CveVentaDetalle").ToString()}").ToDecimal Dim CantidadInventario As Decimal = MovDet("Cantidad").ToString().ToDecimal - If RemisionesLista.Count > 0 AndAlso ChkRemProductos.Checked AndAlso CantidadInventario >= CantidadRemision Then + If RemisionesLista.Count > 0 AndAlso CantidadInventario >= CantidadRemision Then Cantidad = CantidadRemision Else Cantidad = CantidadInventario