mejora en validación de datos de traslados
This commit is contained in:
@@ -204,29 +204,25 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
divEmitir.Visible = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 119, 140, 2) Then
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(161) = "1" Then
|
||||
ChkEmitirTimbrado.Checked = True
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 2, 119, 140) Then
|
||||
|
||||
ChkEmitirCartaPorte.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
CantidadTotal = 0
|
||||
CvePS = 0
|
||||
TipoSeccionAlmacen = 0
|
||||
CvePS = 0
|
||||
TipoSeccionAlmacen = 0
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then
|
||||
|
||||
TxtFecha.Enabled = False
|
||||
ImgFecha.Visible = False
|
||||
TxtFecha.Enabled = False
|
||||
ImgFecha.Visible = False
|
||||
|
||||
TxtFechaRecepcion.Enabled = False
|
||||
ImgFechaRecepcion.Visible = False
|
||||
TxtFechaRecepcion.Enabled = False
|
||||
ImgFechaRecepcion.Visible = False
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
If ChkTransitorio.Checked Then
|
||||
@@ -731,19 +727,19 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
#Region " GUARDAR "
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
If ChkEmitirTimbrado.Checked Then
|
||||
'If ChkEmitirTimbrado.Checked Then
|
||||
|
||||
If DdlChofer.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Debe de seleccionar un chofer")
|
||||
Exit Sub
|
||||
End If
|
||||
If DdlUnidadCamion.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Debe de seleccionar una unidad")
|
||||
Exit Sub
|
||||
End If
|
||||
' If DdlChofer.SelectedValue.ToEntero <= 0 Then
|
||||
' Alert("Debe de seleccionar un chofer")
|
||||
' Exit Sub
|
||||
' End If
|
||||
' If DdlUnidadCamion.SelectedValue.ToEntero <= 0 Then
|
||||
' Alert("Debe de seleccionar una unidad")
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
|
||||
End If
|
||||
'End If
|
||||
|
||||
'VALIDA ALMACEN ORIGEN Y DESTINO
|
||||
If DdlAlmacenOrigen.SelectedValue = DdlAlmacenDestino.SelectedValue Then
|
||||
@@ -1156,7 +1152,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim CveSubProyectoTimbre As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacenOrigen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||
Dim Fechallegada As DateTime = (TxtFechaLlegada.Text & " 23:59:59").ToDateTime
|
||||
|
||||
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, -1, -1, CveMovimientoSalida, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, Fechallegada, "T", 1, 1, 1)
|
||||
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, -1, -1, CveMovimientoSalida, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, Fechallegada, "T", "", "", MinFecha, 1, 1, 1)
|
||||
|
||||
If CveEntregaAlmacen > 0 Then
|
||||
CveTimbre = ObjGral.AddGralTimbre("Tra", CveSubProyectoTimbre, TxtFechaEntrega.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen:=CveEntregaAlmacen, AplicaCP:=ChkEmitirCartaPorte.Checked)
|
||||
|
||||
Reference in New Issue
Block a user