From 608ab24d81ad221e04f26fcd10b845d75c5d5bd4 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Wed, 6 Jul 2022 21:32:41 -0700 Subject: [PATCH] Cerrar Fletes, Cerrar importaciones, RSCO Productos servicios, rep productos por caducarse agrega Compuesto --- App_Code/ClsCompras.vb | 3 +- App_Code/ClsInventarios.vb | 3 +- App_Code/ClsProductosServicios.vb | 16 ++++- Ashx/SIGWeb.ashx | 2 +- Compras/Importaciones.aspx | 10 ++++ Compras/Importaciones.aspx.vb | 18 ++++++ Compras/RepImportaciones.aspx | 11 ++++ Compras/RepImportaciones.aspx.vb | 5 +- Inventarios/Consignaciones.aspx.vb | 26 ++++++++- Inventarios/Fletes.aspx | 21 ++++++- Inventarios/Fletes.aspx.vb | 21 +++++++ Inventarios/RepFletes.aspx | 23 ++++++++ Inventarios/RepFletes.aspx.vb | 2 +- Inventarios/RepProductosPorCaducar.aspx | 20 +++++-- Inventarios/RepProductosPorCaducar.aspx.cs | 18 +++++- Ventas/ProductosServicios.aspx | 53 +++++++++++++++++ Ventas/ProductosServicios.aspx.vb | 68 +++++++++++++++++++++- 17 files changed, 298 insertions(+), 22 deletions(-) diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index 5c4bd2ae9..e9431b099 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -1329,7 +1329,7 @@ Public Class ClsCompras #Region "I M P O R T A C I O N E S" - Public Function GetImportaciones(CveImportacion As Integer, CveProveedor As Integer, CveActivoFijo As Integer, FechaInicio As String, FechaFin As String, CveEmpresa As Integer) As Boolean + Public Function GetImportaciones(CveImportacion As Integer, CveProveedor As Integer, CveActivoFijo As Integer, FechaInicio As String, FechaFin As String, CveEmpresa As Integer, Optional CveEstatus As Integer = -1) As Boolean Dim Retorno = False @@ -1342,6 +1342,7 @@ Public Class ClsCompras .Add("@FechaI", SqlDbType.VarChar).Value = FechaInicio .Add("@FechaF", SqlDbType.VarChar).Value = FechaFin .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus End With Try diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 85fdea037..f0a6541c5 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1665,7 +1665,7 @@ Public Class ClsInventarios End Function Public Function GetProductosCaducidad(CveProveedor As Integer, FechaInicio As Date, FechaFin As Date, CveSubProyecto As Integer, CveClasificacion As Integer, CvePS As Integer, - CvesAlmacenes As String, CveUsuario As Integer, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean + CvesAlmacenes As String, CveUsuario As Integer, CveEmpresa As Integer, Optional Opcion As Integer = 1, Optional CveCompuesto As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_ProductosCaducidadGet") @@ -1681,6 +1681,7 @@ Public Class ClsInventarios .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@Opcion", SqlDbType.Int).Value = Opcion + .Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto End With Try diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 3bc1b22f7..be991e0fc 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -416,12 +416,15 @@ Public Class ClsProductosServicios Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "", Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False, - Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0) As Integer + Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0, + Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_ProductosServiciosAdd") With SqlAdapter.SelectCommand.Parameters + + .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion .Add("@CveClasificacionCosto", SqlDbType.Int).Value = CveClasificacionCosto .Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida @@ -506,6 +509,10 @@ Public Class ClsProductosServicios .Add("@Dimensiones", SqlDbType.VarChar).Value = Dimensiones .Add("@CveObjetoImpuesto", SqlDbType.TinyInt).Value = CveObjetoImpuesto + .Add("@RegistroRSCO", SqlDbType.VarChar).Value = RegistroRSCO + .Add("@FechaVigenciaRSCO", SqlDbType.Date).Value = FechaVigenciaRSCO + .Add("@VigenciaIndeterminadaRSCO", SqlDbType.Bit).Value = VigenciaIndeterminadaRSCO + End With Try @@ -653,7 +660,8 @@ Public Class ClsProductosServicios Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1, Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "", Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False, - Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0) As Boolean + Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0, + Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False) As Boolean Dim Retorno As Boolean = False @@ -745,6 +753,10 @@ Public Class ClsProductosServicios .Add("@Dimensiones", SqlDbType.VarChar).Value = Dimensiones .Add("@CveObjetoImpuesto", SqlDbType.TinyInt).Value = CveObjetoImpuesto + .Add("@RegistroRSCO", SqlDbType.VarChar).Value = RegistroRSCO + .Add("@FechaVigenciaRSCO", SqlDbType.Date).Value = FechaVigenciaRSCO + .Add("@VigenciaIndeterminadaRSCO", SqlDbType.Bit).Value = VigenciaIndeterminadaRSCO + End With Try diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index b47839ef4..13be2dac8 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -1647,7 +1647,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState End If End While xtr.Close() - xtr. + End Using If (System.IO.File.Exists(urfile)) Then Dim fechita As DateTime = fecha.ToDateTime() diff --git a/Compras/Importaciones.aspx b/Compras/Importaciones.aspx index b4bb6222c..49b1e34cf 100644 --- a/Compras/Importaciones.aspx +++ b/Compras/Importaciones.aspx @@ -6,6 +6,16 @@ + + + +
  • + +
  • +
    +
    +
    Importaciones diff --git a/Compras/Importaciones.aspx.vb b/Compras/Importaciones.aspx.vb index 37a964e6c..79ca7d049 100644 --- a/Compras/Importaciones.aspx.vb +++ b/Compras/Importaciones.aspx.vb @@ -95,6 +95,11 @@ Partial Class Compras_Importaciones 'HLCompraSerieFolio.NavigateUrl = $"/Compras/Compras.aspx?CveCompra={HdnCveCompra.Value}" 'LbCompraImporte.Text = ObjImportaciones.DtResultados.Rows(0)("Total").ToString + If ObjImportaciones.DtResultados.Rows(0)("CveEstatus").ToString.ToEntero = 0 Then + LnkCerrarImportacion.Visible = True + End If + + HdnCveAF.Value = ObjImportaciones.DtResultados.Rows(0)("CveActivoFijo").ToString VincularAF() @@ -491,4 +496,17 @@ Partial Class Compras_Importaciones + + Protected Sub LnkCerrarImportacion_Click(sender As Object, e As EventArgs) + + + Dim ObjInv As New ClsInventarios + + If ObjInv.UpdateImportacionCierre(CveImportacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then + Alert("Importación cerrada correctamente.", TipoMensaje.MsgInformacion, $" location.href = ""./Importaciones.aspx?CveImportacion={CveImportacion}"" ") + End If + + ObjInv.Dispose() + + End Sub End Class diff --git a/Compras/RepImportaciones.aspx b/Compras/RepImportaciones.aspx index c84fe45cc..b8331f33c 100644 --- a/Compras/RepImportaciones.aspx +++ b/Compras/RepImportaciones.aspx @@ -114,6 +114,17 @@ + +
    Esatus:
    +
    + + + Todos + Activo + Cerrado + + +
    diff --git a/Compras/RepImportaciones.aspx.vb b/Compras/RepImportaciones.aspx.vb index ee7bf6d30..d5e62cbf2 100644 --- a/Compras/RepImportaciones.aspx.vb +++ b/Compras/RepImportaciones.aspx.vb @@ -40,9 +40,11 @@ Partial Class Compras_RepImportaciones #Region " CARGA DAATOS " + Protected Sub BtnConsultarFiltros_Click(sender As Object, e As EventArgs) CargaDatos() End Sub + Private Sub CargaDatos() Dim ObjImportaciones As New ClsCompras Dim FechaI, FechaF As String @@ -50,7 +52,7 @@ Partial Class Compras_RepImportaciones If TxtFechaI.Text <> "" Then FechaI = TxtFechaI.Text Else FechaI = "-1" If TxtFechaF.Text <> "" Then FechaF = TxtFechaF.Text Else FechaF = "-1" - If ObjImportaciones.GetImportaciones(-1, DdlProveedor.SelectedValue.ToString.ToEntero, -1, FechaI, FechaF, UsuarioActual.CveEmpresa) Then + If ObjImportaciones.GetImportaciones(-1, DdlProveedor.SelectedValue.ToString.ToEntero, -1, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero) Then DtImportaciones = ObjImportaciones.DtResultados Else Alert("Ocurrió un error al cargar las importaciones", TipoMensaje.MsgError) @@ -59,6 +61,7 @@ Partial Class Compras_RepImportaciones CargaGrid() End Sub + Private Sub CargaGrid() GvDatos.DataSource = DtImportaciones GvDatos.DataBind() diff --git a/Inventarios/Consignaciones.aspx.vb b/Inventarios/Consignaciones.aspx.vb index 503e5dd85..2110906bf 100644 --- a/Inventarios/Consignaciones.aspx.vb +++ b/Inventarios/Consignaciones.aspx.vb @@ -744,9 +744,33 @@ Partial Class Inventarios_Consignaciones If Not ErrorMovInv Then - If DdlConcepto.SelectedValue = "11" Then + + + Dim ImportePrePoliza As Decimal = DtMovimientos.SUMD("Total") + + + Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL) + + Dim Concepto As String = "Consig" + Dim CvePrePoliza = ObjConta.AddPrePolizas("Entrada/Consignacion", 53, ImportePrePoliza, ImportePrePoliza, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImportePrePoliza, "Entrada por Consignacion", 68, "Entrada por Consignacion", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImportePrePoliza, CveSubProyecto:=-1, Contabilizable:=False) Then + ErrorMovInv = True End If + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImportePrePoliza, "Entrada por Consignacion", 337, "Entrada por Consignacion", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImportePrePoliza, Contabilizable:=False) Then + ErrorMovInv = True + End If + + If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then + If ObjConta.ValorPolizaDescuadre > 0 Then + GuardaLogAD($"Consig | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") + ErrorMovInv = True + End If + End If + + End If diff --git a/Inventarios/Fletes.aspx b/Inventarios/Fletes.aspx index bcd2bac64..1c6c4aa71 100644 --- a/Inventarios/Fletes.aspx +++ b/Inventarios/Fletes.aspx @@ -8,9 +8,24 @@ Costo Indirecto
    -
  • - PDF -
  • + + + +
  • + PDF +
  • +
  • + +
  • +
    + + + +
    + + +
    diff --git a/Inventarios/Fletes.aspx.vb b/Inventarios/Fletes.aspx.vb index 31217cb1a..f9522884b 100644 --- a/Inventarios/Fletes.aspx.vb +++ b/Inventarios/Fletes.aspx.vb @@ -94,6 +94,11 @@ Partial Class Compras_Fletes 'HLOCFolio.NavigateUrl = If(HdnCveOC.Value.ToEntero > 0, $"/OC/OC.aspx?OC={HdnCveOC.Value}", $"/Compras/Compras.aspx?CveCompra={HdnCveCompra.Value}") 'LbOCImporte.Text = $"{ObjInv.DtResultados.Rows(0)("TotalDocumento").ToString.FormatoNumero} {ObjInv.DtResultados.Rows(0)("Moneda").ToString}" + If ObjInv.DtResultados.Rows(0)("CveEstatus").ToString.ToEntero = 0 Then + LnkCerrarFlete.Visible = True + End If + + If ObjInv.GetFleteDetalle(CveFlete) Then DtCompras = ObjInv.DtResultados Else @@ -104,6 +109,9 @@ Partial Class Compras_Fletes GvComprasVinculadas.DataSource = ObjInv.DtResultados End If + + + Else Alert("No se encontró el flete", TipoMensaje.MsgAdvertencia) End If @@ -434,4 +442,17 @@ Partial Class Compras_Fletes End Sub + + Protected Sub LnkCerrarFlete_Click(sender As Object, e As EventArgs) + + + Dim ObjInv As New ClsInventarios + + If ObjInv.UpdateFleteCierre(CveFlete, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then + Alert("Flete cerrado correctamente.", TipoMensaje.MsgInformacion, $" location.href = ""./Fletes.aspx?CveFlete={CveFlete}"" ") + End If + + ObjInv.Dispose() + + End Sub End Class diff --git a/Inventarios/RepFletes.aspx b/Inventarios/RepFletes.aspx index 217c49c07..7745188b2 100644 --- a/Inventarios/RepFletes.aspx +++ b/Inventarios/RepFletes.aspx @@ -40,6 +40,7 @@ +
    @@ -91,9 +92,31 @@
    +
    + + + + +
    +
    +
    Esatus:
    +
    + + + Todos + Activo + Cerrado + + +
    +
    +
    + + +

    diff --git a/Inventarios/RepFletes.aspx.vb b/Inventarios/RepFletes.aspx.vb index abdee8011..f5b5fa434 100644 --- a/Inventarios/RepFletes.aspx.vb +++ b/Inventarios/RepFletes.aspx.vb @@ -49,7 +49,7 @@ Partial Class Compras_RepFletes Dim ObjInv As New ClsInventarios If TxtFolio.Text <> "" Then TxtFechaI.Text = MinFecha.ToShortDateString : TxtFechaF.Text = MaxFecha.ToShortDateString If ObjInv.GetFletesRep(UsuarioActual.CveEmpresa, -1, If(TxtFolio.Text = "", "-1", TxtFolio.Text), DdlProveedores.SelectedValue.ToString.ToEntero, -1, -1, - TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, TipoGasto:=DdlTipoGasto.SelectedValue.ToEntero()) Then + TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, TipoGasto:=DdlTipoGasto.SelectedValue.ToEntero(), CveEstatus:=DdlEstatus.SelectedValue.ToEntero()) Then DtFletes = ObjInv.DtResultados End If ObjInv.Dispose() diff --git a/Inventarios/RepProductosPorCaducar.aspx b/Inventarios/RepProductosPorCaducar.aspx index b2dc48c13..69bd14031 100644 --- a/Inventarios/RepProductosPorCaducar.aspx +++ b/Inventarios/RepProductosPorCaducar.aspx @@ -118,7 +118,7 @@
    - +
    @@ -139,10 +139,10 @@
    -
    +
    - +
    @@ -152,13 +152,21 @@
    -
    - +
    + + +
    - +
    +
    + +
    + +
    +
    diff --git a/Inventarios/RepProductosPorCaducar.aspx.cs b/Inventarios/RepProductosPorCaducar.aspx.cs index 4efdf5004..18fc44e5a 100644 --- a/Inventarios/RepProductosPorCaducar.aspx.cs +++ b/Inventarios/RepProductosPorCaducar.aspx.cs @@ -29,10 +29,13 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas CargaFiltros(); CargarDatos(); CargaAlamacenes(); + CargaCompuestos(); } } + + private void CargarDatos() { @@ -47,8 +50,9 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas // aqui siempre se visualiza la caducidad, sin importar la condición, porque siempre se valida la caducidad ClsInventarios ObjInventarios = new ClsInventarios(); if (ObjInventarios.GetProductosCaducidad(DdlProveedor.SelectedValue.ToEntero(), FI, TxtFechaFin.Text.ToDate(), DdlSucursal.SelectedValue.ToEntero(), - DdlClasificacion.SelectedValue.ToEntero(), CvePS, Cves_Alamcenes, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Opcion: DdlOpcion.SelectedValue.ToEntero())) - { + DdlClasificacion.SelectedValue.ToEntero(), CvePS, Cves_Alamcenes, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Opcion: DdlOpcion.SelectedValue.ToEntero(), + CveCompuesto: DdlCompuesto.SelectedValue.ToEntero() )) + { GvDatos.DataSource = ObjInventarios.DtResultados; DTDatos = ObjInventarios.DtResultados; if (DdlOpcion.SelectedValue == "1") @@ -75,6 +79,16 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas } + + private void CargaCompuestos() + { + ClsProductosServicios ObjPS = new ClsProductosServicios(); + ObjPS.GetCompuestosActivos(UsuarioActual.CveEmpresa); + DdlCompuesto.DataSource = ObjPS.DtResultados; + ObjPS.Dispose(); + DdlCompuesto.DataBind(); + DdlCompuesto.Items.Insert(0, new ListItem("Todos", "-1")); + } private void CargarFechaText() { DateTime date = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1); diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index f8c4c5040..85a05dc7a 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -263,6 +263,59 @@ + + +
    +
    +
    +
    + + + <%----%> + +
    + + +
    + +
    + +
    + + +
    + +
    +
    + + + +
    + + + + + + + + + + <%----%> + + + <%----%> + + + + +
    + + + +
    <%----%> diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index 33bdf5a4b..639e97c8f 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -220,6 +220,18 @@ Partial Class ProductosyServicios End If End If + + If UsuarioActual.Empresa.Funcionalidad(143) = "1" Then + + DivRegistroRSCO1.Visible = True + DivRegistroRSCO2.Visible = True + DivRegistroRSCO3.Visible = True + + TxtRegistroRSCO.Text = "" + TxtFechaVigenciaRSCO.Text = "" + ChkFechaIndeterminadaRSCO.Checked = False + End If + End If If Request("Ret") IsNot Nothing AndAlso Request("Ret").ToString <> "" Then @@ -1000,6 +1012,35 @@ Partial Class ProductosyServicios ChkPrecioLibre.Checked = ObjProductosServicios.PrecioLibre + + If UsuarioActual.Empresa.Funcionalidad(143) = "1" Then + + TxtRegistroRSCO.Text = ObjProductosServicios.DtResultados.Rows(0)("RegistroRSCO").ToString + ChkFechaIndeterminadaRSCO.Checked = Boolean.Parse(ObjProductosServicios.DtResultados.Rows(0)("VigenciaIndeterminadaRSCO").ToString) + + + DivRegistroRSCO1.Visible = True + DivRegistroRSCO2.Visible = True + + + If ChkFechaIndeterminadaRSCO.Checked Then + TxtFechaVigenciaRSCO.Text = "01/01/1900" + Else + TxtFechaVigenciaRSCO.Text = ObjProductosServicios.DtResultados.Rows(0)("FechaVigenciaRSCO").ToString.ToDate.ToString("dd/MM/yyyy") + DivRegistroRSCO3.Visible = True + End If + + + + + Else + TxtRegistroRSCO.Text = "" + TxtFechaVigenciaRSCO.Text = "01/01/1900" + ChkFechaIndeterminadaRSCO.Checked = False + End If + + + Else Alert("El Producto o Servicio Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia) RegistraScript("$('#C_Tab_TabPaquetes_tab').css('display' , 'none')") @@ -1365,6 +1406,11 @@ Partial Class ProductosyServicios End If End If + + If TxtFechaVigenciaRSCO.Text = "" Then + TxtFechaVigenciaRSCO.Text = "01/01/1900" + End If + If CvePS = -1 Then Dim PSS As String = TxtPS.Text.Trim.Replace("|", "") If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper @@ -1380,8 +1426,8 @@ Partial Class ProductosyServicios CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(), ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked, - CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim, - CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal) > 0 Then + CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim, + CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked) > 0 Then ViewState("CvePS") = ObjProductosServicios.CvePS For Each GVR As GridViewRow In GvImpuestosLocales.Rows If GVR.FCCheckBox("ChkDeduccion").Checked Then @@ -1432,7 +1478,8 @@ Partial Class ProductosyServicios ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked, CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim, - CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal) Then + CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, + RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked) Then If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then TieneError = True @@ -1900,6 +1947,10 @@ Partial Class ProductosyServicios DdlCompuesto.DataSource = PS.DtResultados PS.Dispose() DdlCompuesto.DataBind() + + + + End If End Sub @@ -3183,5 +3234,16 @@ Partial Class ProductosyServicios End Sub + Protected Sub ChkFechaIndeterminadaRSCO_CheckedChanged(sender As Object, e As EventArgs) + DivRegistroRSCO3.Visible = If(ChkFechaIndeterminadaRSCO.Checked, False, True) + + + If TxtFechaVigenciaRSCO.Text = "01/01/1900" Then + TxtFechaVigenciaRSCO.Text = "" + End If + + UpDatos.Update() + + End Sub End Class