-
This commit is contained in:
@@ -799,6 +799,22 @@ Public Class ClsVentas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdateIxCAnticipoAutorizado(CveIE As Integer, Autorizado As Boolean) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_IxCAnticipoAutorizadoUpdate")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||||
|
.Add("@Autorizado", SqlDbType.Bit).Value = Autorizado
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al actualizar el estatus del anticipo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function UpdateFechaVencimientoVenta(CveVenta As Integer, FechaVencimiento As Date) As Boolean
|
Public Function UpdateFechaVencimientoVenta(CveVenta As Integer, FechaVencimiento As Date) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_VentasFechaVencimientoUpdate")
|
DataAdapter("PA_Vta_VentasFechaVencimientoUpdate")
|
||||||
|
|||||||
@@ -243,7 +243,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row rowcheck truncate" id="DivDescuentocheck" style="margin-top: -25px;">
|
<div class="row rowcheck truncate" id="DivDescuentocheck" style="margin-top: -25px;" runat="server">
|
||||||
<div class="col-md-1" runat="server" id="Div1" style="width: 155px">
|
<div class="col-md-1" runat="server" id="Div1" style="width: 155px">
|
||||||
<asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento" CssClass="checkbox" />
|
<asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento" CssClass="checkbox" />
|
||||||
</div>
|
</div>
|
||||||
@@ -273,7 +273,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row rowcheck truncate" id="DivIntercheck" style="margin-top: -15px;">
|
<div class="row rowcheck truncate" id="DivIntercheck" style="margin-top: -15px;" runat="server">
|
||||||
|
|
||||||
<div class="col-md-1" runat="server" id="Div2" style="width: 155px">
|
<div class="col-md-1" runat="server" id="Div2" style="width: 155px">
|
||||||
<asp:CheckBox ID="ChkIntermediario" runat="server" Text="Intermediario" CssClass="checkbox" />
|
<asp:CheckBox ID="ChkIntermediario" runat="server" Text="Intermediario" CssClass="checkbox" />
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ Partial Class Bancos_DepositosCaja
|
|||||||
If DdlTipoPago.Items.FindByValue("-1") IsNot Nothing Then
|
If DdlTipoPago.Items.FindByValue("-1") IsNot Nothing Then
|
||||||
DdlTipoPago.Items.Remove(DdlTipoPago.Items.FindByValue("-1"))
|
DdlTipoPago.Items.Remove(DdlTipoPago.Items.FindByValue("-1"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
DivDescuentocheck.Visible = False
|
||||||
|
DivIntercheck.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -509,7 +512,7 @@ Partial Class Bancos_DepositosCaja
|
|||||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha).AddDays(1)
|
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha).AddDays(1)
|
||||||
|
|
||||||
If ObjMovtos.GetRemisionesCobranza(UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, FechaI, FechaF) Then
|
If ObjMovtos.GetRemisionesCobranza(UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, FechaI, FechaF) Then
|
||||||
Dim dtt As DataTable = ObjMovtos.DtResultados.FiltraParametros($"CveVenta > 0 AND (CveUsuarioCobranza IS NULL OR CveUsuarioCobranza = {UsuarioActual.CveUsuario}) AND TipoDocto IN ('Ing','Rem')")
|
Dim dtt As DataTable = ObjMovtos.DtResultados.FiltraParametros($"CveVenta > 0 AND (CveUsuarioCobranza IS NULL OR CveUsuarioCobranza = {UsuarioActual.CveUsuario}) AND TipoDocto IN ('Ing','Rem') AND RemisionEspecial = 0")
|
||||||
'Dim Dtta As DataTable = dtt.FiltraParametros($"CveUsuarioCobranza = {UsuarioActual.CveUsuario} ")
|
'Dim Dtta As DataTable = dtt.FiltraParametros($"CveUsuarioCobranza = {UsuarioActual.CveUsuario} ")
|
||||||
'If Dtta IsNot Nothing AndAlso Dtta.Rows.Count > 0 Then dtt = Dtta
|
'If Dtta IsNot Nothing AndAlso Dtta.Rows.Count > 0 Then dtt = Dtta
|
||||||
|
|
||||||
|
|||||||
@@ -1428,7 +1428,7 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If HayDifIEPS Then Alert("El porcentaje de IEPS del producto no coincide con el especificado.", TipoMensaje.MsgAdvertencia)
|
'If HayDifIEPS Then Alert("El porcentaje de IEPS del producto no coincide con el especificado.", TipoMensaje.MsgAdvertencia)
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(562).ToEntero > 0 Then CargaGastosServicios(UsuarioActual.Empresa.Funcionalidad(562).ToEntero)
|
If UsuarioActual.Empresa.Funcionalidad(562).ToEntero > 0 Then CargaGastosServicios(UsuarioActual.Empresa.Funcionalidad(562).ToEntero)
|
||||||
|
|
||||||
@@ -1986,13 +1986,14 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
If EmisorRegimenFiscal = "626" AndAlso Not RetISRResico AndAlso EmisorRFC.Length = 13 Then 'solo para personas físicas
|
|
||||||
|
If EmisorRegimenFiscal = "626" AndAlso Not RetISRResico AndAlso EmisorRFC.Length = 13 AndAlso UsuarioActual.CveEmpresa.Contiene(119, 158) Then 'solo para personas físicas
|
||||||
SbValRet.Append(" La factura no tiene especificado una retención de ISR, ya que el proveedor es Resico. <br/>")
|
SbValRet.Append(" La factura no tiene especificado una retención de ISR, ya que el proveedor es Resico. <br/>")
|
||||||
BtnGuardar.Enabled = False
|
BtnGuardar.Enabled = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If SbValRet.ToString.Trim.Length > 0 Then
|
If SbValRet.ToString.Trim.Length > 0 Then
|
||||||
Alert(SbValRet.ToString, TipoMensaje.MsgAdvertencia)
|
Alert("El porcentaje de IEPS del producto no coincide con el especificado.<br/><br/>" & SbValRet.ToString, TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
@@ -8055,10 +8056,10 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
If (TmpDT.Rows(IndiceUltimo)("IVA").ToString.ToDecimal + DiferenciaIVas) < 0 Then
|
If (TmpDT.Rows(IndiceUltimo)("IVA").ToString.ToDecimal + DiferenciaIVas) < 0 Then
|
||||||
|
|
||||||
Dim AjusteteDividido As Decimal = Math.Abs(DiferenciaIVas) / CantidadRegistroConIVA
|
Dim AjusteteDividido As Decimal = DiferenciaIVas / CantidadRegistroConIVA
|
||||||
|
|
||||||
For Each dRow As DataRow In TmpDT.Rows
|
For Each dRow As DataRow In TmpDT.Rows
|
||||||
dRow("IVA") = dRow("IVA").ToString.ToDecimal - AjusteteDividido
|
dRow("IVA") = dRow("IVA").ToString.ToDecimal + AjusteteDividido
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -1584,6 +1584,7 @@ Partial Class Compras_eFacturas
|
|||||||
|
|
||||||
Dim FiInfo As New FileInfo(comprmido)
|
Dim FiInfo As New FileInfo(comprmido)
|
||||||
|
|
||||||
|
Try
|
||||||
Using stream As Stream = System.IO.File.OpenRead(FiInfo.FullName)
|
Using stream As Stream = System.IO.File.OpenRead(FiInfo.FullName)
|
||||||
Try
|
Try
|
||||||
Dim reader = ReaderFactory.Open(stream)
|
Dim reader = ReaderFactory.Open(stream)
|
||||||
@@ -1636,6 +1637,20 @@ Partial Class Compras_eFacturas
|
|||||||
GuardaLogAD("'ERROR :" & ex.Message, eFacturasLog)
|
GuardaLogAD("'ERROR :" & ex.Message, eFacturasLog)
|
||||||
End Try
|
End Try
|
||||||
End Using
|
End Using
|
||||||
|
Catch ex As Exception
|
||||||
|
If UsuarioActual.CveRol = 1 Then
|
||||||
|
Alert($"Error al procesar archivo: {FiInfo.FullName} Error:{ex.Message} stackTrace: {ex.StackTrace}", TipoMensaje.MsgAdvertencia)
|
||||||
|
GuardaLogAD($"Error al procesar archivo: {FiInfo.FullName} Error:{ex.Message} stackTrace: {ex.StackTrace}")
|
||||||
|
Else
|
||||||
|
Alert("Se presento un error al procesar las solcictudes. comuniquese con soporte tecnico.", TipoMensaje.MsgAdvertencia)
|
||||||
|
GuardaLogAD($"Error al procesar archivo: {FiInfo.FullName} Error:{ex.Message} stackTrace: {ex.StackTrace}")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Exit Sub
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
@@ -1726,6 +1741,7 @@ Partial Class Compras_eFacturas
|
|||||||
For Each s As String In ListComprimidos
|
For Each s As String In ListComprimidos
|
||||||
Try
|
Try
|
||||||
File.Delete(s)
|
File.Delete(s)
|
||||||
|
GuardaLogAD("")
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
End Try
|
End Try
|
||||||
Next
|
Next
|
||||||
@@ -2853,11 +2869,14 @@ Partial Class Compras_eFacturas
|
|||||||
|
|
||||||
Dim TipoMensaje As ModExtensiones.TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion
|
Dim TipoMensaje As ModExtensiones.TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
For Each GvRow As GridViewRow In GVSolicitudesPendientes.Rows
|
||||||
|
|
||||||
Dim ListComprimidos As New List(Of String)
|
Dim ListComprimidos As New List(Of String)
|
||||||
Dim ListXML As New List(Of String)
|
Dim ListXML As New List(Of String)
|
||||||
Dim ListPDF As New List(Of String)
|
Dim ListPDF As New List(Of String)
|
||||||
|
|
||||||
For Each GvRow As GridViewRow In GVSolicitudesPendientes.Rows
|
|
||||||
Dim CveSolicitudActual As Integer = GvRow.DataKey("CveSolicitud").ToEntero()
|
Dim CveSolicitudActual As Integer = GvRow.DataKey("CveSolicitud").ToEntero()
|
||||||
Dim idSolicitud As String = GvRow.DataKey("idSolicitud").Trim()
|
Dim idSolicitud As String = GvRow.DataKey("idSolicitud").Trim()
|
||||||
Dim CveTipoSolicitud As Integer = GvRow.DataKey("CveTipoSolicitud").ToEntero()
|
Dim CveTipoSolicitud As Integer = GvRow.DataKey("CveTipoSolicitud").ToEntero()
|
||||||
@@ -2872,6 +2891,7 @@ Partial Class Compras_eFacturas
|
|||||||
Dim ResultadoSolicitudOK As Boolean = False
|
Dim ResultadoSolicitudOK As Boolean = False
|
||||||
Dim api As New GeneralesAPIeFacturas(If(EsProduccion, "http://localhost:4001/", "http://localhost:60281/"))
|
Dim api As New GeneralesAPIeFacturas(If(EsProduccion, "http://localhost:4001/", "http://localhost:60281/"))
|
||||||
|
|
||||||
|
|
||||||
Dim Verificar As Boolean = True
|
Dim Verificar As Boolean = True
|
||||||
|
|
||||||
If idSolicitud.Length = 0 Then
|
If idSolicitud.Length = 0 Then
|
||||||
@@ -2938,6 +2958,7 @@ Partial Class Compras_eFacturas
|
|||||||
|
|
||||||
If File.Exists(destFile) Then
|
If File.Exists(destFile) Then
|
||||||
ListComprimidos.Add(destFile)
|
ListComprimidos.Add(destFile)
|
||||||
|
'GuardaLogAD($"eFacturas Solicitudes SAT Archivo copiado a {destFile}")
|
||||||
Else
|
Else
|
||||||
sbArchivosFaltantes.AppendFormat("<br/> Folio: {0} Archivo: {1}", Folio, fileName)
|
sbArchivosFaltantes.AppendFormat("<br/> Folio: {0} Archivo: {1}", Folio, fileName)
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -3533,6 +3533,8 @@
|
|||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
<ReportParameter Name="RegimenFiscalCodigo">
|
<ReportParameter Name="RegimenFiscalCodigo">
|
||||||
<DataType>String</DataType>
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
<Prompt>ReportParameter1</Prompt>
|
<Prompt>ReportParameter1</Prompt>
|
||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
</ReportParameters>
|
</ReportParameters>
|
||||||
|
|||||||
@@ -738,7 +738,7 @@ CIUDAD DE MEXICO</Value>
|
|||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox6</rd:DefaultName>
|
<rd:DefaultName>Textbox6</rd:DefaultName>
|
||||||
<Top>0.93835cm</Top>
|
<Top>0.93835cm</Top>
|
||||||
<Left>4.49034cm</Left>
|
<Left>4.52562cm</Left>
|
||||||
<Height>1.56146cm</Height>
|
<Height>1.56146cm</Height>
|
||||||
<Width>10.79062cm</Width>
|
<Width>10.79062cm</Width>
|
||||||
<ZIndex>1</ZIndex>
|
<ZIndex>1</ZIndex>
|
||||||
|
|||||||
@@ -807,9 +807,10 @@ Partial Class Inventarios_Kardex
|
|||||||
|
|
||||||
Protected Sub ddlProducto2_selectedindexchange(sender As Object, e As EventArgs)
|
Protected Sub ddlProducto2_selectedindexchange(sender As Object, e As EventArgs)
|
||||||
LnkKPIVerComportamiento.Visible = False
|
LnkKPIVerComportamiento.Visible = False
|
||||||
If ddlProducto2.SelectedValue.ToEntero > 0 Then
|
If ddlProducto2.SelectedValue.ToEntero > 0 And UsuarioActual.CveRol = 1 Then
|
||||||
LnkKPIVerComportamiento.Visible = True
|
LnkKPIVerComportamiento.Visible = True
|
||||||
End If
|
End If
|
||||||
UpAcciones.Update()
|
UpAcciones.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1016,13 +1016,12 @@ Partial Class OC_OC
|
|||||||
LblPrioridad.Text = "Sucursal"
|
LblPrioridad.Text = "Sucursal"
|
||||||
DdlPrioridad.Visible = False
|
DdlPrioridad.Visible = False
|
||||||
DdlSubProyectoGral.Visible = True
|
DdlSubProyectoGral.Visible = True
|
||||||
End If
|
|
||||||
|
|
||||||
If UsuarioActual.CveRol = 1 Then
|
|
||||||
TrDescuentoEscalonado.Visible = True
|
TrDescuentoEscalonado.Visible = True
|
||||||
TrDescuentoProntoPago.Visible = True
|
TrDescuentoProntoPago.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.CveEmpresa = 189 AndAlso CveOrdenCompra <> Nothing AndAlso CveOrdenCompra > 0 Then
|
If UsuarioActual.Empresa.CveEmpresa = 189 AndAlso CveOrdenCompra <> Nothing AndAlso CveOrdenCompra > 0 Then
|
||||||
BtnEdicionMasiva.Visible = True
|
BtnEdicionMasiva.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -4079,8 +4079,12 @@
|
|||||||
<asp:UpdatePanel ID="UPGvDocumentosFirma" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPGvDocumentosFirma" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpGvDocumentosFirma2" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpGvDocumentosFirma2" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
<asp:GridView ID="GvDocumentosFirma" runat="server" AutoGenerateColumns="False" DataKeyNames="CveDocumentacion,Documentacion,Orden,CveDocumentacionElectronica,Adjunto,Estatus,Observacion,Fecha,FechaIng,Usuario,FechaLimite,DocumentacionFormato,FechaVigencia,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento"
|
<asp:GridView ID="GvDocumentosFirma" runat="server" AutoGenerateColumns="False" DataKeyNames="CveDocumentacion,Documentacion,Orden,CveDocumentacionElectronica,Adjunto,Estatus,Observacion,Fecha,FechaIng,Usuario,FechaLimite,DocumentacionFormato,FechaVigencia,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento"
|
||||||
EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall" GridLines="None">
|
EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
@@ -4149,7 +4153,9 @@
|
|||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal>
|
<%--<asp:Literal ID="ImgDownLoad" runat="server" ></asp:Literal>--%>
|
||||||
|
<asp:LinkButton ID="ImgDownLoad" CssClass="btn btn-circle btn-sm blue" OnClick="ImgDownLoad_Click" runat="server"
|
||||||
|
Text="<i class='fa fa-download' style='color:white' title='Descargar formato'></i>" CausesValidation="False" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
@@ -4161,6 +4167,7 @@
|
|||||||
</asp:TemplateField>--%>
|
</asp:TemplateField>--%>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
<asp:UpdatePanel ID="UpImprimir" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpImprimir" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<table runat="server" visible="false" class="table table-hover table-advance Widthall">
|
<table runat="server" visible="false" class="table table-hover table-advance Widthall">
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ Imports System.Data
|
|||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
Imports System.Data.SqlTypes
|
Imports System.Data.SqlTypes
|
||||||
|
Imports DocumentFormat.OpenXml.Drawing.Diagrams
|
||||||
|
|
||||||
Partial Class RH_Personal
|
Partial Class RH_Personal
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -4357,6 +4358,7 @@ Partial Class RH_Personal
|
|||||||
objRH.Dispose()
|
objRH.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvDocumentosFirma_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocumentosFirma.RowDataBound
|
Protected Sub GvDocumentosFirma_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocumentosFirma.RowDataBound
|
||||||
|
|
||||||
|
|
||||||
@@ -4364,7 +4366,8 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString()
|
Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString()
|
||||||
Dim ImgDownLoadFormato As LinkButton = e.Row.FCLinkButton("ImgDownLoadFormato")
|
Dim ImgDownLoadFormato As LinkButton = e.Row.FCLinkButton("ImgDownLoadFormato")
|
||||||
Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
|
|
||||||
|
Dim ImgDownLoad As LinkButton = e.Row.FCLinkButton("ImgDownLoad")
|
||||||
Dim ImgRequired As Literal = e.Row.FCLiteral("ImgRequired")
|
Dim ImgRequired As Literal = e.Row.FCLiteral("ImgRequired")
|
||||||
Dim txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite")
|
Dim txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite")
|
||||||
Dim requerido As Boolean = If(e.Row.DBCampo("Requerido").ToUpper = "TRUE", True, False)
|
Dim requerido As Boolean = If(e.Row.DBCampo("Requerido").ToUpper = "TRUE", True, False)
|
||||||
@@ -4417,14 +4420,18 @@ Partial Class RH_Personal
|
|||||||
If File.Exists(linkDescargaArchivo) Then
|
If File.Exists(linkDescargaArchivo) Then
|
||||||
|
|
||||||
ImgDownLoad.Visible = True
|
ImgDownLoad.Visible = True
|
||||||
If extencion.Length > 0 Then
|
ScriptManager.GetCurrent(Me).RegisterPostBackControl(ImgDownLoad)
|
||||||
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CvePersonal & Documentacion & "." & extencion)
|
|
||||||
Else
|
'If extencion.Length > 0 Then
|
||||||
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CvePersonal & Documentacion)
|
' ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CvePersonal & Documentacion & "." & extencion)
|
||||||
End If
|
'Else
|
||||||
|
' ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CvePersonal & Documentacion)
|
||||||
|
'End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ImgDownLoad.Visible = False
|
ImgDownLoad.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ImgDownLoad.Visible = False
|
ImgDownLoad.Visible = False
|
||||||
End If
|
End If
|
||||||
@@ -4438,6 +4445,35 @@ Partial Class RH_Personal
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub ImgDownLoad_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
|
||||||
|
Dim Adjunto As String = GvRow.DataKey("Adjunto").ToString()
|
||||||
|
Dim ArchivoPath As String = UsuarioActual.Empresa.Ruta & "Personal/" & CvePersonal & "/" & Adjunto
|
||||||
|
|
||||||
|
DescargarArchivo(ArchivoPath)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub DescargarArchivo(rutaArchivo As String)
|
||||||
|
|
||||||
|
If System.IO.File.Exists(rutaArchivo) Then
|
||||||
|
|
||||||
|
Dim nombreArchivo As String = System.IO.Path.GetFileName(rutaArchivo)
|
||||||
|
Response.Clear()
|
||||||
|
Response.ContentType = "application/octet-stream"
|
||||||
|
Response.AddHeader("Content-Disposition", "attachment; filename=" & nombreArchivo)
|
||||||
|
Response.AddHeader("Content-Length", New System.IO.FileInfo(rutaArchivo).Length.ToString())
|
||||||
|
Response.WriteFile(rutaArchivo)
|
||||||
|
Response.End()
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Sub DownLoadFormato_ClickDocumentacion(sender As Object, e As EventArgs)
|
Public Sub DownLoadFormato_ClickDocumentacion(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
@@ -8160,5 +8196,7 @@ Partial Class RH_Personal
|
|||||||
args.IsValid = retorno
|
args.IsValid = retorno
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -937,6 +937,39 @@ Partial Class Clientes
|
|||||||
DivAseguradora.Visible = True
|
DivAseguradora.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'PROCESOS PARA OCULTAR OPCIONES
|
||||||
|
If TabAnticipos.Visible Then
|
||||||
|
TabAnticipos.Visible = Not UsuarioActual.TienePermisoProceso(391)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TabComplementos.Visible Then
|
||||||
|
TabComplementos.Visible = Not UsuarioActual.TienePermisoProceso(392)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TabOtros.Visible Then
|
||||||
|
TabOtros.Visible = Not UsuarioActual.TienePermisoProceso(393)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TabUsuarios.Visible Then
|
||||||
|
TabUsuarios.Visible = Not UsuarioActual.TienePermisoProceso(394)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TabContratos.Visible Then
|
||||||
|
TabContratos.Visible = Not UsuarioActual.TienePermisoProceso(395)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TabSistema.Visible Then
|
||||||
|
TabSistema.Visible = Not UsuarioActual.TienePermisoProceso(396)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TabDocumentacion.Visible Then
|
||||||
|
TabDocumentacion.Visible = Not UsuarioActual.TienePermisoProceso(397)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TabRH.Visible Then
|
||||||
|
TabRH.Visible = Not UsuarioActual.TienePermisoProceso(398)
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -1749,6 +1782,7 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Ocultamos la mayoria de informacion si es no-frecuente
|
'Ocultamos la mayoria de informacion si es no-frecuente
|
||||||
If ObjClientes.TipoCliente = 2 Then
|
If ObjClientes.TipoCliente = 2 Then
|
||||||
If UsuarioActual.CveEmpresa <> 141 Then TabFiscalContable.Visible = False
|
If UsuarioActual.CveEmpresa <> 141 Then TabFiscalContable.Visible = False
|
||||||
@@ -1771,6 +1805,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
TxtCorreoEntregaCompras.Text = ObjClientes.DtResultados(0)("CorreoEntregaCompras").ToString()
|
TxtCorreoEntregaCompras.Text = ObjClientes.DtResultados(0)("CorreoEntregaCompras").ToString()
|
||||||
TxtCorreoEntregaAlmacen.Text = ObjClientes.DtResultados(0)("CorreoEntregaAlmacen").ToString()
|
TxtCorreoEntregaAlmacen.Text = ObjClientes.DtResultados(0)("CorreoEntregaAlmacen").ToString()
|
||||||
|
|
||||||
@@ -1803,11 +1838,11 @@ Partial Class Clientes
|
|||||||
TxtRepresentanteLegal.Text = ObjClientes.RepresentanteLegal
|
TxtRepresentanteLegal.Text = ObjClientes.RepresentanteLegal
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UpActivacionPortal.Update()
|
UpActivacionPortal.Update()
|
||||||
UpModalPersonaFisica.Update()
|
UpModalPersonaFisica.Update()
|
||||||
ObjClientes.Dispose()
|
ObjClientes.Dispose()
|
||||||
|
|
||||||
|
|
||||||
watch.Stop()
|
watch.Stop()
|
||||||
' Alert(watch.ElapsedMilliseconds.ToString())
|
' Alert(watch.ElapsedMilliseconds.ToString())
|
||||||
|
|
||||||
@@ -2992,7 +3027,17 @@ Partial Class Clientes
|
|||||||
|
|
||||||
|
|
||||||
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() = "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
|
||||||
|
e.Row.FCLinkButton("LnkAutorizar").Visible = True
|
||||||
|
e.Row.FCLinkButton("LnkCancelar").Visible = False
|
||||||
|
Else
|
||||||
|
e.Row.FCLinkButton("LnkAutorizar").Visible = False
|
||||||
|
e.Row.FCLinkButton("LnkCancelar").Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
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
|
||||||
@@ -10744,14 +10789,23 @@ Partial Class Clientes
|
|||||||
Protected Sub LnkAutorizarAnticipo_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkAutorizarAnticipo_Click(sender As Object, e As EventArgs)
|
||||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||||
Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
|
Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
|
||||||
If CveVenta > 0 Then
|
Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
|
||||||
|
|
||||||
|
If CveVenta > 0 OrElse CveIE > 0 Then
|
||||||
Using ObjVentas As New ClsVentas
|
Using ObjVentas As New ClsVentas
|
||||||
|
If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
|
||||||
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, True) Then
|
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, True) Then
|
||||||
Alert("El anticipo se autorizó correctamente")
|
Alert("El anticipo se autorizó correctamente")
|
||||||
End If
|
End If
|
||||||
End Using
|
ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
|
||||||
CargaAnticipos()
|
If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, True) Then
|
||||||
|
Alert("El anticipo se autorizó correctamente")
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
|
|
||||||
|
CargaAnticipos()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub LnkCancelarAnticipo_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkCancelarAnticipo_Click(sender As Object, e As EventArgs)
|
||||||
|
|||||||
@@ -203,6 +203,9 @@ Partial Class Ventas_PVCobranza
|
|||||||
LkbEstadodeCaja.Visible = True
|
LkbEstadodeCaja.Visible = True
|
||||||
LkbIngreso.Visible = True
|
LkbIngreso.Visible = True
|
||||||
LkbRetiro.Visible = True
|
LkbRetiro.Visible = True
|
||||||
|
If UsuarioActual.CveEmpresa = 189 Then
|
||||||
|
LkbRetiro.Visible = False
|
||||||
|
End If
|
||||||
UpTurno.Visible = True
|
UpTurno.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -343,6 +346,11 @@ Partial Class Ventas_PVCobranza
|
|||||||
'e.Row.CssClass = "blue-madison"
|
'e.Row.CssClass = "blue-madison"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If e.Row.DBCampo("RemisionEspecial") = "1" Then
|
||||||
|
e.Row.BackColor = Drawing.ColorTranslator.FromHtml("#e9edef")
|
||||||
|
e.Row.ToolTip = "Remisión especial"
|
||||||
|
End If
|
||||||
|
|
||||||
If e.Row.DBCampo("TipoEntrega") = "2" OrElse e.Row.DBCampo("AplicaImpresionPorAnt") = "1" Then
|
If e.Row.DBCampo("TipoEntrega") = "2" OrElse e.Row.DBCampo("AplicaImpresionPorAnt") = "1" Then
|
||||||
e.Row.FCLinkButton("LnkImprimir").Visible = True
|
e.Row.FCLinkButton("LnkImprimir").Visible = True
|
||||||
ScriptManager.GetCurrent(Me).RegisterPostBackControl(e.Row.FCLinkButton("LnkImprimir"))
|
ScriptManager.GetCurrent(Me).RegisterPostBackControl(e.Row.FCLinkButton("LnkImprimir"))
|
||||||
@@ -831,6 +839,9 @@ Partial Class Ventas_PVCobranza
|
|||||||
DtAnticipos.Columns.Add("TotalAnticipo", GetType(Decimal))
|
DtAnticipos.Columns.Add("TotalAnticipo", GetType(Decimal))
|
||||||
DtAnticipos.Columns.Add("SubTotalAnticipo", GetType(Decimal))
|
DtAnticipos.Columns.Add("SubTotalAnticipo", GetType(Decimal))
|
||||||
DtAnticipos.Columns.Add("CveMoneda", GetType(Decimal))
|
DtAnticipos.Columns.Add("CveMoneda", GetType(Decimal))
|
||||||
|
DtAnticipos.Columns.Add("Fecha", GetType(DateTime))
|
||||||
|
DtAnticipos.Columns.Add("TipoCambioPago", GetType(Decimal))
|
||||||
|
DtAnticipos.Columns.Add("Folio", GetType(String))
|
||||||
|
|
||||||
For Each GvRow As GridViewRow In GVAnticipos.Rows
|
For Each GvRow As GridViewRow In GVAnticipos.Rows
|
||||||
If GvRow.FCCheckBox("Chk" & GvRow.RowIndex) IsNot Nothing AndAlso GvRow.FCCheckBox("Chk" & GvRow.RowIndex).Checked Then
|
If GvRow.FCCheckBox("Chk" & GvRow.RowIndex) IsNot Nothing AndAlso GvRow.FCCheckBox("Chk" & GvRow.RowIndex).Checked Then
|
||||||
@@ -844,8 +855,11 @@ Partial Class Ventas_PVCobranza
|
|||||||
Dim TotalAnticipo As Decimal = GvRow.DataKey("TotalAnticipo").ToDecimal()
|
Dim TotalAnticipo As Decimal = GvRow.DataKey("TotalAnticipo").ToDecimal()
|
||||||
Dim SubTotalAnticipo As Decimal = GvRow.DataKey("SubTotalAnticipo").ToDecimal()
|
Dim SubTotalAnticipo As Decimal = GvRow.DataKey("SubTotalAnticipo").ToDecimal()
|
||||||
Dim CveMoneda As Integer = GvRow.DataKey("CveMoneda").ToEntero()
|
Dim CveMoneda As Integer = GvRow.DataKey("CveMoneda").ToEntero()
|
||||||
|
Dim Fecha As DateTime = GvRow.DataKey("Fecha").ToDateTime()
|
||||||
|
Dim TipoCambioPago As Decimal = GvRow.DataKey("TipoCambioPago").ToDecimal()
|
||||||
|
Dim Folio = GvRow.DataKey("Folio")
|
||||||
|
|
||||||
DtAnticipos.Rows.Add(CveVenta, Importe, CveConceptoContable, CveIE, FolioFiscal, Descuentos, TotalAnticipo, SubTotalAnticipo, CveMoneda)
|
DtAnticipos.Rows.Add(CveVenta, Importe, CveConceptoContable, CveIE, FolioFiscal, Descuentos, TotalAnticipo, SubTotalAnticipo, CveMoneda, Fecha, TipoCambioPago, Folio)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -968,6 +982,9 @@ Partial Class Ventas_PVCobranza
|
|||||||
DtAnticipos.Columns.Add("TotalAnticipo", GetType(Decimal))
|
DtAnticipos.Columns.Add("TotalAnticipo", GetType(Decimal))
|
||||||
DtAnticipos.Columns.Add("SubTotalAnticipo", GetType(Decimal))
|
DtAnticipos.Columns.Add("SubTotalAnticipo", GetType(Decimal))
|
||||||
DtAnticipos.Columns.Add("CveMoneda", GetType(Decimal))
|
DtAnticipos.Columns.Add("CveMoneda", GetType(Decimal))
|
||||||
|
DtAnticipos.Columns.Add("Fecha", GetType(DateTime))
|
||||||
|
DtAnticipos.Columns.Add("TipoCambioPago", GetType(Decimal))
|
||||||
|
DtAnticipos.Columns.Add("Folio", GetType(String))
|
||||||
|
|
||||||
For Each GvRow As GridViewRow In GVAnticipos.Rows
|
For Each GvRow As GridViewRow In GVAnticipos.Rows
|
||||||
If GvRow.FCCheckBox("Chk" & GvRow.RowIndex) IsNot Nothing AndAlso GvRow.FCCheckBox("Chk" & GvRow.RowIndex).Checked Then
|
If GvRow.FCCheckBox("Chk" & GvRow.RowIndex) IsNot Nothing AndAlso GvRow.FCCheckBox("Chk" & GvRow.RowIndex).Checked Then
|
||||||
@@ -981,8 +998,11 @@ Partial Class Ventas_PVCobranza
|
|||||||
Dim TotalAnticipo As Decimal = GvRow.DataKey("TotalAnticipo").ToDecimal()
|
Dim TotalAnticipo As Decimal = GvRow.DataKey("TotalAnticipo").ToDecimal()
|
||||||
Dim SubTotalAnticipo As Decimal = GvRow.DataKey("SubTotalAnticipo").ToDecimal()
|
Dim SubTotalAnticipo As Decimal = GvRow.DataKey("SubTotalAnticipo").ToDecimal()
|
||||||
Dim CveMoneda As Integer = GvRow.DataKey("CveMoneda").ToEntero()
|
Dim CveMoneda As Integer = GvRow.DataKey("CveMoneda").ToEntero()
|
||||||
|
Dim Fecha As DateTime = GvRow.DataKey("Fecha").ToDateTime()
|
||||||
|
Dim TipoCambioPago As Decimal = GvRow.DataKey("TipoCambioPago").ToDecimal()
|
||||||
|
Dim Folio = GvRow.DataKey("Folio")
|
||||||
|
|
||||||
DtAnticipos.Rows.Add(CveVenta, Importe, CveConceptoContable, CveIE, FolioFiscal, Descuentos, TotalAnticipo, SubTotalAnticipo, CveMoneda)
|
DtAnticipos.Rows.Add(CveVenta, Importe, CveConceptoContable, CveIE, FolioFiscal, Descuentos, TotalAnticipo, SubTotalAnticipo, CveMoneda, Fecha, TipoCambioPago, Folio)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -1019,6 +1039,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
ObjFactura.Timbre.CFDIRelacionados.UUID.Clear()
|
ObjFactura.Timbre.CFDIRelacionados.UUID.Clear()
|
||||||
If HdnTipoAmortizacion.Value = "2" Then
|
If HdnTipoAmortizacion.Value = "2" Then
|
||||||
Dim Anticipos = ListaAnticiposAplicados.Where(Function(Obj) Obj.Tipo = "Ant")
|
Dim Anticipos = ListaAnticiposAplicados.Where(Function(Obj) Obj.Tipo = "Ant")
|
||||||
|
If Anticipos IsNot Nothing AndAlso Anticipos.Count() > 0 Then
|
||||||
For Each Ant As Modelos.MAnticipoRelacionado In Anticipos
|
For Each Ant As Modelos.MAnticipoRelacionado In Anticipos
|
||||||
ObjFactura.Timbre.CFDIRelacionados.UUID.Add(Ant.FolioFiscal)
|
ObjFactura.Timbre.CFDIRelacionados.UUID.Add(Ant.FolioFiscal)
|
||||||
Next
|
Next
|
||||||
@@ -1035,9 +1056,12 @@ Partial Class Ventas_PVCobranza
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
'DEVOLUCIONES DE OTRA VENTA, APLICADAS EN UNA NUEVA
|
'DEVOLUCIONES DE OTRA VENTA, APLICADAS EN UNA NUEVA
|
||||||
If HdnTipoAmortizacion.Value = "4" Then
|
If HdnTipoAmortizacion.Value = "4" Then
|
||||||
Dim DevolucionesNC = ListaAnticiposAplicados.Where(Function(Obj) Obj.Tipo = "NC")
|
Dim DevolucionesNC = ListaAnticiposAplicados.Where(Function(Obj) Obj.Tipo = "NC")
|
||||||
|
If DevolucionesNC IsNot Nothing AndAlso DevolucionesNC.Count() > 0 Then
|
||||||
For Each Ant As Modelos.MAnticipoRelacionado In DevolucionesNC
|
For Each Ant As Modelos.MAnticipoRelacionado In DevolucionesNC
|
||||||
ObjFactura.Timbre.CFDIRelacionados.UUID.Add(Ant.FolioFiscal)
|
ObjFactura.Timbre.CFDIRelacionados.UUID.Add(Ant.FolioFiscal)
|
||||||
Next
|
Next
|
||||||
@@ -1054,6 +1078,8 @@ Partial Class Ventas_PVCobranza
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function TimbrarFactura(ByRef ObjFactura As Modelos.Factura, ByRef ObjNC As Modelos.Factura) As String
|
Private Function TimbrarFactura(ByRef ObjFactura As Modelos.Factura, ByRef ObjNC As Modelos.Factura) As String
|
||||||
@@ -1187,13 +1213,48 @@ Partial Class Ventas_PVCobranza
|
|||||||
|
|
||||||
ObjPVenta.Dispose()
|
ObjPVenta.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function ValidaCobranza() As Boolean
|
||||||
|
Dim Respuesta As Boolean = False
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
|
|
||||||
|
Dim ObjMovtos As New ClsMovimientos()
|
||||||
|
Dim FechaI, FechaF As Date
|
||||||
|
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
||||||
|
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha).AddDays(1)
|
||||||
|
|
||||||
|
If ObjMovtos.GetRemisionesCobranza(UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero(), FechaI, FechaF) Then
|
||||||
|
Dim dtt As DataTable = ObjMovtos.DtResultados.FiltraParametros($"CveVenta > 0 AND (CveUsuarioCobranza IS NULL OR CveUsuarioCobranza = {UsuarioActual.CveUsuario}) AND TipoDocto IN ('Ing','Rem') AND RemisionEspecial = 0")
|
||||||
|
'Dim Dtta As DataTable = dtt.FiltraParametros($"CveUsuarioCobranza = {UsuarioActual.CveUsuario} ")
|
||||||
|
'If Dtta IsNot Nothing AndAlso Dtta.Rows.Count > 0 Then dtt = Dtta
|
||||||
|
|
||||||
|
If dtt.Rows.Count = 0 Then
|
||||||
|
Respuesta = True
|
||||||
|
Else
|
||||||
|
Respuesta = False
|
||||||
|
Alert("No se puede realizar el cerrar el turno, ya que hay cobros pendientes por aplicar.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
Alert("Error al consultarcobros pendientes.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Respuesta = False
|
||||||
|
End If
|
||||||
|
ObjMovtos.Dispose()
|
||||||
|
Else
|
||||||
|
Respuesta = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return Respuesta
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub BtnCerrarTurno_Click(sender As Object, e As EventArgs) Handles BtnCerrarTurno.Click
|
Private Sub BtnCerrarTurno_Click(sender As Object, e As EventArgs) Handles BtnCerrarTurno.Click
|
||||||
|
|
||||||
'validar.
|
'validar.
|
||||||
' que no existan movimientos pendientes de pago.
|
' que no existan movimientos pendientes de pago.
|
||||||
' que no halla facturas pendientes de cancelación.
|
' que no halla facturas pendientes de cancelación.
|
||||||
' no facturar remisiones de días anteriores
|
' no facturar remisiones de días anteriores
|
||||||
|
If ValidaCobranza() Then
|
||||||
Dim ObjPVenta As New ClsPuntoVenta
|
Dim ObjPVenta As New ClsPuntoVenta
|
||||||
If TxtEfectivoEnCaja.Text.Trim <> "" Then
|
If TxtEfectivoEnCaja.Text.Trim <> "" Then
|
||||||
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoEnCaja.Text.ToDouble, LblDiferenciaCaja.Text.ToDouble, NowADS(), UsuarioActual.CveEmpresa) Then
|
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoEnCaja.Text.ToDouble, LblDiferenciaCaja.Text.ToDouble, NowADS(), UsuarioActual.CveEmpresa) Then
|
||||||
@@ -1203,6 +1264,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ObjPVenta.Dispose()
|
ObjPVenta.Dispose()
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub BtnCerrarBloqueo_Click(sender As Object, e As EventArgs) Handles BtnCerrarBloqueo.Click
|
Private Sub BtnCerrarBloqueo_Click(sender As Object, e As EventArgs) Handles BtnCerrarBloqueo.Click
|
||||||
Dim ObjPVenta As New ClsPuntoVenta
|
Dim ObjPVenta As New ClsPuntoVenta
|
||||||
@@ -1239,6 +1301,10 @@ Partial Class Ventas_PVCobranza
|
|||||||
|
|
||||||
ObjPVenta.Dispose()
|
ObjPVenta.Dispose()
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 189 Then
|
||||||
|
LkbRetiro.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
RegistraScript("$('#DivCorteDeCaja').hide();")
|
RegistraScript("$('#DivCorteDeCaja').hide();")
|
||||||
|
|
||||||
UpTurno.Update()
|
UpTurno.Update()
|
||||||
@@ -1702,16 +1768,34 @@ Partial Class Ventas_PVCobranza
|
|||||||
|
|
||||||
Dim ObjProceso As New ClsSisProcesos
|
Dim ObjProceso As New ClsSisProcesos
|
||||||
If ObjProceso.GetUsuariosconProceso(379, UsuarioActual.CveEmpresa) Then 'proceso para autorizar
|
If ObjProceso.GetUsuariosconProceso(379, UsuarioActual.CveEmpresa) Then 'proceso para autorizar
|
||||||
dtt = ObjProceso.DtResultados.Copy()
|
dtt = ObjProceso.DtResultados.FiltraParametros("", DistinctColumns:={"CveUsuario", "Celular"})
|
||||||
End If
|
End If
|
||||||
ObjProceso.Dispose()
|
ObjProceso.Dispose()
|
||||||
|
|
||||||
|
Dim NombreCliente As String = ""
|
||||||
|
If gvr.DataKey("CveCliente").ToEntero() > 0 Then
|
||||||
|
NombreCliente = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=gvr.DataKey("CveCliente").ToEntero()).FiltroPrimeroValor("NombreComercial")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim EnvioMsg As Boolean = False
|
||||||
|
|
||||||
If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
||||||
For Each dr As DataRow In dtt.Rows
|
For Each dr As DataRow In dtt.Rows
|
||||||
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)
|
Dim NumeroTelefono = "526621143532"
|
||||||
|
'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)
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If EnvioMsg Then
|
||||||
|
Alert("Se envió una solicitud de autorización")
|
||||||
|
Else
|
||||||
|
Alert("No se envió la solicitud de autorización", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
UpAnticipos.Update()
|
UpAnticipos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1806,7 +1890,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(185) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(185) = "1" Then
|
||||||
If e.Row.DBCampo("Tipo").ToString().Contiene("Ant", "IxC") AndAlso Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
|
If e.Row.DBCampo("Tipo").ToString().Contiene("NC", "Ant", "IxC") AndAlso Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
|
||||||
e.Row.FCCheckBox("Chk" & e.Row.RowIndex).Enabled = False
|
e.Row.FCCheckBox("Chk" & e.Row.RowIndex).Enabled = False
|
||||||
e.Row.FCCheckBox("Chk" & e.Row.RowIndex).ToolTip = "Anticipo Bloqueado"
|
e.Row.FCCheckBox("Chk" & e.Row.RowIndex).ToolTip = "Anticipo Bloqueado"
|
||||||
e.Row.FCLinkButton("LnkSolicitarActivarAnticipo").Visible = True
|
e.Row.FCLinkButton("LnkSolicitarActivarAnticipo").Visible = True
|
||||||
|
|||||||
@@ -865,6 +865,16 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr align="left" id="TrRemEspecial" runat="server" visible="false">
|
||||||
|
<td><b>Remisión Especial:</b> </td>
|
||||||
|
<td>
|
||||||
|
<asp:UpdatePanel ID="UpRemEspecial" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:CheckBox ID="ChkRemEspecial" runat="server" />
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr align="left" id="TrSinExistencia" runat="server" visible="false">
|
<tr align="left" id="TrSinExistencia" runat="server" visible="false">
|
||||||
<td><b>Sin existencia:</b> </td>
|
<td><b>Sin existencia:</b> </td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -3184,7 +3184,9 @@ Partial Class Ventas
|
|||||||
|
|
||||||
CargaEstatusFactura()
|
CargaEstatusFactura()
|
||||||
'DdlEstatus.SelectedValueExist("2")
|
'DdlEstatus.SelectedValueExist("2")
|
||||||
|
If UsuarioActual.Empresa.CveEmpresa = 189 Then
|
||||||
|
ImgAntiPend.Visible = False
|
||||||
|
End If
|
||||||
ConfiguraTipoDocto()
|
ConfiguraTipoDocto()
|
||||||
|
|
||||||
|
|
||||||
@@ -3619,6 +3621,8 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "Bloqueo Pantalla"
|
#Region "Bloqueo Pantalla"
|
||||||
@@ -5242,6 +5246,15 @@ Partial Class Ventas
|
|||||||
DiasCredito = DbRowVenta("DiasCredito").ToString().ToEntero()
|
DiasCredito = DbRowVenta("DiasCredito").ToString().ToEntero()
|
||||||
EsDiasCreditoFijo = CBool(DbRowVenta("EsDiasCreditoFijo").ToString())
|
EsDiasCreditoFijo = CBool(DbRowVenta("EsDiasCreditoFijo").ToString())
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
|
If DbRowVenta("Num2").ToString().ToEntero() = 2000 Then
|
||||||
|
ChkRemEspecial.Checked = True
|
||||||
|
ChkRemEspecial.Enabled = False
|
||||||
|
TxtFech2.Text = DbRowVenta("Fech2").ToString()
|
||||||
|
TrRemEspecial.Visible = UsuarioActual.TienePermisoProceso(390)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
'If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
' Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto")))
|
' Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto")))
|
||||||
' If TienePermiso <> "" Then ' si tiene acceso en el subproyecto
|
' If TienePermiso <> "" Then ' si tiene acceso en el subproyecto
|
||||||
@@ -6656,10 +6669,14 @@ Partial Class Ventas
|
|||||||
DdlTipoRelacionARelacionar.Items.Insert(0, New ListItem("-", "-1"))
|
DdlTipoRelacionARelacionar.Items.Insert(0, New ListItem("-", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaFormaEntrega()
|
Private Sub CargaFormaEntrega()
|
||||||
|
If GlobalDTVtaCondicionesEntrega(UsuarioActual.CveEmpresa).Rows.Count > 0 Then
|
||||||
TrFormaEntrega.Visible = True
|
TrFormaEntrega.Visible = True
|
||||||
DdlFormaEntrega.DataSource = GlobalDTVtaCondicionesEntrega(UsuarioActual.CveEmpresa)
|
DdlFormaEntrega.DataSource = GlobalDTVtaCondicionesEntrega(UsuarioActual.CveEmpresa)
|
||||||
DdlFormaEntrega.DataBind()
|
DdlFormaEntrega.DataBind()
|
||||||
DdlFormaEntrega.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlFormaEntrega.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
Else
|
||||||
|
TrFormaEntrega.Visible = False
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaGestionCobranza()
|
Private Sub CargaGestionCobranza()
|
||||||
@@ -12437,6 +12454,15 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'VALOR PARA REMISIONES ESPECIALES
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
|
If ObjFactura.TipoDocto = "Rem" AndAlso ChkRemEspecial.Checked Then
|
||||||
|
ObjFactura.Num2 = 2000
|
||||||
|
'FECHA DE VIGENCIA PARA REMISION ESPECIAL
|
||||||
|
ObjFactura.Fech2 = DateTime.Now.AddDays(1).Date
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If divcondicionespago.Visible Then
|
If divcondicionespago.Visible Then
|
||||||
ObjFactura.FechaPago = TxtFechaPago.Text.ToDate
|
ObjFactura.FechaPago = TxtFechaPago.Text.ToDate
|
||||||
Else
|
Else
|
||||||
@@ -18565,6 +18591,10 @@ Partial Class Ventas
|
|||||||
TrAntEspecial.Visible = DdlTipoComprobante.SelectedValue = "Ant"
|
TrAntEspecial.Visible = DdlTipoComprobante.SelectedValue = "Ant"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Rem" Then
|
||||||
|
TrRemEspecial.Visible = UsuarioActual.TienePermisoProceso(390)
|
||||||
|
End If
|
||||||
|
|
||||||
'REINICIALIZA VALORES DE ENTREGA POR ADELANTADO
|
'REINICIALIZA VALORES DE ENTREGA POR ADELANTADO
|
||||||
RequiereAlmacenDestino = False
|
RequiereAlmacenDestino = False
|
||||||
TrAlmacenAsignado.Visible = False
|
TrAlmacenAsignado.Visible = False
|
||||||
@@ -18712,6 +18742,7 @@ Partial Class Ventas
|
|||||||
ImgAntiPend.Visible = True
|
ImgAntiPend.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If ImgAntiPend.Visible Then
|
If ImgAntiPend.Visible Then
|
||||||
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
|
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
|
||||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('NC','RNC','IxC','Ant') ", "")}")
|
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('NC','RNC','IxC','Ant') ", "")}")
|
||||||
|
|||||||
Reference in New Issue
Block a user