-- optimización a utilizar GlobalDTInvCamiones y AutoTransportes en sección de carta porte
This commit is contained in:
@@ -36045,39 +36045,20 @@ Partial Class Ventas
|
||||
|
||||
DdlChofer.DataSource = GlobalDTChoferes(UsuarioActual.CveEmpresa)
|
||||
DdlChofer.DataBind()
|
||||
|
||||
DdlChofer.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
||||
DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
||||
|
||||
'Using ObjInv As New ClsInventarios
|
||||
|
||||
' If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1, Estatus:=1) Then
|
||||
' DdlUnidadCamion.DataSource = ObjInv.DtResultados
|
||||
' End If
|
||||
|
||||
' If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
|
||||
' DdlRemolque1.DataSource = ObjInv.DtResultados
|
||||
' End If
|
||||
|
||||
'End Using
|
||||
|
||||
DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa, CveTipoCamion:=1)
|
||||
DdlUnidadCamion.DataBind()
|
||||
DdlUnidadCamion.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
DdlRemolque1.DataBind()
|
||||
DdlRemolque1.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
Using ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetCartaPorteConfigAutoTransportes() Then
|
||||
DdlConfigAuto.DataSource = ObjGrales.DtResultados
|
||||
End If
|
||||
End Using
|
||||
|
||||
DdlConfigAuto.DataSource = GlobalDTGralCartaPorteConfigAutoTransportes
|
||||
DdlConfigAuto.DataBind()
|
||||
DdlConfigAuto.Items.Insert(0, New ListItem("Seleccione una", "-1"))
|
||||
|
||||
DdlRemolque1.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa, CveTipoCamion:=2)
|
||||
DdlRemolque1.DataBind()
|
||||
DdlRemolque1.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
|
||||
@@ -36091,12 +36072,10 @@ Partial Class Ventas
|
||||
DdlRemolque2.SelectedValueExist(-1)
|
||||
|
||||
If DdlUnidadCamion.SelectedValue.ToEntero > 0 Then
|
||||
Using ObjInv As New ClsInventarios
|
||||
If ObjInv.GetCamiones(DdlUnidadCamion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlConfigAuto.SelectedValueExist(ObjInv.DtResultados.FiltroPrimeroValor("CveConfigAutoTransporte"))
|
||||
DdlConfigAuto_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
End Using
|
||||
|
||||
Dim CveConfig As String = GlobalDTInvCamiones(UsuarioActual.CveEmpresa, CveCamion:=DdlUnidadCamion.SelectedValue.ToEntero, CveTipoCamion:=1).FiltroPrimeroValor("CveConfigAutoTransporte")
|
||||
DdlConfigAuto.SelectedValueExist(CveConfig)
|
||||
DdlConfigAuto_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
@@ -36222,27 +36201,24 @@ Partial Class Ventas
|
||||
|
||||
If DdlConfigAuto.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
Using ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetCartaPorteConfigAutoTransportes() Then
|
||||
Dim Remolque As String = ObjGrales.DtResultados.FiltroPrimeroValor("Remolque", $" CveConfigAutoTransporte ='{DdlConfigAuto.SelectedValue}'")
|
||||
Dim Remolque As String = GlobalDTGralCartaPorteConfigAutoTransportes.FiltroPrimeroValor("Remolque", $" CveConfigAutoTransporte ='{DdlConfigAuto.SelectedValue}'")
|
||||
If Remolque <> "" Then
|
||||
|
||||
If Remolque = "1" Then
|
||||
RequiereRemolque = True
|
||||
MostrarRemolques = True
|
||||
End If
|
||||
|
||||
If Remolque = "0, 1" Then
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = True
|
||||
End If
|
||||
|
||||
If Remolque = "0" Then
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = False
|
||||
End If
|
||||
If Remolque = "1" Then
|
||||
RequiereRemolque = True
|
||||
MostrarRemolques = True
|
||||
End If
|
||||
End Using
|
||||
|
||||
If Remolque = "0, 1" Then
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = True
|
||||
End If
|
||||
|
||||
If Remolque = "0" Then
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = False
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = False
|
||||
@@ -36266,13 +36242,7 @@ Partial Class Ventas
|
||||
|
||||
If DdlRemolque1.SelectedValue.ToEntero > 0 Then
|
||||
DvRemolque2.Visible = True
|
||||
|
||||
Using ObjInv As New ClsInventarios
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
|
||||
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero}")
|
||||
End If
|
||||
End Using
|
||||
|
||||
DdlRemolque2.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa, CveTipoCamion:=2)
|
||||
DdlRemolque2.DataBind()
|
||||
Else
|
||||
DvRemolque2.Visible = False
|
||||
|
||||
Reference in New Issue
Block a user