This commit is contained in:
rrene
2020-05-30 15:34:48 -07:00
4 changed files with 18 additions and 14 deletions

View File

@@ -2943,7 +2943,7 @@ Public Class ClsInventarios
DataAdapter("Vta_UpdateDevolucionVentaDetalle")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVenta
.Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVentaDetalle
.Add("@Valor", SqlDbType.Int).Value = Valor
End With

View File

@@ -660,8 +660,9 @@ Partial Class Inventarios_EntregaAlmacen
Alert("Ocurrió un error al cargar los datos de devolución. Por favor vuelva a intentar.", TipoMensaje.MsgError)
End If
End If
CargaDocumentos(CveVenta)
If UsuarioActual.Empresa.FacturaProduccion Then
CargaDocumentos(CveVenta)
End If
Else
Alert("No se encontraron productos pendientes por surtir. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
End If

View File

@@ -5152,7 +5152,9 @@ Partial Class Ventas
CargarAlmacenes()
CargaDocumentacionCliente()
If UsuarioActual.Empresa.FacturaProduccion Then
CargaDocumentacionCliente()
End If
If UsuarioActual.CveEmpresa.Contiene(72, 80, 1, 119) Then
BtnEmitirImprimir.OnClientClick = $"ValidaGuardar({ If(ImprimeNombreSucursal = True, 1, 0)});"
@@ -7029,7 +7031,7 @@ Partial Class Ventas
'MARCA LO PENDIENTE A NIVEL DETALLE
Dim DtMovDetalles As DataTable = Nothing
If ObjInventario.GetSaldoVentaDetalle(ObjFactura.CveVenta, UsuarioActual.CveEmpresa) Then
If ObjInventario.GetSaldoVentaDetalle(CveDevolucion, UsuarioActual.CveEmpresa) Then
DtMovDetalles = ObjInventario.DtResultados.Copy()
End If
@@ -7037,9 +7039,9 @@ Partial Class Ventas
For Each Row As DataRow In DtMovDetalles.Rows
Dim SaldoAlmacen As Decimal = Row("SaldoAlmacen").ToString().ToEntero()
If SaldoAlmacen < 0 Then
ObjInventario.UpdateEstatusAlmacen(Row("CveVentaDetalle").ToString().ToEntero(), 1)
ObjInventario.UpdateEstatusAlmacen(Row("CveVentaDetalleNueva").ToString().ToEntero(), 1)
ElseIf SaldoAlmacen = 0 Then
ObjInventario.UpdateEstatusAlmacen(Row("CveVentaDetalle").ToString().ToEntero(), 0)
ObjInventario.UpdateEstatusAlmacen(Row("CveVentaDetalleNueva").ToString().ToEntero(), 0)
End If
Next
End If
@@ -19451,6 +19453,7 @@ Partial Class Ventas
Private Sub CancelarDocumento(Optional EsRefacturacion As Boolean = False)
Dim LigaRedirigir As String = ""
'Si es cancelacion de una refactura ignoramos las condiciones
If Me.CveEstatus = 13 Then
CancelarRefacturada()
@@ -19495,11 +19498,9 @@ Partial Class Ventas
Else
If EsRefacturacion Then
If resp.CveEstatus = 20 Then
ObjFacturaCancelacion.Dispose()
Server.Transfer($"/Ventas/RepCancelacionesPorRespuesta.aspx?CveVenta={CveVenta}")
LigaRedirigir = $"/Ventas/RepCancelacionesPorRespuesta.aspx?CveVenta={CveVenta}"
ElseIf resp.CveEstatus.Contiene(4, 5) Then
ObjFacturaCancelacion.Dispose()
Server.Transfer($"Ventas.aspx?CveDevolucion={CveVenta}&NuevaFactura=1")
LigaRedirigir = $"Ventas.aspx?CveDevolucion={CveVenta}&NuevaFactura=1"
Else
Alert(resp.Mensaje, resp.TipoMensaje, JSBtnAceptar:="BtnRefrescarPagina();")
End If
@@ -19507,8 +19508,6 @@ Partial Class Ventas
Alert(resp.Mensaje, resp.TipoMensaje, JSBtnAceptar:="BtnRefrescarPagina();")
End If
End If
ObjFacturaCancelacion.CveAlmacen = -1
Else
Alert("Ocurrió un error al generar la cancelación", TipoMensaje.MsgError)
End If
@@ -19520,6 +19519,10 @@ Partial Class Ventas
UpEstatus.Update()
If Not String.IsNullOrEmpty(LigaRedirigir) Then
Response.Redirect(LigaRedirigir)
End If
End Sub

View File

@@ -633,7 +633,7 @@ Public Class WSApp
Dim retorno As String = "[]"
Dim CvePS = -1
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSExistencias(CvePS, CvePrecioLista, -1, CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm")) Then
If ObjPS.GetPSExistenciasWS(CvePS, CvePrecioLista, -1, CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm")) Then
If CveClasificacion > 0 Then
retorno = ObjPS.DtResultados.FiltraParametros($"CveClasificacion = {CveClasificacion}").ToJson()
Else