-- filtro de almacenes al editar pedido
This commit is contained in:
@@ -1017,7 +1017,6 @@ Partial Class Ventas
|
|||||||
Get
|
Get
|
||||||
Return ViewState("CvePSAmortizacion").ToString().ToEntero()
|
Return ViewState("CvePSAmortizacion").ToString().ToEntero()
|
||||||
End Get
|
End Get
|
||||||
|
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("CvePSAmortizacion") = value
|
ViewState("CvePSAmortizacion") = value
|
||||||
End Set
|
End Set
|
||||||
@@ -2337,8 +2336,6 @@ Partial Class Ventas
|
|||||||
ViewState("ClienteEsDistribuidor") = value
|
ViewState("ClienteEsDistribuidor") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Public Property CveAlmacenAsignado As Integer
|
Public Property CveAlmacenAsignado As Integer
|
||||||
@@ -2353,16 +2350,15 @@ Partial Class Ventas
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property CveAlmacenFiltroDdl As Integer
|
||||||
Public Property CveAlamcenFiltroDdl As Integer
|
|
||||||
Get
|
Get
|
||||||
If ViewState("CveAlamcenFiltroDdl") Is Nothing Then
|
If ViewState("CveAlmacenFiltroDdl") Is Nothing Then
|
||||||
ViewState("CveAlamcenFiltroDdl") = -1
|
ViewState("CveAlmacenFiltroDdl") = -1
|
||||||
End If
|
End If
|
||||||
Return ViewState("CveAlamcenFiltroDdl").ToString.ToEntero
|
Return ViewState("CveAlmacenFiltroDdl").ToString.ToEntero
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("CveAlamcenFiltroDdl") = value
|
ViewState("CveAlmacenFiltroDdl") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -5428,7 +5424,6 @@ Partial Class Ventas
|
|||||||
UPCondicionesPago.Update()
|
UPCondicionesPago.Update()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'ESCONDE ACCIONES
|
'ESCONDE ACCIONES
|
||||||
LnkRemisiones.Visible = False
|
LnkRemisiones.Visible = False
|
||||||
LnkPedido2SinFacturar.Visible = False
|
LnkPedido2SinFacturar.Visible = False
|
||||||
@@ -5541,7 +5536,6 @@ Partial Class Ventas
|
|||||||
DdlUsoCFDI.SelectedValueExistInsert(DbRowVenta("CveUsoCFDI").ToString(), UsoCFDI)
|
DdlUsoCFDI.SelectedValueExistInsert(DbRowVenta("CveUsoCFDI").ToString(), UsoCFDI)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 126 Then CargaOrdenProduccion(2, CveVenta)
|
If UsuarioActual.CveEmpresa = 126 Then CargaOrdenProduccion(2, CveVenta)
|
||||||
|
|
||||||
If DbRowVenta("CveTipoRelacion").ToString().ToEntero() > 0 Then
|
If DbRowVenta("CveTipoRelacion").ToString().ToEntero() > 0 Then
|
||||||
@@ -5573,7 +5567,6 @@ Partial Class Ventas
|
|||||||
|
|
||||||
LiComplementoPago.Visible = True
|
LiComplementoPago.Visible = True
|
||||||
|
|
||||||
|
|
||||||
ViewState("FolioFiscal") = DbRowVenta("FolioFiscal").ToString()
|
ViewState("FolioFiscal") = DbRowVenta("FolioFiscal").ToString()
|
||||||
|
|
||||||
SerieVenta = DbRowVenta("Serie").ToString()
|
SerieVenta = DbRowVenta("Serie").ToString()
|
||||||
@@ -5603,7 +5596,6 @@ Partial Class Ventas
|
|||||||
Dim PorcentajeRetIVA As Decimal = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
|
Dim PorcentajeRetIVA As Decimal = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
|
||||||
LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2)
|
LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
TxtRetISR.Text = DbRowVenta("RetISR").ToString().FormatoNumero(2)
|
TxtRetISR.Text = DbRowVenta("RetISR").ToString().FormatoNumero(2)
|
||||||
TxtIEPS.Text = DbRowVenta("IEPS").ToString().FormatoNumero(2)
|
TxtIEPS.Text = DbRowVenta("IEPS").ToString().FormatoNumero(2)
|
||||||
@@ -5626,7 +5618,6 @@ Partial Class Ventas
|
|||||||
TxtPedidoContrato.Enabled = False
|
TxtPedidoContrato.Enabled = False
|
||||||
TxtKilometraje.Text = DbRowVenta("Kilometraje").ToString().PadLeft(6, "0"c)
|
TxtKilometraje.Text = DbRowVenta("Kilometraje").ToString().PadLeft(6, "0"c)
|
||||||
|
|
||||||
|
|
||||||
VentaActual = New Venta(UsuarioActual)
|
VentaActual = New Venta(UsuarioActual)
|
||||||
VentaActual.CveVenta = CveVenta
|
VentaActual.CveVenta = CveVenta
|
||||||
VentaActual.Fecha = DbRowVenta("Fecha").ToString.ToDate
|
VentaActual.Fecha = DbRowVenta("Fecha").ToString.ToDate
|
||||||
@@ -5657,12 +5648,6 @@ Partial Class Ventas
|
|||||||
BtnEmitir.Visible = False
|
BtnEmitir.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'HdnAmortizacion.Value = LblAmort.Text.ToDouble.ToString()
|
|
||||||
'HdnSubTotalDescuestos.Value = (TxtSubTotal.Text.Replace(",", "").ToDouble - LblDescuentos.Text.Replace(",", "").ToDouble - LblAmortizacion.Text.Trim.Replace(",", "").ToDouble - TxtRetISR.Text.Replace(",", "").ToDouble).FormatoNumero(2)
|
|
||||||
'DdlAmortizacionConceptos.SelectedValue = DbRowVenta("AnticipoPosicion").ToString()
|
|
||||||
'ChkAnticipoEnSubTotal.Checked = DbRowVenta("AnticipoEnSubTotal").ToString() = "True"
|
|
||||||
|
|
||||||
|
|
||||||
If DbRowVenta("CveTipoRelacion").ToString().ToEntero() > 0 Then
|
If DbRowVenta("CveTipoRelacion").ToString().ToEntero() > 0 Then
|
||||||
TrTipoRelacion2.Visible = True
|
TrTipoRelacion2.Visible = True
|
||||||
LblTipoRelacion.Text = DbRowVenta("TipoRelacion").ToString()
|
LblTipoRelacion.Text = DbRowVenta("TipoRelacion").ToString()
|
||||||
@@ -5681,7 +5666,6 @@ Partial Class Ventas
|
|||||||
HLSaldarVenta.Visible = True
|
HLSaldarVenta.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If (UsuarioActual.TienePermisoProceso(166) Or UsuarioActual.CveRol = 1) AndAlso (LblFolioFiscal.Text = "" Or LblFolioFiscal.Text = "test") Then
|
If (UsuarioActual.TienePermisoProceso(166) Or UsuarioActual.CveRol = 1) AndAlso (LblFolioFiscal.Text = "" Or LblFolioFiscal.Text = "test") Then
|
||||||
LkEliminarFactura.Visible = True
|
LkEliminarFactura.Visible = True
|
||||||
End If
|
End If
|
||||||
@@ -5853,14 +5837,6 @@ Partial Class Ventas
|
|||||||
' BtnGenerarOS.OnClientClick = String.Format("/OS/OrdenesServicios.aspx?CveVenta={0}", CveVenta)
|
' BtnGenerarOS.OnClientClick = String.Format("/OS/OrdenesServicios.aspx?CveVenta={0}", CveVenta)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'[IPP] COMENTADO 12/MARZO/2018 -SABRA QUE SE QUERIA ESCONDER
|
|
||||||
'If DbRowVenta("TipoDocto").ToString() = "Rem" Then
|
|
||||||
' GvPS.Columns(11).Visible = False
|
|
||||||
' GvPS.Columns(12).Visible = False
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
'Ocultamos los botones Clonar y Ordenar
|
'Ocultamos los botones Clonar y Ordenar
|
||||||
GvPS.Columns(19).Visible = False
|
GvPS.Columns(19).Visible = False
|
||||||
GvPS.Columns(20).Visible = False
|
GvPS.Columns(20).Visible = False
|
||||||
@@ -6259,7 +6235,8 @@ Partial Class Ventas
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||||
|
|
||||||
CveTipoVenta = If(DbRowVenta("CveTipoVenta").ToString.ToEntero > 0, DbRowVenta("CveTipoVenta").ToString.ToEntero, -1)
|
CveTipoVenta = If(DbRowVenta("CveTipoVenta").ToString.ToEntero > 0, DbRowVenta("CveTipoVenta").ToString.ToEntero, -1)
|
||||||
|
RBLTipoVenta.Items.Add(New ListItem("-", DbRowVenta("CveTipoVenta").ToString))
|
||||||
|
RBLTipoVenta.SelectedValuesIfExist(CveTipoVenta.ToString)
|
||||||
TrVentasMedicas3.Visible = True
|
TrVentasMedicas3.Visible = True
|
||||||
|
|
||||||
If DbRowVenta("CveMedico").ToString.ToEntero > 0 AndAlso CveTipoVenta.Contiene(1, 2, 3, 5, 6) Then
|
If DbRowVenta("CveMedico").ToString.ToEntero > 0 AndAlso CveTipoVenta.Contiene(1, 2, 3, 5, 6) Then
|
||||||
@@ -8514,9 +8491,9 @@ Partial Class Ventas
|
|||||||
Objeto.ddlWS.Attributes.Add("data-AplicaparaVenta", "1")
|
Objeto.ddlWS.Attributes.Add("data-AplicaparaVenta", "1")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||||
Objeto.Attributes.Add("data-CveAlmacen", $"{CveAlamcenFiltroDdl}")
|
Objeto.Attributes.Add("data-CveAlmacen", $"{CveAlmacenFiltroDdl}")
|
||||||
Objeto.ddlWS.Attributes.Add("data-CveAlmacen", $"{CveAlamcenFiltroDdl}")
|
Objeto.ddlWS.Attributes.Add("data-CveAlmacen", $"{CveAlmacenFiltroDdl}")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -19352,7 +19329,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Using ObjInv2 As New ClsInventarios
|
Using ObjInv2 As New ClsInventarios
|
||||||
If RBLTipoVenta.SelectedValue.ToEntero = 6 Then
|
If RBLTipoVenta.SelectedValue.ToEntero = 6 Then
|
||||||
Existencia = ObjInv2.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, CveAlamcenFiltroDdl, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=-1,
|
Existencia = ObjInv2.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, CveAlmacenFiltroDdl, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=-1,
|
||||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=0, PendientePorSurtir:=1,
|
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=0, PendientePorSurtir:=1,
|
||||||
RestringirAlmacenes:=1, ExcluyeApartados:=-1, BuscarEnTabla:=BuscarEnTabla)
|
RestringirAlmacenes:=1, ExcluyeApartados:=-1, BuscarEnTabla:=BuscarEnTabla)
|
||||||
Else
|
Else
|
||||||
@@ -23537,6 +23514,8 @@ Partial Class Ventas
|
|||||||
TxtPaciente.Enabled = True
|
TxtPaciente.Enabled = True
|
||||||
TxtEpisodio.Enabled = True
|
TxtEpisodio.Enabled = True
|
||||||
TxtFolioRemision.Enabled = True
|
TxtFolioRemision.Enabled = True
|
||||||
|
'carga los almacenes para la existencias
|
||||||
|
AsignaAlmacenWS()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -38822,18 +38801,18 @@ Partial Class Ventas
|
|||||||
DdlTipoComprobante.SelectedValueExistInsert("Rem", "Remisión")
|
DdlTipoComprobante.SelectedValueExistInsert("Rem", "Remisión")
|
||||||
End If
|
End If
|
||||||
ElseIf RBLTipoVenta.SelectedValue.Contiene("3") Then ' A vista
|
ElseIf RBLTipoVenta.SelectedValue.Contiene("3") Then ' A vista
|
||||||
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped"))
|
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped"))
|
||||||
DdlTipoComprobante.SelectedValueExist("Ped")
|
DdlTipoComprobante.SelectedValueExist("Ped")
|
||||||
TrVentasMedicas1.Visible = False
|
TrVentasMedicas1.Visible = False
|
||||||
TrVentasMedicas2.Visible = False
|
TrVentasMedicas2.Visible = False
|
||||||
ChkRequiereTecnico.Enabled = True
|
ChkRequiereTecnico.Enabled = True
|
||||||
ElseIf RBLTipoVenta.SelectedValue.Contiene("4") Then ' consignacion
|
ElseIf RBLTipoVenta.SelectedValue.Contiene("4") Then ' consignacion
|
||||||
DdlTipoComprobante.SelectedValueExist("Ing")
|
DdlTipoComprobante.SelectedValueExist("Ing")
|
||||||
TrVentasMedicas1.Visible = False
|
TrVentasMedicas1.Visible = False
|
||||||
TrVentasMedicas2.Visible = False
|
TrVentasMedicas2.Visible = False
|
||||||
ChkRequiereTecnico.Enabled = True
|
ChkRequiereTecnico.Enabled = True
|
||||||
Else
|
Else
|
||||||
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped"))
|
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped"))
|
||||||
DdlTipoComprobante.SelectedValueExist("Ped")
|
DdlTipoComprobante.SelectedValueExist("Ped")
|
||||||
TrVentasMedicas1.Visible = True
|
TrVentasMedicas1.Visible = True
|
||||||
TrVentasMedicas2.Visible = True
|
TrVentasMedicas2.Visible = True
|
||||||
@@ -39069,12 +39048,11 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Private Sub AsignaAlmacenWS()
|
Private Sub AsignaAlmacenWS()
|
||||||
|
|
||||||
CveAlamcenFiltroDdl = -1
|
CveAlmacenFiltroDdl = -1
|
||||||
Dim tCveAlmacenExistencia As Integer = -1
|
Dim tCveAlmacenExistencia As Integer = -1
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||||
If DdlSucursalCliente.SelectedValue.ToEntero > 0 Then
|
If DdlSucursalCliente.SelectedValue.ToEntero > 0 Then
|
||||||
|
|
||||||
Dim drr As DataRow = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltroPrimero($"CveClienteSucursal={DdlSucursalCliente.SelectedValue}")
|
Dim drr As DataRow = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltroPrimero($"CveClienteSucursal={DdlSucursalCliente.SelectedValue}")
|
||||||
|
|
||||||
If drr IsNot Nothing Then
|
If drr IsNot Nothing Then
|
||||||
@@ -39098,13 +39076,12 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
CveAlamcenFiltroDdl = tCveAlmacenExistencia
|
CveAlmacenFiltroDdl = tCveAlmacenExistencia
|
||||||
If Not CveAlamcenFiltroDdl > 0 Then
|
If Not CveAlmacenFiltroDdl > 0 Then
|
||||||
CveAlamcenFiltroDdl = If(CveAlmacenAsignado > 0, CveAlmacenAsignado, -1)
|
CveAlmacenFiltroDdl = If(CveAlmacenAsignado > 0, CveAlmacenAsignado, -1)
|
||||||
End If
|
End If
|
||||||
DdlPS.ddlWS.Attributes.Remove("data-CveAlmacen")
|
DdlPS.ddlWS.Attributes.Remove("data-CveAlmacen")
|
||||||
DdlPS.ddlWS.Attributes.Add("data-CveAlmacen", CveAlamcenFiltroDdl.ToString)
|
DdlPS.ddlWS.Attributes.Add("data-CveAlmacen", CveAlmacenFiltroDdl.ToString)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user