From c22c696de823d015b77a178cd18ab9514eb002c8 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Sat, 11 Jan 2020 10:43:06 -0700 Subject: [PATCH] agregando kilometraje a la interfaz de ventas, solo aparece si es empresa llantera --- Ventas/Ventas.aspx | 8 +++++++- Ventas/Ventas.aspx.vb | 14 +++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index a57297234..6fa1b3ceb 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -3239,7 +3239,13 @@ - + + Kilometraje  + + + + + diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 980e7ae74..1765b3c67 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2522,7 +2522,8 @@ Partial Class Ventas DivMesesSinIntereses.Visible = True DivDdlCuentaTarjetaCredito.Attributes.Add("class", "col-md-4") DivContadoOtros.Visible = True - + TrKilometraje.Visible = True + TrKilometrajeTxt.Visible = True End If End If @@ -3841,7 +3842,7 @@ Partial Class Ventas HdnIVAOriginal.Value = TxtIVA.Text TxtPedidoContrato.Text = DbRowVenta("PedidoContrato").ToString TxtPedidoContrato.Enabled = False - + TxtKilometraje.Text = DbRowVenta("Kilometraje").ToString HdnAmortizacion.Value = LblAmort.Text.ToDouble.ToString HdnSubTotalDescuestos.Value = (TxtSubTotal.Text.Replace(",", "").ToDouble - LblDescuentos.Text.Replace(",", "").ToDouble - LblAmortizacion.Text.Trim.Replace(",", "").ToDouble - TxtRetISR.Text.Replace(",", "").ToDouble).FormatoNumero(2) @@ -9123,7 +9124,8 @@ Partial Class Ventas CveMetodoPago33:=factura.CveMetodoPago33, CveUsoCFDI:=factura.CveUsoCFDI, OrdenCompra:=TxtOrdenCompra.Text, CveCuentaTerminal:=DdlCuentasTerminal.SelectedValue.ToEntero, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal, CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)), CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM, - DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False)) Then + DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False), + Kilometraje:=If(TrKilometrajeTxt.Visible AndAlso IsNumeric(TxtKilometraje.Text), TxtKilometraje.Text.ToDouble, -1)) Then ErrorList.Add("Ocurrió un error al Generar la Venta.
Revise su factura y cualquier detalle comuníquese a Soporte Técnico") @@ -16404,7 +16406,9 @@ Partial Class Ventas If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim, UsuarioActual.CveEmpresa, CveVenta, 0, 0, Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1), - PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero, CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, TipoDocto:="Rem", CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal) Then + PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero, + CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, TipoDocto:="Rem", CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, + OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=If(TrKilometrajeTxt.Visible AndAlso IsNumeric(TxtKilometraje.Text), TxtKilometraje.Text.ToDouble, -1)) Then OcurrioError = True End If @@ -22076,7 +22080,7 @@ Partial Class Ventas Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1), PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero, CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, - TipoDocto:=DdlTipoComprobante.SelectedValue) Then + TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=If(TrKilometrajeTxt.Visible AndAlso IsNumeric(TxtKilometraje.Text), TxtKilometraje.Text.ToDouble, -1)) Then MensajeError = "Ocurrió un error al actualizar la información de la cotización" OcurrioError = True End If