This commit is contained in:
rakcsle
2021-08-19 10:44:49 -07:00
4 changed files with 21 additions and 39 deletions

View File

@@ -1905,7 +1905,7 @@ Public Class ClsInventarios
Return Retorno
End Function
Public Function RepTraspasoAlmacen(FechaI As Date, FechaF As Date, CveAlmacenOrigen As Integer, CveAlmacenDestino As Integer, Recibido As Boolean, CveEmpresa As Integer) As Boolean
Public Function RepTraspasoAlmacen(FechaI As Date, FechaF As Date, CveAlmacenOrigen As Integer, CveAlmacenDestino As Integer, Recibido As Boolean, CveTipoAlmacen As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_RepTraspasoAlmacen")
@@ -1915,6 +1915,7 @@ Public Class ClsInventarios
.Add("@CveAlmacenOrigen", SqlDbType.Int).Value = CveAlmacenOrigen
.Add("@CveAlmacenDestino", SqlDbType.Int).Value = CveAlmacenDestino
.Add("@Recibido", SqlDbType.Bit).Value = Recibido
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try

View File

@@ -187,6 +187,11 @@
<div class="col-md-2">
<asp:CheckBox ID="ChkRecibido" runat="server" CssClass="make-switchsd" data-size="small" Text=" " />
</div>
<div class="col-md-1 truncate v-center" style="text-align: right!important">Tipo Almacen:</div>
<div class="col-md-2 v-center">
<asp:DropDownList ID="DdlTipoAlmacen" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Style="width: 100%;" runat="server"></asp:DropDownList>
</div>
</div>
</div>
</div>

View File

@@ -74,7 +74,7 @@ Partial Class RepTraspasoAlmacen
'Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString
If ObjInventarios.RepTraspasoAlmacen(FechaI.ToDate, FechaF.ToDate, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, ChkRecibido.Checked, UsuarioActual.CveEmpresa) Then
If ObjInventarios.RepTraspasoAlmacen(FechaI.ToDate, FechaF.ToDate, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, ChkRecibido.Checked, UsuarioActual.CveEmpresa, DdlTipoAlmacen.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjInventarios.DtResultados
DtInventarios = ObjInventarios.DtResultados
GvDatos.Columns(5).Visible = DtInventarios.MAX("Serie") <> ""
@@ -119,6 +119,12 @@ Partial Class RepTraspasoAlmacen
DdlAlmacenOrigen.SelectedValue = "-1"
DdlAlmacenOrigen.DataBind()
DdlAlmacenOrigen.SelectedValueExist(UsuarioActual.CveAlmacen)
DdlTipoAlmacen.DataSource = GlobalDTTipoAlmacen(1).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11,21)")
DdlTipoAlmacen.DataBind()
DdlTipoAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
Private Sub CargaAlmacenDestino()
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11,21)")

View File

@@ -6594,7 +6594,8 @@ Partial Class Ventas
End If
Dim cvesubproyecto As String = DdlSubProyectoDatos.SelectedValue
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
If UsuarioActual.Empresa.Funcionalidad(558) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
'cuando es empresa llantera (558) o cuando es empresa acumuladores
cvesubproyecto = "-1"
End If
@@ -19180,41 +19181,7 @@ Partial Class Ventas
Dim CveAlmacenVirtual As Integer = -1
Dim CveConceptoMovimientoVirtual As Integer = 37
Dim DtPSVirtual As DataTable = Nothing
'Dim DtTamanios As DataTable = Nothing
' Dim CveMovimientoReferencia As Integer = -1
''SI LA REMISION SE SURTIO CON USADOS UTILIZAR ESTE MOVIMIENTO
'If ObjInventario.GetInv_Mov(CveRemision, UsuarioActual.CveEmpresa) Then
' Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND (CveTipoAlmacen = 1 AND CveConcepto IN (3,8)) AND CveVenta > 0")
' If RowMovimiento IsNot Nothing Then
' CveMovimientoReferencia = RowMovimiento("CveMovimiento").ToString().ToEntero()
' Dim tCveAlmacen = RowMovimiento("CveAlmacen").ToString().ToEntero()
' CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
' End If
'Else
' OcurrioError = True
'End If
''SI NO SE SURTIO LA REMSION CON USADOS, UTILIZAR EL MOVIMIENTO DE SALIDA DEL INGRESO
'If CveMovimientoReferencia <= 0 Then
' If ObjInventario.GetInv_Mov(ObjFactura.CveVenta, UsuarioActual.CveEmpresa) Then
' Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND ( (CveTipoAlmacen = 1 AND CveConcepto IN (3,8)) OR (CveTipoAlmacen = 10 AND CveConcepto = 40) ) AND CveVenta > 0")
' If RowMovimiento IsNot Nothing Then
' CveMovimientoReferencia = RowMovimiento("CveMovimiento").ToString().ToEntero()
' Dim tCveAlmacen = RowMovimiento("CveAlmacen").ToString().ToEntero()
' CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
' Else
' OcurrioError = True
' End If
' Else
' OcurrioError = True
' End If
'End If
CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
'SI TIENE ALMACEN VIRTUAL ASIGNADO GENERA EL MOVIMIENTO VIRTUAL
@@ -19226,9 +19193,9 @@ Partial Class Ventas
OcurrioError = True
End If
If Not OcurrioError AndAlso DtPSVirtual.Rows.Count > 0 Then
If Not OcurrioError AndAlso DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/VV", CveMovimientoRelacionado:=CveMovimientoSalidaAlmacen)
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/VV2", CveMovimientoRelacionado:=CveMovimientoSalidaAlmacen)
If CveMovimientoVirtual > 0 Then
For Each RowUsado As DataRow In DtPSVirtual.Rows
@@ -19298,6 +19265,9 @@ Partial Class Ventas
End If
End If
Else
Alert("No se tiene definido el almacen virtual.")
OcurrioError = True
End If
Catch ex As Exception