diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 94e2c239f..61708bf2c 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -7376,7 +7376,7 @@ Partial Class Ventas 'VALIDA PROMOCIONES Y EXISTENCIAS Dim ObjVentas As New ClsVentas - If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveCliente, DdlVendedor.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then + If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveCliente, DdlVendedor.SelectedValue.ToEntero(), 1, UsuarioActual.CveEmpresa) Then DtPromociones = ObjVentas.DtResultados End If ObjVentas.Dispose() @@ -16092,7 +16092,7 @@ Partial Class Ventas 'VALIDA PROMOCIONES Dim ObjVentas As New ClsVentas - If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveCliente, DdlVendedor.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then + If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveCliente, DdlVendedor.SelectedValue.ToEntero(), 1, UsuarioActual.CveEmpresa) Then DtPromociones = ObjVentas.DtResultados End If ObjVentas.Dispose() @@ -22806,11 +22806,6 @@ Partial Class Ventas Return False End If - 'If AplicaSeccion Then - ' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero - 'Else - ' CveSeccionAlmacen = -1 - 'End If CveSeccionAlmacen = -3 If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, 1, CveUnidad, CveProducto, 0, -1, Serie:=Dr2("Serie").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then @@ -22823,11 +22818,6 @@ Partial Class Ventas Return False End If - 'If AplicaSeccion Then - ' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero - 'Else - ' CveSeccionAlmacen = -1 - 'End If CveSeccionAlmacen = -3 If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, Cantidad, CveUnidad, CveProducto, 0, -1, CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then @@ -22894,7 +22884,7 @@ Partial Class Ventas dtvirtual = ObjInventario.DtResultados If dtvirtual.Rows.Count > 0 Then - CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", Modulo:="VV2", CveMovimientoRelacionado:=CveMovimientoSalidaGeneral) + CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, factura.CveVenta, -1, -1, Observaciones:="", Modulo:="VV2", CveMovimientoRelacionado:=CveMovimientoSalidaGeneral) 'FolioVirtualSalida = ObjInventario.Folio For Each RowVirtual As DataRow In dtvirtual.Rows @@ -22907,10 +22897,14 @@ Partial Class Ventas Return False End If Next + Else + Return False End If Else Return False End If + Else + Return False End If End If