From 33c83caf57527f414f477daf05a7dde3bba1c2cd Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 11 Feb 2022 23:45:11 -0700 Subject: [PATCH] litraje --- Ventas/ProductosServicios.aspx | 2 +- Ventas/ProductosServicios.aspx.vb | 4 +- Ventas/RepProductosServiciosDetalle.aspx.vb | 54 +++------------------ 3 files changed, 10 insertions(+), 50 deletions(-) diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index 9d68c30bf..756088bb6 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -264,7 +264,7 @@
- + <%----%> diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index 36978c5c2..8541c148b 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -1372,7 +1372,7 @@ Partial Class ProductosyServicios 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) > 0 Then + CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal) > 0 Then ViewState("CvePS") = ObjProductosServicios.CvePS For Each GVR As GridViewRow In GvImpuestosLocales.Rows If GVR.FCCheckBox("ChkDeduccion").Checked Then @@ -1423,7 +1423,7 @@ 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) Then + CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal) Then If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then TieneError = True diff --git a/Ventas/RepProductosServiciosDetalle.aspx.vb b/Ventas/RepProductosServiciosDetalle.aspx.vb index 48888726d..f23491722 100644 --- a/Ventas/RepProductosServiciosDetalle.aspx.vb +++ b/Ventas/RepProductosServiciosDetalle.aspx.vb @@ -451,12 +451,13 @@ Partial Class Ventas_RepProductosServiciosDetalle DdlGrupo.SelectedValueExist(GPO) RblTipoCambio.SelectedValue = TipoCambio.ToString If TipoCambio > 1 Then CveMoneda = -1 + CargarMarcas(CveMarca) CargaProvedores(CveProveedorCompra) 'If CveProveedorCompra.ToEntero > 0 Then DdlProveedor.SelectedValue = CveProveedorCompra DdlTipoPSDes.SelectedValueExist(CveClasificacionDetalle) - CargaDatos(CveProyecto, CveSubProyecto, CveCategoria, CveClasificacion, CvePS, Mes, MesEjec, CveCliente, CveSubProyectoEjecucion, CveVendedor, CveUsuario, CveEstatus, GPO.ToEntero, TipoDocto, CveMarca, ModalidadContable) - CargarMarcas(CveMarca) + CargaDatos() + End Sub #End Region @@ -497,32 +498,6 @@ Partial Class Ventas_RepProductosServiciosDetalle Agrupador = DdlGrupo.SelectedItem.Text End Sub - Private Sub CargaDatos(CveProyecto As String, CveSubProyecto As String, CveCategoria As String, CveClasificacion As String, CvePS As String, Mes As String, MesEjec As String, CveCliente As Integer, CveSubProyectoEjecucion As String, CveVendedor As Integer, CveUsuario As String, CveEstatus As String, Gpo As Integer, TipoDocto As String, CveMarca As Integer, ModalidadContable As Boolean) - Dim ObjVentas As New ClsVentas() - Dim FechaI, FechaF, FechaIEjec, FechaFEjec As Date - FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha) - FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha) - FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.ToDate, MinFecha) - FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.ToDate, MaxFecha) - Dim CveProveedorCompra As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1) - Dim TipoComprobante As String = If(DdlTipoComprobante.GetSelectedValuesM = "", "-1", DdlTipoComprobante.GetSelectedValuesM) - - If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then TCEspecifico = TxtEspecifico.Text.ToDouble Else TCEspecifico = -1 - - If ObjVentas.GetRepProductosServiciosDetalle(CveProyecto.ToEntero, CveSubProyecto.ToEntero, CveCategoria.ToEntero, CveClasificacion.ToEntero, CvePS.ToEntero, - FechaI, FechaF, Mes.ToEntero, FechaIEjec, FechaFEjec, MesEjec.ToEntero, CveCliente.ToEntero, CveSubProyectoEjecucion.ToEntero, - CveVendedor, CveUsuario.ToEntero, CveEstatus.ToEntero, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, - GPO:=Gpo, CveMoneda:=CveMoneda, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, - CveProveedorCompra:=CveProveedorCompra, CveMarca:=CveMarca, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then - GvDatos.DataSource = ObjVentas.DtResultados - TmpDT = ObjVentas.DtResultados - Else - GvDatos.DataSource = Nothing - End If - ObjVentas.Dispose() - GvDatos.DataBind() - Agrupador = DdlGrupo.SelectedItem.Text - End Sub Protected Sub BtnTipoCambio_Click(sender As Object, e As EventArgs) CargaDatos() RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio")) @@ -533,14 +508,10 @@ Partial Class Ventas_RepProductosServiciosDetalle DivMarca.Visible = True LblMarca.Visible = True - Dim ObjMarcas As New ClsProductosServicios - If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then - DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados - ObjMarcas.Dispose() - DdlMarcaPSDes.DataBind() - End If + DdlMarcaPSDes.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa) + DdlMarcaPSDes.DataBind() End If - DdlMarcaPSDes.Items.Insert(0, New ListItem(" - ", "-1")) + DdlMarcaPSDes.Items.Insert(0, New ListItem("Todas", "-1")) DdlMarcaPSDes.Items.FindByValue(CStr(CveMarca)).Selected = True End Sub #End Region @@ -573,14 +544,7 @@ Partial Class Ventas_RepProductosServiciosDetalle End If Else If Not e.Row.DBCampo("CveVenta").ToEntero > 0 Then - 'e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center - 'e.Row.Cells(0).Width = Unit.Pixel(200) - 'e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center - 'e.Row.Cells(1).Width = Unit.Pixel(60) - 'e.Row.Cells(2).Width = Unit.Pixel(90) - 'e.Row.Cells(3).Width = Unit.Pixel(90) - 'e.Row.Cells(5).Width = Unit.Pixel(80) - 'e.Row.Cells(8).Width = Unit.Pixel(100) + If e.Row.DBCampo("Gpo") = "" Then e.Row.Cells(5).Text = e.Row.DBCampo("Moneda").ToString e.Row.CssClass = "Totales" @@ -593,9 +557,6 @@ Partial Class Ventas_RepProductosServiciosDetalle End If - - - 'Dim FechaI, FechaF As String 'FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") 'FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") @@ -663,7 +624,6 @@ Partial Class Ventas_RepProductosServiciosDetalle DdlProveedor.Attributes.Add("data-metodo", "getproveedores") DdlProveedor.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RazonSocial", String.Format("CveProveedor = {0}", CveProveedor)) Else - DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DdlProveedor.DataBind() DdlProveedor.ddl.Items.Insert(0, New ListItem("Todos", "-1"))