Especificar feria/cambio

This commit is contained in:
janeth arvizu
2019-11-05 14:31:55 -07:00
parent 06c98f6c9b
commit 3f5ec13536
2 changed files with 27 additions and 19 deletions

View File

@@ -3070,8 +3070,8 @@
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtImporteContado" FilterType="Custom, Numbers" ValidChars=".," />
<asp:CompareValidator ID="CVImporteContado" runat="server" ControlToValidate="TxtImporteContado" Display="None" ErrorMessage="Importe excedido." Operator="LessThanEqual" Type="Double" ValidationGroup="GrpAgregarPago"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CVImporteContado" Width="300px"></ajax:ValidatorCalloutExtender>
<%-- <asp:CompareValidator ID="CVImporteContado" runat="server" ControlToValidate="TxtImporteContado" Display="None" ErrorMessage="Importe excedido." Operator="LessThanEqual" Type="Double" ValidationGroup="GrpAgregarPago"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CVImporteContado" Width="300px"></ajax:ValidatorCalloutExtender>--%>
<br></br>
</div>
</div>

View File

@@ -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("<br/><br/><b> Se generó una Nota de crédito Folio: {0} amortizando el anticipo </b><br/>", ObjFacturaDevolucion.Folio)
End If
If RBLPago.SelectedValue.ToEntero = 2 And TxtCambio.Text.ToDecimal > 0 Then
MensajeAlert.AppendFormat("<br/><br/>Su cambio es de <b>${0}</b><br/>", 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 <br/><br/> {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