--FIX autorizaciones con ixc
This commit is contained in:
@@ -127,26 +127,35 @@
|
|||||||
EmptyDataText="No se encontraron autorizaciones" ToolTip=""
|
EmptyDataText="No se encontraron autorizaciones" ToolTip=""
|
||||||
CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" Width="100%" GridLines="None">
|
CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" Width="100%" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
<%-- 0--%>
|
||||||
<asp:TemplateField HeaderText="Tipo " ItemStyle-Width="3%">
|
<asp:TemplateField HeaderText="Tipo " ItemStyle-Width="3%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LblTipo" Text='<%# Eval("TipoDocumento") %>' runat="server"></asp:Label>
|
<asp:Label ID="LblTipo" Text='<%# Eval("TipoDocumento") %>' runat="server"></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<%-- 1--%>
|
||||||
<asp:TemplateField HeaderText="Tipo" ItemStyle-Width="3%">
|
<asp:TemplateField HeaderText="Tipo" ItemStyle-Width="3%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LblTipoAuto" Text='<%# Eval("TipoAutorizacionTexto") %>' runat="server"></asp:Label>
|
<asp:Label ID="LblTipoAuto" Text='<%# Eval("TipoAutorizacionTexto") %>' runat="server"></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<%-- 2--%>
|
||||||
<asp:HyperLinkField DataTextField="NombreComercial" Target="_blank" HeaderText="Cliente" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
|
<asp:HyperLinkField DataTextField="NombreComercial" Target="_blank" HeaderText="Cliente" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
|
||||||
|
<%-- 3--%>
|
||||||
<asp:BoundField DataField="Vendedor" HeaderText="Vendedor" ItemStyle-Width="9%" />
|
<asp:BoundField DataField="Vendedor" HeaderText="Vendedor" ItemStyle-Width="9%" />
|
||||||
<%-- 30--%>
|
<%-- 4--%>
|
||||||
<asp:BoundField DataField="Importe" ItemStyle-Width="7%" HeaderText="Importe" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
<asp:BoundField DataField="Importe" ItemStyle-Width="7%" HeaderText="Importe" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||||
<asp:BoundField DataField="PorcentajeDescuento" ItemStyle-Width="5%" HeaderText="% Desc" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
<asp:BoundField DataField="PorcentajeDescuento" ItemStyle-Width="5%" HeaderText="% Desc" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||||
<asp:BoundField DataField="LimiteCredito" ItemStyle-Width="7%" HeaderText="L.Créd" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
<asp:BoundField DataField="LimiteCredito" ItemStyle-Width="7%" HeaderText="L.Créd" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||||
<asp:BoundField DataField="Saldo" ItemStyle-Width="7%" HeaderText="Saldo" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
<asp:BoundField DataField="Saldo" ItemStyle-Width="7%" HeaderText="Saldo" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||||
<asp:BoundField DataField="FechaIng" ItemStyle-Width="7%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
<asp:BoundField DataField="FechaIng" ItemStyle-Width="7%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||||
<asp:BoundField DataField="DiasVencidos" ItemStyle-Width="3%" HeaderText="D.Ven" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N0}" />
|
<asp:BoundField DataField="DiasVencidos" ItemStyle-Width="3%" HeaderText="D.Ven" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N0}" />
|
||||||
<asp:HyperLinkField DataTextField="FacturaAplicada" ItemStyle-Width="7%" Target="_blank" HeaderText="Factura" DataNavigateUrlFields="CveVentaAplicada" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" />
|
<asp:TemplateField ItemStyle-Width="7%">
|
||||||
|
<HeaderTemplate>Folio</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlFactura" runat="server"></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
<%-- 45--%>
|
<%-- 45--%>
|
||||||
<asp:BoundField DataField="Usuario" HeaderText="Solicitó" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Usuario" HeaderText="Solicitó" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField DataField="Motivo" HeaderText="Motivo" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Motivo" HeaderText="Motivo" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
|||||||
@@ -62,6 +62,10 @@ Partial Class Ventas_CatAutorizacionLimites
|
|||||||
|
|
||||||
DdlEstatus.SelectedValue = "0"
|
DdlEstatus.SelectedValue = "0"
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(595) = "3" Then
|
||||||
|
LnkAgregar.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
UpModal.Update()
|
UpModal.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
@@ -190,6 +194,12 @@ Partial Class Ventas_CatAutorizacionLimites
|
|||||||
e.Row.FCLabel("LblTipoAuto").CssClass = "badge badge-secondary"
|
e.Row.FCLabel("LblTipoAuto").CssClass = "badge badge-secondary"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If e.Row.DBCampo("CveIEAplicado").ToString().ToEntero() > 0 Then
|
||||||
|
e.Row.FCLiteral("LtlFactura").Text = String.Format("<a class=""Texto"" target=""_blank"" href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a>", e.Row.DBCampo("CveIEAplicado"), e.Row.DBCampo("FolioIEAplicado"))
|
||||||
|
Else
|
||||||
|
e.Row.FCLiteral("LtlFactura").Text = String.Format("<a class=""Texto"" target=""_blank"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">{1}</a>", e.Row.DBCampo("CveVentaAplicada"), e.Row.DBCampo("FacturaAplicada"))
|
||||||
|
End If
|
||||||
|
|
||||||
'If e.Row.DBCampo("Estatus") = "True" Then
|
'If e.Row.DBCampo("Estatus") = "True" Then
|
||||||
' e.Row.Cells(1).ForeColor = Drawing.Color.Green
|
' e.Row.Cells(1).ForeColor = Drawing.Color.Green
|
||||||
' e.Row.Cells(1).Font.Bold = True
|
' e.Row.Cells(1).Font.Bold = True
|
||||||
|
|||||||
@@ -3031,27 +3031,27 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(185) = "1" AndAlso UsuarioActual.TienePermisoProceso(379) AndAlso CType(sender, GridView).ID = "GVAnticipos" Then
|
'If UsuarioActual.Empresa.Funcionalidad(185) = "1" AndAlso UsuarioActual.TienePermisoProceso(379) AndAlso CType(sender, GridView).ID = "GVAnticipos" Then
|
||||||
If e.Row.DBCampo("CveVenta").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString().Contiene("NC", "Ant") Then
|
' If e.Row.DBCampo("CveVenta").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString().Contiene("NC", "Ant") Then
|
||||||
If Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
|
' If Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
|
||||||
e.Row.FCLinkButton("LnkAutorizar").Visible = True
|
' e.Row.FCLinkButton("LnkAutorizar").Visible = True
|
||||||
e.Row.FCLinkButton("LnkCancelar").Visible = False
|
' e.Row.FCLinkButton("LnkCancelar").Visible = False
|
||||||
Else
|
' Else
|
||||||
e.Row.FCLinkButton("LnkAutorizar").Visible = False
|
' e.Row.FCLinkButton("LnkAutorizar").Visible = False
|
||||||
e.Row.FCLinkButton("LnkCancelar").Visible = True
|
' e.Row.FCLinkButton("LnkCancelar").Visible = True
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
If e.Row.DBCampo("CveIE").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString().Contiene("IxC") Then
|
' If e.Row.DBCampo("CveIE").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString().Contiene("IxC") Then
|
||||||
If Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
|
' If Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
|
||||||
e.Row.FCLinkButton("LnkAutorizar").Visible = True
|
' e.Row.FCLinkButton("LnkAutorizar").Visible = True
|
||||||
e.Row.FCLinkButton("LnkCancelar").Visible = False
|
' e.Row.FCLinkButton("LnkCancelar").Visible = False
|
||||||
Else
|
' Else
|
||||||
e.Row.FCLinkButton("LnkAutorizar").Visible = False
|
' e.Row.FCLinkButton("LnkAutorizar").Visible = False
|
||||||
e.Row.FCLinkButton("LnkCancelar").Visible = True
|
' e.Row.FCLinkButton("LnkCancelar").Visible = True
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -978,12 +978,10 @@ Partial Class Ventas_PVCobranza
|
|||||||
Dim Actualizo As Boolean = False
|
Dim Actualizo As Boolean = False
|
||||||
If Tipo.Contiene("NC", "Ant") Then
|
If Tipo.Contiene("NC", "Ant") Then
|
||||||
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then
|
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then
|
||||||
Alert("El anticipo se desautorizó correctamente")
|
|
||||||
Actualizo = True
|
Actualizo = True
|
||||||
End If
|
End If
|
||||||
ElseIf Tipo.Contiene("IxC") Then
|
ElseIf Tipo.Contiene("IxC") Then
|
||||||
If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, False) Then
|
If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, False) Then
|
||||||
Alert("El anticipo se desautorizó correctamente")
|
|
||||||
Actualizo = True
|
Actualizo = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -2130,6 +2128,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
Dim gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
Dim gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
||||||
Dim Folio As String = gvr.DataKey("Folio")
|
Dim Folio As String = gvr.DataKey("Folio")
|
||||||
Dim Importe As Decimal = gvr.FCTextBox(String.Format("TxtAnticipo{0}", gvr.RowIndex)).Text.ToDecimal
|
Dim Importe As Decimal = gvr.FCTextBox(String.Format("TxtAnticipo{0}", gvr.RowIndex)).Text.ToDecimal
|
||||||
|
Dim Saldo As Decimal = gvr.DataKey("Saldo").ToDecimal()
|
||||||
Dim dtt As DataTable = Nothing
|
Dim dtt As DataTable = Nothing
|
||||||
|
|
||||||
Dim ObjProceso As New ClsSisProcesos
|
Dim ObjProceso As New ClsSisProcesos
|
||||||
@@ -2156,22 +2155,17 @@ Partial Class Ventas_PVCobranza
|
|||||||
Arr.Add(NombreCliente)
|
Arr.Add(NombreCliente)
|
||||||
Arr.Add(Folio)
|
Arr.Add(Folio)
|
||||||
Arr.Add($"$ {Importe}")
|
Arr.Add($"$ {Importe}")
|
||||||
|
|
||||||
EnvioMsg = EnviarNotificacionWhatsAppPlantilla(NumeroTelefono, "solicitud_autorizacion_anticipo", Arr, $"https://grupodiaz.adssistemas.mx.com/Clientes/Clientes.aspx?CveCliente={CveCliente}")
|
EnvioMsg = EnviarNotificacionWhatsAppPlantilla(NumeroTelefono, "solicitud_autorizacion_anticipo", Arr, $"https://grupodiaz.adssistemas.mx.com/Clientes/Clientes.aspx?CveCliente={CveCliente}")
|
||||||
'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)
|
|
||||||
Next
|
Next
|
||||||
If EnvioMsg Then
|
|
||||||
Alert("Se envió una solicitud de autorización", TipoMensaje.ToastInformacion)
|
|
||||||
'Else
|
|
||||||
' Alert("No se envió la solicitud de autorización", TipoMensaje.MsgAdvertencia)
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CveVenta As Integer = gvr.DataKey("CveVenta").ToEntero()
|
Dim CveVenta As Integer = gvr.DataKey("CveVenta").ToEntero()
|
||||||
Dim CveIE As Integer = gvr.DataKey("CveIE").ToEntero()
|
Dim CveIE As Integer = gvr.DataKey("CveIE").ToEntero()
|
||||||
|
|
||||||
Dim ObjVta As New ClsVentas
|
Dim ObjVta As New ClsVentas
|
||||||
If ObjVta.AddAutorizacionLimite(UsuarioActual.CveEmpresa, gvr.DataKey("CveCliente").ToEntero(), CveVendedor, Importe, 0, UsuarioActual.CveUsuario, 1, TipoDocumento:="Ant", DiasVencidos:=1, CveVenta:=CveVenta, CveIE:=CveIE) Then
|
If ObjVta.AddAutorizacionLimite(UsuarioActual.CveEmpresa, gvr.DataKey("CveCliente").ToEntero(), CveVendedor, Saldo, 0, UsuarioActual.CveUsuario, 1, TipoDocumento:="Ant", DiasVencidos:=1, CveVenta:=CveVenta, CveIE:=CveIE) Then
|
||||||
Dim msgAlert = "La autorización se agregó correctamente."
|
Dim msgAlert = "La autorización se agregó correctamente."
|
||||||
If EnvioMsg Then
|
If EnvioMsg Then
|
||||||
msgAlert = $"{msgAlert} Se envió una notificación de autorización a los usuarios"
|
msgAlert = $"{msgAlert} Se envió una notificación de autorización a los usuarios"
|
||||||
@@ -2181,7 +2175,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
ObjVta.Dispose()
|
ObjVta.Dispose()
|
||||||
|
|
||||||
|
|
||||||
UpAnticipos.Update()
|
CargaAnticipos(CveVenta)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user