Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1776,27 +1776,72 @@ Public Class ClsCompras
|
||||
End Function
|
||||
|
||||
|
||||
Public Function AddFactura(Serie As String, Folio As String, FechaFactura As DateTime, NombreProveedor As String, RFCDe As String, SubTotal As Double,
|
||||
IVA As Double, Total As Double, UUID As String, RFCPara As String, XML As String, PDF As String,
|
||||
VersionCFD As String, Descuento As Double, Moneda As String, TipodeComprobante As String, TipoCambio As Double, FueValidado As Integer,
|
||||
CveEmpresa As Integer, PreFijo As String) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
'Public Function AddFactura(Serie As String, Folio As String, FechaFactura As DateTime, NombreProveedor As String, RFCDe As String, SubTotal As Double,
|
||||
'IVA As Double, Total As Double, UUID As String, RFCPara As String, XML As String, PDF As String,
|
||||
'VersionCFD As String, Descuento As Double, Moneda As String, TipodeComprobante As String, TipoCambio As Double, FueValidado As Integer,
|
||||
'CveEmpresa As Integer, PreFijo As String) As Integer
|
||||
' Dim Retorno As Integer = -1
|
||||
|
||||
Dim StrSQL As StringBuilder = New StringBuilder()
|
||||
StrSQL.Append(" BEGIN ")
|
||||
StrSQL.Append(" DECLARE @tTotal INT; ")
|
||||
StrSQL.Append(" ")
|
||||
StrSQL.Append(" SELECT @tTotal = ISNULL(MAX(CveFactura),0) FROM Comp_Facturas WHERE UUID = @UUID;")
|
||||
StrSQL.Append(" IF @tTotal = 0 ")
|
||||
StrSQL.Append(" BEGIN ")
|
||||
StrSQL.Append(" INSERT INTO Comp_Facturas (Serie, Folio, FechaFactura, NombreProveedor, RFCDe, Total, UUID, RFCPara, XML, PDF, FueValidado, CveEmpresa, TipoFactura,Version, TipoComprobante) ")
|
||||
StrSQL.Append(" VALUES (@Serie, @Folio, @FechaFactura, @NombreProveedor, @RFCDe, @Total, @UUID, @RFCPara, @XML, @PDF, @FueValidado, @CveEmpresa, @PreFijo, @Version,@TipodeComprobante); ")
|
||||
StrSQL.Append(" SET @Retorno = 1; ")
|
||||
StrSQL.Append(" SET @CveFactura = SCOPE_IDENTITY(); ")
|
||||
StrSQL.Append(" UPDATE Comp_Facturas SET XML = CONCAT(@CveFactura,'.xml'), PDF = CONCAT(@CveFactura ,'.pdf') WHERE CveFactura = @CveFactura; ")
|
||||
StrSQL.Append(" END ")
|
||||
StrSQL.Append(" ELSE BEGIN SET @CveFactura = @tTotal; END ")
|
||||
StrSQL.Append(" END ")
|
||||
' Dim StrSQL As StringBuilder = New StringBuilder()
|
||||
' StrSQL.Append(" BEGIN ")
|
||||
' StrSQL.Append(" DECLARE @tTotal INT; ")
|
||||
' StrSQL.Append(" ")
|
||||
' StrSQL.Append(" SELECT @tTotal = ISNULL(MAX(CveFactura),0) FROM Comp_Facturas WHERE UUID = @UUID;")
|
||||
' StrSQL.Append(" IF @tTotal = 0 ")
|
||||
' StrSQL.Append(" BEGIN ")
|
||||
' StrSQL.Append(" INSERT INTO Comp_Facturas (Serie, Folio, FechaFactura, NombreProveedor, RFCDe, Total, UUID, RFCPara, XML, PDF, FueValidado, CveEmpresa, TipoFactura,Version, TipoComprobante,) ")
|
||||
' StrSQL.Append(" VALUES (@Serie, @Folio, @FechaFactura, @NombreProveedor, @RFCDe, @Total, @UUID, @RFCPara, @XML, @PDF, @FueValidado, @CveEmpresa, @PreFijo, @Version,@TipodeComprobante); ")
|
||||
' StrSQL.Append(" SET @Retorno = 1; ")
|
||||
' StrSQL.Append(" SET @CveFactura = SCOPE_IDENTITY(); ")
|
||||
' StrSQL.Append(" UPDATE Comp_Facturas SET XML = CONCAT(@CveFactura,'.xml'), PDF = CONCAT(@CveFactura ,'.pdf') WHERE CveFactura = @CveFactura; ")
|
||||
' StrSQL.Append(" END ")
|
||||
' StrSQL.Append(" ELSE BEGIN SET @CveFactura = @tTotal; END ")
|
||||
' StrSQL.Append(" END ")
|
||||
|
||||
' If PreFijo.ToLower() = "cfdi" Then
|
||||
' PreFijo = "CFDi"
|
||||
' ElseIf PreFijo.ToLower() = "cfd" Then
|
||||
' PreFijo = "CFD"
|
||||
' End If
|
||||
|
||||
' DataAdapter(StrSQL.ToString(), CommandType.Text)
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||
' .Add("@Folio", SqlDbType.VarChar).Value = Folio
|
||||
' .Add("@FechaFactura", SqlDbType.[Date]).Value = FechaFactura
|
||||
' .Add("@NombreProveedor", SqlDbType.VarChar).Value = NombreProveedor
|
||||
' .Add("@RFCDe", SqlDbType.VarChar).Value = RFCDe
|
||||
' .Add("@Total", SqlDbType.Money).Value = Total
|
||||
' .Add("@UUID", SqlDbType.VarChar).Value = UUID
|
||||
' .Add("@RFCPara", SqlDbType.VarChar).Value = RFCPara
|
||||
' .Add("@XML", SqlDbType.VarChar).Value = XML
|
||||
' .Add("@PDF", SqlDbType.VarChar).Value = PDF
|
||||
' .Add("@Version", SqlDbType.VarChar).Value = VersionCFD
|
||||
' .Add("@FueValidado", SqlDbType.Int).Value = FueValidado
|
||||
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
' .Add("@PreFijo", SqlDbType.VarChar).Value = PreFijo
|
||||
' .Add("@TipodeComprobante", SqlDbType.VarChar).Value = TipodeComprobante.ToUpper
|
||||
' .Add("@CveFactura", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
' .Add("@Retorno", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
' End With
|
||||
|
||||
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
|
||||
' Retorno = SqlAdapter.SelectCommand.Parameters("@Retorno").Value.ToString().ToEntero()
|
||||
|
||||
' CveFactura = SqlAdapter.SelectCommand.Parameters("@CveFactura").Value.ToString().ToEntero()
|
||||
' Catch ex As Exception
|
||||
' ModExtensiones.OnError(Me, "Ocurrió un error al intentar Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
' End Try
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
|
||||
Public Function AddFactura(Serie As String, Folio As String, FechaFactura As DateTime, NombreProveedor As String, RFCDe As String, SubTotal As Decimal, IVA As Decimal, Total As Decimal, UUID As String, RFCPara As String, XML As String, PDF As String, VersionCFD As String, Descuento As Decimal, TipoCambio As Decimal, FueValidado As Integer, CveEmpresa As Integer, PreFijo As String, TipoComprobante As String, MONEDA As String, METODODEPAGO As String, Optional TipoRecepcion As Integer = 0, Optional Version As String = "3.3", Optional IEPS As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
If PreFijo.ToLower() = "cfdi" Then
|
||||
PreFijo = "CFDi"
|
||||
@@ -1804,40 +1849,50 @@ Public Class ClsCompras
|
||||
PreFijo = "CFD"
|
||||
End If
|
||||
|
||||
DataAdapter(StrSQL.ToString(), CommandType.Text)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||
.Add("@Folio", SqlDbType.VarChar).Value = Folio
|
||||
.Add("@FechaFactura", SqlDbType.[Date]).Value = FechaFactura
|
||||
.Add("@NombreProveedor", SqlDbType.VarChar).Value = NombreProveedor
|
||||
.Add("@RFCDe", SqlDbType.VarChar).Value = RFCDe
|
||||
.Add("@Total", SqlDbType.Money).Value = Total
|
||||
.Add("@UUID", SqlDbType.VarChar).Value = UUID
|
||||
.Add("@RFCPara", SqlDbType.VarChar).Value = RFCPara
|
||||
.Add("@XML", SqlDbType.VarChar).Value = XML
|
||||
.Add("@PDF", SqlDbType.VarChar).Value = PDF
|
||||
.Add("@Version", SqlDbType.VarChar).Value = VersionCFD
|
||||
.Add("@FueValidado", SqlDbType.Int).Value = FueValidado
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@PreFijo", SqlDbType.VarChar).Value = PreFijo
|
||||
.Add("@TipodeComprobante", SqlDbType.VarChar).Value = TipodeComprobante.ToUpper
|
||||
.Add("@CveFactura", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@Retorno", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
DataAdapter("PA_eFacturas_FacturasAdd", CommandType.StoredProcedure)
|
||||
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@Folio", SqlDbType.VarChar).Value = Folio
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@FechaFactura", SqlDbType.Date).Value = FechaFactura
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@NombreProveedor", SqlDbType.VarChar).Value = NombreProveedor
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@RFCDe", SqlDbType.VarChar).Value = RFCDe
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@TipoComprobante", SqlDbType.VarChar).Value = TipoComprobante
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@Total", SqlDbType.Money).Value = Total
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@UUID", SqlDbType.VarChar).Value = UUID
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@RFCPara", SqlDbType.VarChar).Value = RFCPara
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@XML", SqlDbType.VarChar).Value = XML
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@PDF", SqlDbType.VarChar).Value = PDF
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@Version", SqlDbType.VarChar).Value = VersionCFD
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@FueValidado", SqlDbType.Int).Value = FueValidado
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@PreFijo", SqlDbType.VarChar).Value = PreFijo
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@TipoRecepcion", SqlDbType.Int).Value = TipoRecepcion
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@CveFactura", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@Retorno", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@MONEDA", SqlDbType.VarChar).Value = MONEDA
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@METODODEPAGO", SqlDbType.VarChar).Value = METODODEPAGO
|
||||
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@TipoCambio", SqlDbType.SmallMoney).Value = TipoCambio
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@SubTotal", SqlDbType.Money).Value = SubTotal
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@IVA", SqlDbType.Money).Value = IVA
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@IEPS", SqlDbType.Money).Value = IEPS
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@RetIVA", SqlDbType.Money).Value = RetIVA
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@RetISR", SqlDbType.Money).Value = RetISR
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@Descuento", SqlDbType.Money).Value = Descuento
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
Retorno = SqlAdapter.SelectCommand.Parameters("@Retorno").Value.ToString().ToEntero()
|
||||
Retorno = Convert.ToInt32(SqlAdapter.SelectCommand.Parameters("@Retorno").Value)
|
||||
CveFactura = Convert.ToInt32(SqlAdapter.SelectCommand.Parameters("@CveFactura").Value)
|
||||
|
||||
CveFactura = SqlAdapter.SelectCommand.Parameters("@CveFactura").Value.ToString().ToEntero()
|
||||
Catch ex As Exception
|
||||
ModExtensiones.OnError(Me, "Ocurrió un error al intentar Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateArchivo(CveFactura As Integer, Columna As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Dim Str As String = ""
|
||||
@@ -1851,9 +1906,12 @@ Public Class ClsCompras
|
||||
DataAdapter(Str, CommandType.Text)
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@CveFactura", SqlDbType.Int).Value = CveFactura
|
||||
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
ModExtensiones.OnError(Me, "Ocurrió un error al agregar el Tipo de Cambio", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
ModExtensiones.OnError(Me, "Ocurrió un error al actualizar la factura", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
@@ -6330,6 +6330,71 @@ Public Class ClsContabilidad
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "B L O Q U E O -- D I A R I O"
|
||||
Public Function GetBloqueoDiario(CveBloqueoDiario As Integer, FechaI As DateTime, FechaF As DateTime, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta_BloqueoDiarioGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveBloqueoDiario", SqlDbType.Int).Value = CveBloqueoDiario
|
||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al obtener el periodo de bloqueo diario.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddUpdateBloqueoDiario(CveBloqueoDiario As Integer, Fecha As DateTime, Bloqueado As Boolean, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta_BloqueoDiarioAddUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveBloqueoDiario", SqlDbType.Int).Value = CveBloqueoDiario
|
||||
.Add("@Fecha", SqlDbType.Date).Value = Fecha
|
||||
.Add("@Bloqueado", SqlDbType.Bit).Value = Bloqueado
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al actulizar el periodo de bloqueo diario.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RemoveBloqueoDiario(CveBloqueoDiario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta_BloqueoDiarioRemove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveBloqueoDiario", SqlDbType.Int).Value = CveBloqueoDiario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al eliminar el periodo de bloqueo diario.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "ESTADO RESULTADOS HORIZONTAL"
|
||||
|
||||
@@ -10138,6 +10138,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Contabilidad/CatContaEjercicios.aspx".ToUpper(), 725)
|
||||
PaginaDict.Add("/Contabilidad/RepEstadoResultadosHorizontal.aspx".ToUpper(), 420)
|
||||
PaginaDict.Add("/Contabilidad/RepAnexoCatalogoMensualHorizontal.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Contabilidad/CatBloqueoDiario.aspx".ToUpper(), 680)
|
||||
#End Region
|
||||
#Region "Contratos"
|
||||
'--------------------- C O N T R A T O S - P R E S U P U E S T O S ---------------------
|
||||
@@ -10782,7 +10783,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Ventas/FacturacionGlobal.aspx".ToUpper(), 546)
|
||||
PaginaDict.Add("/Ventas/RepComisionesSMS.aspx".ToUpper(), 1347)
|
||||
PaginaDict.Add("/Ventas/RepVencimientosCredito.aspx".ToUpper(), 146)
|
||||
|
||||
PaginaDict.Add("/Ventas/CatMotivosDevoluciones.aspx".ToUpper(), 786)
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -454,7 +454,7 @@ Public Class ClsVentas
|
||||
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) As Boolean
|
||||
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) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_VentasAdd")
|
||||
@@ -568,6 +568,7 @@ Public Class ClsVentas
|
||||
.Add("@CveSATMes", SqlDbType.Int).Value = CveSATMes
|
||||
.Add("@SATAnio", SqlDbType.Int).Value = SATAnio
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
.Add("@CveMotivoDevolucion", SqlDbType.Int).Value = CveMotivoDevolucion
|
||||
End With
|
||||
'SqlTypes.SqlDateTime.Null
|
||||
Try
|
||||
@@ -2757,6 +2758,87 @@ Public Class ClsVentas
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " M O T I V O S -- D E V O L U C I O N"
|
||||
|
||||
Public Function AddMotivoDevolucion(Motivo As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasMotivosDevolucionAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Motivo", SqlDbType.VarChar).Value = Motivo
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al tratar de agregar el motivo de devolucion. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function UpdateMotivoDevolucion(CveMotivoDevolucion As Integer, Motivo As String, Estatus As Boolean, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasMotivosDevolucionUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveMotivoDevolucion", SqlDbType.Int).Value = CveMotivoDevolucion
|
||||
.Add("@Motivo", SqlDbType.VarChar).Value = Motivo
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al tratar de actualizar el motivo de devolución. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetMotivoDevolucion(CveMotivoDevolucion As Integer, Estatus As Boolean, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasMotivosDevolucionGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveMotivoDevolucion", SqlDbType.Int).Value = CveMotivoDevolucion
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al tratar de obtener el motivo de devolución. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RemoveMotivoDevolucion(CveMotivoDevolucion As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasMotivosDevolucionRemove")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveMotivoDevolucion", SqlDbType.Int).Value = CveMotivoDevolucion
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al tratar de obtener el motivo de devolución. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
Public Function GetPrecios(CveClasificacion As Integer, CvePS As Integer, CveEmpresa As Integer, CveSubProyecto As Integer) As Boolean
|
||||
|
||||
@@ -2014,6 +2014,12 @@ Namespace Extensiones
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function CopyToDataTable(Of T)(ByVal source As IEnumerable(Of T), ByVal flag As Boolean) As DataTable
|
||||
Return New ObjectShredder(Of T)().Shred(source, Nothing, Nothing)
|
||||
End Function
|
||||
|
||||
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Sub ExportToExcel2(GridView As GridView, NombreArchivoXLSX As String)
|
||||
|
||||
|
||||
@@ -9155,7 +9155,7 @@ Partial Class Compras_Compras
|
||||
ObjCompra.RollBack()
|
||||
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||
|
||||
SeActualizoDetalle = False
|
||||
|
||||
Finally
|
||||
If Retorno Then
|
||||
If ObjContabilidad.MensajePolizaDescuadre IsNot Nothing AndAlso ObjContabilidad.MensajePolizaDescuadre.ToString <> "" Then
|
||||
@@ -9192,23 +9192,22 @@ Partial Class Compras_Compras
|
||||
UpBitacora.Update()
|
||||
|
||||
|
||||
If SeActualizoDetalle Then
|
||||
MandaCorreoActualizacionDetalle(CveCompra)
|
||||
If SeActualizoDetalle AndAlso UsuarioActual.CveEmpresa = 119 Then
|
||||
MandaCorreoActualizacionDetalle()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub MandaCorreoActualizacionDetalle(CveCompra As Integer)
|
||||
Private Sub MandaCorreoActualizacionDetalle()
|
||||
|
||||
|
||||
If UsuarioActual.CveRol <> 1 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim DTCorreos As New DataTable
|
||||
Dim DTMovimientos As New DataTable
|
||||
Dim strBody As New StringBuilder
|
||||
Dim Asunto, Para, ArrayCC, Body As String
|
||||
Para = GlobalDTUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltroPrimeroValor("Correo")
|
||||
'Para = GlobalDTUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltroPrimeroValor("Correo")
|
||||
Para = "fernanda.romo@agrojam.com.mx"
|
||||
|
||||
If Para.ToString = "" AndAlso UsuarioActual.CveRol = 1 Then
|
||||
Para = Para & ";oscar.irigoyen@adssistemas.mx;rene.molina@adssistemas.mx"
|
||||
@@ -9260,8 +9259,8 @@ Partial Class Compras_Compras
|
||||
Asunto = $"Actualizacion de Compra: {SerieFolioCompra} Proveedor: {HplProveedor.Text}"
|
||||
ArrayCC = ""
|
||||
Body = strBody.ToString
|
||||
Dim Mail As New ClsSisMail()
|
||||
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, ArrayCC)
|
||||
Dim Mail As New ClsSisMail()
|
||||
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, ArrayCC)
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
120
Contabilidad/CatBloqueoDiario.aspx
Normal file
120
Contabilidad/CatBloqueoDiario.aspx
Normal file
@@ -0,0 +1,120 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatBloqueoDiario.aspx.vb" Inherits="Contabilidad_CatBloqueoDiario" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Totales, .table-striped > tbody > tr.Totales {
|
||||
background: forestgreen !important;
|
||||
}
|
||||
|
||||
table > tbody > .SubTotales2:hover, .SubTotales2 {
|
||||
background-color: #ed4116 !important;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de bloqueo diario
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<%--Consulta--%>
|
||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||
<div class="portlet-title portlet-filterT smalltitle " style="">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsulta" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsulta_Click" ValidationGroup="GrpObligatorio" />
|
||||
</div>
|
||||
|
||||
<div class="titlefiltros caption">
|
||||
|
||||
<div class="row" style="height: 32px;">
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Inicio:
|
||||
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Fin:
|
||||
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<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="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--Seccion lista resultados--%>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light ">
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" Width="100%" OnRowDataBound="GvDatos_RowDataBound" DataKeyNames="CveBloqueoDiario,Fecha" CssClass=" table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Modificado" ItemStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# If(CInt(Eval("CveBloqueoDiario")) > 0, "Si", "No") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Fecha" DataFormatString="{0:d}" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="70%" />
|
||||
<asp:TemplateField HeaderText="Bloqueado" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20%">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkBloqueo" runat="server" Checked='<%# Eval("Bloqueado") %>' OnCheckedChanged="ChkBloqueo_CheckedChanged" AutoPostBack="true" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
125
Contabilidad/CatBloqueoDiario.aspx.vb
Normal file
125
Contabilidad/CatBloqueoDiario.aspx.vb
Normal file
@@ -0,0 +1,125 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Contabilidad_CatBloqueoDiario
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
txtFechaI.Text = Now.AddMonths(-1).ToShortDateString()
|
||||
txtFechaF.Text = Now.AddMonths(1).ToShortDateString()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsulta_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim FechaI = txtFechaI.Text.ToDate()
|
||||
Dim FechaF = txtFechaF.Text.ToDate()
|
||||
|
||||
GvDatos.DataSource = GenerateDTBloqueos(FechaI, FechaF)
|
||||
GvDatos.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Function GenerateDTBloqueos(FechaI As DateTime, FechaF As DateTime) As DataTable
|
||||
Dim DtDatos As New DataTable()
|
||||
DtDatos.Columns.Add(New DataColumn("CveBloqueoDiario", GetType(Integer)))
|
||||
DtDatos.Columns.Add(New DataColumn("Fecha", GetType(DateTime)))
|
||||
DtDatos.Columns.Add(New DataColumn("Bloqueado", GetType(Boolean)))
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
Try
|
||||
Dim DtBloqueos As DataTable = Nothing
|
||||
|
||||
Using ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetBloqueoDiario(-1, FechaI, FechaF, UsuarioActual.CveEmpresa) Then
|
||||
DtBloqueos = ObjConta.DtResultados.Copy()
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
End Using
|
||||
|
||||
If Not TieneError Then
|
||||
Dim dateList As List(Of DateTime) = GenerateDateList(FechaI, FechaF)
|
||||
'GENERA EL LISTADO DE FECHAS
|
||||
For Each dateValue As DateTime In dateList
|
||||
Dim Row As DataRow = DtDatos.NewRow()
|
||||
|
||||
Row("CveBloqueoDiario") = -1
|
||||
Row("Fecha") = dateValue
|
||||
Row("Bloqueado") = False
|
||||
|
||||
DtDatos.Rows.Add(Row)
|
||||
Next
|
||||
|
||||
'ASIGNA LOS QUE TIENEN VALORES
|
||||
For Each RowValores As DataRow In DtBloqueos.Rows
|
||||
Dim RowsFechas As DataRow() = DtDatos.Select($"Fecha = '{RowValores("Fecha").ToString().ToDate().ToString("dd/MM/yyyy")}'")
|
||||
|
||||
If RowsFechas IsNot Nothing AndAlso RowsFechas.Count() > 0 Then
|
||||
RowsFechas(0)("CveBloqueoDiario") = RowValores("CveBloqueoDiario")
|
||||
RowsFechas(0)("Bloqueado") = RowValores("Bloqueado")
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error generar la tabla", ex)
|
||||
DtDatos.Rows.Clear()
|
||||
TieneError = True
|
||||
End Try
|
||||
|
||||
If TieneError Then
|
||||
DtDatos.Rows.Clear()
|
||||
End If
|
||||
|
||||
Return DtDatos
|
||||
End Function
|
||||
|
||||
Function GenerateDateList(startDate As DateTime, endDate As DateTime) As List(Of DateTime)
|
||||
Dim dates As New List(Of DateTime)()
|
||||
Dim dateValue As DateTime = startDate
|
||||
While dateValue <= endDate
|
||||
dates.Add(dateValue)
|
||||
dateValue = dateValue.AddDays(1)
|
||||
End While
|
||||
Return dates
|
||||
End Function
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CveBloqueoDiario").ToEntero() > 0 Then
|
||||
If CBool(e.Row.DBCampo("Bloqueado")) Then
|
||||
e.Row.CssClass = "SubTotales2"
|
||||
Else
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub ChkBloqueo_CheckedChanged(sender As Object, e As EventArgs)
|
||||
Dim ChkBloqueo = DirectCast(sender, CheckBox)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(ChkBloqueo.NamingContainer, GridViewRow)
|
||||
|
||||
Dim CveBloqueoDiario As Integer = GvRow.DataKey("CveBloqueoDiario").ToEntero()
|
||||
Dim Fecha As DateTime = GvRow.DataKey("Fecha").ToDate()
|
||||
|
||||
Using ObjConta As New ClsContabilidad
|
||||
If ObjConta.AddUpdateBloqueoDiario(CveBloqueoDiario, Fecha, ChkBloqueo.Checked, UsuarioActual.CveEmpresa) Then
|
||||
Alert($"Se actualizó el estatus de bloqueo en el dia {Fecha.ToString("dd/MM/yyyy")}")
|
||||
End If
|
||||
End Using
|
||||
|
||||
CargaDatos()
|
||||
End Sub
|
||||
End Class
|
||||
@@ -710,8 +710,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
LnkTimbrarTodos.Visible = (dtempleados.Rows.Count > 0 &&
|
||||
dtempleados.COUNT("CvePersonal", "SeTimbro=0 AND CvePersonal >0 AND NomAutorizado =1") > 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (CvePersonal > 0)
|
||||
@@ -7198,7 +7198,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
using (ClsNominas ObjMovt = new ClsNominas())
|
||||
{
|
||||
ObjMovt.GetMovtoPermanenteSaldos(UsuarioActual.CveEmpresa, SRCvePersonal, CcveMovtoPermanente);
|
||||
ObjMovt.GetMovtoPermanenteSaldos(UsuarioActual.CveEmpresa, SRCvePersonal, CcveMovtoPermanente);
|
||||
GVMovtoPermanenteSaldos.DataSource = ObjMovt.DtResultados;
|
||||
GVMovtoPermanenteSaldos.DataBind();
|
||||
}
|
||||
@@ -9894,7 +9894,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
|
||||
protected void DdlCuenta_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
{
|
||||
ConvenioPagoElectronico = string.Empty;
|
||||
DivModalLayoutBancosFecha.Visible = false;
|
||||
|
||||
@@ -9948,7 +9948,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
libro.Range(1, 1, row, column - 1).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
libro.Range(1, 1, row, column - 1).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
|
||||
|
||||
if (objnom.GetDispersionNomina(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa,-1))
|
||||
if (objnom.GetDispersionNomina(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa, -1))
|
||||
{
|
||||
foreach (DataRow dRow in objnom.DtResultados.Rows)
|
||||
{
|
||||
@@ -10061,7 +10061,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetDispersionNomina(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa,4))
|
||||
if (objnom.GetDispersionNomina(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa, 4))
|
||||
{
|
||||
CrearLayoutNominaBancomer(objnom.DtResultados);
|
||||
}
|
||||
@@ -10071,7 +10071,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetDispersionNomina (CvePeriodoSeleccionado, UsuarioActual.CveEmpresa,18))
|
||||
if (objnom.GetDispersionNomina(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa, 18))
|
||||
{
|
||||
CrearLayoutNominaBanorte(objnom.DtResultados, ConvenioPagoElectronico, 1);
|
||||
}
|
||||
@@ -10081,7 +10081,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetDispersionNomina(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa,1))
|
||||
if (objnom.GetDispersionNomina(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
CrearLayoutNominaBanamex(objnom.DtResultados);
|
||||
}
|
||||
@@ -10126,8 +10126,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
SbErrores.AppendLine($"- {Nombre} el importe debe de ser mayor a 0 importe {Importe}"); // importe mayot a 0
|
||||
ErroresValidaciones = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!ErroresValidaciones)
|
||||
{
|
||||
int Count = 1;
|
||||
@@ -10142,7 +10142,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
SbLinea.Append(Count.ToString("000000000"));
|
||||
SbLinea.Append(RFC.Trim().PadRight(16));
|
||||
if (modalidadnomina == 2) SbLinea.Append("99"); else SbLinea.Append("03");
|
||||
if (modalidadnomina == 2) SbLinea.Append("99"); else SbLinea.Append("03");
|
||||
SbLinea.Append(BancoNumCuenta.Trim().PadRight(20));
|
||||
SbLinea.Append(Importe.ToString("0000000000000.00").Replace(".", ""));
|
||||
|
||||
@@ -10152,9 +10152,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
SbLinea.Append(Nombre.Trim().PadRight(40));
|
||||
if (modalidadnomina == 2)
|
||||
{
|
||||
SbLinea.Append("001"); SbLinea.Append("001");
|
||||
SbLinea.Append("001"); SbLinea.Append("001");
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
SbLinea.Append("012"); SbLinea.Append("000");
|
||||
}
|
||||
sb.AppendLine(SbLinea.ToString());
|
||||
@@ -10167,9 +10168,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
Response.ContentType = "text/plain";
|
||||
//Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina{NowADS().ToString("yyyyMMddhhmmss").ToString()}.txt\"");
|
||||
Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina_BBVA_{DdlPeriodo.SelectedItem.Text}.txt\"");
|
||||
Response.Write(sb.ToString());
|
||||
//RegistraScript("$('#ModalLayoutBancos').modal('hide');");
|
||||
// Response.Flush();
|
||||
Response.Write(sb.ToString());
|
||||
//RegistraScript("$('#ModalLayoutBancos').modal('hide');");
|
||||
// Response.Flush();
|
||||
Response.End();
|
||||
}
|
||||
else
|
||||
@@ -10348,7 +10349,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
if (!ErroresValidaciones)
|
||||
{
|
||||
|
||||
DataRow RowCuenta = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta: DdlCuenta.SelectedValue.ToEntero(), CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimero("");
|
||||
DataRow RowCuenta = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta: DdlCuenta.SelectedValue.ToEntero(), CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimero("");
|
||||
var ClaveMoneda = "001"; // PESOS MEXICANOS
|
||||
|
||||
//REGISTRO DE CONTROL - IMPORTACIÓN
|
||||
@@ -10421,7 +10422,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
var NumCargos = (1).ToString("000000");
|
||||
var StrImportes = SumaImportes.ToString("0000000000000000.00").Replace(".", "");
|
||||
|
||||
sb.AppendLine($"{TipoReg4}{ClaveMoneda}{NumAbonos}{StrImportes}{NumCargos}{StrImportes}");
|
||||
sb.Append($"{TipoReg4}{ClaveMoneda}{NumAbonos}{StrImportes}{NumCargos}{StrImportes}");
|
||||
|
||||
Response.Clear();
|
||||
Response.ClearHeaders();
|
||||
|
||||
@@ -1253,9 +1253,11 @@
|
||||
<%--1--%>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3" id="TagPromocion" runat="server" visible='<%# If(UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso CInt(Extensiones.IfNull(Eval("CvePromocionDetalle"), 0)) > 0, "true", "false") %>'>
|
||||
<i class="fa fa-tag" aria-hidden="true" style="color: #E43A45"></i>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:#,###.####}") %>'></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1671,7 +1673,7 @@
|
||||
<td style="border: 1px none white"><b>Amort. Ant.:</b></td>
|
||||
<td>
|
||||
<asp:Label ID="LblAmortizacion" ClientIDMode="Static" runat="server" Style="text-align: right;" Text="0.00" Width="78px"></asp:Label></td>
|
||||
<td align="right"> <asp:LinkButton ID="ImgAntiPend" runat="server" OnClick="ImgAntiPend_Click" Text=" <i class='fa fa-money font-green'></i> " AlternateText="Cancelación de Anticipos" Style="cursor: pointer;" />
|
||||
<td align="right"> <asp:LinkButton ID="ImgAntiPend" runat="server" OnClick="ImgAntiPend_Click" Text=" <i class='fa fa-money font-green'></i> " AlternateText="Cancelación de Anticipos" Style="cursor: pointer;" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -4929,7 +4931,7 @@
|
||||
<td colspan="1"> </td>
|
||||
<td colspan="1"> </td>
|
||||
</tr>
|
||||
<tr align="left" >
|
||||
<tr align="left">
|
||||
<td>
|
||||
<asp:Label runat="server" Font-Bold="true" ID="Label3">Sucursal:</asp:Label>
|
||||
</td>
|
||||
@@ -7970,9 +7972,9 @@
|
||||
<asp:CheckBox ID="ChkDevAlm" AutoPostBack="true" runat="server" OnCheckedChanged="ChkDevAlm_CheckedChanged" /><asp:Label ID="LblDevAlm" Text="Devolución Almacen" runat="server"></asp:Label>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="DivGeneraIxC" runat="server" visible="false">
|
||||
<div id="DivGeneraIxC" runat="server" visible="false">
|
||||
<h5>
|
||||
<asp:CheckBox ID="ChkGeneraIxC" runat="server" /><asp:Label ID="Label4" Text="Genera IxC" runat="server"></asp:Label>
|
||||
<asp:CheckBox ID="ChkGeneraIxC" runat="server" /><asp:Label ID="Label4" Text="Genera IxC" runat="server"></asp:Label>
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
@@ -8590,6 +8592,7 @@
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoDocto" 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="<%= DdlTipoDocto.ClientID.ToString()%>">Tipo Documento:</label>
|
||||
</div>
|
||||
|
||||
@@ -9752,13 +9752,13 @@ Partial Class Ventas
|
||||
Dim CveVendedor As Integer = DdlVendedor.SelectedValue.ToEntero()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, CveVendedor, "Ing", CveEstatus:=1) Then
|
||||
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, CveVendedor, If(DdlTipoComprobante.SelectedValue = "Egs", "Egs", "Ing"), CveEstatus:=1) Then
|
||||
Dim RowAutorizacion As DataRow = Nothing
|
||||
'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO
|
||||
If TieneDiasVencidos Then
|
||||
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion IN(1,2) AND CveVenta IS NULL AND CveTipoDocumento='Ing'", Orderby:="Importe DESC")
|
||||
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion IN(1,2) AND CveVenta IS NULL AND CveTipoDocumento='{If(DdlTipoComprobante.SelectedValue = "Egs", "Egs", "Ing")}'", Orderby:="Importe DESC")
|
||||
Else
|
||||
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion = 1 AND CveVenta IS NULL AND CveTipoDocumento='Ing'", Orderby:="Importe DESC")
|
||||
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion = 1 AND CveVenta IS NULL AND CveTipoDocumento='{If(DdlTipoComprobante.SelectedValue = "Egs", "Egs", "Ing")}'", Orderby:="Importe DESC")
|
||||
End If
|
||||
|
||||
If RowAutorizacion IsNot Nothing Then
|
||||
@@ -12239,7 +12239,7 @@ Partial Class Ventas
|
||||
ObjFactura.Det_OrdenCompra = TxtDet_OrdenCompra.Text.Trim
|
||||
ObjFactura.Det_FechaOrdenCompra = TxtDet_FechaOrdenCompra.Text.Trim
|
||||
ObjFactura.Det_ContraRecibo = TxtDet_ContraRecibo.Text.Trim
|
||||
ObjFactura.MonedaAbreviatura = ""
|
||||
ObjFactura.MonedaAbreviatura = DdlMoneda.SelectedItem.Text
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DvModalRequiereOSFecha.Visible Then
|
||||
ObjFactura.FechaEjecucion = TxtFechaOS.Text.Trim.ToDateTime
|
||||
|
||||
Reference in New Issue
Block a user