diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index c8917cf1b..593569762 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -583,12 +583,27 @@ Public Class ClsAcumuladores End Try Return Retorno - End Function + End Function + + Public Function GetNuevoConsecutivoFolio(CveFolioGarantia As Integer) As Boolean + Dim Retorno As Boolean = False + SqlDataAdapter(String.Format("SELECT MAX(Consecutivo) + 1 AS NuevoConsecutivo FROM Acum_GarantiasDetalle d WHERE d.CveFolioGarantia = {0}", CveFolioGarantia), CommandType.Text) + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError(String.Format("Ocurrió un error al consultar un nuevo consecutivo para el folio {0}", CveFolioGarantia), ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + + #End Region - + #Region " GARANTÍAS MESES " - + Public Function GarantiasMesesGet(CveGarantiaMes As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional CveTipoUso As Integer = -1, Optional Mes As Integer = -1) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable diff --git a/Inventarios/InventarioFisicoDetalle.aspx b/Inventarios/InventarioFisicoDetalle.aspx index 2a55c0a31..5499ab0b4 100644 --- a/Inventarios/InventarioFisicoDetalle.aspx +++ b/Inventarios/InventarioFisicoDetalle.aspx @@ -89,21 +89,30 @@ -
  • - -
  • -
  • - -
  • -
  • - Imprimir PDF -
  • -
  • - Imprimir PDF Resumido -
  • -
  • - Imprimir EXCEL -
  • + + +
  • + +
  • +
  • + +
  • +
  • + Imprimir PDF +
  • +
  • + Imprimir PDF Resumido +
  • +
  • + Imprimir EXCEL +
  • +
    + + + + + +
    diff --git a/Inventarios/InventarioFisicoDetalle.aspx.vb b/Inventarios/InventarioFisicoDetalle.aspx.vb index 33153f984..c07b9ca77 100644 --- a/Inventarios/InventarioFisicoDetalle.aspx.vb +++ b/Inventarios/InventarioFisicoDetalle.aspx.vb @@ -432,8 +432,8 @@ Partial Class Inventarios_InventarioFisicoDetalle Protected Sub Impimir(Optional Formato As String = "PDF", Optional Agrupar As Boolean = False) Dim DtDatos As New DataTable Dim ObjInventario As New ClsInventarios() - If ObjInventario.GetInventarioFisicoDetalle(CveInventarioFisico, UsuarioActual.CveUsuario, Agrupar:=Agrupar) Then - DtDatos = ObjInventario.DtResultados + If ObjInventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue, Agrupar:=Agrupar) Then + DtDatos = ObjInventario.DtResultados.Copy End If ObjInventario.Dispose() diff --git a/Inventarios/Kardex.aspx.vb b/Inventarios/Kardex.aspx.vb index 2f9fdb888..b6fe14ec1 100644 --- a/Inventarios/Kardex.aspx.vb +++ b/Inventarios/Kardex.aspx.vb @@ -343,11 +343,16 @@ Partial Class Inventarios_Kardex EntradaSalida = " Solo Salidas" End If + Dim CveTiposAlmacen = "" + For Each item As ListItem In CBLTiposAlmacen.Items + CveTiposAlmacen += If(item.Selected, $"{item.Value},", "") + Next + Dim Serie As String = If(TxtSerie.Text <> "", TxtSerie.Text, "-1") Dim SerieAgrupado As String = If(TxtSerie.Text = "", "", $"Existencia y costos calculada por numero de serie: {TxtSerie.Text} ") - If Movimientos.GetKardex(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, "1", DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ChkAgruparAlmacen.Checked, Serie) Then + If Movimientos.GetKardex(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, CveTiposAlmacen.Substring(0, CveTiposAlmacen.Length - 1), DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ChkAgruparAlmacen.Checked, Serie) Then Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index a763ee493..f2660bbdf 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -2840,7 +2840,7 @@
    - + diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index eb7260310..1ea131f5e 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -5427,6 +5427,16 @@ Partial Class PV RegistraScript("Recalcula();", "Recalcula") End Sub + Protected Sub DdlFolioGarantia_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlFolioGarantia.SelectedIndexChanged + Dim ObjAcumuladores As New ClsAcumuladores + If ObjAcumuladores.GetNuevoConsecutivoFolio(DdlFolioGarantia.SelectedValue.ToEntero) Then + Dim resultado As String = ObjAcumuladores.DtResultados.FiltroPrimeroValor("NuevoConsecutivo") + TxtConsecutivoAjuste.Text = resultado + UpAjuste.Update() + End If + ObjAcumuladores.Dispose() + End Sub + #End Region #Region "U S A D O S"