diff --git a/Inventarios/PrestamosdeProveedor.aspx.vb b/Inventarios/PrestamosdeProveedor.aspx.vb
index 40839cf55..9cfe144b4 100644
--- a/Inventarios/PrestamosdeProveedor.aspx.vb
+++ b/Inventarios/PrestamosdeProveedor.aspx.vb
@@ -41,6 +41,11 @@ Partial Class Inventarios_PrestamosdeProveedor
If ObjInv.PrestamosdeProveedorGet(tCveProveedor, tFolio, UsuarioActual.CveEmpresa) Then
GvD.DataSource = ObjInv.DtResultados
+ Dim Dr As Data.DataRow = ObjInv.DtResultados.FiltroPrimero("")
+ If Dr IsNot Nothing Then
+ HdnCveProveedor.Value = Dr("CveProveedor")
+ End If
+
End If
ObjInv.Dispose()
@@ -124,7 +129,7 @@ Partial Class Inventarios_PrestamosdeProveedor
Dim Fecha As Date = TxtFechaEntrega.Text.ToDate
Dim CveMovimientoSalida As Integer
- Dim tCveProveedor As Integer = ddlProveedor.SelectedValue.ToEntero
+ Dim tCveProveedor As Integer = HdnCveProveedor.Value.ToEntero
Dim CvePS As Integer = 0
'AGREGAMOS LA SALIDA
@@ -169,8 +174,7 @@ Partial Class Inventarios_PrestamosdeProveedor
Dim CveConceptoContable As Integer = 69
Dim CveClasifCosto As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", String.Format("CvePS ={0} ", CvePS))
- IdCtaContableOtro = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", $"CveClasificacion = {CveClasifCosto}").ToEntero
-
+ IdCtaContableOtro = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasifCosto}").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAlmacen, tValorInventario, TxtObservacionesEntrega.Text.Trim, 68, TxtObservacionesEntrega.Text.Trim, Fecha, idCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=tValorInventario) Then
ErrorMovInv = True
@@ -192,6 +196,7 @@ Partial Class Inventarios_PrestamosdeProveedor
TxtRecibio.Text = ""
TxtFechaEntrega.Text = Now.ToShortDateString
TxtObservacionesEntrega.Text = ""
+ HdnCveProveedor.Value = ""
Dim Mensaje As StringBuilder = New StringBuilder
Mensaje.AppendFormat("Se realizo correctamente la recepción.
Folio de Salida:
{0}", Folio, CveMovimientoSalida)