Especificar feria/cambio
This commit is contained in:
@@ -3070,8 +3070,8 @@
|
|||||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtImporteContado" FilterType="Custom, Numbers" ValidChars=".," />
|
<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>
|
<%-- <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>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CVImporteContado" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||||
<br></br>
|
<br></br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3383,7 +3383,7 @@ Partial Class Ventas
|
|||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
|
|
||||||
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
||||||
CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||||
|
|
||||||
UpContado.Update()
|
UpContado.Update()
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
@@ -4102,7 +4102,7 @@ Partial Class Ventas
|
|||||||
CalculaTotalesVenta(False)
|
CalculaTotalesVenta(False)
|
||||||
|
|
||||||
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
||||||
CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||||
|
|
||||||
'CARGA ANTICIPOS
|
'CARGA ANTICIPOS
|
||||||
If Not (CveRemision > 0 Or CveCotizacion > 0) Then
|
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)
|
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.
|
'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
|
If DdlVendedor.SelectedValue.ToEntero > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
|
||||||
DdlVendedor.Enabled = False
|
DdlVendedor.Enabled = False
|
||||||
@@ -5865,7 +5865,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
|
|
||||||
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
||||||
CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||||
|
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
UpContado.Update()
|
UpContado.Update()
|
||||||
@@ -5888,7 +5888,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
||||||
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
||||||
CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||||
|
|
||||||
UpContado.Update()
|
UpContado.Update()
|
||||||
End Sub
|
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)
|
MensajeAlert.AppendFormat("<br/><br/><b> Se generó una Nota de crédito Folio: {0} amortizando el anticipo </b><br/>", ObjFacturaDevolucion.Folio)
|
||||||
End If
|
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
|
'MUESTA ALERT OK
|
||||||
' si es elrol 1165-Ventas,EMp:80, o la empresa 119, recarga ventas, para seguir registrando-.
|
' 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"";"))
|
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
|
Exit For
|
||||||
End If
|
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)
|
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
|
If CveIEPago > 0 Then
|
||||||
@@ -10816,7 +10824,7 @@ Partial Class Ventas
|
|||||||
ViewState("FolioFiscal") = drv("FolioFiscal").ToString
|
ViewState("FolioFiscal") = drv("FolioFiscal").ToString
|
||||||
|
|
||||||
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
||||||
CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||||
|
|
||||||
UpContado.Update()
|
UpContado.Update()
|
||||||
If factura.CveCliente > 0 Then
|
If factura.CveCliente > 0 Then
|
||||||
@@ -14613,7 +14621,7 @@ Partial Class Ventas
|
|||||||
HdnIVAOriginal.Value = TxtIVA.Text
|
HdnIVAOriginal.Value = TxtIVA.Text
|
||||||
|
|
||||||
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
'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
|
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)
|
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.
|
'JJMQ 20160506: Validacion para no pagar de mas a peticion de I.P.
|
||||||
Dim abonado = DtPagos.SUM("Importe")
|
Dim abonado = DtPagos.SUM("Importe")
|
||||||
Dim saldo = TxtTotal.Text.Replace(",", "").ToDouble - abonado
|
Dim saldo = TxtTotal.Text.Replace(",", "").ToDouble - abonado
|
||||||
CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString
|
'CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString
|
||||||
|
|
||||||
CargaGridContado()
|
CargaGridContado()
|
||||||
UpContado.Update()
|
UpContado.Update()
|
||||||
@@ -16456,10 +16464,10 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If total <= 0 Then Alert("No se ha ingresado importe", TipoMensaje.MsgAdvertencia) : Exit Sub
|
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
|
'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)
|
' Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor rectifique.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
' Exit Sub
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
'Pago en Efectivo
|
'Pago en Efectivo
|
||||||
If TxtImporteEfectivo.Text.ToDecimal > 0 Then
|
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.
|
'JJMQ 20160506: Validacion para no pagar de mas a peticion de I.P.
|
||||||
abonado = DtPagos.SUM("Importe")
|
abonado = DtPagos.SUM("Importe")
|
||||||
saldo = TxtTotal.Text.Replace(",", "").ToDouble - abonado
|
saldo = TxtTotal.Text.Replace(",", "").ToDouble - abonado
|
||||||
CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString
|
'CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString
|
||||||
|
|
||||||
CargaGridContado()
|
CargaGridContado()
|
||||||
UpContado.Update()
|
UpContado.Update()
|
||||||
@@ -16671,10 +16679,10 @@ Partial Class Ventas
|
|||||||
Retorno = True
|
Retorno = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DtPagos.SUM("Importe").ToString.ToDecimal > TxtTotal.Text.ToDecimal Then
|
'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)
|
' Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor verifique.", TipoMensaje.MsgAdvertencia)
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
Reference in New Issue
Block a user