--FIX pago en dolares a facturas en dolares en cobranza
This commit is contained in:
@@ -368,7 +368,7 @@
|
|||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%"
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%"
|
||||||
EmptyDataText="No se encontraron Ventas con los filtros especificados" data-sort="true" ToolTip="Listado de Ventas"
|
EmptyDataText="No se encontraron Ventas con los filtros especificados" data-sort="true" ToolTip="Listado de Ventas"
|
||||||
CssClass="ScrollAD table table-striped table-hover Widthall mysmallbtn" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
|
CssClass="ScrollAD table table-striped table-hover Widthall mysmallbtn" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
|
||||||
DataKeyNames="CveVenta,CveCliente,TipoDocto,Saldo,AtencionA,CveFormaPago33,SerieFolio,CondicionesPago,PlazoCobranza">
|
DataKeyNames="CveVenta,CveCliente,TipoDocto,Saldo,AtencionA,CveFormaPago33,SerieFolio,CondicionesPago,PlazoCobranza,CveMoneda,Moneda">
|
||||||
<Columns>
|
<Columns>
|
||||||
<%--<asp:BoundField HeaderText="Atención" DataField="AtencionA" />--%>
|
<%--<asp:BoundField HeaderText="Atención" DataField="AtencionA" />--%>
|
||||||
<asp:TemplateField HeaderText="Atención/Cliente" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="25%">
|
<asp:TemplateField HeaderText="Atención/Cliente" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="25%">
|
||||||
@@ -481,36 +481,29 @@
|
|||||||
<div class="col-md-7">
|
<div class="col-md-7">
|
||||||
<asp:Panel runat="server" ID="PnlContado" DefaultButton="BtnPagar" Visible="false">
|
<asp:Panel runat="server" ID="PnlContado" DefaultButton="BtnPagar" Visible="false">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="note note-success">
|
<div class="note note-success">
|
||||||
<div class="row">
|
<div class="row" style="display: flex;">
|
||||||
<div class="col-md-2">
|
<div class="col-md-1"><b>Nombre:</b></div>
|
||||||
<b>Nombre:</b>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4"> <label><asp:Literal ID="LtlNombre" runat="server"></asp:Literal></label> </div>
|
<div class="col-md-4"> <label><asp:Literal ID="LtlNombre" runat="server"></asp:Literal></label> </div>
|
||||||
|
<div class="col-md-2"><b>Folio:</b> <label><asp:Literal ID="LtlFolio" runat="server"></asp:Literal></label> </div>
|
||||||
<div class="col-md-1"><b>Folio:</b></div>
|
<div class="col-md-4">
|
||||||
<div class="col-md-2"> <label><asp:Literal ID="LtlFolio" runat="server"></asp:Literal></label> </div>
|
|
||||||
|
|
||||||
<div class="col-md-1">
|
|
||||||
<b>
|
<b>
|
||||||
<asp:Literal ID="LtLTipoSaldo" runat="server" Text="Total:"></asp:Literal></b>
|
<asp:Literal ID="LtLTipoSaldo" runat="server" Text="Total:"></asp:Literal>
|
||||||
</div>
|
</b>
|
||||||
<div class="col-md-1">
|
|
||||||
<b>
|
<asp:Literal ID="LtlSaldo" runat="server" Text=""></asp:Literal>
|
||||||
<asp:TextBox ID="LtlSaldo" runat="server" Enabled="true" CssClass="TextBoxAsLabel" BorderStyle="None" BackColor="Transparent" ForeColor="#3c763d" Style="text-align: left"></asp:TextBox>
|
|
||||||
</b>
|
<b>
|
||||||
|
<asp:Literal ID="LtlMoneda" runat="server"></asp:Literal></b>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1" style="text-align: right;">
|
<div class="col-md-1" style="text-align: right;">
|
||||||
<asp:LinkButton ID="LnkLiberar" runat="server" CssClass="btn btn-xs btn-success" Text="Liberar" OnClick="LnkLiberar_Click" />
|
<asp:LinkButton ID="LnkLiberar" runat="server" CssClass="btn btn-xs btn-success" Text="Liberar" OnClick="LnkLiberar_Click" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<div runat="server" id="DivContadoBancos" class="row" visible="True">
|
<div runat="server" id="DivContadoBancos" class="row" visible="True">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="chequesie1">
|
<div class="chequesie1">
|
||||||
@@ -682,7 +675,7 @@
|
|||||||
<div class="chequesie2">
|
<div class="chequesie2">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4" style="display: flex; align-items: center;">
|
<div class="col-md-4" style="display: flex; align-items: center;">
|
||||||
<label style="font-weight: bold; font-size: medium;">Total:</label>
|
<label style="font-weight: bold; font-size: 13px;width: 90px;">Total:</label>
|
||||||
<div class="input-icon">
|
<div class="input-icon">
|
||||||
<i style="margin: 0px;">$</i>
|
<i style="margin: 0px;">$</i>
|
||||||
<asp:TextBox ID="TxtImporteContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100%" ReadOnly="true" ClientIDMode="Static" Style="text-align: right; font-size: 14px;"></asp:TextBox>
|
<asp:TextBox ID="TxtImporteContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100%" ReadOnly="true" ClientIDMode="Static" Style="text-align: right; font-size: 14px;"></asp:TextBox>
|
||||||
@@ -692,7 +685,7 @@
|
|||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-5" style="display: flex; align-items: center;">
|
<div class="col-md-5" style="display: flex; align-items: center;">
|
||||||
<label id="lblCambio" runat="server" style="font-weight: bold; font-size: medium;">Cambio:</label>
|
<label id="lblCambio" runat="server" style="font-weight: bold; font-size: 13px;width: 60px;">Cambio:</label>
|
||||||
<div class="input-icon">
|
<div class="input-icon">
|
||||||
<i style="margin: 0px;">$</i>
|
<i style="margin: 0px;">$</i>
|
||||||
<asp:HiddenField ID="HdnSobranteFaltante" Value="0" ClientIDMode="Static" runat="server" />
|
<asp:HiddenField ID="HdnSobranteFaltante" Value="0" ClientIDMode="Static" runat="server" />
|
||||||
@@ -701,7 +694,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-7" style="display: flex; align-items: center;">
|
<div class="col-md-7" style="display: flex; align-items: center;">
|
||||||
<label style="font-weight: bold; font-size: medium;">Sob/falt:</label>
|
<label style="font-weight: bold; font-size: 13px;">Sob/falt:</label>
|
||||||
|
|
||||||
<asp:CheckBox ID="ChkSobFaltante" runat="server" ClientIDMode="Static" />
|
<asp:CheckBox ID="ChkSobFaltante" runat="server" ClientIDMode="Static" />
|
||||||
<div class="input-icon" style="margin-left: 20px;">
|
<div class="input-icon" style="margin-left: 20px;">
|
||||||
@@ -713,6 +706,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
|
<div id="DivUSD" runat="server" class="row" visible="false">
|
||||||
|
<div class="col-md-4" style="display: flex; align-items: center;">
|
||||||
|
<label style="font-weight: bold; font-size: 13px;width: 90px;">Total (MXN):</label>
|
||||||
|
<div class="input-icon">
|
||||||
|
<i style="margin: 0px;">$</i>
|
||||||
|
<asp:TextBox ID="TxtTotalMXN" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100%" ReadOnly="true" ClientIDMode="Static" Style="text-align: right; font-size: 14px;"></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FTETotalMXN" runat="server" TargetControlID="TxtTotalMXN" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4" style="display: flex; align-items: center;">
|
||||||
|
<label style="font-weight: bold; font-size: 13px; width: 60px;">TC:</label>
|
||||||
|
<div class="input-icon">
|
||||||
|
<i style="margin: 0px;">$</i>
|
||||||
|
<asp:TextBox ID="TxtTC" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ReadOnly="false" ClientIDMode="Static" Style="text-align: right; font-size: 14px;"></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FTETC" runat="server" TargetControlID="TxtTC" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
@@ -727,6 +739,7 @@
|
|||||||
<asp:HiddenField ID="HdnVentaCondicionesPago" runat="server" />
|
<asp:HiddenField ID="HdnVentaCondicionesPago" runat="server" />
|
||||||
<asp:HiddenField ID="HdnCveIE" runat="server" />
|
<asp:HiddenField ID="HdnCveIE" runat="server" />
|
||||||
<asp:HiddenField ID="HdnTotal" runat="server" ClientIDMode="Static" />
|
<asp:HiddenField ID="HdnTotal" runat="server" ClientIDMode="Static" />
|
||||||
|
<asp:HiddenField ID="HdnMoneda" runat="server" ClientIDMode="Static" Value="1" />
|
||||||
<asp:Button ID="BtnPagar" CssClass="btn btn-large btn-success e-big-btn" runat="server" Text="Pagar" />
|
<asp:Button ID="BtnPagar" CssClass="btn btn-large btn-success e-big-btn" runat="server" Text="Pagar" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1239,7 +1252,7 @@
|
|||||||
<input type="text" id="TxtBusquedaAnticipos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBusquedaAnticipos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12" style="display: flex; justify-content: end; font-size: 16px; font-weight: bold;">
|
<div class="col-md-12" style="display: flex; justify-content: end; font-size: 16px; font-weight: bold;">
|
||||||
<span>Total: </span>
|
<span>Total: </span>
|
||||||
@@ -1609,6 +1622,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$get("TxtImporteContado").value = FormatoNumero(total, 2);
|
$get("TxtImporteContado").value = FormatoNumero(total, 2);
|
||||||
|
|
||||||
|
//DOLARES
|
||||||
|
if ($get("HdnMoneda").value == "2") {
|
||||||
|
$get("TxtTotalMXN").value = FormatoNumero(ToDouble($get('TxtImporteContado').value) * ToDouble($get('TxtTC').value), 2);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function CalculaDiferencia() {
|
function CalculaDiferencia() {
|
||||||
|
|||||||
@@ -517,6 +517,17 @@ Partial Class Ventas_PVCobranza
|
|||||||
LtlNombre.Text = GvRow.DataKey("AtencionA")
|
LtlNombre.Text = GvRow.DataKey("AtencionA")
|
||||||
LtlFolio.Text = GvRow.DataKey("SerieFolio")
|
LtlFolio.Text = GvRow.DataKey("SerieFolio")
|
||||||
LtlSaldo.Text = GvRow.DataKey("Saldo").ToDecimal.FormatoNumero
|
LtlSaldo.Text = GvRow.DataKey("Saldo").ToDecimal.FormatoNumero
|
||||||
|
LtlMoneda.Text = GvRow.DataKey("Moneda")
|
||||||
|
|
||||||
|
Dim CveMoneda As Integer = GvRow.DataKey("CveMoneda").ToEntero()
|
||||||
|
|
||||||
|
HdnMoneda.Value = CveMoneda.ToString()
|
||||||
|
If CveMoneda = 2 Then
|
||||||
|
DivUSD.Visible = True
|
||||||
|
TxtTC.Text = GlobalTipoCambio(Now).ToString()
|
||||||
|
TxtTotalMXN.Text = (TxtImporteContado.Text.ToDecimal() * TxtTC.Text.ToDecimal()).FormatoNumero()
|
||||||
|
End If
|
||||||
|
|
||||||
HdnVentaCondicionesPago.Value = GvRow.DataKey("CondicionesPago")
|
HdnVentaCondicionesPago.Value = GvRow.DataKey("CondicionesPago")
|
||||||
HdnPlazoCobranza.Value = GvRow.DataKey("PlazoCobranza")
|
HdnPlazoCobranza.Value = GvRow.DataKey("PlazoCobranza")
|
||||||
|
|
||||||
@@ -1262,6 +1273,11 @@ Partial Class Ventas_PVCobranza
|
|||||||
LtlTipoAnticipo.Text = ""
|
LtlTipoAnticipo.Text = ""
|
||||||
TxtFaltante.Text = ""
|
TxtFaltante.Text = ""
|
||||||
ChkSobFaltante.Checked = False
|
ChkSobFaltante.Checked = False
|
||||||
|
LtlMoneda.Text = ""
|
||||||
|
TxtTC.Text = ""
|
||||||
|
TxtTotalMXN.Text = ""
|
||||||
|
DivUSD.Visible = False
|
||||||
|
HdnMoneda.Value = "1"
|
||||||
'HdnTipoAmortizacion.Value = ""
|
'HdnTipoAmortizacion.Value = ""
|
||||||
CveCliente = -1
|
CveCliente = -1
|
||||||
CveVendedor = -1
|
CveVendedor = -1
|
||||||
@@ -1318,7 +1334,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
ObjFactura.CveMoneda = VentaRemision.CveMoneda
|
ObjFactura.CveMoneda = VentaRemision.CveMoneda
|
||||||
|
|
||||||
If ObjFactura.CveMoneda = 2 Then
|
If ObjFactura.CveMoneda = 2 Then
|
||||||
ObjFactura.TipoCambio = GlobalTipoCambio(Now).ToString().ToDecimal()
|
ObjFactura.TipoCambio = TxtTC.Text.ToDecimal()
|
||||||
Else
|
Else
|
||||||
ObjFactura.TipoCambio = 1
|
ObjFactura.TipoCambio = 1
|
||||||
End If
|
End If
|
||||||
@@ -1699,6 +1715,9 @@ Partial Class Ventas_PVCobranza
|
|||||||
Dim CveIEPago As Integer = 0
|
Dim CveIEPago As Integer = 0
|
||||||
Dim ErrorConta As Boolean
|
Dim ErrorConta As Boolean
|
||||||
|
|
||||||
|
Dim CveMonedaVenta As Integer = VentaActual.CveMoneda
|
||||||
|
Dim CveMonedaPago As Integer = CveMonedaVenta
|
||||||
|
|
||||||
If String.IsNullOrEmpty(Obs) Then
|
If String.IsNullOrEmpty(Obs) Then
|
||||||
Obs = $"Folio: {VentaActual.SerieFolio}"
|
Obs = $"Folio: {VentaActual.SerieFolio}"
|
||||||
Else
|
Else
|
||||||
@@ -1750,7 +1769,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If String.IsNullOrEmpty(Retorno) Then
|
If String.IsNullOrEmpty(Retorno) Then
|
||||||
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImporteIE, 1, 1, Obs, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=tCveCorte, CveAutorizacion:=CveAutorizacion, CveSubProyecto:=CveSubProyecto)
|
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImporteIE, CveMonedaPago, If(CveMonedaVenta = 1, 1, TxtTC.Text.ToDecimal()), Obs, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=tCveCorte, CveAutorizacion:=CveAutorizacion, CveSubProyecto:=CveSubProyecto, Modulo:="PVCob")
|
||||||
If CveIEPago > 0 Then
|
If CveIEPago > 0 Then
|
||||||
Dim tImportePago As Decimal = If(ImporteBancos > ImporteAbonoVenta, ImporteAbonoVenta, ImporteBancos) 'toma el importe menor para la factura
|
Dim tImportePago As Decimal = If(ImporteBancos > ImporteAbonoVenta, ImporteAbonoVenta, ImporteBancos) 'toma el importe menor para la factura
|
||||||
|
|
||||||
@@ -1759,10 +1778,10 @@ Partial Class Ventas_PVCobranza
|
|||||||
Pago.ImportePagoVenta = tImportePago
|
Pago.ImportePagoVenta = tImportePago
|
||||||
Pago.ImportePago = ImporteIE
|
Pago.ImportePago = ImporteIE
|
||||||
Pago.CveIE = CveIEPago
|
Pago.CveIE = CveIEPago
|
||||||
Pago.CveMonedaPago = VentaActual.CveMoneda
|
Pago.CveMonedaPago = CveMonedaPago ' EL PAGO SIEMRE DEBE SER EN PESOS
|
||||||
Pago.Fecha = NowADS()
|
Pago.Fecha = NowADS()
|
||||||
Pago.Referencia = VentaActual.SerieFolio
|
Pago.Referencia = VentaActual.SerieFolio
|
||||||
If Pago.CveMonedaPago > 1 Then Pago.TCPago = GlobalTipoCambio(Now).ToDecimal
|
Pago.TCPago = If(CveMonedaVenta = 1, 1, TxtTC.Text.ToDecimal())
|
||||||
|
|
||||||
ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
|
ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
|
||||||
End If
|
End If
|
||||||
@@ -3092,6 +3111,9 @@ Partial Class Ventas_PVCobranza
|
|||||||
Next
|
Next
|
||||||
TxtCxCAplicado.Text = (SaldoCxC).FormatoNumero
|
TxtCxCAplicado.Text = (SaldoCxC).FormatoNumero
|
||||||
TxtImporteContado.Text = (LtlSaldo.Text.ToDecimal + SaldoCxC).FormatoNumero
|
TxtImporteContado.Text = (LtlSaldo.Text.ToDecimal + SaldoCxC).FormatoNumero
|
||||||
|
If DivUSD.Visible Then
|
||||||
|
TxtTotalMXN.Text = (TxtImporteContado.Text.ToDecimal() * TxtTC.Text.ToDecimal()).FormatoNumero()
|
||||||
|
End If
|
||||||
RegistraScript("$('#divCxC').hide();", "AE21")
|
RegistraScript("$('#divCxC').hide();", "AE21")
|
||||||
UPPCobranza.Update()
|
UPPCobranza.Update()
|
||||||
UPPTotalesContado.Update()
|
UPPTotalesContado.Update()
|
||||||
|
|||||||
Reference in New Issue
Block a user