diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index c2a581513..85a36307a 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -2351,6 +2351,7 @@ Public Class ClsInventarios
End With
Try
+ SqlAdapter.SelectCommand.CommandTimeout = 0
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
@@ -4565,7 +4566,7 @@ Public Class ClsInventarios
Return Retorno
End Function
- Public Function AddTrasladoSolicitudDetalle(CveTrasladoSolicitud As Integer, Cantidad As Integer, CveUM As Integer, CvePS As Integer, Precio As Decimal, Observaciones As String,
+ Public Function AddTrasladoSolicitudDetalle(CveTrasladoSolicitud As Integer, Cantidad As Decimal, CveUM As Integer, CvePS As Integer, Precio As Decimal, Observaciones As String,
CveContratoDetalle As Integer, Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Boolean
Dim Retorno As Boolean = False
Dim CveTraspasoSolicitud As Integer = 0
@@ -4573,7 +4574,7 @@ Public Class ClsInventarios
With SqlAdapter.SelectCommand.Parameters
.Add("@CveTrasladoSolicitud", SqlDbType.Int).Value = CveTrasladoSolicitud
- .Add("@Cantidad", SqlDbType.Int).Value = Cantidad
+ .Add("@Cantidad", SqlDbType.Money).Value = Cantidad
.Add("@CveUM", SqlDbType.Int).Value = CveUM
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@Precio", SqlDbType.Float).Value = Precio
@@ -4597,6 +4598,41 @@ Public Class ClsInventarios
Return Retorno
End Function
+
+ Public Function UpdateTrasladoSolicitudDetalle(CveTrasladoSolicitudDetalle As Integer, CveEmpresa As Integer, CveTrasladoSolicitud As Integer, Cantidad As Decimal, CveUM As Integer, CvePS As Integer, Precio As Decimal, Observaciones As String,
+ CveContratoDetalle As Integer, Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Boolean
+ Dim Retorno As Boolean = False
+ Dim CveTraspasoSolicitud As Integer = 0
+ DataAdapter("PA_Inv_TraspasoSolicitudDetalleUpdate")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveTrasladoSolicitudDetalle", SqlDbType.Int).Value = CveTrasladoSolicitudDetalle
+ .Add("@CveTrasladoSolicitud", SqlDbType.Int).Value = CveTrasladoSolicitud
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@Cantidad", SqlDbType.Money).Value = Cantidad
+ .Add("@CveUM", SqlDbType.Int).Value = CveUM
+ .Add("@CvePS", SqlDbType.Int).Value = CvePS
+ .Add("@Precio", SqlDbType.Float).Value = Precio
+ .Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
+ .Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
+ .Add("@Serie", SqlDbType.NVarChar).Value = Serie
+ .Add("@Lote", SqlDbType.NVarChar).Value = Lote
+ .Add("@FechaCaducidad", SqlDbType.Date).Value = FechaCaducidad
+
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch Ex1 As SqlException
+ Me.OnError("Ocurrió un error al actualizar los detalles del movimiento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ Catch ex As Exception
+ OnError("Ocurrió un error al actualizar los detalles del movimiento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
Public Function AddTrasladoSolicitudGet(CveTrasladoSolicitud As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
Dim CveTraspasoSolicitud As Integer = 0
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 0039b43eb..3e722fbae 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -5780,7 +5780,17 @@ Public Class ClsPaginas
DR = TmpDTImpuestos.NewRow()
If dtVentas(0)("SubTotal").ToString.ToDouble <> (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) Then DR("ImpuestoLocal") = "SubTotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) : DR("Orden") = 40 : TmpDTImpuestos.Rows.Add(DR)
DR = TmpDTImpuestos.NewRow()
- If dtVentas(0)("IVA").ToString.ToDouble >= 0 Then DR("ImpuestoLocal") = "IVA" : DR("Importe") = dtVentas(0)("IVA").ToString.ToDouble : DR("Orden") = 50 : TmpDTImpuestos.Rows.Add(DR)
+ If dtVentas(0)("IVA").ToString.ToDouble >= 0 Then
+ DR("ImpuestoLocal") = "IVA"
+
+ If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
+ DR("ImpuestoLocal") = String.Format("IVA {0}%", dtVentas(0)("PorcentajeIVA").ToString.ToDouble * 100)
+ End If
+
+ DR("Importe") = dtVentas(0)("IVA").ToString.ToDouble
+ DR("Orden") = 50
+ TmpDTImpuestos.Rows.Add(DR)
+ End If
'solo para eclipse, que muesre un subtotal debajo de IVA
If UsuarioActual.CveEmpresa = 15 Then DR = TmpDTImpuestos.NewRow() : DR("ImpuestoLocal") = "Subtotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) + dtVentas(0)("IVA").ToString.ToDouble : DR("Orden") = 51 : TmpDTImpuestos.Rows.Add(DR)
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index 96e987c23..3aee4f3d4 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -293,7 +293,7 @@ Public Class ClsVentas
Public Function GetVentas(CveEmpresa As Integer, TipoDocto As String, Serie As String, Folio As Integer, Codigo As String, CveCliente As Integer,
CveSubProyecto As Integer, CveEstatus As Integer, CveUsuario As Integer, FechaI As String, FechaF As String, FolioFiscal As String, Optional CveClienteSucursal As Integer = -1, Optional CvePS As Integer = -1, Optional PedidoContrato As String = "-1",
Optional OrdenCompra As String = "-1", Optional CveUsuarioConsulta As Integer = -1, Optional ClienteRFC As String = "-1",
- Optional CveEmpresaCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional TopSelect As Integer = 1000) As Boolean
+ Optional CveEmpresaCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional TopSelect As Integer = 1000, Optional CveVendedor As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasGetBuscar")
@@ -319,6 +319,7 @@ Public Class ClsVentas
.Add("@CveEmpresaCRM", SqlDbType.Int).Value = CveEmpresaCRM
.Add("@CveAcercamientoCRM", SqlDbType.Int).Value = CveAcercamientoCRM
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
+ .Add("@CveVendedorFiltro", SqlDbType.Int).Value = CveVendedor
End With
Try
@@ -440,22 +441,22 @@ Public Class ClsVentas
End Function
Public Function AddVenta(TipoDocto As String, FolioFact As Integer, CveCliente As Integer, CveClienteSucursal As Integer, SubTotal As Decimal, Descuento As Decimal, Amortizacion As Decimal, IVA As Decimal, RetIVA As Decimal, RetISR As Decimal, Total As Decimal,
- CveMoneda As Integer, TipoCambio As Double, CveMetodoPago As Integer, CondicionesPago As Integer, FormaPago As Integer, FechaVencimiento As DateTime, Fecha As DateTime, MotivoDescuento As String, Observaciones As String, FechaEjecucion As DateTime,
- CveVendedor As Integer, Alfa1 As String, Alfa2 As String, Alfa3 As String, Num1 As Double, Num2 As Double, Num3 As Double,
+ CveMoneda As Integer, TipoCambio As Decimal, CveMetodoPago As Integer, CondicionesPago As Integer, FormaPago As Integer, FechaVencimiento As DateTime, Fecha As DateTime, MotivoDescuento As String, Observaciones As String, FechaEjecucion As DateTime,
+ CveVendedor As Integer, Alfa1 As String, Alfa2 As String, Alfa3 As String, Num1 As Decimal, Num2 As Decimal, Num3 As Decimal,
Fech1 As Date, Fech2 As Date, Fech3 As Date, CveCorte As Integer, NumeroPersonas As Integer, CvePrePoliza As Integer, CveUsuario As Integer, CveEmpresa As Integer,
- Optional Propina As Double = -1, Optional CveVentaTerminal As Integer = -1, Optional AtencionA As String = "-1", Optional CveContrato As Integer = -1,
+ Optional Propina As Decimal = -1, Optional CveVentaTerminal As Integer = -1, Optional AtencionA As String = "-1", Optional CveContrato As Integer = -1,
Optional CveVentaPadre As Integer = -1, Optional Det_OrdenCompra As String = "", Optional Det_FechaOrdenCompra As String = "", Optional otros As Decimal = 0,
Optional Entrega As String = "-1", Optional Vigencia As DateTime = MinFecha, Optional CveAlmacenTraspasoDestino As Integer = -1, Optional CveAlmacenTraspasoOrigen As Integer = -1, Optional CveDireccionEnvio As Integer = -1,
- Optional CveOC As Integer = -1, Optional IEPS As Double = 0, Optional Serie As String = "-1", Optional TelefonoGenerico As String = "", Optional CveCondicionEntrega As Integer = -1, Optional PedidoContrato As String = "-1",
+ Optional CveOC As Integer = -1, Optional IEPS As Decimal = 0, Optional Serie As String = "-1", Optional TelefonoGenerico As String = "", Optional CveCondicionEntrega As Integer = -1, Optional PedidoContrato As String = "-1",
Optional ObservacionesAlmacen As String = "", Optional CveSubProyecto As Integer = -1, Optional CveSubProyectoEjecucion As Integer = -1, Optional CveSubProyectoCobranza As Integer = -1,
- Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Double = 0,
+ Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Decimal = 0,
Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1,
- Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0,
+ Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Decimal = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0,
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1",
Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "",
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional RequiereOS As Boolean = False,
Optional FechaParaSurtir As DateTime = MinFecha, Optional Paciente As String = "-1", Optional Episodio As String = "-1", Optional EsFacturaGlobal As Boolean = False, Optional CveSATPeriodicidad As Integer = -1, Optional CveSATMes As Integer = -1, Optional SATAnio As Integer = -1, Optional CveMotivoDevolucion As Integer = -1,
- Optional CveCobranzaEstatusTurno As Integer = -1, Optional Addenda As String = "") As Boolean
+ Optional CveCobranzaEstatusTurno As Integer = -1, Optional Addenda As String = "", Optional Bloqueada As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_VentasAdd")
@@ -572,6 +573,7 @@ Public Class ClsVentas
.Add("@CveMotivoDevolucion", SqlDbType.Int).Value = CveMotivoDevolucion
.Add("@CveCobranzaEstatusTurno", SqlDbType.Int).Value = CveCobranzaEstatusTurno
.Add("@Addenda", SqlDbType.VarChar).Value = Addenda
+ .Add("@Bloqueada", SqlDbType.Bit).Value = Bloqueada
End With
'SqlTypes.SqlDateTime.Null
Try
@@ -2473,20 +2475,21 @@ Public Class ClsVentas
'End Function
#Region " PROMOCIONES "
- Public Function GetPromociones(CvePromocion As Integer, Fecha As String, CveVendedor As Integer, CveCliente As Integer, Estatus As Integer, CveEmpresa As Integer,
- CveSubProyecto As Integer, Optional CveMarca As Integer = -1) As Boolean
+ Public Function GetPromociones(CvePromocion As Integer, Fecha As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Integer, CveEmpresa As Integer,
+ CveSubProyecto As Integer, Optional CveMarca As Integer = -1, Optional CveUsuario As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PromocionesGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePromocion", SqlDbType.Int).Value = CvePromocion
- .Add("@Fecha", SqlDbType.VarChar).Value = Fecha
+ .Add("@Fecha", SqlDbType.Date).Value = Fecha
.Add("@Estatus", SqlDbType.Int).Value = Estatus
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
+ .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuario
End With
Try
@@ -5988,7 +5991,7 @@ Public Class ClsVentas
#End Region
- Public Function AddAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, Importe As Decimal, CveEstatus As Integer, CveUsuario As Integer, TipoAutorizacion As Integer, TipoDocumento As String, Optional DiasVencidos As Integer = 0, Optional Motivo As String = "", Optional PorcentajeDescuento As Decimal = 0) As Boolean
+ Public Function AddAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, Importe As Decimal, CveEstatus As Integer, CveUsuario As Integer, TipoAutorizacion As Integer, TipoDocumento As String, Optional DiasVencidos As Integer = 0, Optional Motivo As String = "", Optional PorcentajeDescuento As Decimal = 0, Optional CveVenta As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_AutorizacionLimitesAdd")
With SqlAdapter.SelectCommand.Parameters
@@ -6003,6 +6006,7 @@ Public Class ClsVentas
.Add("@DiasVencidos", SqlDbType.Int).Value = DiasVencidos
.Add("@PorcentajeDescuento", SqlDbType.Decimal).Value = PorcentajeDescuento
.Add("@Motivo", SqlDbType.VarChar).Value = Motivo
+ .Add("@CveVenta", SqlDbType.Int).Value = CveVenta
End With
Try
SqlAdapter.Fill(Data)
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index 283f93c50..80ac46373 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -8037,9 +8037,9 @@ Namespace Modelos
Public Property Fech2 As Date
Public Property Fech3 As Date
- Public Property Num1 As Double = 0
- Public Property Num2 As Double = 0
- Public Property Num3 As Double = 0
+ Public Property Num1 As Decimal = 0
+ Public Property Num2 As Decimal = 0
+ Public Property Num3 As Decimal = 0
Public Property DiasCredito As Integer
Public Property EsDiasCreditoFijo As Boolean
Public Property CveVentaTerminal As Integer = 0
@@ -8200,6 +8200,7 @@ Namespace Modelos
Public Property CveMotivoCancelacion As Integer = -1
Public Property MotivoCancelacion As String = ""
Public Property TipoContable As Integer = -1
+ Public Property Bloqueada As Boolean = False
Public Property Addenda As String = ""
#End Region
diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb
index 148701a92..d81e49fd9 100644
--- a/App_Code/modExtensiones.vb
+++ b/App_Code/modExtensiones.vb
@@ -818,6 +818,80 @@ Namespace Extensiones
Return Retorno
End Function
+ Public Function EnviarNotificacionWhatsAppPlantilla(NumeroTelefono As String, NombrePlantilla As String, ParametrosBody As ArrayList, Optional LigaBoton As String = "") As Boolean
+ Dim RetornoObj As String = "{}"
+ Dim Retorno As Boolean = False
+ If NumeroTelefono = "" OrElse NombrePlantilla = "" Then Return False
+
+ Try
+ Dim TokenAutorizacion As String = $"Bearer {WhatsAppToken}"
+ Using httpClient = New HttpClient()
+ Using request = New HttpRequestMessage(HttpMethod.Post, New Uri("https://graph.facebook.com/v20.0/425866980604901/messages"))
+ request.Headers.Add("Authorization", TokenAutorizacion)
+ Dim buttonComponent As Newtonsoft.Json.Linq.JObject = Nothing
+ ' Crear el array para "parameters"
+ Dim ArrayBody As Newtonsoft.Json.Linq.JArray = New Newtonsoft.Json.Linq.JArray()
+ If ParametrosBody.Count > 0 Then
+ For Each valor In ParametrosBody
+ Dim parametro As Newtonsoft.Json.Linq.JObject = New Newtonsoft.Json.Linq.JObject(
+ New Newtonsoft.Json.Linq.JProperty("type", "text"),
+ New Newtonsoft.Json.Linq.JProperty("text", valor)
+ )
+ ArrayBody.Add(parametro)
+ Next
+ End If
+
+ If LigaBoton <> "" Then
+ ' Crear los parámetros del componente "button"
+ Dim buttonParameters As Newtonsoft.Json.Linq.JArray = New Newtonsoft.Json.Linq.JArray(
+ New Newtonsoft.Json.Linq.JObject(
+ New Newtonsoft.Json.Linq.JProperty("type", "text"),
+ New Newtonsoft.Json.Linq.JProperty("text", "https://sig.adssistemas.mx.com/Clientes/Clientes.aspx?CveCliente=1")
+ )
+ )
+ ' Crear el componente "button"
+ buttonComponent = New Newtonsoft.Json.Linq.JObject(
+ New Newtonsoft.Json.Linq.JProperty("type", "button"),
+ New Newtonsoft.Json.Linq.JProperty("sub_type", "url"),
+ New Newtonsoft.Json.Linq.JProperty("index", 0),
+ New Newtonsoft.Json.Linq.JProperty("parameters", buttonParameters)
+ )
+ End If
+ ' Crear el componente "body" usando el array
+ Dim bodyComponent As Newtonsoft.Json.Linq.JObject = New Newtonsoft.Json.Linq.JObject(
+ New Newtonsoft.Json.Linq.JProperty("type", "body"),
+ New Newtonsoft.Json.Linq.JProperty("parameters", ArrayBody) ' Usar el JArray directamente
+ )
+ ' Construir el JSON principal
+ Dim bodyJson As Newtonsoft.Json.Linq.JObject = New Newtonsoft.Json.Linq.JObject(
+ New Newtonsoft.Json.Linq.JProperty("messaging_product", "whatsapp"),
+ New Newtonsoft.Json.Linq.JProperty("to", NumeroTelefono),
+ New Newtonsoft.Json.Linq.JProperty("type", "template"),
+ New Newtonsoft.Json.Linq.JProperty("template", New Newtonsoft.Json.Linq.JObject(
+ New Newtonsoft.Json.Linq.JProperty("name", NombrePlantilla),
+ New Newtonsoft.Json.Linq.JProperty("language", New Newtonsoft.Json.Linq.JObject(New Newtonsoft.Json.Linq.JProperty("code", "es_MX"))),
+ New Newtonsoft.Json.Linq.JProperty("components", New Newtonsoft.Json.Linq.JArray(bodyComponent, buttonComponent))
+ ))
+ )
+
+ ' Agregar el contenido a la solicitud
+ Using content = New StringContent(bodyJson.ToString(), Encoding.UTF8, "application/json")
+ request.Content = content
+ Dim response = httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).Result
+
+ If response.StatusCode = Net.HttpStatusCode.OK Then
+ RetornoObj = response.Content.ReadAsStringAsync().Result
+ Retorno = True
+ End If
+ End Using
+ End Using
+ End Using
+ Catch ex As Exception
+ RetornoObj = New Newtonsoft.Json.Linq.JObject(New Newtonsoft.Json.Linq.JProperty("Error", ex.ToString())).ToString()
+ GuardaLog("Ocurrió un error al enviar la información por WhatsApp: " & ex.Message)
+ End Try
+ Return Retorno
+ End Function
#End Region
diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx
index bbc5e7a95..4f4952174 100644
--- a/Compras/Compras.aspx
+++ b/Compras/Compras.aspx
@@ -5171,7 +5171,7 @@
-
+
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 1cd6c0683..a97e39a4d 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -1377,7 +1377,7 @@ Partial Class Compras_Compras
DdlMedico.DataBind()
End If
- If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then
+ If UsuarioActual.Empresa.Funcionalidad(590).ToString = "1" Then
DVCultivosCuadro.Visible = True
DdlSubProyecto.AutoPostBack = True
@@ -1906,24 +1906,11 @@ Partial Class Compras_Compras
TmpDT.Columns.Add("CveSATPSActualizado")
SubTotalConceptos = TmpDT.SUMD("Total").RoundSQL
- If Not TmpDT.Columns.Contains("Amortizacion") Then
- TmpDT.Columns.Add("Amortizacion", GetType(Decimal))
- End If
-
- If Not TmpDT.Columns.Contains("AplicaLote") Then
- TmpDT.Columns.Add("AplicaLote", GetType(Boolean))
- End If
- If Not TmpDT.Columns.Contains("AplicaCaducidad") Then
- TmpDT.Columns.Add("AplicaCaducidad", GetType(Boolean))
- End If
-
-
- If Not TmpDT.Columns.Contains("Lote") Then
- TmpDT.Columns.Add("Lote", GetType(String))
- End If
- If Not TmpDT.Columns.Contains("FechaCaducidad") Then
- TmpDT.Columns.Add("FechaCaducidad", GetType(Date))
- End If
+ If Not TmpDT.Columns.Contains("Amortizacion") Then TmpDT.Columns.Add("Amortizacion", GetType(Decimal))
+ If Not TmpDT.Columns.Contains("AplicaLote") Then TmpDT.Columns.Add("AplicaLote", GetType(Boolean))
+ If Not TmpDT.Columns.Contains("AplicaCaducidad") Then TmpDT.Columns.Add("AplicaCaducidad", GetType(Boolean))
+ If Not TmpDT.Columns.Contains("Lote") Then TmpDT.Columns.Add("Lote", GetType(String))
+ If Not TmpDT.Columns.Contains("FechaCaducidad") Then TmpDT.Columns.Add("FechaCaducidad", GetType(Date))
AddPS2(False)
@@ -2324,6 +2311,19 @@ Partial Class Compras_Compras
End If
End If
Next
+
+ 'consideración si el usuarioactual, solo tienen un centro de costo, que lo asigne en automático
+ Dim dtsubAsignados As DataTable = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
+ If dtsubAsignados.Rows.Count = 1 Then
+ Dim drtt As DataRow = dtsubAsignados.FiltroPrimero("")
+ For Each item As DataRow In TmpDT.Rows
+ item("CveSubProyecto") = drtt("CveSubProyecto")
+ item("SubProyecto") = drtt("SubProyecto")
+ item("CveProyecto") = drtt("CveProyecto")
+ item("Proyecto") = drtt("Proyecto")
+ Next
+ End If
+
GvPS.DataSource = TmpDT
GvPS.DataBind()
UpPS.Update()
@@ -4391,24 +4391,6 @@ Partial Class Compras_Compras
End If
- ''VERIFICA SI LOS PRODUCTOS/SERVICIOS EXISTEN EN EL CATALOGO DEL SAT
- 'If UsuarioActual.CveEmpresa = 72 Then
-
- ' Dim DtNoEncontrados As DataTable = TmpDT.FiltraParametros("ISNULL(CveSATPS,0) = 46920 ")
- ' If DtNoEncontrados IsNot Nothing AndAlso DtNoEncontrados.Rows.Count > 0 Then
- ' Dim StrNoEncontrados As New StringBuilder
- ' StrNoEncontrados.Append("Los siguientes productos no tiene asignado la clave Producto SAT o Unidad Medida SAT
")
- ' For Each drt As DataRow In DtNoEncontrados.Rows
- ' StrNoEncontrados.AppendFormat("{0} ", drt("CodigoPS"))
- ' Next
- ' Alert(StrNoEncontrados.ToString(), TipoMensaje.MsgAdvertencia)
- ' DtNoEncontrados.Dispose()
- ' StrNoEncontrados.Clear()
- ' Exit Sub
- ' End If
- ' DtNoEncontrados.Dispose()
- 'End If
-
'Verifica funcionalidad 128 "Require orden de compra para factura de compra"
Dim EsViatico As Boolean = False
@@ -4447,21 +4429,6 @@ Partial Class Compras_Compras
Exit Sub
End If
- ''DF - 10/04/2017
- 'If UsuarioActual.TienePermisoProceso(187) Then
- ' If TxtSerie.Text <> SerieVieja Then
- ' Dim dtt As DataTable = GlobalDTProveedorSucursales(CveProveedor, UsuarioActual.CveEmpresa)
- ' If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
- ' Dim SerieNueva As String = dtt.FiltroPrimeroValor("Serie", $"Serie = '{TxtSerie.Text}'").ToString
- ' If SerieNueva = "" Then
- ' Alert("La Serie no es válida, por favor revise que se encuentre dentro de la lista de las sucursales del proveedor.", TipoMensaje.MsgAdvertencia)
- ' Exit Sub
- ' End If
- ' End If
-
- ' End If
- 'End If
-
'Excede el limite de credito
If RBLPago.SelectedValue = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Fac") AndAlso UsuarioActual.Empresa.Funcionalidad(518) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(185) Then
Dim ObjCompras As New ClsCompras
@@ -4528,36 +4495,28 @@ Partial Class Compras_Compras
ValidaFechaDeAlamacen()
Else
'GvInv.Rows(x).FCDropDownList("ddlEAlmacen").SelectedValue.ToEntero 'Charlie
- Dim x As Integer = 0
- For Each Dr As GridViewRow In GvInv.Rows
- If Dr.FCCheckBox("cbInv").Checked Then
+ 'pestaña de almacen, si hay especificado una entrada por partida dealmacen, debe de existir el almacen.
+ If GvInv.Rows.Count > 0 Then
+ If DdlTipoComprobante.SelectedValue.Contiene("Fac") Then
+ Dim x As Integer = 0
+ For Each Dr As GridViewRow In GvInv.Rows
+ If Dr.FCCheckBox("cbInv").Checked Then
+ If Dr.FCDropDownList("ddlEAlmacen").SelectedValue.ToEntero <= 0 Then
+ Alert("Favor de seleccionar almacen en la pestaña de almacén.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+ x = x + 1
+ End If
+ Next
- If Not Dr.FCDropDownList("ddlEAlmacen").SelectedValue.ToEntero > 0 Then
- Alert("Favor de seleccionar almacen en la pestaña de almacén.", TipoMensaje.MsgAdvertencia)
- Exit Sub
+ If Not (CveCompraRefacturacion > 0 AndAlso ChkRefacturacionConAlmacen.Checked) Then
+ If x = 0 AndAlso GvInv.Rows.Count > 0 Then
+ Alert("Favor de seleccionar un producto en la pestaña de almacén", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
End If
-
- x = x + 1
- End If
-
- Next
-
- If Not (CveCompraRefacturacion > 0 AndAlso ChkRefacturacionConAlmacen.Checked) Then
- If x = 0 AndAlso GvInv.Rows.Count > 0 Then
- Alert("Favor de seleccionar un producto en la pestaña de almacén", TipoMensaje.MsgAdvertencia)
- Exit Sub
End If
End If
-
- End If
- End If
-
-
-
- If UsuarioActual.Empresa.Funcionalidad(538) = "1" Then
- If TmpDT.MIN("CvePS").ToEntero <= 0 Then
- Alert("Todos los Productos/Servicios deben estar registrados o aliados a un productos ya registrado.", TipoMensaje.MsgAdvertencia)
- Exit Sub
End If
End If
@@ -11502,7 +11461,7 @@ Partial Class Compras_Compras
e.Row.FCDropDownList("ddlAlmacenConsignacionGeneral").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 4)
e.Row.FCDropDownList("ddlAlmacenConsignacionGeneral").DataBind()
- 'que no sea recepcion alamcen adelatnado. DdlOCVinculaInv
+ 'que no sea recepcion almacen adelantado. DdlOCVinculaInv
If UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso DdlOCVinculaInv.SelectedValue <> "176" Then
If e.Row.FCDropDownList("ddlAlmacen").Items.Count > 1 Then
e.Row.FCDropDownList("ddlAlmacen").SelectedIndex = 1
@@ -19152,7 +19111,11 @@ Partial Class Compras_Compras
Else
HplDevv.Text = " Solicitar Devolución Almacén"
HplDevv.ToolTip = "¿Está seguro de Solicitar la Devolución de Almacén?"
- ChkEsDevolucionDevInv.Visible = True
+ If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
+ ChkEsDevolucionDevInv.Visible = True
+ ChkEsDevolucionDevInv.Checked = True
+ ChkEsDevolucionDevInv.Enabled = False
+ End If
End If
End If
@@ -19181,26 +19144,18 @@ Partial Class Compras_Compras
Dim tCveSubProyeto As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
ObjCompras.IniciaTransacSQL()
- If ChkEsDevolucionDevInv.Checked Then
-
- End If
-
Dim ImporteCompra As Decimal = 0
-
If EstatusAlmacen = 0 Then
For Each gvr As GridViewRow In GvSolDev.Rows
-
Dim Cantidad As Decimal = gvr.FCTextBox("TxtCant").Text.ToDecimal
Dim PU As Decimal = gvr.DataKey("PU").ToDecimal
-
If gvr.FCTextBox("TxtCant").Text.ToDecimal > 0 Then
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 0, UsuarioActual.CveUsuario, CantidadDevolucion:=gvr.FCTextBox("TxtCant").Text.ToDecimal)
ImporteCompra = ImporteCompra + ((PU * Cantidad))
Else
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 1, UsuarioActual.CveUsuario, CantidadDevolucion:=0)
End If
-
Next
End If
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index ea00e848c..5ad5f3e85 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -3080,7 +3080,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Observaciones", Observaciones))
- If UsuarioActual.CveEmpresa.Contiene(186, 189, 193) Then
+ If UsuarioActual.CveEmpresa.Contiene(186, 189, 193, 189) Then
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
params.Add(New ReportParameter("NombreProveedor", If(CveCompra > 0, dr("RazonSocial").ToString, "")))
End If
diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb
index 7e5c2cd3a..f2874e93f 100644
--- a/Compras/eFacturas.aspx.vb
+++ b/Compras/eFacturas.aspx.vb
@@ -1124,11 +1124,8 @@ Partial Class Compras_eFacturas
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
- Dim FechaFactura As Date = e.Row.DataKey("FechaFactura").ToDate
- Dim AnioFactura As Integer = FechaFactura.Year
-
Dim Fecha28Dic As Date = New Date(2024, 12, 28)
- If NowADS() >= Fecha28Dic Then
+ If NowADS() >= Fecha28Dic AndAlso e.Row.DBCampo("FechaFactura").ToDate <= "2025/01/01".ToDate Then
e.Row.FCHyperLink("HplAgregar").Visible = False
End If
End If
diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb
index 98d85a892..427aae109 100644
--- a/Inventarios/EntregaAlmacen.aspx.vb
+++ b/Inventarios/EntregaAlmacen.aspx.vb
@@ -2300,28 +2300,38 @@ Partial Class Inventarios_EntregaAlmacen
StrXML.Append("")
Dim TieneErrorExistencia As Boolean = False
- If ObjInventario.GetExistenciasPSXML(StrXML.ToString(), DdlAlmacen.SelectedValue.ToEntero(), TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSubProyecto, CveVendedor, If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), If(TipoEntrega = 2, 1, -1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
- If ObjInventario.DtResultados.Rows.Count > 0 Then
- TieneErrorExistencia = True
- For Each Dr As DataRow In ObjInventario.DtResultados.Rows
+ Dim VerificaExistencia As Boolean = True
- Dim SerieLoteCaducidad As String = ","
- If Dr("Serie").ToString.Trim.Length > 0 AndAlso Dr("Serie").ToString.Trim <> "-1" Then
- SerieLoteCaducidad = $" Serie: { Dr("Serie").ToString.Trim}"
- End If
- If Dr("Lote").ToString.Trim.Length > 0 AndAlso Dr("Lote").ToString.Trim <> "-1" Then
- SerieLoteCaducidad = $"{SerieLoteCaducidad} Lote: {Dr("Lote").ToString.Trim}"
- End If
- If Dr("FechaCaducidad").ToString.Trim.Length > 0 AndAlso Dr("FechaCaducidad").ToString.Trim <> "-1" Then
- SerieLoteCaducidad = $"{SerieLoteCaducidad} Caducidad: { Dr("FechaCaducidad").ToString.Trim.ToDate.ToString("dd/MM/yyyy")}"
- End If
- TextoError.AppendFormat(" - {0} Existencia: {1:#,##0.##} {2} ", Dr("CodigoPS"), Dr("Existencia"), If(SerieLoteCaducidad <> ",", SerieLoteCaducidad, ""))
- Next
- End If
- Else
- TieneErrorExistencia = True
+ 'TEMPORAL - NO VERIFICAR EXISTENCIA CUANDO SON MUCHOS DATOS
+ If UsuarioActual.CveEmpresa = 140 AndAlso DtDatos.Rows.Count > 10 Then
+ VerificaExistencia = False
End If
+ If VerificaExistencia Then
+ If ObjInventario.GetExistenciasPSXML(StrXML.ToString(), DdlAlmacen.SelectedValue.ToEntero(), TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSubProyecto, CveVendedor, If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), If(TipoEntrega = 2, 1, -1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
+ If ObjInventario.DtResultados.Rows.Count > 0 Then
+ TieneErrorExistencia = True
+ For Each Dr As DataRow In ObjInventario.DtResultados.Rows
+
+ Dim SerieLoteCaducidad As String = ","
+ If Dr("Serie").ToString.Trim.Length > 0 AndAlso Dr("Serie").ToString.Trim <> "-1" Then
+ SerieLoteCaducidad = $" Serie: { Dr("Serie").ToString.Trim}"
+ End If
+ If Dr("Lote").ToString.Trim.Length > 0 AndAlso Dr("Lote").ToString.Trim <> "-1" Then
+ SerieLoteCaducidad = $"{SerieLoteCaducidad} Lote: {Dr("Lote").ToString.Trim}"
+ End If
+ If Dr("FechaCaducidad").ToString.Trim.Length > 0 AndAlso Dr("FechaCaducidad").ToString.Trim <> "-1" Then
+ SerieLoteCaducidad = $"{SerieLoteCaducidad} Caducidad: { Dr("FechaCaducidad").ToString.Trim.ToDate.ToString("dd/MM/yyyy")}"
+ End If
+ TextoError.AppendFormat(" - {0} Existencia: {1:#,##0.##} {2} ", Dr("CodigoPS"), Dr("Existencia"), If(SerieLoteCaducidad <> ",", SerieLoteCaducidad, ""))
+ Next
+ End If
+ Else
+ TieneErrorExistencia = True
+ End If
+ End If
+
+
If TieneErrorExistencia Then
ObjInventario.RollBack()
ObjInventario.Dispose()
@@ -3681,17 +3691,28 @@ Partial Class Inventarios_EntregaAlmacen
StrXML.Append("")
Dim TieneErrorExistencia As Boolean = False
- If ObjInventario.GetExistenciasPSXML(StrXML.ToString(), DdlAlmacen.SelectedValue.ToEntero(), TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSubProyecto, CveVendedor, If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), If(TipoEntrega = 2, 1, -1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
- If ObjInventario.DtResultados.Rows.Count > 0 Then
- TieneErrorExistencia = True
- For Each Dr As DataRow In ObjInventario.DtResultados.Rows
- TextoError += $" - {Dr("CodigoPS")} Existencia: {Dr("Existencia").ToString().ToDecimal.ToString("#,##0.##")} "
- Next
- End If
- Else
- TieneErrorExistencia = True
+
+ Dim VerificaExistencia As Boolean = True
+
+ 'TEMPORAL - NO VERIFICAR EXISTENCIA CUANDO SON MUCHOS DATOS
+ If UsuarioActual.CveEmpresa = 140 AndAlso DtDatos.Rows.Count > 10 Then
+ VerificaExistencia = False
End If
+ If VerificaExistencia Then
+ If ObjInventario.GetExistenciasPSXML(StrXML.ToString(), DdlAlmacen.SelectedValue.ToEntero(), TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSubProyecto, CveVendedor, If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), If(TipoEntrega = 2, 1, -1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
+ If ObjInventario.DtResultados.Rows.Count > 0 Then
+ TieneErrorExistencia = True
+ For Each Dr As DataRow In ObjInventario.DtResultados.Rows
+ TextoError += $" - {Dr("CodigoPS")} Existencia: {Dr("Existencia").ToString().ToDecimal.ToString("#,##0.##")} "
+ Next
+ End If
+ Else
+ TieneErrorExistencia = True
+ End If
+ End If
+
+
If TieneErrorExistencia Then
ObjInventario.RollBack()
ObjInventario.Dispose()
diff --git a/Inventarios/TrasladoSolicitud.aspx b/Inventarios/TrasladoSolicitud.aspx
index fbb09ad01..a12e04e17 100644
--- a/Inventarios/TrasladoSolicitud.aspx
+++ b/Inventarios/TrasladoSolicitud.aspx
@@ -299,7 +299,7 @@
diff --git a/Inventarios/TrasladoSolicitud.aspx.vb b/Inventarios/TrasladoSolicitud.aspx.vb
index bcd68055d..a6ddafa5f 100644
--- a/Inventarios/TrasladoSolicitud.aspx.vb
+++ b/Inventarios/TrasladoSolicitud.aspx.vb
@@ -503,8 +503,9 @@ Partial Class Inventarios_TrasladoSolicitud
TextoExistencia.Append("Los siguiente productos no tienen existencia: ")
For Each gvr As GridViewRow In GvSolicitudes.Rows
- Dim Existencia As Decimal = 0
+
+ Dim Existencia As Decimal = 0
Dim MsgAdicional As String = ""
If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, CveAlmacenOrigen, FechaMovto:=NowADS.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=-1, Serie:="-1", Lote:="-1", Caducidad:=MinFecha) Then
@@ -606,15 +607,32 @@ Partial Class Inventarios_TrasladoSolicitud
For Each gvr As GridViewRow In GvSolicitudes.Rows
- Dim Cantidad As Decimal = gvr.FCTextBox("TxtCantidad").Text.ToDecimal
- If gvr.FCCheckBox("Chk").Checked AndAlso Cantidad > 0 Then
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, CveAF:=-1, CveSeccionAlmacen:=-1, Serie:="-1", Lote:="-1", FechaCaducidad:=MinFecha, Observaciones:="") Then
+ Dim CveTrasladoSolicitudDetalle As Integer = gvr.DataKey("CveTrasladoSolicitudDetalle").ToEntero
+ Dim CantidadOriginal As Decimal = gvr.DataKey("Cantidad").ToDecimal
+ Dim CantidadAceptada As Decimal = gvr.FCTextBox("TxtCantidad").Text.ToDecimal
+
+
+ If gvr.FCCheckBox("Chk").Checked AndAlso CantidadAceptada > 0 Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadAceptada, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, CveAF:=-1, CveSeccionAlmacen:=-1, Serie:="-1", Lote:="-1", FechaCaducidad:=MinFecha, Observaciones:="") Then
ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de salida"
Exit For
End If
+
+ If CantidadOriginal <> CantidadAceptada Then
+ If Not ObjInventario.UpdateTrasladoSolicitudDetalle(CveTrasladoSolicitudDetalle, UsuarioActual.CveEmpresa, -1, CantidadAceptada, -1, -1, -1, "-1", -1, "-1", "-1", MinFecha) Then
+ ErrorMovInv = True
+ TextoError = "Ocurrió un error al actuazliar el detalle de traslado"
+ Exit For
+ End If
+ End If
+
Cont += 1
+
End If
+
+
+
Next
'For Each Dr As DataRow In DtMovimientos.RowsF
diff --git a/OC/PopUpBuscarReq.aspx.vb b/OC/PopUpBuscarReq.aspx.vb
index b547f75b3..331f62b03 100644
--- a/OC/PopUpBuscarReq.aspx.vb
+++ b/OC/PopUpBuscarReq.aspx.vb
@@ -143,13 +143,14 @@ Partial Class OC_PopUpBuscarReq
ViewState("CveProveedor") = DdlProveedorMultiple.SelectedValue
tCveProveedor = DdlProveedorMultiple.SelectedValue.ToEntero
End If
+ Dim CveEstatus As Integer = GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatus", "Tipo = 'OC' and TipoTermino = 3").ToEntero
'Cargar Datos
Dim ObjOC As New ClsOC
- ObjOC.GetOrdenesCompraVinculacion("OC", -1, -1, -1, MinFecha, MaxFecha, -1, tCveProveedor, -1, -1, UsuarioActual.CveEmpresa)
+ ObjOC.GetOrdenesCompraVinculacion("OC", -1, -1, CveEstatus, MinFecha, MaxFecha, -1, tCveProveedor, -1, -1, UsuarioActual.CveEmpresa)
Dim DtOC As Data.DataTable = ObjOC.DtResultados
ObjOC.Dispose()
- If DtOC.Rows.Count > 0 Then ' tipotermino, esattus inicial
+ If DtOC.Rows.Count > 0 Then ' tipotermino, estatus inicial
BtnVincularOC.Visible = True
End If
diff --git a/OC/RepOCxSurtir.aspx b/OC/RepOCxSurtir.aspx
index 0365b13b2..148aeb4e3 100644
--- a/OC/RepOCxSurtir.aspx
+++ b/OC/RepOCxSurtir.aspx
@@ -18,7 +18,7 @@
<%--FILTROS--%>
-
+
@@ -53,6 +53,10 @@
+
Centro de Costo
+
+
+
@@ -60,16 +64,15 @@
-
+ <%----%>
+
Cliente:
-
-
-
Centro de Costo
-
-
+ <%----%>
+
+
diff --git a/OC/RepOCxSurtir.aspx.vb b/OC/RepOCxSurtir.aspx.vb
index 0a9726d3a..5e0c376cc 100644
--- a/OC/RepOCxSurtir.aspx.vb
+++ b/OC/RepOCxSurtir.aspx.vb
@@ -15,20 +15,51 @@ Partial Class OC_RepOCxSurtir
#Region " INICIALIZA VALORES "
Private Sub InicializaValores()
+
+ Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
+
TxtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
TxtFechaF.Text = NowADS().ToShortDateString
- DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
- DdlProveedor.DataBind()
- DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
+ 'DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
+ 'DdlProveedor.DataBind()
+ 'DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
+
+ 'CargaProveedores
+
DdlSubProyecto.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
- DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
- DdlCliente.DataBind()
- DdlCliente.Items.Insert(0, New ListItem("Todos", "-1"))
+
+
+
+ If EsWS Then
+ DdlCliente.setEsWebService(True)
+ DdlCliente.SelectedText = "Todos"
+ DdlCliente.SelectedValue = "-1"
+
+ DdlProveedor.setEsWebService(True)
+ DdlProveedor.Attributes.Add("data-metodo", "getproveedores")
+ DdlProveedor.SelectedText = "Todos"
+ DdlProveedor.SelectedValue = "-1"
+
+ Else
+ DdlCliente.setEsWebService(False)
+ DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
+ DdlCliente.DataBind()
+ DdlCliente.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
+
+ DdlProveedor.setEsWebService(False)
+ DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
+ DdlProveedor.DataBind()
+ DdlProveedor.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
+
+
+
+ End If
+
UPFiltros.Update()
End Sub
diff --git a/RH/PopUpBuscarPersonal.aspx b/RH/PopUpBuscarPersonal.aspx
index 9bf6f2f1b..40a763c65 100644
--- a/RH/PopUpBuscarPersonal.aspx
+++ b/RH/PopUpBuscarPersonal.aspx
@@ -34,7 +34,7 @@