diff --git a/Ventas/PVCobranza.aspx b/Ventas/PVCobranza.aspx
index 1178e920e..74235e10c 100644
--- a/Ventas/PVCobranza.aspx
+++ b/Ventas/PVCobranza.aspx
@@ -706,7 +706,7 @@
@@ -1591,7 +1591,7 @@
} else {
$get("TxtFaltante").value = FormatoNumero(cambio);
$get("ChkSobFaltante").checked = true;
- $get("TxtCambio").value = FormatoNumero(cambio);
+ $get("TxtCambio").value = "";
}
} else {
@@ -1617,15 +1617,26 @@
$('#C_LblDiferenciaCajaBloqueo').val(FormatoNumero(total));
}
+ function ValidaSobranteFaltante() {
+ if (ToDouble($get("TxtFaltante").value) > 1) {
+ alert("El sobrante/faltante no debe ser mayor a 1");
+ $get("TxtFaltante").value = "";
+ $get("ChkSobFaltante").checked = false;
+ } else {
+ $get("ChkSobFaltante").checked = true;
+ }
+ }
+
function CargaSobranteFaltante() {
$('#ChkSobFaltante').change(function () {
if (this.checked == true) {
if (ToDouble($get("TxtCambio").value) > 1) {
alert("El sobrante/faltante no debe ser mayor a 1")
+ $get("ChkSobFaltante").checked = false;
} else {
$get("TxtFaltante").value = $get("TxtCambio").value;
}
-
+
}
else {
$get("TxtFaltante").value = "";
diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb
index efa42fdd2..a9228656f 100644
--- a/Ventas/PVCobranza.aspx.vb
+++ b/Ventas/PVCobranza.aspx.vb
@@ -1601,7 +1601,6 @@ Partial Class Ventas_PVCobranza
Dim Importe = GvRowAnticipo.FCTextBox(String.Format("TxtAnticipo{0}", GvRowAnticipo.RowIndex)).Text.ToDecimal()
Dim CveConceptoContable = GvRowAnticipo.DataKey("CveConceptoContable").ToEntero()
-
Dim FolioFiscal = GvRowAnticipo.DataKey("FolioFiscal")
Dim Descuentos As Decimal = GvRowAnticipo.DataKey("Descuentos").ToDecimal()
Dim TotalAnticipo As Decimal = GvRowAnticipo.DataKey("TotalAnticipo").ToDecimal()
@@ -1612,8 +1611,10 @@ Partial Class Ventas_PVCobranza
Dim Folio = GvRowAnticipo.DataKey("Folio")
Dim Tipo = GvRowAnticipo.DataKey("Tipo")
-
DtAnticipos.Rows.Add(CveVenta, Importe, CveConceptoContable, CveIE, FolioFiscal, Descuentos, TotalAnticipo, SubTotalAnticipo, CveMoneda, Fecha, TipoCambioPago, Folio, Tipo)
+
+ ObjNC.Observaciones = $"Folio: {GvRowAnticipo.DataKey("Folio")}"
+
End If
ObjNC.EsNCAmortizacion = True
@@ -1708,12 +1709,14 @@ Partial Class Ventas_PVCobranza
'METER LO QUE FALTA COMO GASTO
If (ImporteBancos.RoundSQL(2) + Math.Abs(SobranteFaltante)) = ImporteAbonoVenta.RoundSQL(2) Then
Pago.OtroGastoIngreso = SobranteFaltante.ToString().ToDecimal()
- 'LIMPIAR SOBRANTE/FALTANTE
- SobranteFaltante = 0
+
'SUMAR AL PAGO
If ImporteBancos < ImporteAbonoVenta Then
ImporteBancos += Math.Abs(SobranteFaltante)
End If
+
+ 'LIMPIAR SOBRANTE/FALTANTE
+ SobranteFaltante = 0
End If
End If