--FIX nc en cobro por caja

This commit is contained in:
2024-12-05 09:08:23 -07:00
parent 6fae25ffba
commit 18bab2c0c3
2 changed files with 193 additions and 190 deletions

View File

@@ -1282,9 +1282,9 @@
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
//si es con.nc,es.el.total
let Total = ToDouble($get("C_LtlSaldo").value);
let Total = ToDouble($get("C_LtlSaldo").value.replace(",",""));
let SaldoCompra = parseFloat(parseFloat($get("C_LtlSaldo").value).toFixed(2));
let SaldoCompra = parseFloat(parseFloat($get("C_LtlSaldo").value.replace(",", "")).toFixed(2));
if (t.checked) {
@@ -1319,13 +1319,13 @@
function FnCambiaAnt(chk, txt, saldo) {
let Total = ToDouble($get("C_LtlSaldo").value);// ToDouble($get('TxtSubTotal').value);
let Total = ToDouble($get("C_LtlSaldo").value.replace(",", ""));// ToDouble($get('TxtSubTotal').value);
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
let importeTxt = parseFloat(txt.value.replace(/,/g, ''));
if (TipoAnticipo == '4') {
Total = ToDouble($get("C_LtlSaldo").value);
Total = ToDouble($get("C_LtlSaldo").value.replace(",", ""));
}
if (isNaN(importeTxt)) {

View File

@@ -758,7 +758,9 @@ Partial Class Ventas_PVCobranza
Private Function GenerarFactura(ByRef VentaRemision As Venta, ByRef ObjVentas As ClsVentas, ByRef ObjClientes As ClsClientes) As Modelos.Factura.MMensajeFactura
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
Dim SbAlert As New StringBuilder()
Try
Dim DtRemisiones As New DataTable
DtRemisiones.Columns.Add(New DataColumn("CveVenta", GetType(Integer)))
DtRemisiones.Columns.Add(New DataColumn("SerieFolio", GetType(String)))
@@ -872,9 +874,6 @@ Partial Class Ventas_PVCobranza
ObjFactura.DtAnticiposAplicados = DtAnticipos
End If
Dim SbAlert As New StringBuilder()
Try
Retorno = ObjFactura.EmitirFactura(False, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Cobranza/GuardarVenta", MostrarURL:=True)
Retorno.Factura = ObjFactura
@@ -944,6 +943,9 @@ Partial Class Ventas_PVCobranza
Private Function GenerarNC(ByRef Venta As Venta, ByRef ObjVentas As ClsVentas) As Modelos.Factura.MMensajeFactura
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
Dim SbAlert As New StringBuilder()
Try
Dim ObjNC = Modelos.Factura.CrearVentaNueva(UsuarioActual, Venta.CveSubProyecto, Venta.CveCliente, Venta.CveMoneda, "Egs")
Dim Total As Decimal = TxtNCDev.Text.ToDecimal()
@@ -1016,9 +1018,10 @@ Partial Class Ventas_PVCobranza
ObjNC.PreparaTimbre()
Dim SbAlert As New StringBuilder()
ObjNC.CveFormaPago33 = 21 'Aplicación de anticipos
ObjNC.CveMetodoPago33 = 1
ObjNC.CveMetodoPago = 1
Try
Retorno = ObjNC.EmitirFactura(False, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Cobranza/GuardarVenta", MostrarURL:=True)
Retorno.Factura = ObjNC