Compras anticipos amortizacion de compra dolares en pesos

This commit is contained in:
rakcsle
2024-07-03 15:19:10 -07:00
parent 125466a892
commit b067811605
2 changed files with 145 additions and 82 deletions

View File

@@ -8362,8 +8362,19 @@ Partial Class Compras_Compras
Pago.TCPago = TipoCambioAnt
Pago.CveProveedor = gvr.DataKey("CveProveedor").ToEntero
If ChkPagarConPesos.Checked Then Pago.TCCambioMoneda = 1 / TipoCambioAnt
If ChkPagarConDolares.Checked Then Pago.TCCambioMoneda = TipoCambioAnt
Dim tTCFecha As Double = If(Not gvr.DataKey("TCCompra").ToDouble > 1, GlobalTipoCambio(gvr.DataKey("Fecha").ToDate), gvr.DataKey("TCCompra").ToDouble)
If ChkPagarConPesos.Checked Then
Pago.TCCambioMoneda = 1 / TipoCambioAnt
If CveMoneda = 2 Then
'Pago.TCCambioMoneda = tTCFecha.ToDecimal
Pago.TCCambioMoneda = 1 / tTCFecha.ToDecimal
End If
End If
If ChkPagarConDolares.Checked Then
Pago.TCCambioMoneda = TipoCambioAnt
End If
Select Case gvr.DataKey("TipoDocto")
Case "NC", "DEV", "RNC"
@@ -8415,10 +8426,10 @@ Partial Class Compras_Compras
If ErrorMovtosCxP = 0 AndAlso Not ObjConta.ValidacionesPrePoliza(CvePrePolizaNueva, UsuarioActual) Then
ErrorMovtosCxP = 1
'If ObjConta.ValorPolizaDescuadre > 0 Then
' GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
' ErrorPrepolizaDescuadre = True
'End If
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
End If
End If
Select Case ErrorMovtosCxP
@@ -9780,8 +9791,9 @@ Partial Class Compras_Compras
Dim tTCFecha As Double = If(Not e.Row.DBCampo("TCCompra").ToDouble > 1, GlobalTipoCambio(e.Row.DBCampo("Fecha").ToDate), e.Row.DBCampo("TCCompra").ToDouble)
e.Row.FCTextBox("TxtAnticipo").Attributes.Add("data-tcanticipo", tTCFecha.ToString)
Dim TCAnt As Decimal = If(DdlMoneda.SelectedValue = "1", 1, If(CveCompra > 0, LblTC.Text.ToDecimal, TxtTC.Text.ToDecimal))
Dim TCAnt As Decimal = If(DdlMoneda.SelectedValue = "1", 1, If(CveCompra > 0, LblTC.Text.Replace("TC:", "").ToDecimal, TxtTC.Text.ToDecimal))
If UsuarioActual.Empresa.CveEmpresa.Contiene(13, 83) Then