diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index ea00e848c..5ad5f3e85 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -3080,7 +3080,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Observaciones", Observaciones)) - If UsuarioActual.CveEmpresa.Contiene(186, 189, 193) Then + If UsuarioActual.CveEmpresa.Contiene(186, 189, 193, 189) Then params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) params.Add(New ReportParameter("NombreProveedor", If(CveCompra > 0, dr("RazonSocial").ToString, ""))) End If diff --git a/OC/RepOCxSurtir.aspx b/OC/RepOCxSurtir.aspx index 0365b13b2..148aeb4e3 100644 --- a/OC/RepOCxSurtir.aspx +++ b/OC/RepOCxSurtir.aspx @@ -18,7 +18,7 @@ <%--FILTROS--%> -
+
@@ -53,6 +53,10 @@
+
Centro de Costo
+
+ +
@@ -60,16 +64,15 @@
- + <%----%> +
Cliente:
- -
-
Centro de Costo
-
- + <%----%> +
+
diff --git a/OC/RepOCxSurtir.aspx.vb b/OC/RepOCxSurtir.aspx.vb index 0a9726d3a..5e0c376cc 100644 --- a/OC/RepOCxSurtir.aspx.vb +++ b/OC/RepOCxSurtir.aspx.vb @@ -15,20 +15,51 @@ Partial Class OC_RepOCxSurtir #Region " INICIALIZA VALORES " Private Sub InicializaValores() + + Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False) + TxtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString TxtFechaF.Text = NowADS().ToShortDateString - DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) - DdlProveedor.DataBind() - DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1")) + 'DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) + 'DdlProveedor.DataBind() + 'DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1")) + + 'CargaProveedores + DdlSubProyecto.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa) DdlSubProyecto.DataBind() DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) - DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) - DdlCliente.DataBind() - DdlCliente.Items.Insert(0, New ListItem("Todos", "-1")) + + + + If EsWS Then + DdlCliente.setEsWebService(True) + DdlCliente.SelectedText = "Todos" + DdlCliente.SelectedValue = "-1" + + DdlProveedor.setEsWebService(True) + DdlProveedor.Attributes.Add("data-metodo", "getproveedores") + DdlProveedor.SelectedText = "Todos" + DdlProveedor.SelectedValue = "-1" + + Else + DdlCliente.setEsWebService(False) + DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) + DdlCliente.DataBind() + DdlCliente.ddl.Items.Insert(0, New ListItem("Todos", "-1")) + + DdlProveedor.setEsWebService(False) + DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) + DdlProveedor.DataBind() + DdlProveedor.ddl.Items.Insert(0, New ListItem("Todos", "-1")) + + + + End If + UPFiltros.Update() End Sub diff --git a/Site.master b/Site.master index d925ca666..89641e5d6 100644 --- a/Site.master +++ b/Site.master @@ -168,7 +168,7 @@
  • - Buscar Venta diff --git a/Ventas/CatAutorizacionLimites.aspx.vb b/Ventas/CatAutorizacionLimites.aspx.vb index 3783e7562..8d8a0bc50 100644 --- a/Ventas/CatAutorizacionLimites.aspx.vb +++ b/Ventas/CatAutorizacionLimites.aspx.vb @@ -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, diff --git a/Ventas/PVCobranza.aspx b/Ventas/PVCobranza.aspx index d23c3b2fb..eb932618b 100644 --- a/Ventas/PVCobranza.aspx +++ b/Ventas/PVCobranza.aspx @@ -371,7 +371,6 @@ -
    @@ -399,9 +398,7 @@
    -
    - -   +
    Nombre:
             
    @@ -538,7 +535,8 @@
    - + +
    $ diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index e95f16c1a..735335254 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -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") = "2" Then ' 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: ' 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: ' 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 @@ -1849,7 +1896,7 @@ 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" + Dim NumeroTelefono = "" If EsProduccion Then NumeroTelefono = String.Format("52{0}", dr("Celular").ToString()) 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 diff --git a/Ventas/PopUpBuscarFolio.aspx.vb b/Ventas/PopUpBuscarFolio.aspx.vb index 99717874d..8f3996771 100644 --- a/Ventas/PopUpBuscarFolio.aspx.vb +++ b/Ventas/PopUpBuscarFolio.aspx.vb @@ -175,7 +175,7 @@ Partial Class PopUpBuscarFolio Liga = String.Format("", e.Row.DBCampo("CveVenta")) End If - e.Row.FCLiteral("LtlTipo").Text = String.Format("", Liga, e.Row.DBCampo("TipoDocto")) + e.Row.FCLiteral("LtlTipo").Text = String.Format("", Liga, e.Row.DBCampo("TipoDocto")) e.Row.FCLiteral("LtlFolio").Text = String.Format("
    {0}{1}
    ", Liga, e.Row.DBCampo("Folio")) e.Row.FCLiteral("LtlFecha").Text = String.Format("
    {0}{1}
    ", Liga, e.Row.DBCampo("Fecha").ToDate.ToShortDateString) e.Row.FCLiteral("LtlNombre").Text = String.Format("
    {0}{1}
    ", Liga, e.Row.DBCampo("NombreComercial")) diff --git a/Ventas/Promociones.aspx b/Ventas/Promociones.aspx index 1aa380ef7..0b342eb9b 100644 --- a/Ventas/Promociones.aspx +++ b/Ventas/Promociones.aspx @@ -142,6 +142,9 @@ Descuento PU + +
    @@ -193,7 +196,7 @@
    - +
    diff --git a/Ventas/Promociones.aspx.vb b/Ventas/Promociones.aspx.vb index de8564cf0..82f584ad0 100644 --- a/Ventas/Promociones.aspx.vb +++ b/Ventas/Promociones.aspx.vb @@ -243,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")) @@ -536,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 @@ -714,7 +719,7 @@ Partial Class Ventas_Promociones Next End If - If BloqueadoPromocionPorcentaje AndAlso Bloquear Then + If (Not PermisoAutorizPromocionPorcentaje) AndAlso BloqueadoPromocionPorcentaje AndAlso Bloquear Then ChkEstatus.Checked = False ChkEstatus.Enabled = False End If diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index fc26e3cb5..cc159a59b 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -451,7 +451,7 @@ Nombre:  - Enviar Mail: + Envía Mail: @@ -578,6 +578,11 @@ + + + + + Médico: @@ -1266,7 +1271,7 @@ <%--1--%> - +
    @@ -1288,7 +1293,7 @@ - + @@ -1472,7 +1477,7 @@ <%--18--%> - +
    @@ -1486,7 +1491,7 @@ <%--19--%> - + @@ -8821,55 +8826,59 @@