This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2024-12-31 07:26:01 -07:00
32 changed files with 963 additions and 866 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -5171,7 +5171,7 @@
<div class="modal-body">
<div class="row">
<div class="col-md-12" style="text-align:right">
<asp:CheckBox runat="server" ID="ChkEsDevolucionDevInv" Text="Es Temporal" Visible="false" />
<asp:CheckBox runat="server" ID="ChkEsDevolucionDevInv" Text="Genera Saldo a favor" Visible="false" />
</div>
</div>
<div class="form-group form-md-line-input input-iconright">

View File

@@ -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<br/><br/>")
' For Each drt As DataRow In DtNoEncontrados.Rows
' StrNoEncontrados.AppendFormat("{0} <br/>", 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 = "<i class='fa fa-pencil'></i> 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

View File

@@ -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

View File

@@ -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

View File

@@ -2300,28 +2300,38 @@ Partial Class Inventarios_EntregaAlmacen
StrXML.Append("</conceptos>")
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("<b> - {0}</b> Existencia: {1:#,##0.##} {2}<br/>", 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("<b> - {0}</b> Existencia: {1:#,##0.##} {2}<br/>", 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("</conceptos>")
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 += $"<b> - {Dr("CodigoPS")}</b> Existencia: {Dr("Existencia").ToString().ToDecimal.ToString("#,##0.##")} <br/>"
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 += $"<b> - {Dr("CodigoPS")}</b> Existencia: {Dr("Existencia").ToString().ToDecimal.ToString("#,##0.##")} <br/>"
Next
End If
Else
TieneErrorExistencia = True
End If
End If
If TieneErrorExistencia Then
ObjInventario.RollBack()
ObjInventario.Dispose()

View File

@@ -299,7 +299,7 @@
<div class="col-md-12">
<asp:GridView ID="GvSolicitudes" runat="server" AutoGenerateColumns="False"
DataKeyNames="CvePS, CodigoPS, CveUM, Cantidad, Precio, Observaciones, CveContratoDetalle,UnidadMedida,Serie, Lote, FechaCaducidad" EmptyDataText="No se encontraron Productos registrados"
DataKeyNames="CveTrasladoSolicitudDetalle,CvePS, CodigoPS, CveUM, Cantidad, Precio, Observaciones, CveContratoDetalle,UnidadMedida,Serie, Lote, FechaCaducidad" EmptyDataText="No se encontraron Productos registrados"
ToolTip="Listado de Productos" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall" GridLines="None"
OnRowDataBound="GvSolicitudes_RowDataBound" >
<Columns>

View File

@@ -503,8 +503,9 @@ Partial Class Inventarios_TrasladoSolicitud
TextoExistencia.Append("Los siguiente productos no tienen existencia:<br/>")
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

View File

@@ -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

View File

@@ -18,7 +18,7 @@
<%--FILTROS--%>
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
@@ -53,6 +53,10 @@
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
<div class="col-md-1" style="max-width: 110px;">Centro de Costo</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="select2me Widthall"></asp:DropDownList>
</div>
</div>
</div>
</div>
@@ -60,16 +64,15 @@
<div class="row">
<label class="col-md-1" style="max-width: 80px;">Proveedor: </label>
<div class="col-md-2">
<asp:DropDownList ID="DdlProveedor" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Class="select2me Widthall" ></asp:DropDownList>
<%--<asp:DropDownList ID="DdlProveedor" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" CssClass="select2me" Width="100%" ></asp:DropDownList>--%>
<ADS:Dropdownlost ID="DdlProveedor" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
</div>
<div class="col-md-1" style="max-width: 60px;">Cliente:</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlCliente" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="select2me Widthall"></asp:DropDownList>
</div>
<div class="col-md-1" style="max-width: 110px;">Centro de Costo</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="select2me Widthall"></asp:DropDownList>
<%--<asp:DropDownList ID="DdlCliente" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" CssClass="select2me" Width="100%" ></asp:DropDownList>--%>
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCliente" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
</div>
</div>
</div>

View File

@@ -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

View File

@@ -34,7 +34,7 @@
<asp:TextBox ID="TxtCodigo" runat="server" MaxLength="12" Width="100px"></asp:TextBox></td>
<td class="text-right"><b>Nombre:</b></td>
<td colspan="3">
<asp:TextBox ID="TxtNombre" runat="server" MaxLength="100" Width="362px" autofocus></asp:TextBox></td>
<asp:TextBox ID="TxtNombre" runat="server" MaxLength="100" Width="362px" autofocus="autofocus"></asp:TextBox></td>
</tr>
<tr align="left">
<td class="text-right"><b>NSS:</b></td>
@@ -43,7 +43,7 @@
<td class="text-right"><b>Puesto:</b></td>
<td>
<asp:DropDownList ID="DdlPuestos" runat="server" AppendDataBoundItems="true" DataTextField="Puesto" DataValueField="CvePuesto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>RFC:</b></td>
@@ -54,19 +54,19 @@
<td class="text-right"><b>Tipo de Período:</b></td>
<td>
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" AppendDataBoundItems="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>Tipo de Contrato:</b></td>
<td>
<asp:DropDownList ID="DdlTipoContrato" runat="server" AppendDataBoundItems="true" DataTextField="TipoContrato" DataValueField="CveTipoContrato" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>Departamento:</b></td>
<td>
<asp:DropDownList ID="DdlDepartamentos" runat="server" AppendDataBoundItems="true" DataTextField="Departamento" DataValueField="CveDepartamento" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
@@ -74,19 +74,19 @@
<td class="text-right"><b>Género:</b></td>
<td>
<asp:DropDownList ID="DdlGenero" runat="server" AppendDataBoundItems="true" DataTextField="Genero" DataValueField="CveGenero" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>Estado Civil:</b></td>
<td>
<asp:DropDownList ID="DdlEstadoCivil" runat="server" AppendDataBoundItems="true" DataTextField="EstadoCivil" DataValueField="CveEstadoCivil" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>Escolaridad:</b></td>
<td>
<asp:DropDownList ID="DdlEscolaridad" runat="server" AppendDataBoundItems="true" DataTextField="Escolaridad" DataValueField="CveEscolaridad" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
@@ -101,13 +101,13 @@
<td class="text-right"><b>Turno:</b></td>
<td>
<asp:DropDownList ID="DdlTurnos" runat="server" AppendDataBoundItems="true" DataTextField="Turno" DataValueField="CveTurno" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>Cliente:</b></td>
<td>
<asp:DropDownList ID="DdlClienteAsignado" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
@@ -115,19 +115,19 @@
<td class="text-right"><b>Proyecto:</b></td>
<td>
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>Sub Proyecto:</b></td>
<td>
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>Ruta:</b></td>
<td>
<asp:DropDownList ID="DdlRuta" runat="server" AppendDataBoundItems="true" DataTextField="Ruta" DataValueField="CveRuta" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
@@ -135,7 +135,7 @@
<td class="text-right"><b>Estatus:</b></td>
<td>
<asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" DataTextField="EstatusPersonal" DataValueField="CveEstatusPersonal" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>clasificación:</b></td>
@@ -175,8 +175,6 @@
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
<td colspan="2">
<asp:GridView ID="GvCrt2" runat="server" GridLines="None" BorderWidth="0" CssClass="table table-hover table-advance Widthall" AutoGenerateColumns="False"

View File

@@ -168,7 +168,7 @@
</a>
</li>
<li id="tdVentas" runat="server" visible="false">
<a onclick="javascript:AbrirVentana('/Ventas/PopUpBuscarFolio.aspx',890,577,'N');
<a onclick="javascript:AbrirVentana('/Ventas/PopUpBuscarFolio.aspx',890,607,'N');
">
<i class="fa fa-money"></i>
Buscar Venta

View File

@@ -213,6 +213,8 @@ Partial Class Ventas_CatAutorizacionLimites
Dim CveCliente As Integer = gvRow.DataKey("CveCliente").ToEntero()
Dim CveVendedor As Integer = gvRow.DataKey("CveVendedor").ToEntero()
Dim CveEstatusAutorizacion As Integer = 1
'cuando es la modalidad 3, es autorización directa sobre la venta ya asociada a la solicitud.
If UsuarioActual.Empresa.Funcionalidad(595) = "3" Then CveEstatusAutorizacion = 2
Dim Importe As Decimal = gvRow.DataKey("Importe").ToDecimal().RoundSQL(2)
'AUTORIZACION DE IMPORTE,
@@ -247,7 +249,7 @@ Partial Class Ventas_CatAutorizacionLimites
Dim DiasVencidosAutorizacion As Integer = gvRow.DataKey("DiasVencidosAutorizacion").ToEntero()
If DiasVencidos > DiasVencidosAutorizacion Then
Alert($"No se puede autorizar, los días vencidos del cliente son mayores a la autorización. Dias Vencidos: {DiasVencidos:N0} . Dias autorizados. {DiasVencidosAutorizacion:N0}", TipoMensaje.MsgAdvertencia)
Alert($"No se puede autorizar, los días vencidos del cliente son mayores a la autorización. <br/> Dias Vencidos: {DiasVencidos:N0} . Dias autorizados. {DiasVencidosAutorizacion:N0}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If

View File

@@ -80,12 +80,14 @@
<label for="<%= TxtPrecioLista.ClientID.ToString()%>">Precio de Lista:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:CheckBox ID="ChkPredeterminada" runat="server" Text="Predeterminada" CausesValidation="true"></asp:CheckBox>
</div>
<div id="dvEstatus" runat="server" class="form-group form-md-line-input input-iconright">
<label>Activo: </label>
<asp:CheckBox ID="chkEstatus" Text=" " runat="server" CssClass="chksino" Width="250px"></asp:CheckBox>
</div>
<div class="col-md-6">
<asp:CheckBox ID="ChkPredeterminada" runat="server" Text="Predeterminada" CausesValidation="true"></asp:CheckBox>
</div>
<div class="col-md-6" id="dvEstatus" runat="server">
<label>Activo: </label>
<asp:CheckBox ID="chkEstatus" Text=" " runat="server" CssClass="chksino" Width="250px"></asp:CheckBox>
</div>
</div>
<div id="divPermiso" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
<label>Restringida a permiso: </label>
<asp:CheckBox ID="ChkRestringida" Text=" " runat="server" CssClass="chksino" Width="250px"></asp:CheckBox>

View File

@@ -57,16 +57,16 @@
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover" runat="server" AutoGenerateColumns="False" GridLines="None">
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" runat="server" AutoGenerateColumns="False" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Promoción" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:HyperLink runat="server" ID="HLPromocion" Text='<%# Eval("Promocion").ToString %>' CssClass="Texto"></asp:HyperLink>
<asp:HyperLink runat="server" ID="HLPromocion" Text='<%# Eval("Promocion").ToString %>' NavigateUrl ='<%# Eval("CvePromocion", "/Ventas/Promociones.aspx?CvePromocion={0}") %>' CssClass="Texto"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="FechaInicio" DataFormatString="{0:d}" HeaderText="F. Inicio" ItemStyle-Width="70px" />
<asp:BoundField DataField="FechaFin" DataFormatString="{0:d}" HeaderText="F. Fin" ItemStyle-Width="70px" />
<asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" ItemStyle-Width="100px" />
<asp:BoundField DataField="FechaInicio" DataFormatString="{0:d}" HeaderText="F. Inicio" ItemStyle-Width="80px" />
<asp:BoundField DataField="FechaFin" DataFormatString="{0:d}" HeaderText="F. Fin" ItemStyle-Width="80px" />
<asp:BoundField DataField="SubProyecto" HeaderText="Sucursal" ItemStyle-Width="125px" />
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="70px">
<ItemTemplate>
<asp:Label runat="server" ID="LbEstatus" Text='<%#If(Eval("Estatus").ToString = "True", "Activo", "Inactivo") %>' />
@@ -82,25 +82,6 @@
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="JS" runat="Server">
<script type="text/javascript">
function pageLoad() {
$(document).ready(function () {
gridviewScroll();
});
function gridviewScroll() {
var Tam = TamañoVentana();
var Alto = Tam.height - 210;
$('#<%=GvDatos.ClientID%>').gridviewScroll({
width: 995,
height: Alto,
freezesize: 1,
headerrowcount: 1
});
}
}
</script>
</asp:Content>

View File

@@ -36,7 +36,7 @@ Partial Class Ventas_CatPromociones
Private Sub CargaDatos()
Dim ObjVentas As New ClsVentas
If ObjVentas.GetPromociones(-1, "-1", -1, -1, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero) Then
If ObjVentas.GetPromociones(-1, MinFecha, -1, -1, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, CveUsuario:=UsuarioActual.CveUsuario) Then
DtDatos = ObjVentas.DtResultados
Else
DtDatos = Nothing
@@ -58,12 +58,5 @@ Partial Class Ventas_CatPromociones
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CargaDatos()
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.FCHyperLink("HLPromocion").NavigateUrl = String.Format("/Ventas/Promociones.aspx?CvePromocion={0}", e.Row.DBCampo("CvePromocion"))
End If
End Sub
End Class

View File

@@ -371,7 +371,6 @@
</div>
</div>
</div>
</div>
<div class="portlet-body rowpadding">
<div class="row">
@@ -399,9 +398,7 @@
<div class="row">
<div class="note note-success">
<div class="row">
<div class="col-md-2">
<asp:LinkButton ID="ImgAntiPend" Visible="false" OnClick="ImgAntiPend_Click" runat="server" Text=" <i class='fa fa-money' style='font-size: 18px !important; color: #3c763d !important;'></i> " AlternateText="Aplicación de anticipos" Style="cursor: pointer;" />
&nbsp;
<div class="col-md-2">
<b>Nombre:</b>
</div>
<div class="col-md-4">&nbsp;<label><asp:Literal ID="LtlNombre" runat="server"></asp:Literal></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
@@ -538,7 +535,8 @@
<div class="chequesie1" id="DivAnticipo" runat="server" visible="false">
<div class="row">
<div class="col-md-2">
<label>Anticipos.:</label>
<label>Anticipos:</label><asp:LinkButton ID="ImgAntiPend" Visible="false" OnClick="ImgAntiPend_Click" runat="server" Text=" <i class='fa fa-money' style='font-size: 18px !important; color: #3c763d !important;'></i> " AlternateText="Aplicación de anticipos" Style="cursor: pointer;" />
</div>
<div class="col-md-4 input-icon">
<i style="margin: 0px;">$</i>
@@ -1108,7 +1106,7 @@
<div id="DivAnticipos" class="modal ADS fade" role="dialog">
<asp:UpdatePanel runat="server" ID="UpAnticipos" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<div class="modal-dialog">
<div class="modal-dialog" style ="width: 700px;">
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
@@ -1189,7 +1187,7 @@
</div>
<br />
<asp:GridView ID="GVAnticipos" runat="server" AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText="No se encontraron Anticipos del Cliente"
ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall mysmallbtn" data-height="300" Style="text-align: center;" GridLines="None"
ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall mysmallbtn" data-height="300" GridLines="None"
DataKeyNames="ISTotal,Saldo,CveIE,Folio,Tipo,CveVenta,CveConceptoContable,CveConceptoContableAmor, TotalAnticipo, SubTotalAnticipo, IVAAnticipo,IEPS, ImpuestosLocalesAnticipo, SubTotalAmortizacion, SubTotal, Original, IVA, RetIVA, RetISR, FolioFiscal, CveClasificacionNC, TipoCambio,TipoCambioPago,TipoCambioHoy, CveMoneda,Fecha,SaldoSubTotal,SaldoConImpuestos,RegresarImpuesto,DevolucionImportePagado,CveCliente,Descuentos">
<Columns>
<asp:TemplateField>

View File

@@ -3,12 +3,16 @@ Option Strict On
Imports System.Data
Imports System.IO
Imports System.Net.Http
Imports Extensiones
Imports Modelos.Factura
Partial Class Ventas_PVCobranza
Inherits ClsPaginas
#Region "Propiedades"
Private Property CveCliente As Integer
Get
If ViewState("CveCliente") Is Nothing Then
@@ -93,10 +97,30 @@ Partial Class Ventas_PVCobranza
Set(value As DataTable)
ViewState("DtCortesVentas") = value
End Set
End Property
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
If Not Page.IsPostBack Then
Dim Arr As New ArrayList
'Arr.Add("autorizada")
'If EnviarNotificacionWhatsApp("526621430964", "solicitud_autorizacion_anticipo_respuesta", Arr) Then
' Alert("bien")
'Else
' Alert("mal", TipoMensaje.MsgAdvertencia)
'End If
'Arr.Add("suc")
'Arr.Add("cliente")
'Arr.Add("10")
'Arr.Add("$ 15.11")
'If EnviarNotificacionWhatsApp("526621430964", "solicitud_autorizacion_anticipo", Arr, "autoriza") Then
' Alert("bien")
'Else
' Alert("mal", TipoMensaje.MsgAdvertencia)
'End If
'Exit Sub
CveCorte = 0
CargaFiltros()
CargaDdlPagos()
@@ -340,8 +364,6 @@ Partial Class Ventas_PVCobranza
End Sub
Private Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -360,8 +382,33 @@ Partial Class Ventas_PVCobranza
ScriptManager.GetCurrent(Me).RegisterPostBackControl(e.Row.FCLinkButton("LnkImprimir"))
End If
If e.Row.DBCampo("CondicionesPago") = "1" Then ' remis de crédito
e.Row.FCLinkButton("BtnPagar").CssClass = "btn btn-xs btn-warning"
e.Row.FCLinkButton("BtnPagar").Text = "Crédito"
' si es de crédito debe de estar autorizado.
e.Row.FCLinkButton("BtnPagar").Text = "Crédito"
If e.Row.DBCampo("CveEstatusAutorizacion").Contiene("", "2") Then ' si es vacío,significa que no requirió autorización, si es autorizada
e.Row.FCLinkButton("BtnPagar").CssClass = "btn btn-xs btn-warning"
e.Row.FCLinkButton("BtnPagar").Enabled = True
Else
e.Row.FCLinkButton("BtnPagar").CssClass = "btn btn-xs btn-danger"
' e.Row.FCLinkButton("BtnPagar").Enabled = False
'e.Row.FCLinkButton("BtnPagar").OnClientClick = "alert('La solicitud de crédito no ha sido autorizada');return false;"
'e.Row.FCLinkButton("BtnPagar").OnClientClick = "bootbox.dialog({message: 'La solicitud de crédito no ha sido autorizada ', className: ' header-yellow ', onEscape: function() { },title: '<i class='fa fa-warning'></i> Advertencia',buttons: { success: { label: '', className: ' hide',callback: function() { } }, danger: { label: '', className: ' hide',callback: function() { } },main: { label: 'Aceptar', className: ' yellow', callback: function() { } } } });return false;"
'e.Row.FCLinkButton("BtnPagar") =
e.Row.FCLinkButton("BtnPagar").Enabled = False
e.Row.FCLinkButton("BtnPagar").OnClientClick =
"bootbox.dialog({" &
"message: 'La solicitud de crédito no ha sido autorizada ', " &
"className: 'header-yellow', " &
"onEscape: function() {}, " &
"title: '<i class=""fa fa-warning""></i> Advertencia', " &
"buttons: { " &
"success: { label: '', className: 'hide', callback: function() {} }, " &
"danger: { label: '', className: 'hide', callback: function() {} }, " &
"main: { label: 'Aceptar', className: 'yellow', callback: function() {} } " &
"} " &
"});" &
"return false;"
End If
End If
If e.Row.DBCampo("AplicaImpresionPorAnt") = "1" Then
@@ -369,10 +416,10 @@ Partial Class Ventas_PVCobranza
If e.Row.DBCampo("Saldo").ToDecimal() > 0 Then
e.Row.FCLinkButton("BtnPagar").Visible = True
If Not e.Row.DBCampo("TipoEntrega") = "2" Then
e.Row.FCLinkButton("LnkImprimir").Visible = False
End If
Else
e.Row.FCLinkButton("BtnPagar").Visible = False
e.Row.FCLinkButton("LnkImprimir").Visible = False
End If
Else
e.Row.FCLinkButton("BtnPagar").Visible = False
End If
End If
@@ -1740,19 +1787,19 @@ Partial Class Ventas_PVCobranza
Me.TmpDTAnticiposNCIxCCliente = ObjMovtos.DtResultados.Copy()
End If
'AGREGAR LOS ANTICIPOS, DEV, IxC QUE ESTEN EN PUBLICO GENERAL
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing AndAlso UsuarioActual.CveEmpresa.Contiene(189, 190, 192, 195, 197) Then
Dim CveClientePublicoGeneral = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
If CveClientePublicoGeneral > 0 Then
If CveCliente <> CveClientePublicoGeneral Then
If ObjMovtos.GetAnticiposNCIxCCliente(CveClientePublicoGeneral) Then
For Each DrGeneral As DataRow In ObjMovtos.DtResultados.Rows
Me.TmpDTAnticiposNCIxCCliente.Rows.Add(DrGeneral.ItemArray)
Next
End If
End If
End If
End If
''AGREGAR LOS ANTICIPOS, DEV, IxC QUE ESTEN EN PUBLICO GENERAL
'If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing AndAlso UsuarioActual.CveEmpresa.Contiene(189, 190, 192, 195, 197) Then
' Dim CveClientePublicoGeneral = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
' If CveClientePublicoGeneral > 0 Then
' If CveCliente <> CveClientePublicoGeneral Then
' If ObjMovtos.GetAnticiposNCIxCCliente(CveClientePublicoGeneral) Then
' For Each DrGeneral As DataRow In ObjMovtos.DtResultados.Rows
' Me.TmpDTAnticiposNCIxCCliente.Rows.Add(DrGeneral.ItemArray)
' Next
' End If
' End If
' End If
'End If
ObjMovtos.Dispose()
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
@@ -1849,12 +1896,12 @@ Partial Class Ventas_PVCobranza
If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
For Each dr As DataRow In dtt.Rows
Dim NumeroTelefono = "526621143532"
'If EsProduccion Then
' NumeroTelefono = String.Format("52{0}", dr("Celular").ToString())
'End If
Dim NumeroTelefono = ""
If EsProduccion Then
NumeroTelefono = String.Format("52{0}", dr("Celular").ToString())
End If
EnvioMsg = ModExtensiones.EnviarNotificacionWhatsApp2(NumeroTelefono, "", $"Solicitud de activación de anticipo.\\nFolio: {Folio}.\\nCliente: {NombreCliente}.")
'ClsSisNotificaciones.EnviarAlerta("Solicitud de Anticipo", $"Solicitud de activación de anticipo Folio: {Folio} <br/><a href='/Ventas/Clientes.aspx?CveCliente={CveCliente}&op=ant'>Ir Activar</a>", dr("CveUsuario").ToString, Tipo:=TipoNotificacion.ToastInformacionB)
ClsSisNotificaciones.EnviarAlerta("Solicitud de Anticipo", $"Solicitud de activación de anticipo Folio: {Folio} <br/><a href='/Ventas/Clientes.aspx?CveCliente={CveCliente}&op=ant'>Ir Activar</a>", dr("CveUsuario").ToString, Tipo:=TipoNotificacion.ToastInformacionB)
Next
End If
@@ -1863,10 +1910,10 @@ Partial Class Ventas_PVCobranza
Else
Alert("No se envió la solicitud de autorización", TipoMensaje.MsgAdvertencia)
End If
UpAnticipos.Update()
End Sub
Protected Sub GVAnticipos_RowCreated(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAnticipos.RowCreated
If e.Row.RowType = DataControlRowType.Header Then
e.Row.ClientIDMode = ClientIDMode.Static
@@ -1888,7 +1935,6 @@ Partial Class Ventas_PVCobranza
e.Row.FCCheckBox("Chk").Enabled = False
End If
End If
End If
End Sub

View File

@@ -164,6 +164,18 @@
<asp:TextBox ID="TxtOrdenCompra" runat="server" CssClass="form-control" Width="230px" Height="30px" style="padding: 0px"></asp:TextBox>
</td>
</tr>
<tr align="left" runat="server" id="TRVendedores" >
<td class="text-right"><b>Vendedor:</b></td>
<td>
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="228px" >
<asp:ListItem Selected="true" Text="Todos" Value="-1" ></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"></td>
<td>
</td>
</tr>
<tr>
<td style="text-align: center;" colspan="4">

View File

@@ -30,6 +30,9 @@ Partial Class PopUpBuscarFolio
CargaPS(-1)
'CargaCodigoCliente()
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltraParametros("VendedorTipo = 1")
DdlVendedor.DataBind()
RegistraScript($"$('#{TxtFolio.ClientID}').focus();", "A1")
End If
End Sub
@@ -138,7 +141,7 @@ Partial Class PopUpBuscarFolio
Dim ObjVentas As New ClsVentas()
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, DdlTipoDocto.SelectedValue, Serie, Folio, Codigo, Cliente.ToEntero, DdlSubProyecto.SelectedValue.ToEntero,
DdlEstatusFactura.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, FolioFiscal, If(DdlSucursalCliente.Visible, DdlSucursalCliente.SelectedValue.ToEntero, -1),
DdlPS.SelectedValue.ToEntero, PedidoContrato:=PeidoContrato, OrdenCompra:=OrdenCompra, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TopSelect:=100) Then
DdlPS.SelectedValue.ToEntero, PedidoContrato:=PeidoContrato, OrdenCompra:=OrdenCompra, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TopSelect:=100, CveVendedor:=DdlVendedor.SelectedValue.ToEntero) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
LtlTotalRegistros.Text = ObjVentas.DtResultados.Rows.Count.ToString.FormatoNumero(0)
GV.DataSource = ObjVentas.DtResultados
@@ -172,7 +175,7 @@ Partial Class PopUpBuscarFolio
Liga = String.Format("<a class='Texto' href='javascript:IrPV(""{0}"");'>", e.Row.DBCampo("CveVenta"))
End If
e.Row.FCLiteral("LtlTipo").Text = String.Format("<div class='truncate' style='width:22px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("TipoDocto"))
e.Row.FCLiteral("LtlTipo").Text = String.Format("<div style='width:22px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("TipoDocto"))
e.Row.FCLiteral("LtlFolio").Text = String.Format("<div class='truncate' style='width:95px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Folio"))
e.Row.FCLiteral("LtlFecha").Text = String.Format("<div class='truncate' style='width:64px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Fecha").ToDate.ToShortDateString)
e.Row.FCLiteral("LtlNombre").Text = String.Format("<div class='truncate' style='width:200px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("NombreComercial"))

View File

@@ -110,9 +110,12 @@
<div class="portlet-body form">
<div class="row">
<div class="form-group form-md-line-input input-iconright col-xs-4">
<asp:TextBox ID="TxtCodigo" CssClass="form-control " runat="server" MaxLength="50"></asp:TextBox>
<label class="truncate" style="padding-left: 16px;" for="<%= TxtCodigo.ClientID.ToString()%>">Código:</label>
<i></i>
<asp:Panel ID="PnlCodigo" runat="server" DefaultButton="BtnConsultaCodigo">
<asp:TextBox ID="TxtCodigo" CssClass="form-control " runat="server" MaxLength="50"></asp:TextBox>
<label class="truncate" style="padding-left: 16px;" for="<%= TxtCodigo.ClientID.ToString()%>">Código:</label>
<i></i>
<asp:Button ID="BtnConsultaCodigo" runat="server" Text="" Visible="false" style="display:none;" OnClick="BtnConsultaCodigo_Click" />
</asp:Panel>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-4">
<asp:TextBox ID="TxtNumeroParte" CssClass="form-control " runat="server" MaxLength="50"></asp:TextBox>
@@ -644,7 +647,42 @@
</div>
</div>
</div>
<div class="row">
<div class="col-md-12" id="DivListaPrecios" runat="server" visible="false">
<div class="portlet xspadding light bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-briefcase font-green"></i>
<span class="caption-subject bold uppercase">Lista de Precios &nbsp;&nbsp;</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
</div>
<div class="portlet-body form">
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GvPLMultiple" Width="100%" runat="server" GridLines="None" ClientIDMode="Static" AutoGenerateColumns="false" DataKeyNames="CvePrecioLista,PrecioLista,Precio"
CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" EmptyDataText="No se encontraron registros" OnRowDataBound="GvMultiple_RowDataBound">
<Columns>
<asp:BoundField DataField="PrecioLista" HeaderText="Lista de Precio" />
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label ID="LtlLista" runat="server">Precio</asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio" runat="server" MaxLength="39" Text='<%# Eval("Precio") %>' onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12" id="DivImagen" runat="server" visible="false">
<div class="portlet xspadding light bordered">
@@ -723,42 +761,7 @@
</div>
</div>
</div>
<div class="row">
<div class="col-md-12" id="DivListaPrecios" runat="server" visible="false">
<div class="portlet xspadding light bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-briefcase font-green"></i>
<span class="caption-subject bold uppercase">Lista de Precios &nbsp;&nbsp;</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
</div>
<div class="portlet-body form">
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GvMultiple" Width="100%" runat="server" GridLines="None" ClientIDMode="Static" AutoGenerateColumns="false" DataKeyNames="CvePrecioLista,PrecioLista,Precio"
CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" EmptyDataText="No se encontraron registros" OnRowDataBound="GvMultiple_RowDataBound">
<Columns>
<asp:BoundField DataField="PrecioLista" HeaderText="Lista de Precio" />
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label ID="LtlLista" runat="server">Precio</asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio" runat="server" MaxLength="39" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>

View File

@@ -142,14 +142,6 @@ Partial Class ProductosyServicios
End Set
End Property
Private Property DtPreciosMultiple As DataTable
Get
Return If(IsNothing(ViewState("DtPreciosMultiple")), Nothing, CType(ViewState("DtPreciosMultiple"), DataTable))
End Get
Set(value As DataTable)
ViewState("DtPreciosMultiple") = value
End Set
End Property
#End Region
Private ReadOnly Property PermiteClasificacion2 As Boolean
@@ -2984,14 +2976,12 @@ Partial Class ProductosyServicios
Private Sub CargaListaPrecios()
If UsuarioActual.TienePermisoProceso(389) Then 'si puede actualizar precios se muestra
Dim objPS As New ClsProductosServicios
If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, -1, CveClasificacion:=-1, CvePS:=CvePS,
CveProveedor:=-1, Estado:=-1, Marcas:="-1", CveModelo:=-1) Then
DtPreciosMultiple = objPS.DtResultados.Copy()
GvMultiple.DataSource = DtPreciosMultiple
If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, -1, CvePS:=CvePS) Then
GvPLMultiple.DataSource = objPS.DtResultados
End If
objPS.Dispose()
DivListaPrecios.Visible = True
GvMultiple.DataBind()
GvPLMultiple.DataBind()
End If
End Sub
@@ -2999,9 +2989,9 @@ Partial Class ProductosyServicios
Protected Sub GvMultiple_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
Dim Valor As Decimal = DtPreciosMultiple.Rows(e.Row.RowIndex)(2).ToString().ToDecimal()
' Dim Valor As Decimal = DtPreciosMultiple.Rows(e.Row.RowIndex)(2).ToString().ToDecimal()
e.Row.FCTextBox("TxtPrecio").Text = Valor.FormatoNumero(2)
' e.Row.FCTextBox("TxtPrecio").Text = Valor.FormatoNumero(2)
End If
End Sub
@@ -3010,7 +3000,7 @@ Partial Class ProductosyServicios
Dim TieneError As Boolean = False
Try
For Each GvRow As GridViewRow In GvMultiple.Rows
For Each GvRow As GridViewRow In GvPLMultiple.Rows
Dim CvePrecioLista As Integer = GvRow.DataKey("CvePrecioLista").ToEntero()
Dim Precio As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal()
@@ -3345,12 +3335,10 @@ Partial Class ProductosyServicios
End If
Else
If ObjPS.GetPS(-1, -1, CveEmpresaFranquicia, Codigo:=TxtCodigo.Text.Trim.ToUpper) Then
If ObjPS.DtResultados IsNot Nothing AndAlso ObjPS.DtResultados.Rows.Count = 1 Then
Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS", String.Format(" Codigo = '{0}'", TxtCodigo.Text.Trim.ToUpper)).ToEntero()
If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, TxtNumeroParte.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble,
Dim CvePS As Integer = GlobalDTPSSimplificado(CveEmpresaFranquicia, Codigo:=TxtCodigo.Text.Trim.ToUpper).FiltroPrimeroValor("CvePS").ToEntero
If CvePS > 0 Then
'Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS", String.Format(" Codigo = '{0}'", TxtCodigo.Text.Trim.ToUpper)).ToEntero()
If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, TxtNumeroParte.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble,
(TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv,
EsPaquete, DdlSATPS.SelectedValue.ToEntero, CveEmpresaFranquicia, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia,
AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
@@ -3363,15 +3351,8 @@ Partial Class ProductosyServicios
ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString,
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked,
TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) Then
Return True
End If
Else
Alert(String.Format("El producto no existe en la franquicia: '{0}'", GlobalDTEmpresas(CveEmpresaFranquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
Return True
End If
Else
Alert(String.Format("Se presento un error al consultar la existencia en la franquicia: '{0}'", GlobalDTEmpresas(CveEmpresaFranquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
Return True
@@ -3874,4 +3855,8 @@ Partial Class ProductosyServicios
End Sub
Protected Sub BtnConsultaCodigo_Click(sender As Object, e As EventArgs)
Alert(TxtCodigo.Text)
End Sub
End Class

View File

@@ -142,6 +142,9 @@
<asp:ListItem Value ="1">Descuento</asp:ListItem>
<asp:ListItem Value ="2">PU</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlTipoAplicacion" runat="server" ControlToValidate="DdlTipoAplicacion" Display="None" InitialValue="-1"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Aplicacion''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCERfvDdlTipoAplicacion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlTipoAplicacion" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
<label class="col-md-2 truncate">Marca:</label>
@@ -193,7 +196,7 @@
</div>
<div class="actions">
<div class="btn-group">
<asp:LinkButton ID="LbAgregarModal" OnClick="LbAgregarModal_Click" runat="server" data-toggle="tooltip" title="Agregar Producto/Servicio" AlternateText="Agregar Producto/Servicio" CssClass="btn btn-circle btn-default" Text="<i class='fa fa-plus'></i>" />
<asp:LinkButton ID="LbAgregarModal" OnClick="LbAgregarModal_Click" runat="server" data-toggle="tooltip" title="Agregar Producto/Servicio" AlternateText="Agregar Producto/Servicio" CssClass="btn btn-circle btn-default" Text="<i class='fa fa-plus'></i> Agregar Producto" />
</div>
</div>
</div>
@@ -217,23 +220,23 @@
<asp:BoundField HeaderText="Promoción" DataField="Promocion" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" />
<%--5--%>
<asp:BoundField HeaderText="P.U. Promoción" DataField="PUPromocion" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Ultimo Costo" DataField="UltimoCosto" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" Visible="false" />
<asp:BoundField HeaderText="% Utilidad" DataField="UtilidadPorcentaje" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00}" ItemStyle-Width="10%" Visible="false" />
<%--6--%>
<asp:BoundField HeaderText="Condiciones" ItemStyle-HorizontalAlign="Center" DataField="AplicaRestriccionTexto" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="Ultimo Costo" DataField="UltimoCosto" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" Visible="false" />
<%--7--%>
<asp:BoundField HeaderText="Clasificacion" ItemStyle-HorizontalAlign="Left" DataField="Clasificacion"/>
<asp:BoundField HeaderText="% Utilidad" DataField="UtilidadPorcentaje" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00}" ItemStyle-Width="10%" Visible="false" />
<%--8--%>
<asp:BoundField HeaderText="Rin" ItemStyle-HorizontalAlign="Left" DataField="RinTamaño" Visible="false"/>
<asp:BoundField HeaderText="Condiciones" ItemStyle-HorizontalAlign="Center" DataField="AplicaRestriccionTexto" ItemStyle-Width="15%" />
<%--9--%>
<asp:BoundField HeaderText="Clasificacion" ItemStyle-HorizontalAlign="Left" DataField="Clasificacion"/>
<%--10--%>
<asp:BoundField HeaderText="Rin" ItemStyle-HorizontalAlign="Left" DataField="RinTamaño" Visible="false"/>
<%--11--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
<ItemTemplate>
<asp:LinkButton ID="LnkGvDetalleEditar" runat="server" AlternateText="Editar" CausesValidation="False" CommandArgument='<%# Container.DataItemIndex%>' CommandName="Editar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
</ItemTemplate>
</asp:TemplateField>
<%--10--%>
<%--12--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
<ItemTemplate>
<asp:LinkButton ID="LnkGvDetalleEliminar" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
@@ -333,7 +336,7 @@
<asp:Label Text="" ID="LbPUActual" runat="server" />
</div>
</div>
<div class="row">
<div class="row" runat="server" visible ="true" id="DVUltimoCostoCostoPromedio">
<label class="col-md-3 truncate">Ultimo Costo:</label>
<div class="col-md-3">
<asp:Label Text="" ID="LblUltimoCosto" runat="server" />

View File

@@ -20,12 +20,12 @@ Partial Class Ventas_Promociones
End Set
End Property
Private Property TempDTOrigial As DataTable
Private Property TempDTOriginal As DataTable
Get
Return CType(ViewState("TempDTOrigial"), DataTable)
Return CType(ViewState("TempDTOriginal"), DataTable)
End Get
Set(value As DataTable)
ViewState("TempDTOrigial") = value
ViewState("TempDTOriginal") = value
End Set
End Property
@@ -146,8 +146,6 @@ Partial Class Ventas_Promociones
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -176,8 +174,7 @@ Partial Class Ventas_Promociones
CargaDatos()
LnkAgrgarPlantillaPS.Visible = False
ValidaPromosiones(False)
'ValidaPromociones(False)
If EmpresaGrupoDiaz Then
If ChkEstatus.Checked = False AndAlso BloqueadoPromocionPorcentaje AndAlso Not PermisoAutorizPromocionPorcentaje Then
@@ -187,7 +184,6 @@ Partial Class Ventas_Promociones
If ChkEstatus.Checked = True And Not PermisoAutorizPromocionPorcentaje Then
BtnGuardar.Visible = False
ButBtnEliminar.Visible = False
'UpBotones.Update()
End If
End If
@@ -198,6 +194,12 @@ Partial Class Ventas_Promociones
CreaDT()
End If
If EmpresaGrupoDiaz AndAlso Not PermisoAutorizPromocionPorcentaje Then
DVUltimoCostoCostoPromedio.Visible = False
GvDatos.Columns(6).Visible = False
GvDatos.Columns(7).Visible = False
End If
CargaGvBitacora()
@@ -241,7 +243,7 @@ Partial Class Ventas_Promociones
'CLASIFICACIONES
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
DdlClasificacion.DataBind()
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
If EmpresaGrupoDiaz Then
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
Else
DdlClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
@@ -346,7 +348,7 @@ Partial Class Ventas_Promociones
TempDT.Columns.Add("UtilidadPorcentaje", GetType(Decimal))
TempDTOrigial = TempDT.Copy
TempDTOriginal = TempDT.Copy
'366 Estatus
'367 CvePS
@@ -419,7 +421,7 @@ Partial Class Ventas_Promociones
Private Sub CargaDatos()
Dim ObjVentas As New ClsVentas
If ObjVentas.GetPromociones(CvePromocion, "-1", -1, -1, -1, UsuarioActual.CveEmpresa, -1) AndAlso ObjVentas.DtResultados.Rows.Count = 1 Then
If ObjVentas.GetPromociones(CvePromocion, MinFecha, -1, -1, -1, UsuarioActual.CveEmpresa, -1) AndAlso ObjVentas.DtResultados.Rows.Count = 1 Then
Dim Dr As DataRow = ObjVentas.DtResultados.Rows(0)
TxtPromocion.Text = Dr("Promocion").ToString
TxtFechaI.Text = Dr("FechaInicio").ToString.ToDate.ToShortDateString
@@ -438,11 +440,6 @@ Partial Class Ventas_Promociones
Else
DdlClientes.SelectedValue = Dr("CveCliente").ToString
End If
End If
ChkEstatus.Checked = If(Dr("Estatus").ToString = "True", True, False)
@@ -455,12 +452,12 @@ Partial Class Ventas_Promociones
If ObjVentas.GetPromocionesDetalle(CvePromocion, UsuarioActual.CveEmpresa) Then
TempDT = ObjVentas.DtResultados.Copy
TempDTOrigial = ObjVentas.DtResultados.Copy
TempDTOriginal = ObjVentas.DtResultados.Copy
CargaGrid()
Else
Alert("Ocurrió un error al consultar los detalles de la promoción. Por favor vuelva a intentar.", TipoMensaje.MsgError)
End If
CargaGvBitacora()
Else
Alert("Ocurrió un error al consultar la promoción. Por favor vuelva a intentar.", TipoMensaje.MsgError)
End If
@@ -480,7 +477,6 @@ Partial Class Ventas_Promociones
UpDatos.Update()
End Sub
Private Sub CargaMonedas()
DdlMoneda.DataSource = GlobalDTMonedas
DdlMoneda.DataBind()
@@ -540,11 +536,16 @@ Partial Class Ventas_Promociones
End If
' validación de %minimo considerado 02580104V
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
If EmpresaGrupoDiaz Then
Dim tuc As Decimal = LblUltimoCosto.Text.ToDecimal
Dim tpu As Decimal = TxtPromocionConcepto.Text.ToDecimal
If tuc <= 0 OrElse (tpu - tuc) / tuc < UsuarioActual.Empresa.Funcionalidad(129).ToDecimal / 100 Then
Alert("El producto está debajo de la utilidad permitida, la promoción requerirá autorización.", TipoMensaje.MsgAdvertencia.ToastAdventencia)
If PermisoAutorizPromocionPorcentaje Then
Alert("El producto está debajo de la utilidad permitida.", TipoMensaje.MsgAdvertencia.ToastAdventencia)
Else
Alert("El producto está debajo de la utilidad permitida, la promoción requerirá autorización.", TipoMensaje.MsgAdvertencia.ToastAdventencia)
End If
End If
End If
@@ -633,8 +634,6 @@ Partial Class Ventas_Promociones
Dr("UltimoCosto") = UltimoCosto
Dr("CostoPromedio") = CostoPromedio
If UltimoCosto > 0 Then
Dim Promocion As Decimal = TxtPromocionConcepto.Text.ToDecimal
@@ -654,12 +653,6 @@ Partial Class Ventas_Promociones
Dr("UtilidadPorcentaje") = 0.0D
End If
If CveConsecutivo >= 0 Then
Dr.AcceptChanges()
Else
@@ -669,20 +662,18 @@ Partial Class Ventas_Promociones
CargaGrid()
RegistraScript("$('#DivAgregar').modal('hide')")
ValidaPromosiones(True)
ValidaPromociones(True)
End Sub
Private Sub ValidaPromosiones(Bloquear As Boolean)
Private Sub ValidaPromociones(Bloquear As Boolean)
If Not EmpresaGrupoDiaz Then
BloqueadoPromocionPorcentaje = False
Exit Sub
End If
Dim DTPSUltimoCosto = New DataTable
Dim ObjInv As New ClsInventarios
@@ -691,8 +682,6 @@ Partial Class Ventas_Promociones
End If
ObjInv.Dispose()
If PorMinMasCostoVentaFnc129 > 0 Then
For Each dRow As DataRow In TempDT.Rows
@@ -724,19 +713,16 @@ Partial Class Ventas_Promociones
Exit For
End If
End If
Else
BloqueadoPromocionPorcentaje = True
End If
Next
End If
If BloqueadoPromocionPorcentaje AndAlso Bloquear Then
If (Not PermisoAutorizPromocionPorcentaje) AndAlso BloqueadoPromocionPorcentaje AndAlso Bloquear Then
ChkEstatus.Checked = False
ChkEstatus.Enabled = False
End If
UpGenerales.Update()
End Sub
@@ -751,7 +737,6 @@ Partial Class Ventas_Promociones
#End Region
#Region " GV PS "
Private Sub GvDatos_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvDatos.RowCommand
@@ -835,7 +820,7 @@ Partial Class Ventas_Promociones
End If
ValidaPromosiones(True)
ValidaPromociones(True)
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
Dim ObjVentas As New ClsVentas
@@ -950,7 +935,7 @@ Partial Class Ventas_Promociones
Dim Dr2 As DataRow = TempDTOrigial.FiltraParametros($"CvePromocionDetalle = {Dr("CvePromocionDetalle").ToString}").Rows(0)
Dim Dr2 As DataRow = TempDTOriginal.FiltraParametros($"CvePromocionDetalle = {Dr("CvePromocionDetalle").ToString}").Rows(0)
If Not TieneError And Dr("CvePS").ToString <> Dr2("CvePS").ToString Then
If Not ObjGral.AddHistorialBitacora(367, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Dr("CodigoPS").ToString, Dr2("CodigoPS").ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, "Se elimino " & Dr("CodigoPS").ToString, "PS", "", CvePromocion:=CvePromocion) Then
@@ -1271,14 +1256,12 @@ Partial Class Ventas_Promociones
Dim contenido As Byte() = System.IO.File.ReadAllBytes(rutaArchivoPlantilla)
Response.BinaryWrite(contenido)
Response.Flush()
Response.End()
End Sub
Protected Sub BrnAgregarPlantilla_Click(sender As Object, e As EventArgs)
If TxtExcel.getfiles().Archivos.Count > 0 Then
@@ -1374,15 +1357,13 @@ Partial Class Ventas_Promociones
CargaGrid()
RegistraScript("$('#DivAgregarPlantilla').modal('hide')")
ValidaPromosiones(True)
ValidaPromociones(True)
End Sub
Private Function ValidaDTPlantilla(ByRef DTPlantilla As DataTable) As Boolean
Dim Errores As New StringBuilder
DTPlantilla.Columns.Add("CveClasificacion", GetType(Integer))
DTPlantilla.Columns.Add("CvePS", GetType(Integer))
DTPlantilla.Columns.Add("CveTipoPromosicion", GetType(Integer))
@@ -1396,13 +1377,13 @@ Partial Class Ventas_Promociones
Dim DTPS As DataTable = New DataTable
Dim DTRines As DataTable = New DataTable
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPS(-1, -1, UsuarioActual.CveEmpresa) Then
DTPS = ObjPS.DtResultados
End If
ObjPS.Dispose()
'Dim ObjPS As New ClsProductosServicios
'If ObjPS.GetPS(-1, -1, UsuarioActual.CveEmpresa) Then
' DTPS = ObjPS.DtResultados
'End If
'ObjPS.Dispose()
DTPS = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
DTRines = GlobalDTPSRinTamaños(UsuarioActual.CveEmpresa)
Dim RegistroActual As Integer = 1
@@ -1436,7 +1417,6 @@ Partial Class Ventas_Promociones
If ClasificacionStr.Length > 0 And CodigoStr.Length > 0 Then
SBErrorRegistro.Append($"No se puede agregar Clasificación y codigo en un mismo registro. ")
Else
If ClasificacionStr.Length > 0 Then
SBErrorRegistro.Append(If(CveClasificacion > 0, "", $"No se encontro Clasificación '{ClasificacionStr}'. </br>"))
Else
@@ -1513,9 +1493,7 @@ Partial Class Ventas_Promociones
LblCostoPromedio.Text = DTPSUltimoCosto.FiltroPrimeroValor("CostoPromedio", "").FormatoNumero(4)
LbPUActual.Text = DTPSUltimoCosto.FiltroPrimeroValor("Importe", "").FormatoNumero(4)
UpAgregar.Update()
End Sub
End Class

View File

@@ -451,7 +451,7 @@
<td width="95px"><b>Nombre:</b>&nbsp;</td>
<td width="200px">
<asp:Label ID="LblCliente" runat="server" Text="Cliente"></asp:Label></td>
<td width="85px" runat="server" id="LblEnviarMail"><b>Enviar Mail:</b></td>
<td width="85px" runat="server" id="LblEnviarMail"><b>Envía Mail:</b></td>
<td width="135px">
<asp:CheckBox ID="ChkEnviarFactura" runat="server" /></td>
</tr>
@@ -578,6 +578,11 @@
<td colspan="3">
<asp:TextBox ID="TxtDescripcionVenta" runat="server" Rows="2" TextMode="MultiLine" Width="100%" MaxLength="300" CssClass="form-control input-sm" Enabled="false"></asp:TextBox></td>
</tr>
<tr runat="server" id="TrCredito1" visible="false">
<td colspan="2">
</td>
</tr>
<tr runat="server" id="TrVentasMedicas1" visible="false">
<td><b>Médico:</b></td>
<td>
@@ -775,7 +780,7 @@
<td>
<asp:UpdatePanel ID="UPPVentas" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="100%">
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="DdlVendedor_SelectedIndexChanged">
<asp:ListItem Selected="true" Text="Sin asignar" Value="0"></asp:ListItem>
</asp:DropDownList>
</ContentTemplate>
@@ -1215,13 +1220,16 @@
</div>
</div>
<div class="row">
<div class="col-md-12">
<asp:TextBox ID="TxtPrecio" runat="server" TabIndex="3" onkeypress="setFocus(event,'LbAgregar');" onkeyup="Recalcula();" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="GprAgregaPS" Width="100%" Height="24px" CssClass="form-control input-sm "></asp:TextBox>
<div class="col-md-12" style="display: flex; align-items: center">
<asp:TextBox ID="TxtPrecio" runat="server" TabIndex="3" onkeypress="setFocus(event,'LbAgregar');" onkeyup="Recalcula();" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="GprAgregaPS" Width="110px" Height="24px" CssClass="form-control input-sm "></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RFVPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPS"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCPrecio" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
<asp:CustomValidator ID="CVPrecio" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprAgregaPS"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="VCEPrecio" runat="server" HighlightCssClass="vco" TargetControlID="CVPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
<div id="TagPromocion" runat="server" visible="false" style="width: 12px; margin-left: 5px;">
<i class="fa fa-tag" aria-hidden="true" style="color: #E43A45"></i>
</div>
</div>
</div>
</th>
@@ -1263,7 +1271,7 @@
</ItemTemplate>
</asp:TemplateField>
<%--1--%>
<asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<div class="row">
<div class="col-md-3" id="TagPromocion" runat="server" visible='<%# If(CInt(Extensiones.IfNull(Eval("CvePromocionDetalle"), 0)) > 0, "true", "false") %>'>
@@ -1285,7 +1293,7 @@
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad") %>' Visible="false"></asp:Literal>
<asp:Literal ID="LtlTipoDescuento" runat="server" Text='<%# Eval("TipoDescuento") %>' Visible="false"></asp:Literal>
<asp:Literal ID="LtlDescuento" runat="server" Text='<%# Eval("Descuento") %>' Visible="false"></asp:Literal>
<asp:TextBox ID="TxtCantidad" runat="server" CausesValidation="true" MaxLength="12" Text='<%# Eval("Cantidad", "{0:0.######}") %>' ValidationGroup="GprGV" Width="45px" Height="24px"></asp:TextBox>
<asp:TextBox ID="TxtCantidad" runat="server" CausesValidation="true" MaxLength="12" Text='<%# Eval("Cantidad", "{0:0.######}") %>' ValidationGroup="GprGV" Width="75px" Height="24px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GprGV"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOCantidad1" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
<asp:CustomValidator ID="CVCantidadEdit" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprGV"></asp:CustomValidator>
@@ -1469,7 +1477,7 @@
</ItemTemplate>
</asp:TemplateField>
<%--18--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Editar">
<asp:TemplateField ItemStyle-HorizontalAlign="Center" >
<EditItemTemplate>
<div style="width: 85px;">
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GprGV" />
@@ -1483,7 +1491,7 @@
</ItemTemplate>
</asp:TemplateField>
<%--19--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Eliminar">
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
@@ -8207,7 +8215,7 @@
</div>
<div class="modal-body">
<div class="row" style="padding-left: 16px;">
<div id="DivValidaRFC" runat="server" visible="false" class="col-md-8">
<div id="DivValidaRFC" runat="server" visible="false" class="col-md-9">
<div class="row">
<asp:Panel ID="PnlRFCCliente" runat="server" DefaultButton="BtnValidarRFC">
<div class="form-group form-md-line-input input-iconright col-xs-9">
@@ -8221,47 +8229,21 @@
</asp:Panel>
</div>
</div>
<div id="DivValidaPorNombre" runat="server" visible="false" class="col-md-8">
<div id="DivValidaPorNombre" runat="server" visible="false" class="col-md-9">
<div class="row">
<asp:Panel ID="PnlValidaNombre" runat="server" DefaultButton="BtnValidaPorNombre">
<div class="form-group form-md-line-input input-iconright col-xs-9">
<asp:TextBox ID="TxtRFCNombre" Style="text-transform: uppercase;" placeholder="Ingrese el RFC/Nombre para su validación" runat="server" CssClass="form-control" MaxLength="13" CausesValidation="true"></asp:TextBox>
<asp:TextBox ID="TxtRFCNombre" Style="text-transform: uppercase;" placeholder="Ingrese el RFC/Nombre para su validación" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtRFCNombre.ClientID.ToString()%>">RFC / Nombre:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-3">
<asp:Button ID="BtnValidaPorNombre" runat="server" CssClass="btn btn-success" Text="Consultar" />
<div class="form-group form-md-line-input input-iconright col-xs-3" style="display:flex;">
<asp:Button ID="BtnValidaPorNombre" runat="server" CssClass="btn btn-success" Text="Buscar"/>
<asp:LinkButton ID="BtnCrearCliente" runat="server" CssClass="btn btn-primary" Text="<i class='fa fa-plus'></i>" OnClick="BtnCrearCliente_Click" />
</div>
</asp:Panel>
</div>
</div>
<div id="DivBusquedaCliente" runat="server" visible="false" >
<div style="overflow-y: auto; width: 100%; height: 250px;">
<asp:GridView ID="GvBusquedaCliente" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros"
CssClass="ScrollAD table table-smallpadding Widthall" GridLines="None">
<Columns>
<asp:TemplateField ItemStyle-Width="15%">
<HeaderTemplate>Código</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlCodigo" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-CssClass="truncate" ItemStyle-Width="55%">
<HeaderTemplate>Nombre</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlNombre" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="30%">
<HeaderTemplate>RFC</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlRFC" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
<div class="col-md-4">
<div class="col-md-3">
<div runat="server" id="DivTipoPersona" visible="false" class="form-group form-md-line-input input-iconright">
<asp:RadioButtonList runat="server" ID="RdTipoPersona" RepeatDirection="Horizontal" OnSelectedIndexChanged="RdTipoPersona_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control">
<asp:ListItem Value="0">Física</asp:ListItem>
@@ -8271,7 +8253,37 @@
<i></i>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div id="DivBusquedaCliente" runat="server" visible="false">
<div style="overflow-y: auto; width: 100%; height: 250px;">
<asp:GridView ID="GvBusquedaCliente" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros"
CssClass="ScrollAD table table-smallpadding Widthall" GridLines="None">
<Columns>
<asp:TemplateField ItemStyle-Width="15%">
<HeaderTemplate>Código</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlCodigo" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-CssClass="truncate" ItemStyle-Width="55%">
<HeaderTemplate>Nombre</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlNombre" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="30%">
<HeaderTemplate>RFC</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlRFC" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12" runat="server" id="DivRazonSocial2">
@@ -8371,10 +8383,9 @@
<label for="<%= DdlMetodoCliente.ClientID.ToString()%>">Método Pago:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlFormaCliente" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="FormaPagoSAT" DataValueField="CveFormaPago" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:DropDownList ID="DdlFormaCliente" CssClass=" form-control input-sm select2me" runat="server" CausesValidation="true" DataTextField="FormaPagoSAT" DataValueField="CveFormaPago" Width="100%">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="DdlMetodoCliente" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Forma Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RFVFormaCliente" runat="server" ControlToValidate="DdlFormaCliente" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Forma Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlFormaCliente.ClientID.ToString()%>">Forma Pago: </label>
<i></i>
</div>
@@ -8814,55 +8825,59 @@
<h4 class="modal-title">Solicitar crédito</h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSolCreditoTipoDocto" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true">
<asp:ListItem Value="Ing" Selected="True" Text="Factura de Ingreso"></asp:ListItem>
<asp:ListItem Value="Egs" Text="Nota de crédito"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlSolCreditoTipoDocto.ClientID.ToString()%>">Tipo Documento:</label>
</div>
<div id="DivAutorizacion" runat="server" class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoAutorizacion" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true">
<asp:ListItem Selected="True" Value="-1" Text="Seleccione"></asp:ListItem>
<asp:ListItem Value="1" Text="Importe"></asp:ListItem>
<asp:ListItem Value="2" Text="Vencimiento"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoAut" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlTipoAutorizacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
<label for="<%= DdlTipoAutorizacion.ClientID.ToString()%>">Tipo Autorización:</label>
</div>
<div id="DivDiasVencidos" runat="server" visible="false" class="row">
<label class="col-md-2 truncate">Días Vencidos:</label>
<div class="col-md-10">
<asp:TextBox ID="TxtDiasVencidos" Text="" runat="server" />
<ajax:FilteredTextBoxExtender ID="FTBDiasVencidos" runat="server" TargetControlID="TxtDiasVencidos" FilterType="Custom, Numbers" />
<asp:RequiredFieldValidator ID="RFVDiasVencidos" runat="server" ControlToValidate="TxtDiasVencidos" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días Vencidos''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEDiasVencidos" runat="server" HighlightCssClass="vco" TargetControlID="RFVDiasVencidos" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:RequiredFieldValidator ID="RFVDiasVencidos2" runat="server" ControlToValidate="TxtDiasVencidos" Display="None" InitialValue="0" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El valor del campo <b>''Días Vencidos''</b> debe ser mayor a 0." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEDiasVencidos2" runat="server" HighlightCssClass="vco" TargetControlID="RFVDiasVencidos2" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div id="DivImporteSolicitud" runat="server" class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtImporteSolicitud" inputmode="numeric" runat="server" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="VgmGuardarAut" Width="200px" CssClass="form-control "></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBImporteSolicitud" runat="server" TargetControlID="TxtImporteSolicitud" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RFVImporteSolicitud" runat="server" ControlToValidate="TxtImporteSolicitud" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="RFVImporteSolicitud" Width="300px"></ajax:ValidatorCalloutExtender>
<asp:CustomValidator ID="CVImporteSolcitud" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtImporteSolicitud" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="VgmGuardarAut"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="VCEImporteSolicitud" runat="server" HighlightCssClass="vco" TargetControlID="CVImporteSolcitud" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtImporteSolicitud.ClientID.ToString()%>">Importe:</label>
</div>
<div id="DivMotivoAutorizacion" runat="server" visible="false" class="row">
<div class="col-md-12">
<div class="row">
<label class="col-md-3 truncate" style="color: #888888; font-family: 'Open Sans', sans-serif; direction: ltr; font-size: 12px;">Motivo:</label>
<div id="divModalidad2" runat="server" class="row">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSolCreditoTipoDocto" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true">
<asp:ListItem Value="Ing" Selected="True" Text="Factura de Ingreso"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlSolCreditoTipoDocto.ClientID.ToString()%>">Tipo Documento:</label>
</div>
<div class="row">
<div class="col-md-12">
<asp:TextBox ID="TxtMotivoAutorizacion" CssClass="form-control input-sm" runat="server" Rows="2" TextMode="MultiLine" Width="100%" MaxLength="50"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVMotivo" runat="server" ControlToValidate="TxtMotivoAutorizacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Motivo''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEMotivo" runat="server" HighlightCssClass="vco" TargetControlID="RFVMotivo" Width="350px"></ajax:ValidatorCalloutExtender>
<div id="DivAutorizacion" runat="server" class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoAutorizacion" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true">
<asp:ListItem Selected="True" Value="-1" Text="Seleccione"></asp:ListItem>
<asp:ListItem Value="1" Text="Importe"></asp:ListItem>
<asp:ListItem Value="2" Text="Vencimiento"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoAut" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlTipoAutorizacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
<label for="<%= DdlTipoAutorizacion.ClientID.ToString()%>">Tipo Autorización:</label>
</div>
<div id="DivDiasVencidos" runat="server" visible="false" class="row">
<label class="col-md-2 truncate">Días Vencidos:</label>
<div class="col-md-10">
<asp:TextBox ID="TxtDiasVencidos" Text="" runat="server" />
<ajax:FilteredTextBoxExtender ID="FTBDiasVencidos" runat="server" TargetControlID="TxtDiasVencidos" FilterType="Custom, Numbers" />
<asp:RequiredFieldValidator ID="RFVDiasVencidos" runat="server" ControlToValidate="TxtDiasVencidos" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días Vencidos''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEDiasVencidos" runat="server" HighlightCssClass="vco" TargetControlID="RFVDiasVencidos" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:RequiredFieldValidator ID="RFVDiasVencidos2" runat="server" ControlToValidate="TxtDiasVencidos" Display="None" InitialValue="0" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El valor del campo <b>''Días Vencidos''</b> debe ser mayor a 0." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEDiasVencidos2" runat="server" HighlightCssClass="vco" TargetControlID="RFVDiasVencidos2" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div id="DivImporteSolicitud" runat="server" class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtImporteSolicitud" inputmode="numeric" runat="server" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="VgmGuardarAut" Width="200px" CssClass="form-control "></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBImporteSolicitud" runat="server" TargetControlID="TxtImporteSolicitud" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RFVImporteSolicitud" runat="server" ControlToValidate="TxtImporteSolicitud" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="RFVImporteSolicitud" Width="300px"></ajax:ValidatorCalloutExtender>
<asp:CustomValidator ID="CVImporteSolcitud" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtImporteSolicitud" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="VgmGuardarAut"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="VCEImporteSolicitud" runat="server" HighlightCssClass="vco" TargetControlID="CVImporteSolcitud" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtImporteSolicitud.ClientID.ToString()%>">Importe:</label>
</div>
<div id="DivMotivoAutorizacion" runat="server" visible="false" class="row">
<div class="col-md-12">
<div class="row">
<label class="col-md-3 truncate" style="color: #888888; font-family: 'Open Sans', sans-serif; direction: ltr; font-size: 12px;">Motivo:</label>
</div>
<div class="row">
<div class="col-md-12">
<asp:TextBox ID="TxtMotivoAutorizacion" CssClass="form-control input-sm" runat="server" Rows="2" TextMode="MultiLine" Width="100%" MaxLength="50"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVMotivo" runat="server" ControlToValidate="TxtMotivoAutorizacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Motivo''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEMotivo" runat="server" HighlightCssClass="vco" TargetControlID="RFVMotivo" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
</div>
<div id="divModalidad3" runat="server" class="row" visible="false">
&nbsp;<asp:CheckBox ID="ChkSolicitudAutorizacionCredito" runat="server" Text="Solicitar autorización crédito" />
</div>
</div>
<div class="modal-footer">

File diff suppressed because it is too large Load Diff

View File

@@ -515,7 +515,7 @@ Public Class WS_PuntoVenta
'End Function
<WebMethod()>
Public Function GetVta_Promociones(Fecha As String, CveSubProyecto As Integer, CveEmpresa As Integer) As RespuestaWS
Public Function GetVta_Promociones(Fecha As Date, CveSubProyecto As Integer, CveEmpresa As Integer) As RespuestaWS
Dim objPromociones As New ClsVentas
Dim Respuesta As New RespuestaWS