From 797ff628eb95742564a1b74c5996e193a2d49747 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 18 Jan 2024 07:26:59 -0700 Subject: [PATCH] =?UTF-8?q?--=20aplicaci=C3=B3n=20de=20nc=20del=202018?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 3a0c01f81..ba9795969 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -15836,7 +15836,7 @@ Partial Class Ventas End If - If e.Row.DBCampo("Tipo").ToString() = "NC" And e.Row.DataKey("CveVenta").ToString().ToEntero() > 0 OrElse (e.Row.DBCampo("Tipo").ToString() = "Ant" And e.Row.DataKey("CveMoneda").ToString().ToEntero() = 1 AndAlso DdlMoneda.SelectedValue.ToEntero() = 2) Then + If e.Row.DBCampo("Tipo").ToString() = "NC" And e.Row.DataKey("CveVenta").ToEntero() > 0 OrElse (e.Row.DBCampo("Tipo").Contiene("Ant", "IxC") And e.Row.DataKey("CveMoneda").ToEntero() = 1 AndAlso DdlMoneda.SelectedValue.ToEntero() = 2) Then 'If e.Row.DBCampo("CveMoneda").ToString().ToEntero() = 2 Then ' tipoCambio = e.Row.DBCampo("TipoCambioHoy").ToString().ToDecimal 'Else @@ -16048,8 +16048,8 @@ Partial Class Ventas importeMN = importeMovimiento * gvr.DataKey("TipoCambio").ToString().ToDecimal TC = gvr.DataKey("TipoCambio").ToString().ToDecimal ElseIf CveMonedaVenta = 1 And gvr.DataKey("CveMoneda").ToEntero = 2 Then - importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal - importeMN = importeMovimiento * gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal + importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal + importeMN = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal TC = TipoCambioFluctuacion ElseIf CveMonedaVenta = 2 And gvr.DataKey("CveMoneda").ToEntero = 1 Then importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal @@ -16080,12 +16080,31 @@ Partial Class Ventas Case "66" If gvr.DataKey("CveIE").ToEntero() > 0 Then - importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal + 'importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal + If CveMonedaVenta = 1 And gvr.DataKey("CveMoneda").ToEntero = 1 Then + importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal + importeMN = importeMovimiento + TC = gvr.DataKey("TipoCambio").ToString().ToDecimal + ElseIf CveMonedaVenta = 2 And gvr.DataKey("CveMoneda").ToEntero = 2 Then + importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal + importeMN = importeMovimiento * gvr.DataKey("TipoCambio").ToString().ToDecimal + TC = gvr.DataKey("TipoCambio").ToString().ToDecimal + ElseIf CveMonedaVenta = 1 And gvr.DataKey("CveMoneda").ToEntero = 2 Then + importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal + importeMN = importeMovimiento * gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal + TC = TipoCambioFluctuacion + ElseIf CveMonedaVenta = 2 And gvr.DataKey("CveMoneda").ToEntero = 1 Then + importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal + importeMN = importeMovimiento * gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal + TC = gvr.DataKey("TipoCambio").ToString().ToDecimal + End If + importeMovimiento = importeMovimiento.RoundSQL + importeMN = importeMN.RoundSQL If importeMovimiento <> 0 Then Dim Pago As New VentaPago Pago.ImportePagoVenta = importeMovimiento - Pago.ImportePago = importeMovimiento + Pago.ImportePago = importeMN Pago.CveIE = CveIEAnticipo Pago.CveMonedaPago = gvr.DataKey("CveMoneda").ToEntero() Pago.TCPago = gvr.DataKey("TipoCambio").ToDecimal