-activar la carga de alamcen ,con lote/caducidad
This commit is contained in:
@@ -68,7 +68,7 @@ Partial Class AC_CatOGClasificaciones
|
|||||||
Dim ObjClasificaciones As New ClsClasificaciones
|
Dim ObjClasificaciones As New ClsClasificaciones
|
||||||
|
|
||||||
If LbAgregar.Text = "Agregar" Then
|
If LbAgregar.Text = "Agregar" Then
|
||||||
If ObjClasificaciones.AddClasificaciones(TxtOGClasificacion.Text.Trim, TxtCodigo.Text.Trim, -1, "", -1, "", -1, "", 0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
If ObjClasificaciones.AddClasificaciones(TxtOGClasificacion.Text.Trim, TxtCodigo.Text.Trim, 0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
TxtOGClasificacion.Text = ""
|
TxtOGClasificacion.Text = ""
|
||||||
TxtCodigo.Text = ""
|
TxtCodigo.Text = ""
|
||||||
Alert("La Clasificacion de Objeto de Gasto se guardó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La Clasificacion de Objeto de Gasto se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
@@ -78,7 +78,7 @@ Partial Class AC_CatOGClasificaciones
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If ObjClasificaciones.UpdateClasificacion(TxtOGClasificacion.Text, TxtCodigo.Text, -1, "", -1, "", -1, "", ChkEstatus.Checked, ChkAfectable.Checked, 0, UsuarioActual.CveUsuario, CveClasificacion) Then
|
If ObjClasificaciones.UpdateClasificacion(TxtOGClasificacion.Text, TxtCodigo.Text, ChkEstatus.Checked, ChkAfectable.Checked, 0, UsuarioActual.CveUsuario, CveClasificacion) Then
|
||||||
GvDatos.EditIndex = -1
|
GvDatos.EditIndex = -1
|
||||||
ViewState("DTOGClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTOGClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
|
||||||
@@ -191,7 +191,7 @@ Partial Class AC_CatOGClasificaciones
|
|||||||
Dim CveOGClasificacion As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
Dim CveOGClasificacion As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||||
Dim Codigo As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtCodigo"), TextBox).Text.Trim
|
Dim Codigo As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtCodigo"), TextBox).Text.Trim
|
||||||
|
|
||||||
If ObjOGClasificaciones.UpdateClasificacion(OGClasificacion, Codigo, -1, "", -1, "", -1, "", Estatus, Afectable, 0, UsuarioActual.CveUsuario, CveOGClasificacion) Then
|
If ObjOGClasificaciones.UpdateClasificacion(OGClasificacion, Codigo, Estatus, Afectable, 0, UsuarioActual.CveUsuario, CveOGClasificacion) Then
|
||||||
GvDatos.EditIndex = -1
|
GvDatos.EditIndex = -1
|
||||||
ViewState("DTOGClasificaciones") = ObjOGClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTOGClasificaciones") = ObjOGClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ Public Class ClsClasificaciones
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function AddClasificaciones(Clasificacion As String, Codigo As String, IdCuentaGasto As Integer, CuentaGasto As String, IdCuentaCostos As Integer, CuentaCostos As String, IdCuentaIngreso As Integer, CuentaIngreso As String, CveCategoria As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = False, Optional RequiereAFInsumo As Boolean = False, Optional RequierePersonal As Boolean = False,
|
Public Function AddClasificaciones(Clasificacion As String, Codigo As String, CveCategoria As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = False, Optional RequiereAFInsumo As Boolean = False, Optional RequierePersonal As Boolean = False,
|
||||||
Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1) As Boolean
|
Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
Me.CveClasificacion = -1
|
Me.CveClasificacion = -1
|
||||||
@@ -281,20 +281,12 @@ Public Class ClsClasificaciones
|
|||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@Clasificacion", SqlDbType.VarChar).Value = Clasificacion
|
.Add("@Clasificacion", SqlDbType.VarChar).Value = Clasificacion
|
||||||
.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
|
.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
|
||||||
.Add("@IdCuentaGasto", SqlDbType.Int).Value = IdCuentaGasto
|
|
||||||
.Add("@IdCuentaCostos", SqlDbType.Int).Value = IdCuentaCostos
|
|
||||||
'.Add("@IdCuentaInventario", SqlDbType.Int).Value = IdCuentaInventario
|
|
||||||
.Add("@CuentaGasto", SqlDbType.VarChar).Value = CuentaGasto
|
|
||||||
.Add("@CuentaCostos", SqlDbType.VarChar).Value = CuentaCostos
|
|
||||||
' .Add("@CuentaInventario", SqlDbType.VarChar).Value = CuentaInventario
|
|
||||||
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
|
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
|
||||||
'Nuevo 10/06/2016
|
'Nuevo 10/06/2016
|
||||||
.Add("@IdCuentaIngresos", SqlDbType.Int).Value = IdCuentaIngreso
|
|
||||||
.Add("@CuentaIngresos", SqlDbType.VarChar).Value = CuentaIngreso
|
|
||||||
.Add("@RequiereSerieLote", SqlDbType.Int).Value = RequiereSerieLote
|
.Add("@RequiereSerieLote", SqlDbType.Int).Value = RequiereSerieLote
|
||||||
.Add("@UsoClasificacion", SqlDbType.Int).Value = UsoClasificacion
|
.Add("@UsoClasificacion", SqlDbType.Int).Value = UsoClasificacion
|
||||||
|
|
||||||
@@ -338,13 +330,7 @@ Public Class ClsClasificaciones
|
|||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@Clasificacion", SqlDbType.VarChar).Value = Clasificacion.Clasificacion
|
.Add("@Clasificacion", SqlDbType.VarChar).Value = Clasificacion.Clasificacion
|
||||||
.Add("@Codigo", SqlDbType.VarChar).Value = Clasificacion.Codigo
|
.Add("@Codigo", SqlDbType.VarChar).Value = Clasificacion.Codigo
|
||||||
'.Add("@IdCuentaGasto", SqlDbType.Int).Value = Clasificacion.IdCuentaGasto
|
|
||||||
'.Add("@IdCuentaCostos", SqlDbType.Int).Value = Clasificacion.IdCuentaCostos
|
|
||||||
'.Add("@IdCuentaInventario", SqlDbType.Int).Value = IdCuentaInventario
|
|
||||||
'.Add("@CuentaGasto", SqlDbType.VarChar).Value = Clasificacion.CuentaGasto
|
|
||||||
'.Add("@CuentaCostos", SqlDbType.VarChar).Value = Clasificacion.CuentaCostos
|
|
||||||
' .Add("@CuentaInventario", SqlDbType.VarChar).Value = CuentaInventario
|
|
||||||
.Add("@CveCategoria", SqlDbType.Int).Value = Clasificacion.CveCategoria
|
.Add("@CveCategoria", SqlDbType.Int).Value = Clasificacion.CveCategoria
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = Clasificacion.CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = Clasificacion.CveEmpresa
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = Clasificacion.CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = Clasificacion.CveUsuario
|
||||||
@@ -384,29 +370,22 @@ Public Class ClsClasificaciones
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateClasificacion(Clasificacion As String, Codigo As String, IdCuentaGasto As Integer, CuentaGasto As String, IdCuentaCostos As Integer, CuentaCostos As String, IdCuentaIngresos As Integer, CuentaIngresos As String, Estatus As Boolean, Afectable As Boolean, CveCategoria As Integer, CveUsuario As Integer, CveClasificacion As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = True, Optional RequiereAFInsumo As Boolean = True, Optional RequierePersonal As Boolean = True,
|
Public Function UpdateClasificacion(Clasificacion As String, Codigo As String, Estatus As Boolean, Afectable As Boolean, CveCategoria As Integer, CveUsuario As Integer, CveClasificacion As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = True, Optional RequiereAFInsumo As Boolean = True, Optional RequierePersonal As Boolean = True,
|
||||||
Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1) As Boolean
|
Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_ClasificacionesUpdate")
|
DataAdapter("PA_ClasificacionesUpdate")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@Clasificacion", SqlDbType.VarChar).Value = Clasificacion
|
.Add("@Clasificacion", SqlDbType.VarChar).Value = Clasificacion
|
||||||
.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
|
.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
|
||||||
.Add("@IdCuentaGasto", SqlDbType.Int).Value = IdCuentaGasto
|
|
||||||
.Add("@IdCuentaCostos", SqlDbType.Int).Value = IdCuentaCostos
|
|
||||||
' .Add("@IdCuentaInventario", SqlDbType.Int).Value = IdCuentaInventario
|
|
||||||
.Add("@CuentaGasto", SqlDbType.VarChar).Value = CuentaGasto
|
|
||||||
.Add("@CuentaCostos", SqlDbType.VarChar).Value = CuentaCostos
|
|
||||||
' .Add("@CuentaInventario", SqlDbType.VarChar).Value = CuentaInventario
|
|
||||||
.Add("@Estatus", SqlDbType.Bit).Value = If(Estatus, 1, 0)
|
.Add("@Estatus", SqlDbType.Bit).Value = If(Estatus, 1, 0)
|
||||||
.Add("@Afectable", SqlDbType.Bit).Value = If(Afectable, 1, 0)
|
.Add("@Afectable", SqlDbType.Bit).Value = If(Afectable, 1, 0)
|
||||||
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
|
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||||
|
|
||||||
'Nuevo 10/06/2016
|
'Nuevo 10/06/2016
|
||||||
.Add("@IdCuentaIngresos", SqlDbType.Int).Value = IdCuentaIngresos
|
|
||||||
.Add("@CuentaIngresos", SqlDbType.VarChar).Value = CuentaIngresos
|
|
||||||
.Add("@RequiereSerieLote", SqlDbType.Int).Value = RequiereSerieLote
|
.Add("@RequiereSerieLote", SqlDbType.Int).Value = RequiereSerieLote
|
||||||
.Add("@UsoClasificacion", SqlDbType.Int).Value = UsoClasificacion
|
.Add("@UsoClasificacion", SqlDbType.Int).Value = UsoClasificacion
|
||||||
|
|
||||||
@@ -572,25 +551,13 @@ Public Class ClsClasificaciones
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateClasificacionSubProyecto(CveClasificacion As Integer, CveSubProyecto As Integer, IdCuentaGasto As Integer, CuentaGasto As String, IdCuentaCostos As Integer, CuentaCostos As String, IdCuentaIngresos As Integer, CuentaIngresos As String) As Boolean
|
Public Function UpdateClasificacionSubProyecto(CveClasificacion As Integer, CveSubProyecto As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_ClasificacionesSubProyectoUpdate")
|
DataAdapter("PA_ClasificacionesSubProyectoUpdate")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@IdCuentaGasto", SqlDbType.Int).Value = IdCuentaGasto
|
|
||||||
.Add("@IdCuentaCostos", SqlDbType.Int).Value = IdCuentaCostos
|
|
||||||
'.Add("@IdCuentaInventario", SqlDbType.Int).Value = IdCuentaInventario
|
|
||||||
.Add("@CuentaGasto", SqlDbType.VarChar).Value = CuentaGasto
|
|
||||||
.Add("@CuentaCostos", SqlDbType.VarChar).Value = CuentaCostos
|
|
||||||
'.Add("@CuentaInventario", SqlDbType.VarChar).Value = CuentaInventario
|
|
||||||
|
|
||||||
.Add("@IdCuentaIngresos", SqlDbType.Int).Value = IdCuentaIngresos
|
|
||||||
.Add("@CuentaIngresos", SqlDbType.VarChar).Value = CuentaIngresos
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -736,8 +736,7 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
|
|
||||||
If Not CveClasificacion > 0 AndAlso Clasificacion <> "" Then
|
If Not CveClasificacion > 0 AndAlso Clasificacion <> "" Then
|
||||||
If ObjClas.AddClasificaciones(Clasificacion, "", -1, "-1", -1, "-1", -1, "-1",
|
If ObjClas.AddClasificaciones(Clasificacion, "", GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCategoria", "").ToString().ToEntero(), UsuarioActual.CveUsuario,
|
||||||
GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCategoria", "").ToString().ToEntero(), UsuarioActual.CveUsuario,
|
|
||||||
UsuarioActual.CveEmpresa) Then
|
UsuarioActual.CveEmpresa) Then
|
||||||
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
|
||||||
CveClasificacion = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion}'").ToString().ToEntero()
|
CveClasificacion = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion}'").ToString().ToEntero()
|
||||||
@@ -825,8 +824,7 @@ Partial Class General_SaldosIniciales
|
|||||||
End If
|
End If
|
||||||
If CveClasificacion2 = 0 Then
|
If CveClasificacion2 = 0 Then
|
||||||
|
|
||||||
If ObjClas.AddClasificaciones(Clasificacion2, "", -1, "-1", -1, "-1", -1, "-1", CveCategoria, UsuarioActual.CveUsuario,
|
If ObjClas.AddClasificaciones(Clasificacion2, "", CveCategoria, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
UsuarioActual.CveEmpresa) Then
|
|
||||||
If ObjClas.GetClasificaciones(Tipo:=4) Then Application("GlobalDTClasificaciones2") = ObjClas.DtResultados
|
If ObjClas.GetClasificaciones(Tipo:=4) Then Application("GlobalDTClasificaciones2") = ObjClas.DtResultados
|
||||||
CveClasificacion2 = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion2}'").ToString().ToEntero()
|
CveClasificacion2 = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion2}'").ToString().ToEntero()
|
||||||
End If
|
End If
|
||||||
@@ -2299,7 +2297,7 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
If CveAlmacen > 0 Then
|
If CveAlmacen > 0 Then
|
||||||
Dim movimientoCabecera As Integer = ObjMovimientos.AddMovimiento(CveAlmacen, DdlConceptoAlmacen.SelectedValue.ToEntero(), 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
|
Dim movimientoCabecera As Integer = ObjMovimientos.AddMovimiento(CveAlmacen, DdlConceptoAlmacen.SelectedValue.ToEntero(), 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
|
||||||
listadoMovimientos += $"movimiento con folio <a href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={movimientoCabecera}' target='_blank' style='color:blue'>{ObjMovimientos.Folio}</a><br/>"
|
listadoMovimientos += $"movimiento con folio <a href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={movimientoCabecera}' target='_blank' class='Texto' style='color:blue'>{ObjMovimientos.Folio}</a><br/>"
|
||||||
If movimientoCabecera > 0 Then
|
If movimientoCabecera > 0 Then
|
||||||
|
|
||||||
For Each nuevaEntrada As DataRow In dt.FiltraParametros($"TRIM(Almacen) = '{almacenActual}'").Rows
|
For Each nuevaEntrada As DataRow In dt.FiltraParametros($"TRIM(Almacen) = '{almacenActual}'").Rows
|
||||||
@@ -2312,12 +2310,12 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim Cantidad As Decimal = nuevaEntrada("Existencia").ToString().ToDecimal
|
Dim Cantidad As Decimal = nuevaEntrada("Existencia").ToString().ToDecimal
|
||||||
Dim Valor As Decimal = nuevaEntrada("Valor").ToString().ToDecimal
|
Dim Valor As Decimal = nuevaEntrada("Valor").ToString().ToDecimal
|
||||||
Dim Serie As String = If(dt.Columns.Contains("Serie"), nuevaEntrada("Serie").ToString().Trim, "")
|
Dim Serie As String = If(dt.Columns.Contains("Serie"), nuevaEntrada("Serie").ToString().Trim, "")
|
||||||
|
Dim Lote As String = If(dt.Columns.Contains("Lote"), nuevaEntrada("Lote").ToString().Trim, "-1")
|
||||||
|
Dim FechaCaducidad As Date = If(dt.Columns.Contains("FechaCaducidad"), nuevaEntrada("FechaCaducidad").ToString().Trim.ToDate, MinFecha)
|
||||||
|
|
||||||
Dim PU As Decimal = If(Valor = 0, 0, (Valor / Cantidad))
|
Dim PU As Decimal = If(Valor = 0, 0, (Valor / Cantidad))
|
||||||
|
|
||||||
|
If Not ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, CveUM, CvePS, PU, -1, -1, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then
|
||||||
If Not ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, CveUM, CvePS, PU, -1, -1, Serie:=Serie) Then
|
|
||||||
mensajeError = "No se logró generar el detalle del movimiento"
|
mensajeError = "No se logró generar el detalle del movimiento"
|
||||||
Throw New Exception()
|
Throw New Exception()
|
||||||
End If
|
End If
|
||||||
@@ -2502,7 +2500,7 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
If Not CveClasificacion > 0 Then
|
If Not CveClasificacion > 0 Then
|
||||||
|
|
||||||
If ObjClasificaciones.AddClasificaciones(Clasificacion, "", -1, "-1", -1, "-1", -1, "-1", CveCategoria, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereSerieLote:=0, UsoClasificacion:=CveUsoClasificacion,
|
If ObjClasificaciones.AddClasificaciones(Clasificacion, "", CveCategoria, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereSerieLote:=0, UsoClasificacion:=CveUsoClasificacion,
|
||||||
CveSATPS:=-1, RequiereAFCompra:=False, RequiereAFInsumo:=False, RequierePersonal:=False, EsAcumulador:=False, TopVentas:=False, TopCompras:=False, PrecioBaseCosto:=-1) Then
|
CveSATPS:=-1, RequiereAFCompra:=False, RequiereAFInsumo:=False, RequierePersonal:=False, EsAcumulador:=False, TopVentas:=False, TopCompras:=False, PrecioBaseCosto:=-1) Then
|
||||||
|
|
||||||
CveClasificacion = ObjClasificaciones.CveClasificacion
|
CveClasificacion = ObjClasificaciones.CveClasificacion
|
||||||
@@ -2523,7 +2521,7 @@ Partial Class General_SaldosIniciales
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|
||||||
If Not ObjClasificaciones.UpdateClasificacion(Clasificacion, "-1", -1, "-1", -1, "-1", -1, "-1", True, True, CveCategoria, UsuarioActual.CveUsuario, CveClasificacion, UsoClasificacion:=CveUsoClasificacion) Then
|
If Not ObjClasificaciones.UpdateClasificacion(Clasificacion, "-1", True, True, CveCategoria, UsuarioActual.CveUsuario, CveClasificacion, UsoClasificacion:=CveUsoClasificacion) Then
|
||||||
ErrorProceso = True
|
ErrorProceso = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2925,7 +2923,6 @@ Partial Class General_SaldosIniciales
|
|||||||
If Not ErrorProceso Then
|
If Not ErrorProceso Then
|
||||||
DTAnticipoCliente.AcceptChanges()
|
DTAnticipoCliente.AcceptChanges()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -2941,8 +2938,6 @@ Partial Class General_SaldosIniciales
|
|||||||
ErrorProceso = True
|
ErrorProceso = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim CveIE As Integer = ObjBancos.AddBancos_IE(CveCuentaBancaria, 3, Fecha, FolioStr.ToString(), "", Importe, CveMoneda,
|
Dim CveIE As Integer = ObjBancos.AddBancos_IE(CveCuentaBancaria, 3, Fecha, FolioStr.ToString(), "", Importe, CveMoneda,
|
||||||
TipoCambio, Descripcion, "", False, False, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
TipoCambio, Descripcion, "", False, False, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
@@ -2951,9 +2946,6 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
Contador = Contador + 1
|
Contador = Contador + 1
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not ErrorProceso Then
|
If Not ErrorProceso Then
|
||||||
Alert($"Se agregaron {Contador} Anticipos.")
|
Alert($"Se agregaron {Contador} Anticipos.")
|
||||||
ObjBancos.Commit()
|
ObjBancos.Commit()
|
||||||
@@ -2963,11 +2955,6 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
<asp:HiddenField ID="HiddenField2" runat="server" ClientIDMode="Static" Value="0" />
|
<asp:HiddenField ID="HiddenField2" runat="server" ClientIDMode="Static" Value="0" />
|
||||||
<div>
|
<div>
|
||||||
<asp:GridView ID="GvDatos" runat="server" data-sort="true" AutoGenerateColumns="False"
|
<asp:GridView ID="GvDatos" runat="server" data-sort="true" AutoGenerateColumns="False"
|
||||||
DataKeyNames="CveClasificacion, CveCategoria, Clasificacion, UsoClasificacion, CuentaGasto, CuentaCostos, CuentaIngresos, IdCuentaGasto, IdCuentaCostos, IdCuentaIngresos,RequiereSerieLote,CveSATPS,SATClaveProductoServicio, RequiereAFCompra, RequiereAFInsumo, RequierePersonal, Estatus,EsAcumulador,TopVentas,TopCompras,PrecioBaseCosto,CveCuentaAsignacionGasto, CveCuentaGasto" EmptyDataText="No se encontraron Clasificaciones Registradas" ToolTip="Listado de Clasificaciones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
DataKeyNames="CveClasificacion, CveCategoria, Clasificacion, UsoClasificacion, CuentaGasto, RequiereSerieLote,CveSATPS,SATClaveProductoServicio, RequiereAFCompra, RequiereAFInsumo, RequierePersonal, Estatus,EsAcumulador,TopVentas,TopCompras,PrecioBaseCosto,CveCuentaAsignacionGasto, CveCuentaGasto" EmptyDataText="No se encontraron Clasificaciones Registradas" ToolTip="Listado de Clasificaciones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Clasificación">
|
<asp:TemplateField HeaderText="Clasificación">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -97,13 +97,13 @@
|
|||||||
|
|
||||||
<asp:TemplateField HeaderText="Cuenta Costos">
|
<asp:TemplateField HeaderText="Cuenta Costos">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LtlCuentaCosto" runat="server" Text='<%# Eval("CuentaCostos")%>'></asp:Label>
|
<asp:Label ID="LtlCuentaCosto" runat="server" Text=''></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Cuenta Ingresos">
|
<asp:TemplateField HeaderText="Cuenta Ingresos">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LtlCuentaIngresos" runat="server" Text='<%# Eval("CuentaIngresos")%>'></asp:Label>
|
<asp:Label ID="LtlCuentaIngresos" runat="server" Text=''></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
<asp:Literal ID="LtlEstado" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
<asp:Literal ID="LtlEstado" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
<asp:CheckBox ID="ChkEstado" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
<asp:CheckBox ID="ChkEstado" runat="server" Checked='<%# If(Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha">
|
<asp:TemplateField HeaderText="Fecha">
|
||||||
|
|||||||
@@ -152,9 +152,6 @@ Partial Class CatClasificaciones
|
|||||||
|
|
||||||
If HdnModalidadClasificacion.Value = "A" Then
|
If HdnModalidadClasificacion.Value = "A" Then
|
||||||
If ObjClasificaciones.AddClasificaciones(TxtClasificacion.Text.Trim, "",
|
If ObjClasificaciones.AddClasificaciones(TxtClasificacion.Text.Trim, "",
|
||||||
DdlCuentaGasto.SelectedValue.ToEntero, DdlCuentaGasto.SelectedItem.Text,
|
|
||||||
DdlCuentaCostos.SelectedValue.ToEntero, DdlCuentaCostos.SelectedItem.Text,
|
|
||||||
DdlCuentaIngresos.SelectedValue.ToEntero, DdlCuentaIngresos.SelectedItem.Text,
|
|
||||||
DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereSerieLote:=RequireSerieLote, UsoClasificacion:=DdlUsoClasificacion.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero,
|
DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereSerieLote:=RequireSerieLote, UsoClasificacion:=DdlUsoClasificacion.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero,
|
||||||
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then
|
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then
|
||||||
|
|
||||||
@@ -185,8 +182,7 @@ Partial Class CatClasificaciones
|
|||||||
Dim DdlCosto As DropDownList = DdlCuentaCostos
|
Dim DdlCosto As DropDownList = DdlCuentaCostos
|
||||||
Dim DdlIngresos As DropDownList = DdlCuentaIngresos
|
Dim DdlIngresos As DropDownList = DdlCuentaIngresos
|
||||||
|
|
||||||
If ObjClasificaciones.UpdateClasificacion(Clasificacion, "", DdlGasto.SelectedValue.ToEntero, DdlGasto.SelectedItem.Text,
|
If ObjClasificaciones.UpdateClasificacion(Clasificacion, "",
|
||||||
DdlCosto.SelectedValue.ToEntero, DdlCosto.SelectedItem.Text, DdlIngresos.SelectedValue.ToEntero, DdlIngresos.SelectedItem.Text,
|
|
||||||
Estatus, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion, RequiereSerieLote:=RequireSerieLote, UsoClasificacion:=DdlUsoClasificacion.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero,
|
Estatus, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion, RequiereSerieLote:=RequireSerieLote, UsoClasificacion:=DdlUsoClasificacion.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero,
|
||||||
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then
|
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then
|
||||||
|
|
||||||
@@ -307,8 +303,8 @@ Partial Class CatClasificaciones
|
|||||||
|
|
||||||
|
|
||||||
If e.Row.DBCampo("CuentaGasto") = "Seleccione" Or e.Row.DBCampo("CuentaGasto") = "" Then e.Row.FCLabel("LtlCuentaGasto").Text = "-"
|
If e.Row.DBCampo("CuentaGasto") = "Seleccione" Or e.Row.DBCampo("CuentaGasto") = "" Then e.Row.FCLabel("LtlCuentaGasto").Text = "-"
|
||||||
If e.Row.DBCampo("CuentaCostos") = "Seleccione" Or e.Row.DBCampo("CuentaCostos") = "" Then e.Row.FCLabel("LtlCuentaCosto").Text = "-"
|
' If e.Row.DBCampo("CuentaCostos") = "Seleccione" Or e.Row.DBCampo("CuentaCostos") = "" Then e.Row.FCLabel("LtlCuentaCosto").Text = "-"
|
||||||
If e.Row.DBCampo("CuentaIngresos") = "Seleccione" Or e.Row.DBCampo("CuentaIngresos") = "" Then e.Row.FCLabel("LtlCuentaIngresos").Text = "-"
|
' If e.Row.DBCampo("CuentaIngresos") = "Seleccione" Or e.Row.DBCampo("CuentaIngresos") = "" Then e.Row.FCLabel("LtlCuentaIngresos").Text = "-"
|
||||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||||
@@ -383,8 +379,8 @@ Partial Class CatClasificaciones
|
|||||||
Dim PrecioBaseCosto As String = GvRow.DataKey("PrecioBaseCosto").ToString
|
Dim PrecioBaseCosto As String = GvRow.DataKey("PrecioBaseCosto").ToString
|
||||||
Dim CveCategoria As String = GvRow.DataKey("CveCategoria").ToString
|
Dim CveCategoria As String = GvRow.DataKey("CveCategoria").ToString
|
||||||
Dim CuentaGasto As String = GvRow.DataKey("CuentaGasto").ToString
|
Dim CuentaGasto As String = GvRow.DataKey("CuentaGasto").ToString
|
||||||
Dim CuentaCostos As String = GvRow.DataKey("CuentaCostos").ToString
|
Dim CuentaCostos As String = ""
|
||||||
Dim CuentaIngresos As String = GvRow.DataKey("CuentaIngresos").ToString
|
Dim CuentaIngresos As String = ""
|
||||||
Dim UsoClasificacion As String = GvRow.DataKey("UsoClasificacion").ToString
|
Dim UsoClasificacion As String = GvRow.DataKey("UsoClasificacion").ToString
|
||||||
Dim TopVentas As Boolean = If(GvRow.DataKey("TopVentas") = "True", True, False)
|
Dim TopVentas As Boolean = If(GvRow.DataKey("TopVentas") = "True", True, False)
|
||||||
Dim TopCompras As Boolean = If(GvRow.DataKey("TopCompras") = "True", True, False)
|
Dim TopCompras As Boolean = If(GvRow.DataKey("TopCompras") = "True", True, False)
|
||||||
@@ -392,9 +388,9 @@ Partial Class CatClasificaciones
|
|||||||
ChkTopCompras.Checked = TopCompras
|
ChkTopCompras.Checked = TopCompras
|
||||||
ChkTopVentas.Checked = TopVentas
|
ChkTopVentas.Checked = TopVentas
|
||||||
|
|
||||||
CveCuentaGastoActual = GvRow.DataKey("IdCuentaGasto").ToString.ToEntero
|
'CveCuentaGastoActual = GvRow.DataKey("IdCuentaGasto").ToString.ToEntero
|
||||||
CveCuentaCostoActual = GvRow.DataKey("IdCuentaCostos").ToString.ToEntero
|
'CveCuentaCostoActual = GvRow.DataKey("IdCuentaCostos").ToString.ToEntero
|
||||||
CveCuentaIngresoActual = GvRow.DataKey("IdCuentaIngresos").ToString.ToEntero
|
'CveCuentaIngresoActual = GvRow.DataKey("IdCuentaIngresos").ToString.ToEntero
|
||||||
|
|
||||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
|
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
|
||||||
ChkRequiereSerieLote.Checked = If(GvRow.DataKey("RequiereSerieLote") = "True", True, False)
|
ChkRequiereSerieLote.Checked = If(GvRow.DataKey("RequiereSerieLote") = "True", True, False)
|
||||||
|
|||||||
Reference in New Issue
Block a user