SMS 2024.02.26
This commit is contained in:
@@ -2320,6 +2320,21 @@ Partial Class Ventas
|
||||
End Property
|
||||
|
||||
|
||||
Public Property CveAlamcenFiltroDdl As Integer
|
||||
Get
|
||||
If ViewState("CveAlamcenFiltroDdl") Is Nothing Then
|
||||
ViewState("CveAlamcenFiltroDdl") = -1
|
||||
End If
|
||||
Return ViewState("CveAlamcenFiltroDdl").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveAlamcenFiltroDdl") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "VENTA MEDICA"
|
||||
|
||||
Property EsVentaMedica As Boolean
|
||||
@@ -8049,8 +8064,16 @@ Partial Class Ventas
|
||||
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")
|
||||
Objeto.ddlWS.Attributes.Add("data-AplicaparaVenta", "1")
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
Objeto.Attributes.Add("data-CveAlmacen", $"{CveAlamcenFiltroDdl}")
|
||||
Objeto.ddlWS.Attributes.Add("data-CveAlmacen", $"{CveAlamcenFiltroDdl}")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPSRemision(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost)
|
||||
@@ -13472,7 +13495,17 @@ Partial Class Ventas
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso EsVentaMedica Then
|
||||
|
||||
CveAlmacenTraspasoDestino = CveAlmacenAsignado
|
||||
If DdlSucursalCliente.SelectedValue.ToEntero > 0 Then
|
||||
Dim objclientes As New ClsClientes
|
||||
If objclientes.GetSucursales(CveCliente, -1) Then
|
||||
CveAlmacenTraspasoDestino = objclientes.DtResultados.FiltroPrimeroValor("CveAlmacenAsignado", $" CveClienteSucursal = {DdlSucursalCliente.SelectedValue.ToEntero}").ToEntero
|
||||
End If
|
||||
objclientes.Dispose()
|
||||
End If
|
||||
|
||||
If Not CveAlmacenTraspasoDestino > 0 Then
|
||||
CveAlmacenTraspasoDestino = CveAlmacenAsignado
|
||||
End If
|
||||
|
||||
If RBLTipoVenta.SelectedValue.ToEntero = 2 Then
|
||||
If Not ChkRequiereTecnico.Checked Then
|
||||
@@ -36627,34 +36660,6 @@ Partial Class Ventas
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Sub CargaSucursalesModal(CveClienteSeleccionado As Integer)
|
||||
|
||||
' DdlSucursalClienteModal.Items.Clear()
|
||||
' DdlSucursalClienteModal.ClearSelection()
|
||||
' DdlSucursalClienteModal.SelectedValue = Nothing
|
||||
|
||||
' Dim ObjCliente As New ClsClientes
|
||||
' If ObjCliente.GetSucursales(CveClienteSeleccionado) Then
|
||||
' DdlSucursalClienteModal.DataSource = ObjCliente.DtResultados
|
||||
' If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
' DvModalClientesucursal.Visible = True
|
||||
' Else
|
||||
' DvModalClientesucursal.Visible = False
|
||||
' End If
|
||||
' Else
|
||||
' DvModalClientesucursal.Visible = False
|
||||
' DdlSucursalClienteModal.DataSource = Nothing
|
||||
' End If
|
||||
' ObjCliente.Dispose()
|
||||
|
||||
' DdlSucursalClienteModal.DataBind()
|
||||
' DdlSucursalClienteModal.Items.Insert(0, New ListItem("Matriz", "-1"))
|
||||
|
||||
' UpDvModalTipoVenta.FindDataSourceControl
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub CargaDdlClientesSucursal()
|
||||
|
||||
@@ -36751,13 +36756,6 @@ Partial Class Ventas
|
||||
UpDvModalTipoVenta.Update()
|
||||
End Sub
|
||||
|
||||
'Protected Sub DdlClientesWS_selectedindexchange(sender As Object, e As EventArgs)
|
||||
|
||||
' CargaPSProcedimiento(DdlProcedimiento.SelectedValue.ToEntero, DdlClientesWS.SelectedValue.ToEntero, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
' 'CargaSucursalesModal(DdlClientesWS.SelectedValue.ToEntero)
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
Protected Sub DdlClienteSucursal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
Dim CveClienteSplit As Integer = -1
|
||||
@@ -36821,9 +36819,7 @@ Partial Class Ventas
|
||||
|
||||
ChkRequiereTecnicoModal.Enabled = True
|
||||
|
||||
'DdlClientesWS.txtText.Value = ""
|
||||
'DdlClientesWS.txtValue.Value = ""
|
||||
'DdlClientesWS.ddl.SelectedValueExist(-1)
|
||||
|
||||
DdlClienteSucursal.SelectedValueExist(-1)
|
||||
|
||||
DvModalRequiereOSFecha.Visible = False
|
||||
@@ -36885,8 +36881,6 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
For Each GvRow As GridViewRow In GvProductosProcedimiento.Rows
|
||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
@@ -36968,6 +36962,9 @@ Partial Class Ventas
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
DdlTipoComprobante.Enabled = False
|
||||
|
||||
CargaCliente(CveCliente)
|
||||
@@ -37020,10 +37017,17 @@ Partial Class Ventas
|
||||
UpParametros.Update()
|
||||
End If
|
||||
|
||||
If RBLTipoVenta.SelectedValue.Contiene("5", "6") Then
|
||||
AsignaAlamacenWS()
|
||||
CargaPS(-1, DdlPS)
|
||||
End If
|
||||
|
||||
RegistraScript("$('#DvModalTipoVenta').modal('hide');")
|
||||
UpCliente.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub GvProductosProcedimiento_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DataKey("Precio").ToDecimal = 0 Then
|
||||
@@ -37183,6 +37187,27 @@ Partial Class Ventas
|
||||
CargaProcedimientos(HdnCveProcedimientoNuevo.Value.ToEntero)
|
||||
End Sub
|
||||
|
||||
Private Sub AsignaAlamacenWS()
|
||||
|
||||
CveAlamcenFiltroDdl = -1
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
If DdlSucursalCliente.SelectedValue.ToEntero > 0 Then
|
||||
Dim objclientes As New ClsClientes
|
||||
If objclientes.GetSucursales(CveCliente, -1) Then
|
||||
CveAlamcenFiltroDdl = objclientes.DtResultados.FiltroPrimeroValor("CveAlmacenAsignado", $" CveClienteSucursal = {DdlSucursalCliente.SelectedValue.ToEntero}").ToEntero
|
||||
End If
|
||||
objclientes.Dispose()
|
||||
End If
|
||||
If Not CveAlamcenFiltroDdl > 0 Then
|
||||
CveAlamcenFiltroDdl = If(CveAlmacenAsignado > 0, CveAlmacenAsignado, -1)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
'Protected Sub LnkCancelarSoloCFDI_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Reference in New Issue
Block a user