From 3f5ec13536d26162677f533379928d0f052712f8 Mon Sep 17 00:00:00 2001 From: janeth arvizu Date: Tue, 5 Nov 2019 14:31:55 -0700 Subject: [PATCH] Especificar feria/cambio --- Ventas/Ventas.aspx | 4 ++-- Ventas/Ventas.aspx.vb | 42 +++++++++++++++++++++++++----------------- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index fcf1ed714..564021c75 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -3070,8 +3070,8 @@ - - +<%-- + --%>

diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 587fc5346..7b9a65473 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -3383,7 +3383,7 @@ Partial Class Ventas GvPS.DataBind() 'JJMQ 20160506: Se agrego para la validacion de pago de contado. - CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "") + 'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "") UpContado.Update() UpPS.Update() @@ -4102,7 +4102,7 @@ Partial Class Ventas CalculaTotalesVenta(False) 'JJMQ 20160506: Se agrego para la validacion de pago de contado. - CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "") + 'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "") 'CARGA ANTICIPOS If Not (CveRemision > 0 Or CveCotizacion > 0) Then @@ -4333,7 +4333,7 @@ Partial Class Ventas HdnSubTotalDescuestos.Value = (TxtSubTotal.Text.Replace(",", "").ToDouble - LblDescuentos.Text.Replace(",", "").ToDouble - LblAmortizacion.Text.Trim.Replace(",", "").ToDouble - TxtRetISR.Text.Replace(",", "").ToDouble).FormatoNumero(2) 'JJMQ 20160506: Se agrego para la validacion de pago de contado. - CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "") + 'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "") If DdlVendedor.SelectedValue.ToEntero > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then DdlVendedor.Enabled = False @@ -5865,7 +5865,7 @@ Partial Class Ventas 'JJMQ 20160506: Se agrego para la validacion de pago de contado. - CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "") + 'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "") UpPS.Update() UpContado.Update() @@ -5888,7 +5888,7 @@ Partial Class Ventas Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) 'JJMQ 20160506: Se agrego para la validacion de pago de contado. - CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "") + 'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "") UpContado.Update() End Sub @@ -6997,6 +6997,10 @@ Partial Class Ventas MensajeAlert.AppendFormat("

Se generó una Nota de crédito Folio: {0} amortizando el anticipo
", ObjFacturaDevolucion.Folio) End If + If RBLPago.SelectedValue.ToEntero = 2 And TxtCambio.Text.ToDecimal > 0 Then + MensajeAlert.AppendFormat("

Su cambio es de ${0}
", TxtCambio.Text.ToDecimal.FormatoNumero(2)) + End If + 'MUESTA ALERT OK ' si es elrol 1165-Ventas,EMp:80, o la empresa 119, recarga ventas, para seguir registrando-. Dim Liga = If(UsuarioActual.CveRol = 1165 Or UsuarioActual.CveEmpresa = 119, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", If(CveEmpresaCRM > 0, $"document.location.href=""/CRM/EmpresaCRM.aspx?CveEmpresaCRM={CveEmpresaCRM}"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}&Opt=3"";")) @@ -10300,6 +10304,10 @@ Partial Class Ventas Exit For End If + If DrPago("CveTipoMovimiento").ToString.ToEntero = 8 Then '13 + DrPago("Importe") = DrPago("Importe").ToString.ToDecimal - TxtCambio.Text.ToDecimal + End If + CveIEPago = ObjBancos.AddBancos_IE(DrPago("CveCuenta").ToString.ToEntero, DrPago("CveTipoMovimiento").ToString.ToEntero, Fecha, FolioIE.ToString, String.Format("PAGO: {0}", TxtFolio.Text), DrPago("Importe").ToString.ToDouble, DdlMoneda.SelectedValue.ToEntero, tipoCambio, DrPago("Observaciones").ToString, "", False, False, -1, ObjFactura.CvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=CveCorte, MesesSinIntereses:=DrPago("MesesSinIntereses").ToString.ToEntero) If CveIEPago > 0 Then @@ -10816,7 +10824,7 @@ Partial Class Ventas ViewState("FolioFiscal") = drv("FolioFiscal").ToString 'JJMQ 20160506: Se agrego para la validacion de pago de contado. - CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "") + 'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "") UpContado.Update() If factura.CveCliente > 0 Then @@ -14613,7 +14621,7 @@ Partial Class Ventas HdnIVAOriginal.Value = TxtIVA.Text 'JJMQ 20160506: Se agrego para la validacion de pago de contado. - CVImporteContado.ValueToCompare = Total.ToString + 'CVImporteContado.ValueToCompare = Total.ToString If MensajeCveSAT IsNot Nothing AndAlso MensajeCveSAT.ToString.Length > 0 Then Alert($"Los siguientes conceptos hace falta especificar clave SAT

{MensajeCveSAT.ToString}", TipoMensaje.MsgAdvertencia) @@ -16442,7 +16450,7 @@ Partial Class Ventas 'JJMQ 20160506: Validacion para no pagar de mas a peticion de I.P. Dim abonado = DtPagos.SUM("Importe") Dim saldo = TxtTotal.Text.Replace(",", "").ToDouble - abonado - CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString + 'CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString CargaGridContado() UpContado.Update() @@ -16456,10 +16464,10 @@ Partial Class Ventas If total <= 0 Then Alert("No se ha ingresado importe", TipoMensaje.MsgAdvertencia) : Exit Sub - If DtPagos.SUM("Importe").ToString.ToDecimal + total > TxtTotal.Text.ToDecimal Then - Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor rectifique.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If + 'If DtPagos.SUM("Importe").ToString.ToDecimal + total > TxtTotal.Text.ToDecimal Then + ' Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor rectifique.", TipoMensaje.MsgAdvertencia) + ' Exit Sub + 'End If 'Pago en Efectivo If TxtImporteEfectivo.Text.ToDecimal > 0 Then @@ -16654,7 +16662,7 @@ Partial Class Ventas 'JJMQ 20160506: Validacion para no pagar de mas a peticion de I.P. abonado = DtPagos.SUM("Importe") saldo = TxtTotal.Text.Replace(",", "").ToDouble - abonado - CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString + 'CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString CargaGridContado() UpContado.Update() @@ -16671,10 +16679,10 @@ Partial Class Ventas Retorno = True End If - If DtPagos.SUM("Importe").ToString.ToDecimal > TxtTotal.Text.ToDecimal Then - Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor verifique.", TipoMensaje.MsgAdvertencia) - Retorno = True - End If + 'If DtPagos.SUM("Importe").ToString.ToDecimal > TxtTotal.Text.ToDecimal Then + ' Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor verifique.", TipoMensaje.MsgAdvertencia) + ' Retorno = True + 'End If Return Retorno End Function