diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index c2a581513..82049c6a4 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -4565,7 +4565,7 @@ Public Class ClsInventarios
Return Retorno
End Function
- Public Function AddTrasladoSolicitudDetalle(CveTrasladoSolicitud As Integer, Cantidad As Integer, CveUM As Integer, CvePS As Integer, Precio As Decimal, Observaciones As String,
+ Public Function AddTrasladoSolicitudDetalle(CveTrasladoSolicitud As Integer, Cantidad As Decimal, CveUM As Integer, CvePS As Integer, Precio As Decimal, Observaciones As String,
CveContratoDetalle As Integer, Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Boolean
Dim Retorno As Boolean = False
Dim CveTraspasoSolicitud As Integer = 0
@@ -4573,7 +4573,7 @@ Public Class ClsInventarios
With SqlAdapter.SelectCommand.Parameters
.Add("@CveTrasladoSolicitud", SqlDbType.Int).Value = CveTrasladoSolicitud
- .Add("@Cantidad", SqlDbType.Int).Value = Cantidad
+ .Add("@Cantidad", SqlDbType.Money).Value = Cantidad
.Add("@CveUM", SqlDbType.Int).Value = CveUM
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@Precio", SqlDbType.Float).Value = Precio
@@ -4597,6 +4597,41 @@ Public Class ClsInventarios
Return Retorno
End Function
+
+ Public Function UpdateTrasladoSolicitudDetalle(CveTrasladoSolicitudDetalle As Integer, CveEmpresa As Integer, CveTrasladoSolicitud As Integer, Cantidad As Decimal, CveUM As Integer, CvePS As Integer, Precio As Decimal, Observaciones As String,
+ CveContratoDetalle As Integer, Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Boolean
+ Dim Retorno As Boolean = False
+ Dim CveTraspasoSolicitud As Integer = 0
+ DataAdapter("PA_Inv_TraspasoSolicitudDetalleUpdate")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveTrasladoSolicitudDetalle", SqlDbType.Int).Value = CveTrasladoSolicitudDetalle
+ .Add("@CveTrasladoSolicitud", SqlDbType.Int).Value = CveTrasladoSolicitud
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@Cantidad", SqlDbType.Money).Value = Cantidad
+ .Add("@CveUM", SqlDbType.Int).Value = CveUM
+ .Add("@CvePS", SqlDbType.Int).Value = CvePS
+ .Add("@Precio", SqlDbType.Float).Value = Precio
+ .Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
+ .Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
+ .Add("@Serie", SqlDbType.NVarChar).Value = Serie
+ .Add("@Lote", SqlDbType.NVarChar).Value = Lote
+ .Add("@FechaCaducidad", SqlDbType.Date).Value = FechaCaducidad
+
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch Ex1 As SqlException
+ Me.OnError("Ocurrió un error al actualizar los detalles del movimiento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ Catch ex As Exception
+ OnError("Ocurrió un error al actualizar los detalles del movimiento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
Public Function AddTrasladoSolicitudGet(CveTrasladoSolicitud As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
Dim CveTraspasoSolicitud As Integer = 0
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index 3d72b5bff..7c81bf728 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -293,7 +293,7 @@ Public Class ClsVentas
Public Function GetVentas(CveEmpresa As Integer, TipoDocto As String, Serie As String, Folio As Integer, Codigo As String, CveCliente As Integer,
CveSubProyecto As Integer, CveEstatus As Integer, CveUsuario As Integer, FechaI As String, FechaF As String, FolioFiscal As String, Optional CveClienteSucursal As Integer = -1, Optional CvePS As Integer = -1, Optional PedidoContrato As String = "-1",
Optional OrdenCompra As String = "-1", Optional CveUsuarioConsulta As Integer = -1, Optional ClienteRFC As String = "-1",
- Optional CveEmpresaCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional TopSelect As Integer = 1000) As Boolean
+ Optional CveEmpresaCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional TopSelect As Integer = 1000, Optional CveVendedor As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasGetBuscar")
@@ -319,6 +319,7 @@ Public Class ClsVentas
.Add("@CveEmpresaCRM", SqlDbType.Int).Value = CveEmpresaCRM
.Add("@CveAcercamientoCRM", SqlDbType.Int).Value = CveAcercamientoCRM
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
+ .Add("@CveVendedorFiltro", SqlDbType.Int).Value = CveVendedor
End With
Try
diff --git a/Inventarios/TrasladoSolicitud.aspx b/Inventarios/TrasladoSolicitud.aspx
index fbb09ad01..a12e04e17 100644
--- a/Inventarios/TrasladoSolicitud.aspx
+++ b/Inventarios/TrasladoSolicitud.aspx
@@ -299,7 +299,7 @@
diff --git a/Inventarios/TrasladoSolicitud.aspx.vb b/Inventarios/TrasladoSolicitud.aspx.vb
index bcd68055d..a6ddafa5f 100644
--- a/Inventarios/TrasladoSolicitud.aspx.vb
+++ b/Inventarios/TrasladoSolicitud.aspx.vb
@@ -503,8 +503,9 @@ Partial Class Inventarios_TrasladoSolicitud
TextoExistencia.Append("Los siguiente productos no tienen existencia: ")
For Each gvr As GridViewRow In GvSolicitudes.Rows
- Dim Existencia As Decimal = 0
+
+ Dim Existencia As Decimal = 0
Dim MsgAdicional As String = ""
If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, CveAlmacenOrigen, FechaMovto:=NowADS.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=-1, Serie:="-1", Lote:="-1", Caducidad:=MinFecha) Then
@@ -606,15 +607,32 @@ Partial Class Inventarios_TrasladoSolicitud
For Each gvr As GridViewRow In GvSolicitudes.Rows
- Dim Cantidad As Decimal = gvr.FCTextBox("TxtCantidad").Text.ToDecimal
- If gvr.FCCheckBox("Chk").Checked AndAlso Cantidad > 0 Then
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, CveAF:=-1, CveSeccionAlmacen:=-1, Serie:="-1", Lote:="-1", FechaCaducidad:=MinFecha, Observaciones:="") Then
+ Dim CveTrasladoSolicitudDetalle As Integer = gvr.DataKey("CveTrasladoSolicitudDetalle").ToEntero
+ Dim CantidadOriginal As Decimal = gvr.DataKey("Cantidad").ToDecimal
+ Dim CantidadAceptada As Decimal = gvr.FCTextBox("TxtCantidad").Text.ToDecimal
+
+
+ If gvr.FCCheckBox("Chk").Checked AndAlso CantidadAceptada > 0 Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadAceptada, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, CveAF:=-1, CveSeccionAlmacen:=-1, Serie:="-1", Lote:="-1", FechaCaducidad:=MinFecha, Observaciones:="") Then
ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de salida"
Exit For
End If
+
+ If CantidadOriginal <> CantidadAceptada Then
+ If Not ObjInventario.UpdateTrasladoSolicitudDetalle(CveTrasladoSolicitudDetalle, UsuarioActual.CveEmpresa, -1, CantidadAceptada, -1, -1, -1, "-1", -1, "-1", "-1", MinFecha) Then
+ ErrorMovInv = True
+ TextoError = "Ocurrió un error al actuazliar el detalle de traslado"
+ Exit For
+ End If
+ End If
+
Cont += 1
+
End If
+
+
+
Next
'For Each Dr As DataRow In DtMovimientos.RowsF
diff --git a/Ventas/PopUpBuscarFolio.aspx b/Ventas/PopUpBuscarFolio.aspx
index 770e98c2c..9e0fcc890 100644
--- a/Ventas/PopUpBuscarFolio.aspx
+++ b/Ventas/PopUpBuscarFolio.aspx
@@ -164,6 +164,18 @@
+
+
Vendedor:
+
+
+
+
+
+
+
+
+
+
diff --git a/Ventas/PopUpBuscarFolio.aspx.vb b/Ventas/PopUpBuscarFolio.aspx.vb
index 99876fa9b..99717874d 100644
--- a/Ventas/PopUpBuscarFolio.aspx.vb
+++ b/Ventas/PopUpBuscarFolio.aspx.vb
@@ -30,6 +30,9 @@ Partial Class PopUpBuscarFolio
CargaPS(-1)
'CargaCodigoCliente()
+ DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltraParametros("VendedorTipo = 1")
+ DdlVendedor.DataBind()
+
RegistraScript($"$('#{TxtFolio.ClientID}').focus();", "A1")
End If
End Sub
@@ -138,7 +141,7 @@ Partial Class PopUpBuscarFolio
Dim ObjVentas As New ClsVentas()
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, DdlTipoDocto.SelectedValue, Serie, Folio, Codigo, Cliente.ToEntero, DdlSubProyecto.SelectedValue.ToEntero,
DdlEstatusFactura.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, FolioFiscal, If(DdlSucursalCliente.Visible, DdlSucursalCliente.SelectedValue.ToEntero, -1),
- DdlPS.SelectedValue.ToEntero, PedidoContrato:=PeidoContrato, OrdenCompra:=OrdenCompra, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TopSelect:=100) Then
+ DdlPS.SelectedValue.ToEntero, PedidoContrato:=PeidoContrato, OrdenCompra:=OrdenCompra, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TopSelect:=100, CveVendedor:=DdlVendedor.SelectedValue.ToEntero) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
LtlTotalRegistros.Text = ObjVentas.DtResultados.Rows.Count.ToString.FormatoNumero(0)
GV.DataSource = ObjVentas.DtResultados
diff --git a/Ventas/Promociones.aspx b/Ventas/Promociones.aspx
index 5b8f32de4..1aa380ef7 100644
--- a/Ventas/Promociones.aspx
+++ b/Ventas/Promociones.aspx
@@ -217,23 +217,23 @@
<%--5--%>
-
-
-
-
<%--6--%>
-
+
<%--7--%>
-
+
<%--8--%>
-
+
<%--9--%>
+
+ <%--10--%>
+
+ <%--11--%>
- <%--10--%>
+ <%--12--%>
@@ -333,7 +333,7 @@
-
+
diff --git a/Ventas/Promociones.aspx.vb b/Ventas/Promociones.aspx.vb
index ced8bff96..de8564cf0 100644
--- a/Ventas/Promociones.aspx.vb
+++ b/Ventas/Promociones.aspx.vb
@@ -184,7 +184,6 @@ Partial Class Ventas_Promociones
If ChkEstatus.Checked = True And Not PermisoAutorizPromocionPorcentaje Then
BtnGuardar.Visible = False
ButBtnEliminar.Visible = False
- 'UpBotones.Update()
End If
End If
@@ -195,6 +194,13 @@ Partial Class Ventas_Promociones
CreaDT()
End If
+ If EmpresaGrupoDiaz AndAlso Not PermisoAutorizPromocionPorcentaje Then
+ DVUltimoCostoCostoPromedio.Visible = False
+ GvDatos.Columns(6).Visible = False
+ GvDatos.Columns(7).Visible = False
+ End If
+
+ CargaGvBitacora()