-- idcta
This commit is contained in:
@@ -1968,7 +1968,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
'Dim Total As Decimal = 0
|
'Dim Total As Decimal = 0
|
||||||
If CveConceptoContable.Contiene(181, 78, 51, 69) Then
|
If CveConceptoContable.Contiene(181, 78, 51, 69) Then
|
||||||
Dim Dt As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}).Copy
|
Dim Dt As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}).Copy
|
||||||
'Dim IdCuentaGasto As Integer = 0
|
|
||||||
For Each Dr As DataRow In Dt.Rows
|
For Each Dr As DataRow In Dt.Rows
|
||||||
Dim Total As Decimal = ObjInventario.DtResultados.FiltraParametros($"CveClasificacion = {Dr("CveClasificacion")}").SUM("Total").RoundSQL()
|
Dim Total As Decimal = ObjInventario.DtResultados.FiltraParametros($"CveClasificacion = {Dr("CveClasificacion")}").SUM("Total").RoundSQL()
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ Partial Class Inventarios_KardexAlmacen
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaClasificaciones()
|
Private Sub CargaClasificaciones()
|
||||||
Dim CveClasificacion = If(Request("CveClasificacion") IsNot Nothing, Request("CveClasificacion").ToString, "-1")
|
Dim CveClasificacion As Integer = If(Request("CveClasificacion") IsNot Nothing, Request("CveClasificacion").ToString, "-1").ToEntero
|
||||||
|
|
||||||
Dim ObjClasificaciones As New ClsClasificaciones
|
Dim ObjClasificaciones As New ClsClasificaciones
|
||||||
If UsuarioActual.Empresa.UsaAC Then
|
If UsuarioActual.Empresa.UsaAC Then
|
||||||
@@ -159,7 +159,7 @@ Partial Class Inventarios_KardexAlmacen
|
|||||||
If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then
|
If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then
|
||||||
dt = ObjMovimientos.DtResultados
|
dt = ObjMovimientos.DtResultados
|
||||||
Dim ListaBorrar As New List(Of DataColumn)
|
Dim ListaBorrar As New List(Of DataColumn)
|
||||||
For index = 3 To dt.Columns.Count - 1
|
For index As Integer = 3 To dt.Columns.Count - 1
|
||||||
Dim TotColumna As Double = 0
|
Dim TotColumna As Double = 0
|
||||||
For Each Dr As DataRow In dt.Rows
|
For Each Dr As DataRow In dt.Rows
|
||||||
TotColumna += Dr.Item(index).ToString.ToDouble
|
TotColumna += Dr.Item(index).ToString.ToDouble
|
||||||
@@ -283,19 +283,19 @@ Partial Class Inventarios_KardexAlmacen
|
|||||||
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense("ESWN-4QFD-26JF-1SZ8")
|
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense("ESWN-4QFD-26JF-1SZ8")
|
||||||
|
|
||||||
Dim excel As GemBox.Spreadsheet.ExcelFile
|
Dim excel As GemBox.Spreadsheet.ExcelFile
|
||||||
Dim options = GemBox.Spreadsheet.LoadOptions.HtmlDefault
|
Dim options As HtmlLoadOptions = GemBox.Spreadsheet.LoadOptions.HtmlDefault
|
||||||
Using htmlStream = New MemoryStream(options.Encoding.GetBytes(sw.ToString()))
|
Using htmlStream As New MemoryStream(options.Encoding.GetBytes(sw.ToString()))
|
||||||
excel = GemBox.Spreadsheet.ExcelFile.Load(htmlStream, options)
|
excel = GemBox.Spreadsheet.ExcelFile.Load(htmlStream, options)
|
||||||
If Usuario IsNot Nothing Then
|
If Usuario IsNot Nothing Then
|
||||||
Dim TotalRowHeader As Integer = 8
|
Dim TotalRowHeader As Integer = 8
|
||||||
Dim TotalRowFooter As Integer = 2
|
Dim TotalRowFooter As Integer = 2
|
||||||
|
|
||||||
Dim worksheet = excel.Worksheets(0)
|
Dim worksheet As ExcelWorksheet = excel.Worksheets(0)
|
||||||
worksheet.Rows.InsertEmpty(0, TotalRowHeader)
|
worksheet.Rows.InsertEmpty(0, TotalRowHeader)
|
||||||
Dim celdasConTexto = worksheet.GetUsedCellRange(True)
|
Dim celdasConTexto As CellRange = worksheet.GetUsedCellRange(True)
|
||||||
celdasConTexto.Style.Font.Name = "Calibri Light"
|
celdasConTexto.Style.Font.Name = "Calibri Light"
|
||||||
|
|
||||||
Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex)
|
Dim RangoNombreEmpresa As CellRange = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex)
|
||||||
RangoNombreEmpresa.Merged = True
|
RangoNombreEmpresa.Merged = True
|
||||||
RangoNombreEmpresa.Value = Usuario.Empresa.Empresa
|
RangoNombreEmpresa.Value = Usuario.Empresa.Empresa
|
||||||
RangoNombreEmpresa.Style.Font.Size = 18 * 20
|
RangoNombreEmpresa.Style.Font.Size = 18 * 20
|
||||||
@@ -304,7 +304,7 @@ Partial Class Inventarios_KardexAlmacen
|
|||||||
RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||||
|
|
||||||
|
|
||||||
Dim RangoFiltros = worksheet.Cells.GetSubrangeAbsolute(6, celdasConTexto.FirstColumnIndex, 6, celdasConTexto.LastColumnIndex)
|
Dim RangoFiltros As CellRange = worksheet.Cells.GetSubrangeAbsolute(6, celdasConTexto.FirstColumnIndex, 6, celdasConTexto.LastColumnIndex)
|
||||||
RangoFiltros.Merged = True
|
RangoFiltros.Merged = True
|
||||||
RangoFiltros.Value = Filtros
|
RangoFiltros.Value = Filtros
|
||||||
RangoFiltros.Style.Font.Size = 15 * 20
|
RangoFiltros.Style.Font.Size = 15 * 20
|
||||||
@@ -313,7 +313,7 @@ Partial Class Inventarios_KardexAlmacen
|
|||||||
RangoFiltros.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
RangoFiltros.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||||
|
|
||||||
|
|
||||||
Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex)
|
Dim RangoTitulo As CellRange = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex)
|
||||||
RangoTitulo.Merged = True
|
RangoTitulo.Merged = True
|
||||||
RangoTitulo.Value = Titulo
|
RangoTitulo.Value = Titulo
|
||||||
RangoTitulo.Style.Font.Size = 20 * 20
|
RangoTitulo.Style.Font.Size = 20 * 20
|
||||||
@@ -321,7 +321,7 @@ Partial Class Inventarios_KardexAlmacen
|
|||||||
RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||||
RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||||
|
|
||||||
For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
|
For i As Integer = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
|
||||||
worksheet.Rows(8).Cells(i).Style.Font.Size = 12 * 20
|
worksheet.Rows(8).Cells(i).Style.Font.Size = 12 * 20
|
||||||
worksheet.Rows(8).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
worksheet.Rows(8).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||||
worksheet.Rows(8).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
worksheet.Rows(8).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||||
|
|||||||
@@ -186,33 +186,33 @@ Partial Class Ventas_CatClasificaciones2
|
|||||||
|
|
||||||
Protected Sub LbAgregarS_Click(sender As Object, e As EventArgs) Handles LbAgregarS.Click
|
Protected Sub LbAgregarS_Click(sender As Object, e As EventArgs) Handles LbAgregarS.Click
|
||||||
Dim ObjClasificaciones As New ClsClasificaciones
|
Dim ObjClasificaciones As New ClsClasificaciones
|
||||||
If ObjClasificaciones.AddClasificaciones(TxtClasificacionS.Text.Trim, "",
|
'If ObjClasificaciones.AddClasificaciones(TxtClasificacionS.Text.Trim, "",
|
||||||
-1, "", -1, "", -1, "",
|
' -1, "", -1, "", -1, "",
|
||||||
DdlCategoriaS.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereAFCompra:=False, RequiereAFInsumo:=False, RequierePersonal:=False) Then
|
' DdlCategoriaS.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereAFCompra:=False, RequiereAFInsumo:=False, RequierePersonal:=False) Then
|
||||||
|
|
||||||
'DdlCuentaGastoS.SelectedValue.ToEntero, DdlCuentaGastoS.SelectedItem.Text,
|
' 'DdlCuentaGastoS.SelectedValue.ToEntero, DdlCuentaGastoS.SelectedItem.Text,
|
||||||
'DdlCuentaAnticipoS.SelectedValue.ToEntero, DdlCuentaAnticipoS.SelectedItem.Text,
|
' 'DdlCuentaAnticipoS.SelectedValue.ToEntero, DdlCuentaAnticipoS.SelectedItem.Text,
|
||||||
'DdlCuentaInventarioS.SelectedValue.ToEntero, DdlCuentaInventarioS.SelectedItem.Text,
|
' 'DdlCuentaInventarioS.SelectedValue.ToEntero, DdlCuentaInventarioS.SelectedItem.Text,
|
||||||
TxtClasificacionS.Text = ""
|
' TxtClasificacionS.Text = ""
|
||||||
Alert("La nueva Clasificación se guardó correctamente.", TipoMensaje.MsgInformacion)
|
' Alert("La nueva Clasificación se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
UpTitulosS.Update()
|
' UpTitulosS.Update()
|
||||||
|
|
||||||
If ObjClasificaciones.GetClasificaciones(-1, 4) Then
|
' If ObjClasificaciones.GetClasificaciones(-1, 4) Then
|
||||||
GlobalDTClasificaciones2(UsuarioActual.CveEmpresa) = Nothing
|
' GlobalDTClasificaciones2(UsuarioActual.CveEmpresa) = Nothing
|
||||||
ViewState("DTClasificacion2") = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
' ViewState("DTClasificacion2") = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
||||||
GlobalDTClasificaciones2(UsuarioActual.CveEmpresa) = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
' GlobalDTClasificaciones2(UsuarioActual.CveEmpresa) = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
'DdlCuentaGastoS.SelectedValue = "-1"
|
' 'DdlCuentaGastoS.SelectedValue = "-1"
|
||||||
'DdlCuentaAnticipoS.SelectedValue = "-1"
|
' 'DdlCuentaAnticipoS.SelectedValue = "-1"
|
||||||
'DdlCuentaInventarioS.SelectedValue = "-1"
|
' 'DdlCuentaInventarioS.SelectedValue = "-1"
|
||||||
|
|
||||||
If ViewState("Orden2").ToString() <> String.Empty Then
|
' If ViewState("Orden2").ToString() <> String.Empty Then
|
||||||
CargaGridS(ViewState("Orden2").ToString())
|
' CargaGridS(ViewState("Orden2").ToString())
|
||||||
Else
|
' Else
|
||||||
CargaGridS("")
|
' CargaGridS("")
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
ObjClasificaciones.Dispose()
|
ObjClasificaciones.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -362,17 +362,17 @@ Partial Class Ventas_CatClasificaciones2
|
|||||||
Dim DdlCategoria As DropDownList = GvDatosS.Rows(e.RowIndex).FCDropDownList("DdlCategoria")
|
Dim DdlCategoria As DropDownList = GvDatosS.Rows(e.RowIndex).FCDropDownList("DdlCategoria")
|
||||||
'Dim IDCuentaGasto As Integer = GvDatosS.Rows(e.RowIndex).FCDropDownList("DdlCuentaGasto").SelectedValue.ToEntero
|
'Dim IDCuentaGasto As Integer = GvDatosS.Rows(e.RowIndex).FCDropDownList("DdlCuentaGasto").SelectedValue.ToEntero
|
||||||
|
|
||||||
If ObjClasificaciones.UpdateClasificacion(Clasificacion, "", -1, "", -1, "", -1, "", Estatus, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion) Then
|
'If ObjClasificaciones.UpdateClasificacion(Clasificacion, "", -1, "", -1, "", -1, "", Estatus, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion) Then
|
||||||
'DdlGasto.SelectedValue.ToEntero, DdlGasto.SelectedItem.Text,
|
' 'DdlGasto.SelectedValue.ToEntero, DdlGasto.SelectedItem.Text,
|
||||||
'DdlAnticipo.SelectedValue.ToEntero, DdlAnticipo.SelectedItem.Text,
|
' 'DdlAnticipo.SelectedValue.ToEntero, DdlAnticipo.SelectedItem.Text,
|
||||||
'DdlInventario.SelectedValue.ToEntero, DdlInventario.SelectedItem.Text,
|
' 'DdlInventario.SelectedValue.ToEntero, DdlInventario.SelectedItem.Text,
|
||||||
|
|
||||||
GvDatosS.EditIndex = -1
|
' GvDatosS.EditIndex = -1
|
||||||
If ObjClasificaciones.GetClasificaciones(-1, 4) Then
|
' If ObjClasificaciones.GetClasificaciones(-1, 4) Then
|
||||||
ViewState("DTClasificacion2") = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
' ViewState("DTClasificacion2") = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
||||||
End If
|
' End If
|
||||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
ObjClasificaciones.Dispose()
|
ObjClasificaciones.Dispose()
|
||||||
|
|
||||||
|
|||||||
@@ -139,9 +139,7 @@ Partial Class CatClasificacionesDetalle
|
|||||||
|
|
||||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||||
Dim ObjClasificaciones As New ClsClasificaciones
|
Dim ObjClasificaciones As New ClsClasificaciones
|
||||||
If ObjClasificaciones.UpdateClasificacion(TxtClasificacion.Text, "", DdlCuentaGasto.SelectedValue.ToEntero, DdlCuentaGasto.SelectedItem.Text,
|
If ObjClasificaciones.UpdateClasificacion(TxtClasificacion.Text, "", ChkEstado.Checked, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion) Then
|
||||||
DdlCuentaCostos.SelectedValue.ToEntero, DdlCuentaCostos.SelectedItem.Text, DdlCuentaIngresos.SelectedValue.ToEntero, DdlCuentaIngresos.SelectedItem.Text,
|
|
||||||
ChkEstado.Checked, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion) Then
|
|
||||||
GvDatos.EditIndex = -1
|
GvDatos.EditIndex = -1
|
||||||
ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||||
@@ -251,14 +249,13 @@ Partial Class CatClasificacionesDetalle
|
|||||||
Dim DdlCostos As DropDownList = GvDatos.Rows(e.RowIndex).FCDropDownList("DdlCuentaCostos")
|
Dim DdlCostos As DropDownList = GvDatos.Rows(e.RowIndex).FCDropDownList("DdlCuentaCostos")
|
||||||
Dim DdlIngresos As DropDownList = GvDatos.Rows(e.RowIndex).FCDropDownList("DdlCuentaIngresos")
|
Dim DdlIngresos As DropDownList = GvDatos.Rows(e.RowIndex).FCDropDownList("DdlCuentaIngresos")
|
||||||
|
|
||||||
If ObjClasificaciones.UpdateClasificacionSubProyecto(tCveClasificacion, CveSubProyecto, DdlGasto.SelectedValue.ToEntero, DdlGasto.SelectedItem.Text,
|
'If ObjClasificaciones.UpdateClasificacionSubProyecto(tCveClasificacion, CveSubProyecto, DdlIngresos.SelectedValue.ToEntero, DdlIngresos.SelectedItem.Text) Then
|
||||||
DdlCostos.SelectedValue.ToEntero, DdlCostos.SelectedItem.Text, DdlIngresos.SelectedValue.ToEntero, DdlIngresos.SelectedItem.Text) Then
|
' GvDatos.EditIndex = -1
|
||||||
GvDatos.EditIndex = -1
|
' ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados
|
||||||
ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados
|
' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
'Else
|
||||||
Else
|
' Alert("Ocurrió un error al actualizar la clasificación. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
Alert("Ocurrió un error al actualizar la clasificación. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
'End If
|
||||||
End If
|
|
||||||
|
|
||||||
ObjClasificaciones.Dispose()
|
ObjClasificaciones.Dispose()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user