diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index 996e1641c..966e36d81 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -6292,6 +6292,34 @@ Public Class ClsInventarios
Return Retorno
End Function
+
+#Region " K P I "
+
+
+ Public Function GetVerComportamiento(CvePS As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, CveAlmacenes As String) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Inv_VerComportamientoGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CvePS", SqlDbType.Int).Value = CvePS
+ .Add("@FechaI", SqlDbType.Date).Value = FechaI
+ .Add("@FechaF", SqlDbType.Date).Value = FechaF
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CveAlmacenes", SqlDbType.VarChar).Value = CveAlmacenes
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al consultar el comportamiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
+#End Region
+
#Region " IDisposable Support "
' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
@@ -6322,6 +6350,8 @@ Public Class ClsInventarios
End Sub
+
+
#End Region
End Class
diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx
index bebe8fb29..c876401d5 100644
--- a/Compras/Compras.aspx
+++ b/Compras/Compras.aspx
@@ -6137,7 +6137,8 @@
txt.value = SaldoCompra - txtvalue;
}
}
-
+
+ debugger;
let saldoVal = saldo;
if (CveMonedaAnticipo == 1 && CveMonedaOriginal == 2) {
saldoVal = ToDouble(saldo / TCAnticipo)
@@ -6145,7 +6146,9 @@
saldoVal = ToDouble(saldo * TCAnticipo)
}
- if (saldoVal > SaldoCompra ) {
+ //(Math.round(saldoVal * 100) / 100);
+
+ if ((Math.round(saldoVal * 100) / 100) > SaldoCompra ) {
saldo = SaldoCompra;
if (CveMonedaAnticipo == 1 && CveMonedaOriginal == 2) {
saldoVal = ToDouble(saldo / TCAnticipo);
@@ -6160,7 +6163,8 @@
chk.checked = true;
} else {
chk.checked = false;
- }
+ }
+
if (ToDouble(txtvalue) > saldoVal) {
txt.value = FormatoNumero(saldo, 2);
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 890daa4f8..1cc208d54 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -401,6 +401,7 @@ Partial Class Compras_Compras
Public Property CvePersonal As Integer
Public Property CveCompra As Integer
Public Property CvePrePoliza As Integer
+ Public Property Fecha As Date
End Class
Private Property ArrAnticipos As ArrayList
Get
@@ -3698,12 +3699,26 @@ Partial Class Compras_Compras
ObjProveedor.Dispose()
End Sub
- Private Sub CargaAnticipos(CveProveedor As Integer, Optional FiltroTipo As String = "-1")
+ Private Sub CargaAnticipos(CveProveedor As Integer, Optional FiltroTipo As String = "-1", Optional PagarDolaresEnPesos As Boolean = False)
+
Dim ObjMovtos As New ClsMovimientos()
+
+ DivPagarConPesos.Visible = False
+ If DdlMoneda.SelectedValue.ToEntero = 2 Then
+ DivPagarConPesos.Visible = True
+ End If
+
If ObjMovtos.GetAnticiposProveedor(CveProveedor, -1, CveMoneda:=-1, SelectTop:=-1, TipoDocto:=FiltroTipo) AndAlso ObjMovtos.DtResultados.Rows.Count > 0 Then
Dim CveMoneda As Integer = If(ChkPagarConPesos.Checked, 1, If(ChkPagarConDolares.Checked, 2, DdlMoneda.SelectedValue.ToEntero))
If DdlMoneda.SelectedValue.ToEntero = 1 AndAlso CveCompra > 0 Then DivPagarConDolares.Visible = True Else If CveCompra > 0 Then DivPagarConPesos.Visible = True
- GVAnticipos.DataSource = ObjMovtos.DtResultados.FiltraParametros($"Tipo = 'Act' AND CveMoneda = {CveMoneda}")
+
+ If PagarDolaresEnPesos Then
+ GVAnticipos.DataSource = ObjMovtos.DtResultados.FiltraParametros($"Tipo = 'Act' CveMoneda = 1")
+ Else
+ GVAnticipos.DataSource = ObjMovtos.DtResultados.FiltraParametros($"Tipo = 'Act' AND CveMoneda = {CveMoneda}")
+ End If
+
+
If ObjMovtos.DtResultados.FiltraParametros("Saldo > 0").Rows.Count > 0 Then
BtnAceptarAnticipos.Enabled = True
If DdlTipoComprobante.SelectedValue = "Fac" Then ImgAnticiposPendientes.Visible = True
@@ -7324,6 +7339,17 @@ Partial Class Compras_Compras
Pago.ImportePago = importeMovimiento + ImporComisionAnticipo
Pago.CveIE = Ant.CveIE
Pago.TCPago = Ant.TCCompra
+
+ If Pago.CveMonedaPago = 1 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
+ Pago.TCPago = 1 ' TxtTC.Text.ToDecimal
+ Pago.TCCambioMoneda = Ant.TCCompra 'GlobalTipoCambio(Now).ToDecimal
+
+ If Ant.TCCompra = 1 Then
+ Pago.TCCambioMoneda = 1 / GlobalTipoCambio(Ant.Fecha).ToDecimal
+ End If
+
+ End If
+
Pago.CveMonedaPago = If(Ant.TCCompra > 1, 2, 1)
Pago.OtroGastoIngreso = -ImporComisionAnticipo
ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
@@ -8555,7 +8581,7 @@ Partial Class Compras_Compras
For Each gvr As GridViewRow In GVAnticipos.Rows
If gvr.FCCheckBox("Chk") IsNot Nothing AndAlso gvr.FCCheckBox("Chk").Checked Then
- ArrAnticipos.Add(New Anticipos With {.CvePrePoliza = gvr.DataKey("CvePrePoliza").ToEntero, .CveIE = gvr.DataKey("CveIE").ToString.ToEntero, .CveCompra = gvr.DataKey("CveCompra").ToEntero, .Importe = gvr.FCTextBox("TxtAnticipo").Text.ToDecimal, .ImporteComision = gvr.FCTextBox("TxtComision").Text.ToDecimal, .TCCompra = gvr.DataKey("TCCompra").ToDecimal, .TipoMovto = gvr.DataKey("TipoDocto")})
+ ArrAnticipos.Add(New Anticipos With {.CvePrePoliza = gvr.DataKey("CvePrePoliza").ToEntero, .CveIE = gvr.DataKey("CveIE").ToString.ToEntero, .CveCompra = gvr.DataKey("CveCompra").ToEntero, .Importe = gvr.FCTextBox("TxtAnticipo").Text.ToDecimal, .ImporteComision = gvr.FCTextBox("TxtComision").Text.ToDecimal, .TCCompra = gvr.DataKey("TCCompra").ToDecimal, .TipoMovto = gvr.DataKey("TipoDocto"), .Fecha = gvr.DataKey("Fecha").ToDate})
End If
Next
diff --git a/Empresas/186/Formatos/Salidas.rdlc b/Empresas/186/Formatos/Salidas.rdlc
index f81d514f8..0beebcd74 100644
--- a/Empresas/186/Formatos/Salidas.rdlc
+++ b/Empresas/186/Formatos/Salidas.rdlc
@@ -85,7 +85,10 @@
2.06786cm
- 9.78709cm
+ 7.28712cm
+
+
+ 2.5cm
1.78414cm
@@ -282,6 +285,52 @@
+
+
+
+ true
+ true
+
+
+
+
+ Serie
+
+
+
+
+
+
+ Textbox3
+
+
+
+ Black
+
+ 1pt
+
+
+ Black
+
+ 1pt
+
+ #9cc3e5
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
@@ -504,6 +553,34 @@
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!SerieLote.Value
+
+
+
+
+
+
+ SerieLote
+
+
+
+
@@ -577,6 +654,7 @@
+
@@ -593,7 +671,7 @@
0.17639cm
0.07701cm
0.83488cm
- 19.71019cm
+ 19.71022cm
@@ -604,10 +682,10 @@
0.58708in