diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb
index e95f16c1a..941d85578 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,29 @@ 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
+ 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 +363,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 +381,16 @@ 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").ToolTip = "Solicitud de crédito no autorizada."
+ End If
End If
If e.Row.DBCampo("AplicaImpresionPorAnt") = "1" Then
@@ -369,10 +398,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
@@ -1867,6 +1896,7 @@ Partial Class Ventas_PVCobranza
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
diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx
index cdad14650..87d14695f 100644
--- a/Ventas/Ventas.aspx
+++ b/Ventas/Ventas.aspx
@@ -451,7 +451,7 @@
@@ -578,6 +578,11 @@
| Médico: |
@@ -1266,7 +1271,7 @@
<%--1--%>
-
+
|