Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -206,10 +206,7 @@ Partial Class Acumuladores_CatTiposDefecto
|
||||
'TxtCompra.Text = GvRow.DataKey("Compra").ToDecimal.ToString("###,###,###.00")
|
||||
'TxtPuntos.Text = GvRow.DataKey("Puntos").ToDecimal.ToString("###,###,###.00")
|
||||
|
||||
'DdlPS.Items.Clear()
|
||||
'DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
'DdlPS.DataBind()
|
||||
'DdlPS.SelectedValueExist(GvRow.DataKey("CvePSCargo").ToEntero)
|
||||
|
||||
|
||||
BtnAgregarTiposDModal.Text = "Actualizar"
|
||||
|
||||
|
||||
@@ -207,10 +207,6 @@ Partial Class Acumuladores_CatTiposUso
|
||||
'TxtCompra.Text = GvRow.DataKey("Compra").ToDecimal.ToString("###,###,###.00")
|
||||
'TxtPuntos.Text = GvRow.DataKey("Puntos").ToDecimal.ToString("###,###,###.00")
|
||||
|
||||
'DdlPS.Items.Clear()
|
||||
'DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
'DdlPS.DataBind()
|
||||
'DdlPS.SelectedValueExist(GvRow.DataKey("CvePSCargo").ToEntero)
|
||||
|
||||
BtnAgregarTiposUsoModal.Text = "Actualizar"
|
||||
|
||||
|
||||
@@ -587,7 +587,7 @@ Public Class ClsAcumuladores
|
||||
|
||||
Public Function GetNuevoConsecutivoFolio(CveFolioGarantia As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
SqlDataAdapter(String.Format("SELECT MAX(Consecutivo) + 1 AS NuevoConsecutivo FROM Acum_GarantiasDetalle d WHERE d.CveFolioGarantia = {0}", CveFolioGarantia), CommandType.Text)
|
||||
SqlDataAdapter(String.Format("SELECT MAX(dbo.FNC_Numero(Consecutivo)) AS NuevoConsecutivo FROM Acum_GarantiasDetalle d WHERE d.CveFolioGarantia = {0}", CveFolioGarantia), CommandType.Text)
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -758,6 +758,23 @@ Public Class ClsAcumuladores
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateGarantiasDetallePoliza(CveVenta As Integer, FolioPolizaVirtual As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
SqlDataAdapter("PA_Acum_GarantiasDetallePolizaUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@FolioPolizaVirtual", SqlDbType.VarChar).Value = FolioPolizaVirtual
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As SqlException
|
||||
OnError("Ocurrió un error a actualizar folio de garantia.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -1100,11 +1100,12 @@ Public Class ClsCompProveedores
|
||||
|
||||
#Region "S U C U R S A L E S"
|
||||
|
||||
Public Function GetSucursales(CveProveedor As Integer) As Boolean
|
||||
Public Function GetSucursales(CveProveedor As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Comp_ProveedorSucursalGet")
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
|
||||
@@ -5901,7 +5901,7 @@ Public Class ClsContabilidad
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdatePeriodosBloqueo(CveEmpresa As Integer, Ejercicio As Integer, Mes1 As Integer, Mes2 As Integer, Mes3 As Integer, Mes4 As Integer, Mes5 As Integer, Mes6 As Integer, Mes7 As Integer, Mes8 As Integer, Mes9 As Integer, Mes10 As Integer, Mes11 As Integer, Mes12 As Integer) As Boolean
|
||||
Public Function UpdatePeriodosBloqueo(CveEmpresa As Integer, Ejercicio As Integer, Mes1 As Integer, Mes2 As Integer, Mes3 As Integer, Mes4 As Integer, Mes5 As Integer, Mes6 As Integer, Mes7 As Integer, Mes8 As Integer, Mes9 As Integer, Mes10 As Integer, Mes11 As Integer, Mes12 As Integer, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Conta_EmpresasBloqueoMesesUpdate")
|
||||
@@ -5920,6 +5920,7 @@ Public Class ClsContabilidad
|
||||
.Add("@Mes10", SqlDbType.Bit).Value = Mes10
|
||||
.Add("@Mes11", SqlDbType.Bit).Value = Mes11
|
||||
.Add("@Mes12", SqlDbType.Bit).Value = Mes12
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -5949,5 +5950,24 @@ Public Class ClsContabilidad
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetBloqueoMesesBitacora(CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Conta_GetBloqueoMesesBitacora")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.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 almacén contable", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
End Class
|
||||
@@ -1238,6 +1238,25 @@ Public Class ClsInventarios
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetMovimientosDetalleVirtual(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveCompra As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_MovimientosDetalleVirtualGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveMovimiento", SqlDbType.Int).Value = CveMovimiento
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los movimientos virtuales.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AddMovimientoDetalle(CveMovimiento As Integer, Cantidad As Double, CveUM As Integer, CvePS As Integer, PU As Double, CveAF As Integer, Optional CveSeccionAlmacen As Integer = -1, Optional SerieLote As String = "",
|
||||
Optional Observaciones As String = "", Optional CveMovimientoDetalleEntrada As Integer = -1, Optional PUTC As Double = -1, Optional FechaCaducidad As Date = MinFecha,
|
||||
Optional CostoIndirecto As Double = 0, Optional CveCompraDetalle As Integer = -1, Optional CveOrdenCompraDetalle As Integer = -1, Optional CveVentaDetalle As Integer = -1,
|
||||
|
||||
@@ -431,32 +431,50 @@ Public Class ClsPaginas
|
||||
End Property
|
||||
Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTProveedorClasificacion{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim P As New ClsCompProveedores
|
||||
If P.GetProveedorClasificacion(UsuarioActual.CveEmpresa) Then Application(AppNombre) = P.DtResultados
|
||||
P.Dispose()
|
||||
End If
|
||||
|
||||
If CveEmpresa <> -1 Then
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTProveedorClasificacion"), DataTable), String.Format("CveEmpresa ={0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa ={0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTProveedorClasificacion = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTProveedorClasificacion = DirectCast(Application("GlobalDTProveedorClasificacion"), DataTable)
|
||||
GlobalDTProveedorClasificacion = DirectCast(Application(AppNombre), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTProveedorClasificacion") = value
|
||||
Dim AppNombre As String = String.Format("GlobalDTProveedorClasificacion{0}", CveEmpresa)
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTProveedorSucursales(CveProveedor As Integer) As DataTable
|
||||
Property GlobalDTProveedorSucursales(CveProveedor As Integer, CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTProveedorSucursales{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim P As New ClsCompProveedores
|
||||
If P.GetSucursales(-1, UsuarioActual.CveEmpresa) Then Application(AppNombre) = P.DtResultados
|
||||
P.Dispose()
|
||||
End If
|
||||
|
||||
If CveProveedor <> -1 Then
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTProveedorSucursales"), DataTable), String.Format("CveProveedor = {0}", CveProveedor), "", DataViewRowState.CurrentRows)
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveProveedor = {0}", CveProveedor), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTProveedorSucursales = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTProveedorSucursales = DirectCast(Application("GlobalDTProveedorSucursales"), DataTable)
|
||||
GlobalDTProveedorSucursales = DirectCast(Application(AppNombre), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTProveedorSucursales") = value
|
||||
Dim AppNombre As String = String.Format("GlobalDTProveedorSucursales{0}", CveEmpresa)
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTRoles(CveEmpresa As Integer) As DataTable
|
||||
@@ -737,32 +755,50 @@ Public Class ClsPaginas
|
||||
Application("GlobalDTSATUsosCFDI") = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable
|
||||
Get
|
||||
Public Shared Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then
|
||||
Dim ObjUnidadesMedida As New ClsUnidadesMedida()
|
||||
If ObjUnidadesMedida.GetUnidadesMedida(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUnidadesMedida.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing
|
||||
'If ObjUnidadesMedida.GetUnidadesMedidaAlias() Then Application("GlobalDTUnidadesMedidaAlias") = ObjUnidadesMedida.DtResultados Else Application("GlobalDTUnidadesMedidaAlias") = Nothing
|
||||
ObjUnidadesMedida.Dispose()
|
||||
End If
|
||||
|
||||
If CveEmpresa <> -1 Then
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTUnidadesMedida"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows)
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows)
|
||||
GlobalDTUnidadesMedida = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTUnidadesMedida = DirectCast(Application("GlobalDTUnidadesMedida"), DataTable)
|
||||
GlobalDTUnidadesMedida = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTUnidadesMedida") = value
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida{0}", CveEmpresa)
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTUnidadesMedidaAlias(Optional CveEmpresa As Integer = -1) As DataTable
|
||||
Get
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTUnidadesMedidaAlias{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then
|
||||
Dim ObjUnidadesMedida As New ClsUnidadesMedida()
|
||||
If ObjUnidadesMedida.GetUnidadesMedidaAlias(CveEmpresa, -1) Then Application(AppNombre) = ObjUnidadesMedida.DtResultados Else Application(AppNombre) = Nothing
|
||||
ObjUnidadesMedida.Dispose()
|
||||
End If
|
||||
If CveEmpresa <> -1 Then
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTUnidadesMedidaAlias"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTUnidadesMedidaAlias = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTUnidadesMedidaAlias = DirectCast(Application("GlobalDTUnidadesMedidaAlias"), DataTable)
|
||||
GlobalDTUnidadesMedidaAlias = DirectCast(Application(AppNombre), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTUnidadesMedidaAlias") = value
|
||||
Dim AppNombre As String = String.Format("GlobalDTUnidadesMedidaAlias{0}", CveEmpresa)
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTEstatusOrdenCompra() As DataTable
|
||||
@@ -843,19 +879,20 @@ Public Class ClsPaginas
|
||||
Application("GlobalDTProyectos") = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
|
||||
Public Shared Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
|
||||
Get
|
||||
|
||||
If DirectCast(Application("GlobalDTSubProyectos"), DataTable) Is Nothing Or (DirectCast(Application("GlobalDTSubProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(Application("GlobalDTSubProyectos"), DataTable).Rows.Count = 0) Then
|
||||
Dim AppNombre As String = String.Format("GlobalDTSubProyectos{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then
|
||||
Dim P As New ClsSubProyectos
|
||||
If P.GetSubProyectos Then
|
||||
Application("GlobalDTSubProyectos") = P.DtResultados
|
||||
If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then
|
||||
HttpContext.Current.Application(AppNombre) = P.DtResultados
|
||||
End If
|
||||
P.Dispose()
|
||||
|
||||
Dim msg As String = "aqui no se carga subproyectos"
|
||||
If Request IsNot Nothing Then
|
||||
msg = msg & Request.ServerVariables("URL")
|
||||
If HttpContext.Current.Request IsNot Nothing Then
|
||||
msg = msg & HttpContext.Current.Request.ServerVariables("URL")
|
||||
End If
|
||||
msg.GuardaLog()
|
||||
|
||||
@@ -868,25 +905,26 @@ Public Class ClsPaginas
|
||||
If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
|
||||
If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTSubProyectos"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTSubProyectos = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
|
||||
Else
|
||||
GlobalDTSubProyectos = DirectCast(Application("GlobalDTSubProyectos"), DataTable)
|
||||
GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(ByVal value As DataTable)
|
||||
Set(ByVal value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTSubProyectos{0}", CveEmpresa)
|
||||
If value Is Nothing OrElse value.Rows.Count = 0 Then
|
||||
Dim msg As String = "aqui no se carga subproyectos"
|
||||
If Request IsNot Nothing Then
|
||||
msg = msg & Request.ServerVariables("URL")
|
||||
If HttpContext.Current.Request IsNot Nothing Then
|
||||
msg = msg & HttpContext.Current.Request.ServerVariables("URL")
|
||||
End If
|
||||
msg.GuardaLog()
|
||||
|
||||
End If
|
||||
Application("GlobalDTSubProyectos") = value
|
||||
End If
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTSubProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable
|
||||
@@ -1141,11 +1179,20 @@ Public Class ClsPaginas
|
||||
ObjPS.Dispose()
|
||||
End Get
|
||||
End Property
|
||||
Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1, Optional AplicaParaVenta As Integer = -1) As DataTable
|
||||
Public Shared Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1, Optional AplicaParaVenta As Integer = -1) As DataTable
|
||||
Get
|
||||
If CveEmpresa <> -1 Then
|
||||
Dim AppNombre As String = String.Format("GlobalDTPSSimplificado{0}", CveEmpresa)
|
||||
If CveEmpresa <> -1 Then
|
||||
'sino existe, recarga los datos
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSSimplificado(-1) Then HttpContext.Current.Application(AppNombre) = ObjPS.DtResultados.AsEnumerable() Else HttpContext.Current.Application("GlobalDTPSSimplificado") = Nothing
|
||||
ObjPS.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Dim Cons = DirectCast(Application("GlobalDTPSSimplificado"), EnumerableRowCollection(Of DataRow))
|
||||
Dim Cons = DirectCast(HttpContext.Current.Application(AppNombre), EnumerableRowCollection(Of DataRow))
|
||||
|
||||
Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
|
||||
If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion))
|
||||
@@ -1160,48 +1207,73 @@ Public Class ClsPaginas
|
||||
End Try
|
||||
|
||||
Else
|
||||
GlobalDTPSSimplificado = DirectCast(Application("GlobalDTPSSimplificado"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
|
||||
GlobalDTPSSimplificado = DirectCast(HttpContext.Current.Application(AppNombre), EnumerableRowCollection(Of DataRow)).CopyToDataTable
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTPSSimplificado") = value
|
||||
Dim AppNombre As String = String.Format("GlobalDTPSSimplificado{0}", CveEmpresa)
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTProductosServiciosAlias(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTProductosServiciosAlias{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSAlias(-1, CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados Else Application(AppNombre) = Nothing
|
||||
ObjPS.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If CveEmpresa <> -1 Then
|
||||
|
||||
Dim StrSQL As New StringBuilder
|
||||
StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
|
||||
If Estatus >= 0 Then StrSQL.AppendFormat(" AND CveEstado = {0} ", Estatus)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTProductosServiciosAlias"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTProductosServiciosAlias = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTProductosServiciosAlias = DirectCast(Application("GlobalDTProductosServiciosAlias"), DataTable)
|
||||
GlobalDTProductosServiciosAlias = DirectCast(Application(AppNombre), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTProductosServiciosAlias") = value
|
||||
Dim AppNombre As String = String.Format("GlobalDTProductosServiciosAlias{0}", CveEmpresa)
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer) As DataTable
|
||||
Public Shared Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias{0}", CveEmpresa)
|
||||
If CveEmpresa <> -1 Then
|
||||
'sino existe, recarga los datos
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSEquivalencias(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjPS.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing
|
||||
ObjPS.Dispose()
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If CvePS <> -1 OrElse CveUM <> -1 Then
|
||||
Dim StrSQL As New StringBuilder
|
||||
If CvePS <> -1 Then StrSQL.AppendFormat(" AND CvePS = {0}", CvePS)
|
||||
If CveUM <> -1 Then StrSQL.AppendFormat(" AND CveUM = {0}", CveUM)
|
||||
If CveUM <> -1 Then StrSQL.AppendFormat(" AND CveUM = {0}", CveUM)
|
||||
If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTProductosServiciosEquivalencias"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTProductosServiciosEquivalencias = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTProductosServiciosEquivalencias = DirectCast(Application("GlobalDTProductosServiciosEquivalencias"), DataTable)
|
||||
GlobalDTProductosServiciosEquivalencias = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTProductosServiciosEquivalencias") = value
|
||||
Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias{0}", CveEmpresa)
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTProductosServiciosCaracteristicas(CveEmpresa As Integer) As DataTable
|
||||
@@ -1222,20 +1294,31 @@ Public Class ClsPaginas
|
||||
|
||||
Property GlobalDTPSAdicionales(CvePS As Integer, CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTPSAdicionales{0}", CveEmpresa)
|
||||
If CveEmpresa <> -1 Then
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSAdicionales(-1, CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados Else Application(AppNombre) = Nothing
|
||||
ObjPS.Dispose()
|
||||
|
||||
End If
|
||||
End If
|
||||
Dim Str As New StringBuilder
|
||||
If CvePS > 0 Then Str.AppendFormat("CvePS = {0}", CvePS)
|
||||
If CveEmpresa > 0 Then Str.AppendFormat("{0} CveEmpresa = {1}", If(CvePS > 0, " AND ", ""), CveEmpresa)
|
||||
|
||||
If CvePS > 0 Then
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTPSAdicionales"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTPSAdicionales = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTPSAdicionales = DirectCast(Application("GlobalDTPSAdicionales"), DataTable)
|
||||
GlobalDTPSAdicionales = DirectCast(Application(AppNombre), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTPSAdicionales") = value
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTPSAdicionales{0}", CveEmpresa)
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTProductosServiciosCaracteristicasOpciones(CveEmpresa As Integer) As DataTable
|
||||
@@ -1287,20 +1370,29 @@ Public Class ClsPaginas
|
||||
End Property
|
||||
Property GlobalDTImpuestosLocales(CvePS As Integer, CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTImpuestosLocales{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSImpuestosLocales(-1, CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados Else Application(AppNombre) = Nothing
|
||||
ObjPS.Dispose()
|
||||
|
||||
End If
|
||||
Dim Str As New StringBuilder
|
||||
If CvePS > 0 Then Str.AppendFormat("CvePS = {0}", CvePS)
|
||||
If CveEmpresa > 0 Then Str.AppendFormat("{0} CveEmpresa = {1}", If(CvePS > 0, " AND ", ""), CveEmpresa)
|
||||
|
||||
If CvePS > 0 Then
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTImpuestosLocales"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTImpuestosLocales = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTImpuestosLocales = DirectCast(Application("GlobalDTImpuestosLocales"), DataTable)
|
||||
GlobalDTImpuestosLocales = DirectCast(Application(AppNombre), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTImpuestosLocales") = value
|
||||
Dim AppNombre As String = String.Format("GlobalDTImpuestosLocales{0}", CveEmpresa)
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
'Bancos
|
||||
@@ -1419,49 +1511,56 @@ Public Class ClsPaginas
|
||||
'Fin Ruta
|
||||
'Cliente
|
||||
Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable
|
||||
Get
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTCliente{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjClientes As New ClsClientes
|
||||
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, Estatus:=-1) Then Application(AppNombre) = ObjClientes.DtResultados Else Application(AppNombre) = Nothing
|
||||
ObjClientes.Dispose()
|
||||
End If
|
||||
|
||||
|
||||
If CveEmpresa <> -1 Then
|
||||
|
||||
Dim StrSQL As New StringBuilder
|
||||
StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
|
||||
If Estatus >= 0 Then StrSQL.AppendFormat(" AND EstatusBool = {0} ", Estatus)
|
||||
|
||||
If Application("GlobalDTCliente") Is Nothing Then
|
||||
Dim ObjClientes As New ClsClientes
|
||||
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus:=-1) Then Application("GlobalDTCliente") = ObjClientes.DtResultados Else Application("GlobalDTCliente") = Nothing
|
||||
ObjClientes.Dispose()
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTCliente"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
|
||||
If Estatus >= 0 Then StrSQL.AppendFormat(" AND EstatusBool = {0} ", Estatus)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTCliente = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
|
||||
Else
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTCliente"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTCliente = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
End If
|
||||
|
||||
Dv.Dispose()
|
||||
|
||||
Else
|
||||
GlobalDTCliente = DirectCast(Application("GlobalDTCliente"), DataTable)
|
||||
GlobalDTCliente = DirectCast(Application(AppNombre), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTCliente") = value
|
||||
Dim AppNombre As String = String.Format("GlobalDTCliente{0}", CveEmpresa)
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTClienteClasificaciones(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjClientes As New ClsClientes
|
||||
If ObjClientes.GetClienteClasificacion(UsuarioActual.CveEmpresa) Then Application(AppNombre) = ObjClientes.DtResultados Else Application(AppNombre) = Nothing
|
||||
ObjClientes.Dispose()
|
||||
End If
|
||||
If CveEmpresa <> -1 Then
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTClienteClasificaciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTClienteClasificaciones = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTClienteClasificaciones = DirectCast(Application("GlobalDTClienteClasificaciones"), DataTable)
|
||||
GlobalDTClienteClasificaciones = DirectCast(Application(AppNombre), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTClasificacionesCliente") = value
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones{0}", CveEmpresa)
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTEstatusOrdenServicios(CveEmpresa As Integer) As DataTable
|
||||
@@ -1509,17 +1608,26 @@ Public Class ClsPaginas
|
||||
End Property
|
||||
Property GlobalDTCompProveedores(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTCompProveedores{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjProveedores As New ClsCompProveedores
|
||||
If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then Application(AppNombre) = ObjProveedores.DtResultados Else Application(AppNombre) = Nothing
|
||||
ObjProveedores.Dispose()
|
||||
End If
|
||||
|
||||
If CveEmpresa <> -1 Then
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTCompProveedores"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTCompProveedores = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTCompProveedores = DirectCast(Application("GlobalDTCompProveedores"), DataTable)
|
||||
GlobalDTCompProveedores = DirectCast(Application(AppNombre), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTCompProveedores") = value
|
||||
Dim AppNombre As String = String.Format("GlobalDTCompProveedores{0}", CveEmpresa)
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
'EstatusFactura
|
||||
@@ -1637,7 +1745,7 @@ Public Class ClsPaginas
|
||||
Application("GlobalDTNom_Periodos") = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTVtaFormaPago() As DataTable
|
||||
Public Property GlobalDTVtaFormaPago() As DataTable
|
||||
Get
|
||||
GlobalDTVtaFormaPago = DirectCast(Application("GlobalDTVtaFormaPago"), DataTable)
|
||||
End Get
|
||||
|
||||
@@ -110,10 +110,14 @@ Public Class ClsSubProyectos
|
||||
SqlTransacc.Commit()
|
||||
End Sub
|
||||
|
||||
Public Function GetSubProyectos() As Boolean
|
||||
Public Function GetSubProyectos(Optional CveEmpresa As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_SubProyectosGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
@@ -121,10 +125,6 @@ Public Class ClsSubProyectos
|
||||
OnError("Ocurrió un error al obtener el Catálogo de SubProyectos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
@@ -126,14 +126,14 @@ Public Class ClsUnidadesMedida
|
||||
|
||||
#Region " UNIDADES DE MEDIDA "
|
||||
|
||||
Public Function GetUnidadesMedida() As Boolean
|
||||
Public Function GetUnidadesMedida(CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_UnidadesMedidaGet")
|
||||
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
'.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
|
||||
'End With
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
@@ -234,10 +234,11 @@ Public Class ClsUnidadesMedida
|
||||
#End Region
|
||||
|
||||
#Region " UM ALIAS "
|
||||
Public Function GetUnidadesMedidaAlias(Optional CveUnidadMedida As Integer = -1) As Boolean
|
||||
Public Function GetUnidadesMedidaAlias(CveEmpresa As Integer, CveUnidadMedida As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_UnidadesMedidaAliasGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
|
||||
End With
|
||||
Try
|
||||
|
||||
@@ -2630,7 +2630,7 @@ Namespace Modelos
|
||||
importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal) * ValorMultiplicador)
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
|
||||
Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, ClsPaginas.GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
|
||||
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas
|
||||
@@ -2705,7 +2705,7 @@ Namespace Modelos
|
||||
importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal) * ValorMultiplicador)
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
|
||||
Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, ClsPaginas.GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
|
||||
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas
|
||||
@@ -3204,7 +3204,7 @@ Namespace Modelos
|
||||
|
||||
If UsuarioActual.CveEmpresa = 1 Then
|
||||
DtEquivalencias = New DataTable
|
||||
DtEquivalencias = GlobalDTProductosServiciosEquivalencias(CveProducto, -1)
|
||||
DtEquivalencias = ClsPaginas.GlobalDTProductosServiciosEquivalencias(CveProducto, -1, UsuarioActual.CveEmpresa)
|
||||
Dim CveUnidadBase As Integer = DtEquivalencias.FiltroPrimeroValor("CveUM", "UnidadBase = 'True'").ToEntero
|
||||
Dim drUMBase As DataRow = DtEquivalencias.FiltroPrimero("UnidadBase = 'True'")
|
||||
|
||||
@@ -5446,11 +5446,11 @@ Namespace Modelos
|
||||
|
||||
Public Sub SetSubProyecto()
|
||||
If CveSubProyecto > 0 Then
|
||||
SubProyecto = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1).FiltroPrimero($"CveSubProyecto = {CveSubProyecto}"))
|
||||
SubProyecto = New Modelos.SubProyectoModel(ClsPaginas.GlobalDTSubProyectos(-1).FiltroPrimero($"CveSubProyecto = {CveSubProyecto}"))
|
||||
End If
|
||||
End Sub
|
||||
Public Sub SetSubProyectoMatriz()
|
||||
Dim Row As Data.DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1")
|
||||
Dim Row As Data.DataRow = ClsPaginas.GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1")
|
||||
If Not IsNothing(Row) Then
|
||||
SubProyectoMatriz = New Modelos.SubProyectoModel(Row)
|
||||
End If
|
||||
@@ -5496,12 +5496,12 @@ Namespace Modelos
|
||||
End Sub
|
||||
Public Sub SetSubProyecto(obj As ClsPaginas)
|
||||
If CveSubProyecto > 0 AndAlso Not IsNothing(obj) Then
|
||||
SubProyecto = New Modelos.SubProyectoModel(obj.GlobalDTSubProyectos(-1).FiltroPrimero($"CveSubProyecto = {CveSubProyecto}"))
|
||||
SubProyecto = New Modelos.SubProyectoModel(ClsPaginas.GlobalDTSubProyectos(-1).FiltroPrimero($"CveSubProyecto = {CveSubProyecto}"))
|
||||
End If
|
||||
End Sub
|
||||
Public Sub SetSubProyectoMatriz(obj As ClsPaginas)
|
||||
If Not IsNothing(obj) Then
|
||||
Dim Row As Data.DataRow = obj.GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=obj.UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1")
|
||||
Dim Row As Data.DataRow = ClsPaginas.GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=obj.UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1")
|
||||
If Not IsNothing(Row) Then
|
||||
SubProyectoMatriz = New Modelos.SubProyectoModel(Row)
|
||||
End If
|
||||
@@ -6339,45 +6339,8 @@ Namespace Modelos
|
||||
End If
|
||||
HttpContext.Current.Application("GlobalDTProyectos") = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
|
||||
Get
|
||||
|
||||
If DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable).Rows.Count = 0) Then
|
||||
Dim P As New ClsSubProyectos
|
||||
If P.GetSubProyectos Then
|
||||
HttpContext.Current.Application("GlobalDTSubProyectos") = P.DtResultados
|
||||
End If
|
||||
P.Dispose()
|
||||
|
||||
Dim msg As String = "aqui no se carga subproyectos"
|
||||
|
||||
End If
|
||||
|
||||
If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
|
||||
Dim StrSQL As New StringBuilder
|
||||
If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
|
||||
If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
|
||||
If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
|
||||
If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTSubProyectos = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
|
||||
Else
|
||||
GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(ByVal value As DataTable)
|
||||
If value Is Nothing OrElse value.Rows.Count = 0 Then
|
||||
Dim msg As String = "aqui no se carga subproyectos"
|
||||
|
||||
End If
|
||||
HttpContext.Current.Application("GlobalDTSubProyectos") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
|
||||
Property GlobalDTSubProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable
|
||||
Get
|
||||
|
||||
@@ -6566,100 +6529,10 @@ Namespace Modelos
|
||||
|
||||
ObjPS.Dispose()
|
||||
End Get
|
||||
End Property
|
||||
Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1, Optional AplicaParaVenta As Integer = -1) As DataTable
|
||||
Get
|
||||
If CveEmpresa <> -1 Then
|
||||
|
||||
Dim Cons = DirectCast(HttpContext.Current.Application("GlobalDTPSSimplificado"), EnumerableRowCollection(Of DataRow))
|
||||
|
||||
Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
|
||||
If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion))
|
||||
If PSCodigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!PSCodigo) = PSCodigo))
|
||||
If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus))
|
||||
If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta))
|
||||
|
||||
Try
|
||||
GlobalDTPSSimplificado = Cons.OrderBy(Function(a) a!PSCodigo).CopyToDataTable
|
||||
Catch ex As Exception
|
||||
GlobalDTPSSimplificado = New DataTable
|
||||
End Try
|
||||
|
||||
Else
|
||||
GlobalDTPSSimplificado = DirectCast(HttpContext.Current.Application("GlobalDTPSSimplificado"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTPSSimplificado") = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTProductosServiciosAlias(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable
|
||||
Get
|
||||
If CveEmpresa <> -1 Then
|
||||
|
||||
Dim StrSQL As New StringBuilder
|
||||
StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
|
||||
If Estatus >= 0 Then StrSQL.AppendFormat(" AND CveEstado = {0} ", Estatus)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosAlias"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTProductosServiciosAlias = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTProductosServiciosAlias = DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosAlias"), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTProductosServiciosAlias") = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer) As DataTable
|
||||
Get
|
||||
If CvePS <> -1 OrElse CveUM <> -1 Then
|
||||
Dim StrSQL As New StringBuilder
|
||||
If CvePS <> -1 Then StrSQL.AppendFormat(" AND CvePS = {0}", CvePS)
|
||||
If CveUM <> -1 Then StrSQL.AppendFormat(" AND CveUM = {0}", CveUM)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosEquivalencias"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTProductosServiciosEquivalencias = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTProductosServiciosEquivalencias = DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosEquivalencias"), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTProductosServiciosEquivalencias") = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTProductosServiciosCaracteristicas(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
If CveEmpresa <> -1 Then
|
||||
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTProductosServiciosCaracteristicas = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTProductosServiciosCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosCaracteristicas"), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTProductosServiciosCaracteristicas") = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTProductosServiciosCaracteristicasOpciones(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
If CveEmpresa <> -1 Then
|
||||
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosCaracteristicasOpciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTProductosServiciosCaracteristicasOpciones = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTProductosServiciosCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosCaracteristicasOpciones"), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTProductosServiciosCaracteristicasOpciones") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Property GlobalDTInvMetodosInventario() As DataTable
|
||||
Get
|
||||
GlobalDTInvMetodosInventario = DirectCast(HttpContext.Current.Application("GlobalDTInvMetodosInventario"), DataTable)
|
||||
|
||||
@@ -519,7 +519,7 @@ Public Class WS_PuntoVenta
|
||||
Dim objUnidadesMedida As New ClsUnidadesMedida
|
||||
Dim Respuesta As New RespuestaWS
|
||||
|
||||
If objUnidadesMedida.GetUnidadesMedida() Then
|
||||
If objUnidadesMedida.GetUnidadesMedida(CveEmpresa) Then
|
||||
Respuesta.Datos = objUnidadesMedida.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
|
||||
Respuesta.Datos.TableName = "Resultados"
|
||||
Respuesta.HuboError = False
|
||||
|
||||
@@ -1929,24 +1929,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
HttpContext.Current.Application("GlobalDTProductosServiciosAlias") = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer) As DataTable
|
||||
Get
|
||||
If CvePS <> -1 OrElse CveUM <> -1 Then
|
||||
Dim StrSQL As New StringBuilder
|
||||
If CvePS <> -1 Then StrSQL.AppendFormat(" AND CvePS = {0}", CvePS)
|
||||
If CveUM <> -1 Then StrSQL.AppendFormat(" AND CveUM = {0}", CveUM)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosEquivalencias"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTProductosServiciosEquivalencias = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTProductosServiciosEquivalencias = DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosEquivalencias"), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTProductosServiciosEquivalencias") = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTProductosServiciosCaracteristicas(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
If CveEmpresa <> -1 Then
|
||||
|
||||
@@ -344,10 +344,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
End If
|
||||
|
||||
If UsaGlobal Then
|
||||
|
||||
Dim DTPS = DirectCast(context.Application("GlobalDTPSSimplificado"), EnumerableRowCollection(Of DataRow))
|
||||
|
||||
If UsaGlobal Then
|
||||
|
||||
'Dim DTPS = DirectCast(context.Application("GlobalDTPSSimplificado"), EnumerableRowCollection(Of DataRow))
|
||||
Dim DTPS = ClsPaginas.GlobalDTPSSimplificado(CveEmpresa).AsEnumerable
|
||||
|
||||
If DTPS IsNot Nothing Then
|
||||
|
||||
@@ -583,10 +583,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
|
||||
|
||||
Dim DTPS = DirectCast(context.Application("GlobalDTPSSimplificado"), EnumerableRowCollection(Of DataRow))
|
||||
|
||||
|
||||
|
||||
Dim DTPS = ClsPaginas.GlobalDTPSSimplificado(CveEmpresa).AsEnumerable ' DirectCast(context.Application("GlobalDTPSSimplificado"), EnumerableRowCollection(Of DataRow))
|
||||
|
||||
|
||||
If DTPS IsNot Nothing Then
|
||||
|
||||
'APLICACION DE FILTROS
|
||||
|
||||
@@ -2804,7 +2804,7 @@ Partial Class Bancos_IE
|
||||
If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
|
||||
ImporteAplicarMN = ((ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TCDocumento)) - ImporteAplicar).RoundSQL()
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAplicar, ReferenciaAplicar, 204, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME, CveCuenta:=CveCuentaConta, TipoCambio:=TCDocumento) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
|
||||
MsgError = "Ocurrió un error al registrara el asiento de bancos complementaria de devolución"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -2411,10 +2411,10 @@ Partial Class Compras_Compras
|
||||
CambiaEjercicioAC(False)
|
||||
End If
|
||||
|
||||
If GlobalDTProveedorSucursales(CveProveedor).Rows.Count > 0 Then
|
||||
If GlobalDTProveedorSucursales(CveProveedor, UsuarioActual.CveEmpresa).Rows.Count > 0 Then
|
||||
RowProveedorSucursal.Visible = True
|
||||
DdlProveedorSucursal.Items.Clear()
|
||||
DdlProveedorSucursal.DataSource = GlobalDTProveedorSucursales(CveProveedor)
|
||||
DdlProveedorSucursal.DataSource = GlobalDTProveedorSucursales(CveProveedor, UsuarioActual.CveEmpresa)
|
||||
DdlProveedorSucursal.DataBind()
|
||||
DdlProveedorSucursal.Items.Insert(0, New ListItem("Matriz", "0"))
|
||||
DdlProveedorSucursal.SelectedValueExist(dr("CveProveedorSucursal").ToString.ToEntero)
|
||||
@@ -3178,7 +3178,7 @@ Partial Class Compras_Compras
|
||||
|
||||
If Not CveCompra > 0 Then '[IPP] SI YA ESTA REGISTRADA LOS VALORES SE CARGAN EN EL CARGACOMPRA()
|
||||
'DF 11-04-17
|
||||
Dim dtprovsuc As DataTable = GlobalDTProveedorSucursales(ObjProveedor.CveProveedor)
|
||||
Dim dtprovsuc As DataTable = GlobalDTProveedorSucursales(ObjProveedor.CveProveedor, UsuarioActual.CveEmpresa)
|
||||
If dtprovsuc IsNot Nothing AndAlso dtprovsuc.Rows.Count > 0 Then
|
||||
RowProveedorSucursal.Visible = True
|
||||
DdlProveedorSucursal.Items.Clear()
|
||||
@@ -3859,7 +3859,7 @@ Partial Class Compras_Compras
|
||||
'DF - 10/04/2017
|
||||
If UsuarioActual.TienePermisoProceso(187) Then
|
||||
If TxtSerie.Text <> SerieVieja Then
|
||||
Dim SerieNueva As String = GlobalDTProveedorSucursales(CveProveedor).FiltroPrimeroValor("Serie", $"Serie = '{TxtSerie.Text}'").ToString
|
||||
Dim SerieNueva As String = GlobalDTProveedorSucursales(CveProveedor, UsuarioActual.CveEmpresa).FiltroPrimeroValor("Serie", $"Serie = '{TxtSerie.Text}'").ToString
|
||||
If SerieNueva = "" Then
|
||||
Alert("La Serie no es válida, por favor revise que se encuentre dentro de la lista de las sucursales del proveedor.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -5119,7 +5119,7 @@ Partial Class Compras_Compras
|
||||
'UNIDAD BASE - EQUIVALENCIAS - INVENTARIO
|
||||
If UsuarioActual.CveEmpresa = 1 Then
|
||||
DtEquivalencias = New DataTable
|
||||
DtEquivalencias = GlobalDTProductosServiciosEquivalencias(CveProducto, -1)
|
||||
DtEquivalencias = GlobalDTProductosServiciosEquivalencias(CveProducto, -1, UsuarioActual.CveEmpresa)
|
||||
Dim CveUnidadBase As Integer = DtEquivalencias.FiltroPrimeroValor("CveUM", "UnidadBase = 'True'").ToEntero
|
||||
Dim drUMBase As DataRow = DtEquivalencias.FiltroPrimero("UnidadBase = 'True'")
|
||||
|
||||
@@ -10295,7 +10295,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'VALIDA UNIDAD DE MEDIDA
|
||||
If e.Row.DBCampo("CvePS").ToString.ToEntero > 0 Then
|
||||
Dim DtEquivalencias = GlobalDTProductosServiciosEquivalencias(e.Row.DBCampo("CvePS").ToString.ToEntero, -1)
|
||||
Dim DtEquivalencias = GlobalDTProductosServiciosEquivalencias(e.Row.DBCampo("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
|
||||
'SI UM NO ESTA REGISTRADA
|
||||
If e.Row.DBCampo("CveUM").ToString.ToEntero <= 0 Then
|
||||
@@ -10458,17 +10458,19 @@ Partial Class Compras_Compras
|
||||
|
||||
#Region "METODOS"
|
||||
Private Sub GeneraGlobalDT(data As Object)
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
|
||||
If (ObjPS.GetPSSimplificado(-1)) Then
|
||||
Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable
|
||||
End If
|
||||
|
||||
If ObjPS.GetPSEquivalencias(-1, -1) Then
|
||||
GlobalDTProductosServiciosEquivalencias(-1, -1) = ObjPS.DtResultados
|
||||
End If
|
||||
|
||||
ObjPS.Dispose()
|
||||
GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing
|
||||
GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa) = Nothing
|
||||
'Dim ObjPS As New ClsProductosServicios
|
||||
|
||||
'If (ObjPS.GetPSSimplificado(-1)) Then
|
||||
' Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable
|
||||
'End If
|
||||
|
||||
'If ObjPS.GetPSEquivalencias(-1, -1) Then
|
||||
' GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa) = ObjPS.DtResultados
|
||||
'End If
|
||||
|
||||
'ObjPS.Dispose()
|
||||
End Sub
|
||||
Private Function notienepresupuesto() As Boolean
|
||||
Dim notienerecursos = False
|
||||
@@ -12106,10 +12108,10 @@ Partial Class Compras_Compras
|
||||
ChkConsignacion.Enabled = False
|
||||
End If
|
||||
|
||||
If GlobalDTProveedorSucursales(DdlProveedor.SelectedValue.ToEntero).Rows.Count > 0 Then
|
||||
If GlobalDTProveedorSucursales(DdlProveedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).Rows.Count > 0 Then
|
||||
RowProveedorSucursal.Visible = True
|
||||
DdlProveedorSucursal.Items.Clear()
|
||||
DdlProveedorSucursal.DataSource = GlobalDTProveedorSucursales(DdlProveedor.SelectedValue.ToEntero)
|
||||
DdlProveedorSucursal.DataSource = GlobalDTProveedorSucursales(DdlProveedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||
DdlProveedorSucursal.DataBind()
|
||||
DdlProveedorSucursal.Items.Insert(0, New ListItem("Selecciona una Sucursal", "-1"))
|
||||
DdlProveedorSucursal.Items.Insert(0, New ListItem("Matriz", "0"))
|
||||
@@ -16667,7 +16669,7 @@ Partial Class Compras_Compras
|
||||
|
||||
ddlUM.Items.Clear()
|
||||
If UsuarioActual.Empresa.UsaInventarios Then
|
||||
ddlUM.DataSource = GlobalDTProductosServiciosEquivalencias(GvRow.DataKey("CvePS").ToEntero, -1)
|
||||
ddlUM.DataSource = GlobalDTProductosServiciosEquivalencias(GvRow.DataKey("CvePS").ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
Else
|
||||
ddlUM.DataSource = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
@@ -16791,7 +16793,7 @@ Partial Class Compras_Compras
|
||||
|
||||
ddlUM.Items.Clear()
|
||||
If UsuarioActual.Empresa.UsaInventarios Then
|
||||
ddlUM.DataSource = GlobalDTProductosServiciosEquivalencias(PS("CvePS").ToString.ToEntero, -1)
|
||||
ddlUM.DataSource = GlobalDTProductosServiciosEquivalencias(PS("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
Else
|
||||
ddlUM.DataSource = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
@@ -17447,7 +17449,7 @@ Partial Class Compras_Compras
|
||||
If Not DdlPSAlias2.SelectedValue = "" Then
|
||||
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPSAlias2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If DrPS IsNot Nothing Then
|
||||
DdlUnidadAlias.DataSource = GlobalDTProductosServiciosEquivalencias(DdlPSAlias2.SelectedValue.ToEntero, -1)
|
||||
DdlUnidadAlias.DataSource = GlobalDTProductosServiciosEquivalencias(DdlPSAlias2.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
DdlUnidadAlias.DataBind()
|
||||
HdnPSAliasCveClasificacion.Value = DrPS("CveClasificacion").ToString
|
||||
HdnPSAliasClasificacion.Value = DrPS("Clasificacion").ToString
|
||||
@@ -17508,7 +17510,7 @@ Partial Class Compras_Compras
|
||||
Private Sub GeneraGlobalEquivalencias()
|
||||
Dim ObjPS = New ClsProductosServicios
|
||||
If ObjPS.GetPSEquivalencias(-1, -1) Then
|
||||
GlobalDTProductosServiciosEquivalencias(-1, -1) = ObjPS.DtResultados
|
||||
GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa) = ObjPS.DtResultados
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
End Sub
|
||||
@@ -17522,7 +17524,7 @@ Partial Class Compras_Compras
|
||||
UpUMAlias.Update()
|
||||
End Sub
|
||||
Protected Sub DdlUMAlias_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If GlobalDTProductosServiciosEquivalencias(TmpDT.Rows(HdnUMAliasInd.Value.ToEntero)("CvePS").ToString.ToEntero, DdlUMAlias.SelectedValue.ToEntero).Rows.Count > 0 Then
|
||||
If GlobalDTProductosServiciosEquivalencias(TmpDT.Rows(HdnUMAliasInd.Value.ToEntero)("CvePS").ToString.ToEntero, DdlUMAlias.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).Rows.Count > 0 Then
|
||||
RegistraScript("$('#RowUMEquivalencia').addClass('hidden')", "RowUMEquivalenciaShow")
|
||||
Else
|
||||
RegistraScript("$('#RowUMEquivalencia').removeClass('hidden')", "RowUMEquivalenciaHide")
|
||||
@@ -17534,7 +17536,7 @@ Partial Class Compras_Compras
|
||||
Dim ObjPS As New ClsProductosServicios(ObjUM.IniciaTransacSQL())
|
||||
|
||||
Dim TieneError = False
|
||||
Dim DtEquivalencia = GlobalDTProductosServiciosEquivalencias(TmpDT.Rows(HdnUMAliasInd.Value.ToEntero)("CvePS").ToString.ToEntero, -1)
|
||||
Dim DtEquivalencia = GlobalDTProductosServiciosEquivalencias(TmpDT.Rows(HdnUMAliasInd.Value.ToEntero)("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
Dim CveUM = -1
|
||||
Dim UM = ""
|
||||
Dim Equivalencia = 0.0
|
||||
@@ -17548,7 +17550,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'SI NO TIENE EQUIVALENCIA DEL PS - AGREGA LA EQUIVALENCIA
|
||||
If Not TieneError Then
|
||||
If Not GlobalDTProductosServiciosEquivalencias(TmpDT.Rows(HdnUMAliasInd.Value.ToEntero)("CvePS").ToString.ToEntero, DdlUMAlias.SelectedValue.ToEntero).Rows.Count > 0 Then
|
||||
If Not GlobalDTProductosServiciosEquivalencias(TmpDT.Rows(HdnUMAliasInd.Value.ToEntero)("CvePS").ToString.ToEntero, DdlUMAlias.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).Rows.Count > 0 Then
|
||||
If Not ObjPS.AddPSEquivalencias(TmpDT.Rows(HdnUMAliasInd.Value.ToEntero)("CvePS").ToString.ToEntero, DdlUMAlias.SelectedValue.ToEntero, TxtUMEquivalenciaCantidad.Text.ToDecimal, False, 0, UsuarioActual.CveUsuario) Then
|
||||
TieneError = True
|
||||
End If
|
||||
@@ -17643,7 +17645,7 @@ Partial Class Compras_Compras
|
||||
End Sub
|
||||
Protected Sub LBAplicarEquivalencia_Click(sender As Object, e As EventArgs)
|
||||
Dim Dr = TmpDT.Rows(CType(CType(sender, LinkButton).NamingContainer, GridViewRow).RowIndex)
|
||||
Dim DtEquivalencia = GlobalDTProductosServiciosEquivalencias(Dr("CvePS").ToString.ToEntero, -1)
|
||||
Dim DtEquivalencia = GlobalDTProductosServiciosEquivalencias(Dr("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
Dim Equivalencia = DtEquivalencia.FiltroPrimeroValor("Cantidad", $"CveUM = {Dr("CveUM")}").ToDouble
|
||||
|
||||
If Equivalencia > 0 Then
|
||||
@@ -17670,7 +17672,7 @@ Partial Class Compras_Compras
|
||||
Dim OjbUM As New ClsUnidadesMedida
|
||||
|
||||
If ObjPS.GetPSEquivalencias(-1, -1) Then
|
||||
GlobalDTProductosServiciosEquivalencias(-1, -1) = ObjPS.DtResultados
|
||||
GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa) = ObjPS.DtResultados
|
||||
End If
|
||||
|
||||
If OjbUM.GetUnidadesMedidaAlias(-1) Then
|
||||
@@ -19066,11 +19068,12 @@ Partial Class Compras_Compras
|
||||
RecargaPSGlobal()
|
||||
End Sub
|
||||
Private Sub RecargaPSGlobal()
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
|
||||
If ObjPS.GetPSSimplificado(-1) Then Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable()
|
||||
|
||||
ObjPS.Dispose()
|
||||
GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing
|
||||
'Dim ObjPS As New ClsProductosServicios
|
||||
|
||||
'If ObjPS.GetPSSimplificado(-1) Then Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable()
|
||||
|
||||
'ObjPS.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -172,7 +172,21 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin: 5px">
|
||||
<asp:UpdatePanel ID="UPGvBitacora" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvMesesBloqueBitacora" runat="server" AutoGenerateColumns="False" DataKeyNames="FechaRealizado,Nombre,Periodo,Accion" EmptyDataText="No se encontraron registros"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-freezerows="1" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="FechaRealizado" HeaderText="Fecha realizado" />
|
||||
<asp:BoundField DataField="Nombre" HeaderText="Usuario" />
|
||||
<asp:BoundField DataField="Periodo" HeaderText="Periodo" />
|
||||
<asp:BoundField DataField="Accion" HeaderText="Accion" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
@@ -68,10 +68,19 @@ Partial Class Contabilidad_CatPeriodosBloqueo
|
||||
GvPeriodosBloqueo.DataSource = Nothing
|
||||
End If
|
||||
|
||||
If ObjConta.GetBloqueoMesesBitacora(UsuarioActual.CveEmpresa) Then
|
||||
GvMesesBloqueBitacora.DataSource = ObjConta.DtResultados
|
||||
Else
|
||||
GvMesesBloqueBitacora.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
UPGvPeriodosBloqueo.DataBind()
|
||||
GvMesesBloqueBitacora.DataBind()
|
||||
UpGral.Update()
|
||||
UPGvBitacora.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -121,7 +130,7 @@ Partial Class Contabilidad_CatPeriodosBloqueo
|
||||
End If
|
||||
Else
|
||||
|
||||
If ObjConta.UpdatePeriodosBloqueo(UsuarioActual.CveEmpresa, TxtEjercicio.Text, ChkM1.Checked, ChkM2.Checked, ChkM3.Checked, ChkM4.Checked, ChkM5.Checked, ChkM6.Checked, ChkM7.Checked, ChkM8.Checked, ChkM9.Checked, ChkM10.Checked, ChkM11.Checked, ChkM12.Checked) Then
|
||||
If ObjConta.UpdatePeriodosBloqueo(UsuarioActual.CveEmpresa, TxtEjercicio.Text, ChkM1.Checked, ChkM2.Checked, ChkM3.Checked, ChkM4.Checked, ChkM5.Checked, ChkM6.Checked, ChkM7.Checked, ChkM8.Checked, ChkM9.Checked, ChkM10.Checked, ChkM11.Checked, ChkM12.Checked, UsuarioActual.CveUsuario) Then
|
||||
|
||||
CargadatosGvPeriodosBloqueo()
|
||||
UpModalPeriodosBloqueo.Update()
|
||||
|
||||
@@ -867,7 +867,8 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
If Not ErrorPS Then
|
||||
ObjPS.Commit()
|
||||
If ObjPS.GetPSSimplificado(-1) Then Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable()
|
||||
GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing
|
||||
'If ObjPS.GetPSSimplificado(-1) Then Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable()
|
||||
If Contador > 0 Then
|
||||
Alert(String.Format("Se agregaron: <b>{0}</b> Productos/Servicios correctamente. <br>Se Actualizaron: <b>{1}</b> Productos/Servicios ya que ya se encontraban registrados.", NumRows - Contador, Contador), TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
|
||||
146
Global.asax
146
Global.asax
@@ -318,27 +318,27 @@
|
||||
If ObjVenta.GetClasificacionDetalle(-1, CveClasificacion:=-1) Then
|
||||
Application("GlobalDTClasificacionesDetalle") = ObjVenta.DtResultados
|
||||
End If
|
||||
ObjVenta.Dispose()
|
||||
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'S U C U R S A L E S
|
||||
|
||||
'Dim ObjSucursales As New ClsSucursales()
|
||||
'If ObjSucursales.GetSucursales() Then Application("GlobalDTSucursales") = ObjSucursales.DtResultados Else Application("GlobalDTSucursales") = Nothing
|
||||
'ObjSucursales.Dispose()
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'U N I D A D E S - D E - M E D I D A
|
||||
|
||||
Dim ObjUnidadesMedida As New ClsUnidadesMedida()
|
||||
If ObjUnidadesMedida.GetUnidadesMedida() Then Application("GlobalDTUnidadesMedida") = ObjUnidadesMedida.DtResultados Else Application("GlobalDTUnidadesMedida") = Nothing
|
||||
If ObjUnidadesMedida.GetUnidadesMedidaAlias() Then Application("GlobalDTUnidadesMedidaAlias") = ObjUnidadesMedida.DtResultados Else Application("GlobalDTUnidadesMedidaAlias") = Nothing
|
||||
ObjUnidadesMedida.Dispose()
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'M E T O D O S - D E - P A G O
|
||||
|
||||
ObjVenta.Dispose()
|
||||
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'S U C U R S A L E S
|
||||
|
||||
'Dim ObjSucursales As New ClsSucursales()
|
||||
'If ObjSucursales.GetSucursales() Then Application("GlobalDTSucursales") = ObjSucursales.DtResultados Else Application("GlobalDTSucursales") = Nothing
|
||||
'ObjSucursales.Dispose()
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'U N I D A D E S - D E - M E D I D A
|
||||
|
||||
'Dim ObjUnidadesMedida As New ClsUnidadesMedida()
|
||||
'If ObjUnidadesMedida.GetUnidadesMedida(-1) Then Application("GlobalDTUnidadesMedida") = ObjUnidadesMedida.DtResultados Else Application("GlobalDTUnidadesMedida") = Nothing
|
||||
'If ObjUnidadesMedida.GetUnidadesMedidaAlias() Then Application("GlobalDTUnidadesMedidaAlias") = ObjUnidadesMedida.DtResultados Else Application("GlobalDTUnidadesMedidaAlias") = Nothing
|
||||
'ObjUnidadesMedida.Dispose()
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'M E T O D O S - D E - P A G O
|
||||
|
||||
Dim ObjMetodoPago As New ClsMetodosPagos()
|
||||
If ObjMetodoPago.GetMetodosPago() Then Application("GlobalDTMetodosPago") = ObjMetodoPago.DtResultados Else Application("GlobalDTMetodosPago") = Nothing
|
||||
ObjMetodoPago.Dispose()
|
||||
@@ -383,7 +383,7 @@
|
||||
'S U B P R O Y E C T O S
|
||||
|
||||
Dim ObjSubProyectos As New ClsSubProyectos
|
||||
If ObjSubProyectos.GetSubProyectos Then Application("GlobalDTSubProyectos") = ObjSubProyectos.DtResultados Else Application("GlobalDTSubProyectos") = Nothing
|
||||
'If ObjSubProyectos.GetSubProyectos Then Application("GlobalDTSubProyectos") = ObjSubProyectos.DtResultados Else Application("GlobalDTSubProyectos") = Nothing
|
||||
If ObjSubProyectos.GetSubProyectosUsuarios Then
|
||||
Application("GlobalDTProyectosUsuarios") = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"})
|
||||
Application("GlobalDTSubProyectosUsuarios") = ObjSubProyectos.DtResultados
|
||||
@@ -413,40 +413,40 @@
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'P R O D U C T O S S E R V I C I O S
|
||||
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSAlias(-1, -1) Then Application("GlobalDTProductosServiciosAlias") = ObjPS.DtResultados Else Application("GlobalDTProductosServiciosAlias") = Nothing
|
||||
If ObjPS.GetPSEquivalencias(-1, -1) Then Application("GlobalDTProductosServiciosEquivalencias") = ObjPS.DtResultados Else Application("GlobalDTProductosServiciosEquivalencias") = Nothing
|
||||
'If ObjPS.GetPS(-1, -1, -1) Then Application("GlobalDTProductosServicios") = ObjPS.DtResultados.AsEnumerable() Else Application("GlobalDTProductosServicios") = Nothing
|
||||
If ObjPS.GetMetodosInv() Then Application("GlobalDTInvMetodosInventario") = ObjPS.DtResultados Else Application("GlobalDTInvMetodosInventario") = Nothing
|
||||
If ObjPS.GetPSSimplificado(-1) Then Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable() Else Application("GlobalDTPSSimplificado") = Nothing
|
||||
If ObjPS.GetPSAdicionales(-1, -1) Then Application("GlobalDTPSAdicionales") = ObjPS.DtResultados Else Application("GlobalDTPSAdicionales") = Nothing
|
||||
ObjPS.Dispose()
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'P R O V E E D O R E S
|
||||
|
||||
Dim ObjProveedores As New ClsCompProveedores
|
||||
If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, -1) Then Application("GlobalDTCompProveedores") = ObjProveedores.DtResultados Else Application("GlobalDTCompProveedores") = Nothing
|
||||
If ObjProveedores.GetProveedorClasificacion(-1) Then Application("GlobalDTProveedorClasificacion") = ObjProveedores.DtResultados Else Application("GlobalDTProveedorClasificacion") = Nothing
|
||||
If ObjProveedores.GetSucursales(-1) Then Application("GlobalDTProveedorSucursales") = ObjProveedores.DtResultados Else Application("GlobalDTProveedorSucursales") = Nothing
|
||||
ObjProveedores.Dispose()
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'P R O V E E D O R E S C U E N T A S
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
'If ObjPS.GetPSAlias(-1, -1) Then Application("GlobalDTProductosServiciosAlias") = ObjPS.DtResultados Else Application("GlobalDTProductosServiciosAlias") = Nothing
|
||||
'If ObjPS.GetPSEquivalencias(-1, -1) Then Application("GlobalDTProductosServiciosEquivalencias") = ObjPS.DtResultados Else Application("GlobalDTProductosServiciosEquivalencias") = Nothing
|
||||
'If ObjPS.GetPS(-1, -1, -1) Then Application("GlobalDTProductosServicios") = ObjPS.DtResultados.AsEnumerable() Else Application("GlobalDTProductosServicios") = Nothing
|
||||
If ObjPS.GetMetodosInv() Then Application("GlobalDTInvMetodosInventario") = ObjPS.DtResultados Else Application("GlobalDTInvMetodosInventario") = Nothing
|
||||
'If ObjPS.GetPSSimplificado(-1) Then Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable() Else Application("GlobalDTPSSimplificado") = Nothing
|
||||
'If ObjPS.GetPSAdicionales(-1, -1) Then Application("GlobalDTPSAdicionales") = ObjPS.DtResultados Else Application("GlobalDTPSAdicionales") = Nothing
|
||||
ObjPS.Dispose()
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'P R O V E E D O R E S
|
||||
|
||||
'Dim ObjProveedores As New ClsCompProveedores
|
||||
'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, -1) Then Application("GlobalDTCompProveedores") = ObjProveedores.DtResultados Else Application("GlobalDTCompProveedores") = Nothing
|
||||
'If ObjProveedores.GetProveedorClasificacion(-1) Then Application("GlobalDTProveedorClasificacion") = ObjProveedores.DtResultados Else Application("GlobalDTProveedorClasificacion") = Nothing
|
||||
'If ObjProveedores.GetSucursales(-1, -1) Then Application("GlobalDTProveedorSucursales") = ObjProveedores.DtResultados Else Application("GlobalDTProveedorSucursales") = Nothing
|
||||
'ObjProveedores.Dispose()
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'P R O V E E D O R E S C U E N T A S
|
||||
Dim ObjProveedoresBancos As New ClsGenerales
|
||||
If ObjProveedoresBancos.GetCuentasDepositos() Then Application("GlobalDTProveedoresCuentas") = ObjProveedoresBancos.DtResultados Else Application("GlobalDTProveedoresCuentas") = Nothing
|
||||
ObjProveedoresBancos.Dispose()
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'C L I E N T E S
|
||||
|
||||
Dim ObjClientes As New ClsClientes
|
||||
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus:=-1) Then Application("GlobalDTCliente") = ObjClientes.DtResultados Else Application("GlobalDTCliente") = Nothing
|
||||
If ObjClientes.GetClienteClasificacion(-1) Then Application("GlobalDTClienteClasificaciones") = ObjClientes.DtResultados Else Application("GlobalDTClienteClasificaciones") = Nothing
|
||||
ObjClientes.Dispose()
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'C O N T R A T O S
|
||||
|
||||
ObjProveedoresBancos.Dispose()
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'C L I E N T E S
|
||||
|
||||
'Dim ObjClientes As New ClsClientes
|
||||
'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus:=-1) Then Application("GlobalDTCliente") = ObjClientes.DtResultados Else Application("GlobalDTCliente") = Nothing
|
||||
'If ObjClientes.GetClienteClasificacion(-1) Then Application("GlobalDTClienteClasificaciones") = ObjClientes.DtResultados Else Application("GlobalDTClienteClasificaciones") = Nothing
|
||||
'ObjClientes.Dispose()
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'C O N T R A T O S
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratos(-1, -1) Then Application("GlobalDTContratos") = ObjContratos.DtResultados Else Application("GlobalDTContratos") = Nothing
|
||||
If ObjContratos.GetSecciones() Then Application("GlobalDTContratosSecciones") = ObjContratos.DtResultados Else Application("GlobalDTContratosSecciones") = Nothing
|
||||
@@ -565,25 +565,25 @@
|
||||
System.Web.UI.ValidationSettings.UnobtrusiveValidationMode = UnobtrusiveValidationMode.None
|
||||
|
||||
Dim EmpresaNotificaciones As New Empresa With {.SendMail = "signotificaciones@adssistemas.mx", .SendMailPassword = "sig123987", .SendMailServer = "mail.adssistemas.mx", .SendMailPuerto = 587}
|
||||
ClsPaginas.EmpresaNotificaciones = EmpresaNotificaciones
|
||||
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'I M P U E S T O S L O C A L E S
|
||||
|
||||
Dim ObjPSImpuestos As New ClsProductosServicios
|
||||
If ObjPSImpuestos.GetPSImpuestosLocales(-1, -1) Then
|
||||
If ObjPSImpuestos.DtResultados.Rows.Count > 0 Then
|
||||
Application("GlobalDTImpuestosLocales") = ObjPSImpuestos.DtResultados
|
||||
Else
|
||||
Application("GlobalDTImpuestosLocales") = Nothing
|
||||
End If
|
||||
End If
|
||||
ObjPSImpuestos.Dispose()
|
||||
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
' R A S T R E O
|
||||
ClsPaginas.EmpresaNotificaciones = EmpresaNotificaciones
|
||||
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'I M P U E S T O S L O C A L E S
|
||||
|
||||
'Dim ObjPSImpuestos As New ClsProductosServicios
|
||||
'If ObjPSImpuestos.GetPSImpuestosLocales(-1, -1) Then
|
||||
' If ObjPSImpuestos.DtResultados.Rows.Count > 0 Then
|
||||
' Application("GlobalDTImpuestosLocales") = ObjPSImpuestos.DtResultados
|
||||
' Else
|
||||
' Application("GlobalDTImpuestosLocales") = Nothing
|
||||
' End If
|
||||
'End If
|
||||
'ObjPSImpuestos.Dispose()
|
||||
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
' R A S T R E O
|
||||
Dim ObjGPS As New ClsGPS
|
||||
If ObjGPS.DispositivosGet(-1, -1, -1, -1) Then
|
||||
If ObjGPS.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
@@ -264,7 +264,7 @@ Partial Class Inventarios_Apartados
|
||||
End If
|
||||
|
||||
DdlUnidad.Items.Clear()
|
||||
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero, -1)
|
||||
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
DdlUnidad.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
|
||||
@@ -1462,7 +1462,7 @@ Partial Class Inventarios_Consignaciones
|
||||
'End If
|
||||
End If
|
||||
Dim dtpse As DataTable
|
||||
dtpse = GlobalDTProductosServiciosEquivalencias(DdlProducto.SelectedValue.ToEntero, -1)
|
||||
dtpse = GlobalDTProductosServiciosEquivalencias(DdlProducto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
'dtpse.Columns("UM").ColumnName = "UnidadMedida"
|
||||
'dtpse.Columns("CveUM").ColumnName = "CveUnidadMedida"
|
||||
DdlUnidad.DataSource = dtpse
|
||||
|
||||
@@ -2154,7 +2154,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
|
||||
DdlUnidad.Items.Clear()
|
||||
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero, -1)
|
||||
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
DdlUnidad.DataBind()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
@@ -162,7 +162,7 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
Protected Sub ddlProducto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlProducto2.selectedindexchange
|
||||
DdlUnidadMedida.Items.Clear()
|
||||
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(ddlProducto2.SelectedValue.ToEntero, -1)
|
||||
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(ddlProducto2.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
DdlUnidadMedida.DataBind()
|
||||
DdlUnidadMedida.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ Partial Class Inventarios_KardexAlmacen
|
||||
Protected Sub ddlProducto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlProducto2.selectedindexchange
|
||||
|
||||
DdlUnidadMedida.Items.Clear()
|
||||
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(ddlProducto2.SelectedValue.ToEntero, -1)
|
||||
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(ddlProducto2.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
DdlUnidadMedida.DataBind()
|
||||
DdlUnidadMedida.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ Partial Class Inventarios_KardexAlmacen
|
||||
Protected Sub ddlProducto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlProducto2.selectedindexchange
|
||||
|
||||
DdlUnidadMedida.Items.Clear()
|
||||
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(ddlProducto2.SelectedValue.ToEntero, -1)
|
||||
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(ddlProducto2.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
DdlUnidadMedida.DataBind()
|
||||
DdlUnidadMedida.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
@@ -1283,7 +1283,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
EscondeColumnasGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
||||
|
||||
DdlUnidad.Items.Clear()
|
||||
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero, -1)
|
||||
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
DdlUnidad.DataBind()
|
||||
|
||||
HdnCveTamaño.Value = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTamaño", $"CvePS = { DdlProducto2.SelectedValue.ToEntero }")
|
||||
|
||||
@@ -367,7 +367,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
'End If
|
||||
|
||||
DdlUnidad.Items.Clear()
|
||||
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero, -1)
|
||||
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
DdlUnidad.DataBind()
|
||||
UPDatos.Update()
|
||||
|
||||
|
||||
@@ -749,6 +749,10 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim CveMovimientoEntrada = 0
|
||||
Dim IDPoliza As Integer = 0
|
||||
Dim FolioSalida = 0
|
||||
Dim CveMovimientoVirtualEntrada As Integer = 0
|
||||
Dim CveMovimientoVirtualSalida As Integer = 0
|
||||
Dim FolioVirtualEntrada As Integer = 0
|
||||
Dim FolioVirtualSalida As Integer = 0
|
||||
Dim FolioEntrada = 0
|
||||
Dim AlmacenEntrada = -1
|
||||
Dim Fecha As Date = TxtFecha.Text.ToDate
|
||||
@@ -790,9 +794,38 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
Cont += 1
|
||||
Next
|
||||
End If
|
||||
|
||||
'AGREGAMOS LA ENTRADA
|
||||
End If
|
||||
|
||||
|
||||
'VIRTUAL SALIDA
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenOrigen.SelectedValue}").ToEntero()
|
||||
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 24).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||
|
||||
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 3, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V")
|
||||
FolioVirtualSalida = ObjInventario.Folio
|
||||
Dim dtvirtual As DataTable = Nothing
|
||||
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
dtvirtual = ObjInventario.DtResultados
|
||||
For Each RowVirtual As DataRow In dtvirtual.Rows
|
||||
Dim CvePS = RowVirtual("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Double = RowVirtual("Cantidad").ToString().ToDouble()
|
||||
Dim PU As Double = RowVirtual("PU").ToString().ToDouble()
|
||||
Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualSalida, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'AGREGAMOS LA ENTRADA
|
||||
If Not ChkTransitorio.Checked Then 'SI NO ES TRANSITORIO SE HACE LA RECEPCION DE INMEDIATO
|
||||
If Not ErrorMovInv Then
|
||||
Dim TipoMovimientoEntrada = 9
|
||||
@@ -826,7 +859,35 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Cont += 1
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
'VIRTUAL ENTRADA
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenDestino.SelectedValue}").ToEntero()
|
||||
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen =24 AND CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||
|
||||
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtual, 2, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/S")
|
||||
FolioVirtualEntrada = ObjInventario.Folio
|
||||
Dim dtvirtual As DataTable = Nothing
|
||||
|
||||
If CveMovimientoVirtualEntrada > 0 AndAlso ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then
|
||||
dtvirtual = ObjInventario.DtResultados
|
||||
For Each RowVirtual As DataRow In dtvirtual.Rows
|
||||
Dim CvePS = RowVirtual("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Double = RowVirtual("Cantidad").ToString().ToDouble()
|
||||
Dim PU As Double = RowVirtual("PU").ToString().ToDouble()
|
||||
Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualEntrada, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -847,10 +908,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
MensajeAlert.AppendFormat("<br/> Folio de Salida: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", FolioSalida, CveMovimientoSalida)
|
||||
MensajeAlert.AppendFormat("<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida)))
|
||||
|
||||
If CveMovimientoVirtualSalida > 0 Then MensajeAlert.AppendFormat("<br/>Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a> <a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Salida Virtual</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualSalida)), CveMovimientoVirtualSalida, FolioVirtualSalida)
|
||||
|
||||
If Not ChkTransitorio.Checked Then
|
||||
MensajeAlert.AppendFormat("<br/> Folio de Entrada: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", FolioEntrada, CveMovimientoEntrada)
|
||||
MensajeAlert.AppendFormat("<br/><br/> Folio de Entrada: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", FolioEntrada, CveMovimientoEntrada)
|
||||
MensajeAlert.AppendFormat("<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada)))
|
||||
If CveMovimientoVirtualEntrada > 0 Then MensajeAlert.AppendFormat("<br/>Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a> <a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Entrada Virtual</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualEntrada)), CveMovimientoVirtualEntrada, FolioVirtualEntrada)
|
||||
|
||||
End If
|
||||
|
||||
'DdlClasificacion.SelectedValue = "-1"
|
||||
@@ -965,10 +1029,8 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
Mensaje.AppendFormat("<br/> Folio: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", FolioMov, CveMovimiento)
|
||||
|
||||
Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)
|
||||
|
||||
|
||||
|
||||
Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)
|
||||
|
||||
LimpiaMovimiento()
|
||||
|
||||
Else
|
||||
@@ -1068,7 +1130,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
|
||||
DdlUnidad.Items.Clear()
|
||||
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero, -1)
|
||||
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
DdlUnidad.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
@@ -1544,6 +1606,37 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Cont += 1
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'VIRTUAL ENTRADA
|
||||
Dim CveMovimientoVirtualEntrada As Integer = 0
|
||||
Dim FolioVirtualEntrada As Integer = 0
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenDestino.SelectedValue}").ToEntero()
|
||||
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen =24 AND CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||
|
||||
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtual, 2, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/S")
|
||||
FolioVirtualEntrada = ObjInventario.Folio
|
||||
Dim dtvirtual As DataTable = Nothing
|
||||
|
||||
If CveMovimientoVirtualEntrada > 0 AndAlso ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then
|
||||
dtvirtual = ObjInventario.DtResultados
|
||||
For Each RowVirtual As DataRow In dtvirtual.Rows
|
||||
Dim CvePS = RowVirtual("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Double = RowVirtual("Cantidad").ToString().ToDouble()
|
||||
Dim PU As Double = RowVirtual("PU").ToString().ToDouble()
|
||||
Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualEntrada, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
''AGREGAMOS LA ENTRADA
|
||||
@@ -1619,6 +1712,8 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim Mensaje As StringBuilder = New StringBuilder
|
||||
Mensaje.AppendFormat("Se realizo correctamente la recepción. <br/> Folio de Entrada: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", Folio, CveMovimientoSalida)
|
||||
Mensaje.AppendFormat("<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida))) 'onclick='ImprimirTraslado()'
|
||||
If CveMovimientoVirtualEntrada > 0 Then Mensaje.AppendFormat("<br/><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualEntrada)), CveMovimientoVirtualEntrada, FolioVirtualEntrada) 'onclick='ImprimirTraslado()'
|
||||
|
||||
|
||||
Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)
|
||||
|
||||
|
||||
@@ -155,19 +155,19 @@
|
||||
|
||||
<asp:GridView ID="GvConceptos" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-hover Widthall GvConceptos"
|
||||
Style="text-align: center;" GridLines="None" OnRowDataBound="GvConceptos_RowDataBound"
|
||||
DataKeyNames="Concepto,CveConcepto,Importe,Estatus,ConceptoD,CveConceptoD,ImporteD,EstatusD">
|
||||
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,EstatusP,ConceptoD,CveConceptoD,ImporteD,EstatusD">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlConcepto" runat="server" Text='<%# Eval("Concepto") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkConcepto" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("Concepto") %>'></asp:LinkButton>
|
||||
<asp:Label ID="LtlConcepto" runat="server" Text='<%# Eval("ConceptoP") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkConcepto" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoP") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="37%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("Importe", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("Importe", "${0:N}") %>'></asp:LinkButton>
|
||||
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -8,6 +8,32 @@ using System.Web.UI.WebControls;
|
||||
|
||||
partial class Nomina_Finiquito : ClsPaginas
|
||||
{
|
||||
private class NConcepto
|
||||
{
|
||||
//Concepto,CveConcepto,Importe,Estatus,ConceptoD,CveConceptoD,ImporteD,EstatusD
|
||||
|
||||
|
||||
|
||||
public string NoConceptoP { get; set; }
|
||||
public string ConceptoP { get; set; }
|
||||
public string LabelValorP { get; set; }
|
||||
public int CveConceptoP { get; set; }
|
||||
public double ImporteP { get; set; }
|
||||
public double ValorP { get; set; }
|
||||
public int EstatusP { get; set; }
|
||||
public bool isEditedP { get; set; }
|
||||
|
||||
|
||||
public string NoConceptoD { get; set; }
|
||||
public string ConceptoD { get; set; }
|
||||
public string LabelValorD { get; set; }
|
||||
public int CveConceptoD { get; set; }
|
||||
public double ImporteD { get; set; }
|
||||
public double ValorD { get; set; }
|
||||
public int EstatusD { get; set; }
|
||||
public bool isEditedD { get; set; }
|
||||
}
|
||||
|
||||
private class ConceptosPersonal
|
||||
{
|
||||
public ConceptosPersonal()
|
||||
@@ -270,9 +296,57 @@ partial class Nomina_Finiquito : ClsPaginas
|
||||
TxtPrimaPagada.Text = $"{finrow["PrimaPagada"]}";
|
||||
TxtPrimaPorPagar.Text = $"{finrow["PrimaVacacionalPorPagar"]}";
|
||||
}
|
||||
if (ObjNom.DTSetResultados.Tables.Count > 5)
|
||||
{
|
||||
DataTable dtconceptos = ObjNom.DTSetResultados.Tables[1];
|
||||
DataTable dtconpersonal = ObjNom.DTSetResultados.Tables[5];
|
||||
|
||||
int maxFila = dtconpersonal.MAX("Fila", "Tipo<3").ToEntero();
|
||||
List<NConcepto> lfin = new List<NConcepto>();
|
||||
|
||||
if (maxFila > 0)
|
||||
{
|
||||
DataRow conPerrow;
|
||||
DataRow conrow;
|
||||
NConcepto sr;
|
||||
|
||||
for (int i = 1; i <= maxFila; i++)
|
||||
{
|
||||
sr = new NConcepto();
|
||||
conPerrow = dtconpersonal.FiltroPrimero(string.Format("Tipo=1 AND Fila ={0}", i));
|
||||
if (conPerrow != null)
|
||||
{
|
||||
sr.CveConceptoP = conPerrow["CveConcepto"].ToString().ToEntero();
|
||||
conrow = dtconceptos.FiltroPrimero(string.Format("CveConcepto ={0}", sr.CveConceptoP));
|
||||
sr.ConceptoP = conrow["Concepto"].ToString();
|
||||
sr.ValorP = conPerrow["Valor"].ToString().ToDouble();
|
||||
sr.ImporteP = conPerrow["Importe"].ToString().ToDouble();
|
||||
sr.NoConceptoP = conrow["Codigo"].ToString();
|
||||
}
|
||||
|
||||
|
||||
conPerrow = dtconpersonal.FiltroPrimero(string.Format("Tipo=2 AND Fila ={0}", i));
|
||||
if (conPerrow != null)
|
||||
{
|
||||
sr.CveConceptoD = conPerrow["CveConcepto"].ToString().ToEntero();
|
||||
conrow = dtconceptos.FiltroPrimero(string.Format("CveConcepto ={0}", sr.CveConceptoD));
|
||||
sr.ConceptoD = conrow["Concepto"].ToString();
|
||||
sr.ValorD= conPerrow["Valor"].ToString().ToDouble();
|
||||
sr.ImporteD = conPerrow["Importe"].ToString().ToDouble();
|
||||
sr.NoConceptoD = conrow["Codigo"].ToString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
lfin.Add(sr);
|
||||
}
|
||||
}
|
||||
GvConceptos.DataSource = lfin;
|
||||
GvConceptos.DataBind();
|
||||
}
|
||||
}
|
||||
GvConceptos.DataSource = ConceptsPersonas;
|
||||
GvConceptos.DataBind();
|
||||
//GvConceptos.DataSource = ConceptsPersonas;
|
||||
//GvConceptos.DataBind();
|
||||
}
|
||||
else
|
||||
retorno = false;
|
||||
@@ -362,11 +436,11 @@ partial class Nomina_Finiquito : ClsPaginas
|
||||
{
|
||||
// Datakeys
|
||||
// Concepto,CveConcepto,Importe,Estatus,ConceptoD,CveConceptoD,ImporteD,EstatusD
|
||||
int CveConcepto = e.Row.DataKey("CveConcepto").ToEntero();
|
||||
int CveConcepto = e.Row.DataKey("CveConceptoP").ToEntero();
|
||||
int CveConceptoD = e.Row.DataKey("CveConceptoD").ToEntero();
|
||||
// Dim Importe As Decimal = e.Row.DataKey("Importe").ToDecimal()
|
||||
// Dim ImporteD As Decimal = e.Row.DataKey("ImporteD").ToDecimal()
|
||||
int Estatus = e.Row.DataKey("Estatus").ToEntero();
|
||||
int Estatus = e.Row.DataKey("EstatusP").ToEntero();
|
||||
int EstatusD = e.Row.DataKey("EstatusD").ToEntero();
|
||||
|
||||
// Controles
|
||||
|
||||
@@ -7315,11 +7315,12 @@ Partial Class OC
|
||||
RecargaPSGlobal()
|
||||
End Sub
|
||||
Private Sub RecargaPSGlobal()
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing
|
||||
'Dim ObjPS As New ClsProductosServicios
|
||||
|
||||
If ObjPS.GetPSSimplificado(-1) Then Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable()
|
||||
'If ObjPS.GetPSSimplificado(-1) Then Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable()
|
||||
|
||||
ObjPS.Dispose()
|
||||
'ObjPS.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
@@ -2313,7 +2313,7 @@ Partial Class Ventas_PortalCliente
|
||||
If drPS IsNot Nothing Then
|
||||
DdlUM.Items.Clear()
|
||||
If UsuarioActual.Empresa.UsaInventarios Then
|
||||
DdlUM.DataSource = GlobalDTProductosServiciosEquivalencias(DdlPS.SelectedValue.ToEntero, -1)
|
||||
DdlUM.DataSource = GlobalDTProductosServiciosEquivalencias(DdlPS.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
Else
|
||||
DdlUM.DataSource = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
|
||||
@@ -220,9 +220,10 @@ Partial Class Sistemas_CatSesiones
|
||||
|
||||
|
||||
Private Sub CargaProductosServiciosSimplificado()
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSSimplificado(-1) Then Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable() Else Application("GlobalDTPSSimplificado") = Nothing
|
||||
ObjPS.Dispose()
|
||||
GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing
|
||||
'Dim ObjPS As New ClsProductosServicios
|
||||
'If ObjPS.GetPSSimplificado(-1) Then Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable() Else Application("GlobalDTPSSimplificado") = Nothing
|
||||
'ObjPS.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
@@ -1615,6 +1615,8 @@ Partial Class PV
|
||||
If (Boolean.Parse(ObjCliente.DtResultados(0)("EsDistribuidor").ToString)) Then
|
||||
TrEsDistribuidor.Visible = True
|
||||
LbVendedor.Text = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Vendedor", $"CveVendedor = {ObjCliente.Vendedor}")
|
||||
Else
|
||||
TrEsDistribuidor.Visible = False
|
||||
End If
|
||||
|
||||
ViewState("CliNoExt") = ObjCliente.NoExt
|
||||
@@ -1643,8 +1645,14 @@ Partial Class PV
|
||||
End If
|
||||
|
||||
If CveVenta <= 0 Then
|
||||
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero
|
||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI.ToString)
|
||||
DdlMetodoPago.SelectedValueExist(ObjCliente.CveMetodoPago.ToString)
|
||||
DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
|
||||
DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty)
|
||||
|
||||
DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
|
||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
|
||||
End If
|
||||
TxtFechaPago.Text = (Now.AddDays(ObjCliente.PlazoCobranza)).ToShortDateString
|
||||
|
||||
@@ -1969,7 +1977,7 @@ Partial Class PV
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Alert("No se pudo verificar la fecha del certificado", TipoMensaje.MsgError)
|
||||
Alert("No se pudo verificar la fecha del certificado", TipoMensaje.ToastError)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -2800,7 +2808,7 @@ Partial Class PV
|
||||
|
||||
DdlUnidadMedida.Items.Clear()
|
||||
If UsuarioActual.Empresa.UsaInventarios Then
|
||||
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(CvePSParametro, -1)
|
||||
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(CvePSParametro, -1, UsuarioActual.CveEmpresa)
|
||||
Else
|
||||
DdlUnidadMedida.DataSource = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
@@ -4890,17 +4898,19 @@ Partial Class PV
|
||||
Hilo.Start()
|
||||
End Sub
|
||||
Private Sub GeneraGlobalDT()
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa) = Nothing
|
||||
GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing
|
||||
'Dim ObjPS As New ClsProductosServicios
|
||||
|
||||
If (ObjPS.GetPSSimplificado(-1)) Then
|
||||
Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable 'Cargamos el GlobalDTPSSimplificado
|
||||
End If
|
||||
'If (ObjPS.GetPSSimplificado(-1)) Then
|
||||
' Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable 'Cargamos el GlobalDTPSSimplificado
|
||||
'End If
|
||||
|
||||
If ObjPS.GetPSEquivalencias(-1, -1) Then
|
||||
GlobalDTProductosServiciosEquivalencias(-1, -1) = ObjPS.DtResultados
|
||||
End If
|
||||
'If ObjPS.GetPSEquivalencias(-1, -1) Then
|
||||
' GlobalDTProductosServiciosEquivalencias(-1, -1) = ObjPS.DtResultados
|
||||
'End If
|
||||
|
||||
ObjPS.Dispose()
|
||||
'ObjPS.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub RecargaGlobalCliente()
|
||||
@@ -5020,8 +5030,6 @@ Partial Class PV
|
||||
GvRecepcionUsados.DataBind()
|
||||
GvRecepcionUsadosModal.DataBind()
|
||||
|
||||
CargaPSAjuste()
|
||||
|
||||
CreaDTmpDTAjustes()
|
||||
CreaDTmpDTRecepcionUsados()
|
||||
CargaBCIAjuste()
|
||||
@@ -5216,10 +5224,11 @@ Partial Class PV
|
||||
|
||||
Private Sub CalculaPorcentajeAjuste()
|
||||
If DdlPS.SelectedValue.ToEntero <= 0 Then
|
||||
'Alert("No se ha especificado producto a entregar")
|
||||
Alert("No se ha especificado producto a entregar")
|
||||
Exit Sub
|
||||
End If
|
||||
Try
|
||||
TxtImporteAjuste.Text = "0.00"
|
||||
If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" AndAlso DdlPS.SelectedValue.ToEntero > 0 Then
|
||||
Dim CveMarca As Integer = -1
|
||||
|
||||
@@ -5267,10 +5276,13 @@ Partial Class PV
|
||||
TxtImporteAjuste.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero
|
||||
|
||||
Else
|
||||
Alert("El producto no tiene ajuste en ese periodo", TipoMensaje.MsgAdvertencia)
|
||||
'cuando no está registrada, no da ajuste
|
||||
TxtImporteAjuste.ToolTip = "El producto no tiene ajuste en ese periodo"
|
||||
TxtImporteAjuste.Text = "0.00"
|
||||
End If
|
||||
Else
|
||||
Alert("No se tiene especificado tabla de garantía")
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
End If
|
||||
@@ -5430,8 +5442,8 @@ Partial Class PV
|
||||
Protected Sub DdlFolioGarantia_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlFolioGarantia.SelectedIndexChanged
|
||||
Dim ObjAcumuladores As New ClsAcumuladores
|
||||
If ObjAcumuladores.GetNuevoConsecutivoFolio(DdlFolioGarantia.SelectedValue.ToEntero) Then
|
||||
Dim resultado As String = ObjAcumuladores.DtResultados.FiltroPrimeroValor("NuevoConsecutivo")
|
||||
TxtConsecutivoAjuste.Text = resultado
|
||||
Dim resultado As Integer = ObjAcumuladores.DtResultados.FiltroPrimeroValor("NuevoConsecutivo").ToEntero
|
||||
TxtConsecutivoAjuste.Text = resultado.ToString
|
||||
UpAjuste.Update()
|
||||
End If
|
||||
ObjAcumuladores.Dispose()
|
||||
|
||||
@@ -1009,7 +1009,7 @@ Partial Class ProductosyServicios
|
||||
End Sub
|
||||
Private Sub ElProductoChange()
|
||||
ddlUnidad.Items.Clear()
|
||||
ddlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProductows.SelectedValue.ToEntero, -1)
|
||||
ddlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProductows.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
ddlUnidad.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
@@ -1301,7 +1301,7 @@ Partial Class ProductosyServicios
|
||||
RecargaGlobal()
|
||||
End Sub
|
||||
Protected Sub HFProducto_ValueChanged(sender As Object, e As EventArgs) Handles HFProducto.ValueChanged
|
||||
ddlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(HFProducto.Value.ToEntero, -1)
|
||||
ddlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(HFProducto.Value.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
ddlUnidad.DataBind()
|
||||
End Sub
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
@@ -1330,27 +1330,34 @@ Partial Class ProductosyServicios
|
||||
Hilo.Start()
|
||||
End Sub
|
||||
Private Sub GeneraGlobalDT()
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
GlobalDTPSAdicionales(-1, UsuarioActual.CveEmpresa) = Nothing
|
||||
GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing
|
||||
GlobalDTProductosServiciosAlias(UsuarioActual.CveEmpresa) = Nothing
|
||||
GlobalDTImpuestosLocales(-1, UsuarioActual.CveEmpresa) = Nothing
|
||||
GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa) = Nothing
|
||||
GlobalDTPSAdicionales(-1, UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
If ObjPS.GetPSSimplificado(-1) Then Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable()
|
||||
'Dim ObjPS As New ClsProductosServicios
|
||||
|
||||
If ObjPS.GetPSAlias(-1, -1) Then
|
||||
GlobalDTProductosServiciosAlias(-1) = ObjPS.DtResultados
|
||||
End If
|
||||
'If ObjPS.GetPSSimplificado(-1) Then Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable()
|
||||
|
||||
If ObjPS.GetPSImpuestosLocales(-1, -1) Then
|
||||
GlobalDTImpuestosLocales(-1, -1) = ObjPS.DtResultados
|
||||
End If
|
||||
'If ObjPS.GetPSAlias(-1, -1) Then
|
||||
' GlobalDTProductosServiciosAlias(-1) = ObjPS.DtResultados
|
||||
'End If
|
||||
|
||||
If ObjPS.GetPSEquivalencias(-1, -1) Then
|
||||
GlobalDTProductosServiciosEquivalencias(-1, -1) = ObjPS.DtResultados
|
||||
End If
|
||||
'If ObjPS.GetPSImpuestosLocales(-1, -1) Then
|
||||
' GlobalDTImpuestosLocales(-1, -1) = ObjPS.DtResultados
|
||||
'End If
|
||||
|
||||
If ObjPS.GetPSAdicionales(-1, -1) Then
|
||||
GlobalDTPSAdicionales(-1, -1) = ObjPS.DtResultados
|
||||
End If
|
||||
'If ObjPS.GetPSEquivalencias(-1, -1) Then
|
||||
' GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa) = ObjPS.DtResultados
|
||||
'End If
|
||||
|
||||
ObjPS.Dispose()
|
||||
''If ObjPS.GetPSAdicionales(-1, -1) Then
|
||||
'' GlobalDTPSAdicionales(-1, -1) = ObjPS.DtResultados
|
||||
''End If
|
||||
|
||||
'ObjPS.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -1398,11 +1405,12 @@ Partial Class ProductosyServicios
|
||||
Hilo.Start()
|
||||
End Sub
|
||||
Private Sub GeneraGlobalEquivalencias()
|
||||
Dim ObjPS = New ClsProductosServicios
|
||||
If ObjPS.GetPSEquivalencias(-1, -1) Then
|
||||
GlobalDTProductosServiciosEquivalencias(-1, -1) = ObjPS.DtResultados
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa) = Nothing
|
||||
'Dim ObjPS = New ClsProductosServicios
|
||||
'If ObjPS.GetPSEquivalencias(-1, -1) Then
|
||||
' GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa) = ObjPS.DtResultados
|
||||
'End If
|
||||
'ObjPS.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGvEquivalencias()
|
||||
If DtEquivalencias IsNot Nothing Then
|
||||
|
||||
@@ -5337,7 +5337,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<td colspan="3" style="padding:0px">
|
||||
<hr />
|
||||
</td>
|
||||
</tr>
|
||||
@@ -5347,6 +5347,9 @@
|
||||
<asp:TextBox runat="server" ID="TxtSerieLote" Width="300px" ClientIDMode="Static" />
|
||||
<asp:RequiredFieldValidator ID="RFVSerieLote" runat="server" ControlToValidate="TxtSerieLote" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie/Lote''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregaSerie"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCESerieLote" runat="server" HighlightCssClass="vco" TargetControlID="RFVSerieLote" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<td colspan="3" align="left">
|
||||
<asp:Label runat="server">Series total: </asp:Label><asp:Label runat="server" ID="lblSerieTotal">0</asp:Label>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -5778,7 +5781,7 @@
|
||||
|
||||
<%--APLICAR NC--%>
|
||||
<div id="ModalAplicarNC" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpAplicarNC" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<asp:UpdatePanel ID="UpAplicarNC" class="modal-dialog rowpadding modal-lg" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@@ -7544,8 +7547,7 @@
|
||||
}
|
||||
|
||||
var ValidarRNC = false;
|
||||
function AplicarValidarRNC(Valor)
|
||||
{
|
||||
function AplicarValidarRNC(Valor) {
|
||||
ValidarRNC = Valor;
|
||||
}
|
||||
function CompararNC() {
|
||||
@@ -7565,16 +7567,16 @@
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "#ff0000";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "#ff0000";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function CerrarModalRemNC() {
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
AplicarValidarRNC(true);
|
||||
CompararNC();
|
||||
}
|
||||
$('#ModalAplicarRemisionesNC').modal('hide');
|
||||
}
|
||||
|
||||
function CerrarModalRemNC() {
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
AplicarValidarRNC(true);
|
||||
CompararNC();
|
||||
}
|
||||
$('#ModalAplicarRemisionesNC').modal('hide');
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -5494,7 +5494,7 @@ Partial Class Ventas
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
'MODO EDICION
|
||||
|
||||
e.Row.FCDropDownList("DdlUnidadMedida").DataSource = GlobalDTProductosServiciosEquivalencias(e.Row.DBCampo("CvePS").ToEntero, -1)
|
||||
e.Row.FCDropDownList("DdlUnidadMedida").DataSource = GlobalDTProductosServiciosEquivalencias(e.Row.DBCampo("CvePS").ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
e.Row.FCDropDownList("DdlUnidadMedida").DataBind()
|
||||
e.Row.FCDropDownList("DdlUnidadMedida").SelectedValueExist(e.Row.DBCampo("CveUM"))
|
||||
|
||||
@@ -6739,12 +6739,6 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
'ENVIAR POLIZA VIRTUAL
|
||||
If ErrorList.Count = 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(576) = "1" Then
|
||||
GeneraPolizaVentaWS(ObjFactura)
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 Then
|
||||
|
||||
@@ -6847,6 +6841,14 @@ Partial Class Ventas
|
||||
If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or ObjFactura.TipoDocto.Contiene("Ped", "Cot", "DPe", "PeC", "PA", "Pd2")) Then
|
||||
ObjVentas.Commit()
|
||||
|
||||
'ENVIAR POLIZA VIRTUAL
|
||||
If ErrorList.Count = 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(576) = "1" Then
|
||||
GeneraPolizaVentaWS(ObjFactura)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'ContPAQ El movimiento 1 es el de Venta
|
||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||
|
||||
@@ -10693,7 +10695,7 @@ Partial Class Ventas
|
||||
|
||||
If UsuarioActual.CveEmpresa = 1 Then
|
||||
DtEquivalencias = New DataTable
|
||||
DtEquivalencias = GlobalDTProductosServiciosEquivalencias(CveProducto, -1)
|
||||
DtEquivalencias = GlobalDTProductosServiciosEquivalencias(CveProducto, -1, UsuarioActual.CveEmpresa)
|
||||
Dim CveUnidadBase As Integer = DtEquivalencias.FiltroPrimeroValor("CveUM", "UnidadBase = 'True'").ToEntero
|
||||
Dim drUMBase As DataRow = DtEquivalencias.FiltroPrimero("UnidadBase = 'True'")
|
||||
|
||||
@@ -13008,7 +13010,7 @@ Partial Class Ventas
|
||||
HdnPorcentajeIEPS.Value = drPS("IEPSPorcentaje").ToString
|
||||
DdlUnidadMedida.Items.Clear()
|
||||
If UsuarioActual.Empresa.UsaInventarios Then
|
||||
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(CvePSParametro, -1)
|
||||
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(CvePSParametro, -1, UsuarioActual.CveEmpresa)
|
||||
Else
|
||||
DdlUnidadMedida.DataSource = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
@@ -15248,7 +15250,7 @@ Partial Class Ventas
|
||||
Protected Sub DdlPS_SelectedIndexChanged1(sender As Object, e As EventArgs)
|
||||
Dim Ddl As DropDownList = CType(sender, DropDownList)
|
||||
Dim gvr As GridViewRow = CType(Ddl.BindingContainer, GridViewRow)
|
||||
gvr.FCDropDownList("DdlUnidadMedida").DataSource = GlobalDTProductosServiciosEquivalencias(Ddl.SelectedValue.ToEntero, -1)
|
||||
gvr.FCDropDownList("DdlUnidadMedida").DataSource = GlobalDTProductosServiciosEquivalencias(Ddl.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
gvr.FCDropDownList("DdlUnidadMedida").DataBind()
|
||||
|
||||
End Sub
|
||||
@@ -19166,17 +19168,19 @@ Partial Class Ventas
|
||||
Hilo.Start()
|
||||
End Sub
|
||||
Private Sub GeneraGlobalDT()
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa) = Nothing
|
||||
GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing
|
||||
'Dim ObjPS As New ClsProductosServicios
|
||||
|
||||
If (ObjPS.GetPSSimplificado(-1)) Then
|
||||
Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable 'Cargamos el GlobalDTPSSimplificado
|
||||
End If
|
||||
'If (ObjPS.GetPSSimplificado(-1)) Then
|
||||
' Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable 'Cargamos el GlobalDTPSSimplificado
|
||||
'End If
|
||||
|
||||
If ObjPS.GetPSEquivalencias(-1, -1) Then
|
||||
GlobalDTProductosServiciosEquivalencias(-1, -1) = ObjPS.DtResultados
|
||||
End If
|
||||
'If ObjPS.GetPSEquivalencias(-1, -1) Then
|
||||
' GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa) = ObjPS.DtResultados
|
||||
'End If
|
||||
|
||||
ObjPS.Dispose()
|
||||
'ObjPS.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -19300,7 +19304,7 @@ Partial Class Ventas
|
||||
HdnPorcentajeIEPS.Value = drPS("IEPSPorcentaje").ToString
|
||||
DdlUMPyME.Items.Clear()
|
||||
If UsuarioActual.Empresa.UsaInventarios Then
|
||||
DdlUMPyME.DataSource = GlobalDTProductosServiciosEquivalencias(DdlPSPyME.SelectedValue.ToEntero, -1)
|
||||
DdlUMPyME.DataSource = GlobalDTProductosServiciosEquivalencias(DdlPSPyME.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
Else
|
||||
DdlUMPyME.DataSource = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
@@ -19513,7 +19517,7 @@ Partial Class Ventas
|
||||
|
||||
GvSerie.DataSource = DtContratosSerieDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerieLote), "Consec DESC")
|
||||
GvSerie.DataBind()
|
||||
|
||||
lblSerieTotal.Text = GvSerie.Rows.Count.ToString
|
||||
'VALIDA QUE SIGA AGREGANDO
|
||||
If DtContratosSerieDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerieLote)).Rows.Count = LbCantidad.Text.ToEntero And LimitaCantidadSerieLote = 1 Then
|
||||
BtnAgregarPS.Enabled = False
|
||||
@@ -20906,16 +20910,16 @@ Partial Class Ventas
|
||||
InicializaDTVentasNC()
|
||||
|
||||
Dim DtImpuestos As New DataTable
|
||||
DtImpuestos.Columns.Add("ImportePU", GetType(Double))
|
||||
DtImpuestos.Columns.Add("ImporteTotal", GetType(Double))
|
||||
DtImpuestos.Columns.Add("PorcentajeIVA", GetType(Double))
|
||||
DtImpuestos.Columns.Add("ImporteIVA", GetType(Double))
|
||||
DtImpuestos.Columns.Add("PorcentajeRetIVA", GetType(Double))
|
||||
DtImpuestos.Columns.Add("ImporteRetIVA", GetType(Double))
|
||||
DtImpuestos.Columns.Add("PorcentajeRetISR", GetType(Double))
|
||||
DtImpuestos.Columns.Add("ImporteRetISR", GetType(Double))
|
||||
DtImpuestos.Columns.Add("PorcentajeIEPS", GetType(Double))
|
||||
DtImpuestos.Columns.Add("ImporteIEPS", GetType(Double))
|
||||
DtImpuestos.Columns.Add("ImportePU", GetType(Decimal))
|
||||
DtImpuestos.Columns.Add("ImporteTotal", GetType(Decimal))
|
||||
DtImpuestos.Columns.Add("PorcentajeIVA", GetType(Decimal))
|
||||
DtImpuestos.Columns.Add("ImporteIVA", GetType(Decimal))
|
||||
DtImpuestos.Columns.Add("PorcentajeRetIVA", GetType(Decimal))
|
||||
DtImpuestos.Columns.Add("ImporteRetIVA", GetType(Decimal))
|
||||
DtImpuestos.Columns.Add("PorcentajeRetISR", GetType(Decimal))
|
||||
DtImpuestos.Columns.Add("ImporteRetISR", GetType(Decimal))
|
||||
DtImpuestos.Columns.Add("PorcentajeIEPS", GetType(Decimal))
|
||||
DtImpuestos.Columns.Add("ImporteIEPS", GetType(Decimal))
|
||||
DtImpuestos.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
DtImpuestos.AcceptChanges()
|
||||
|
||||
@@ -20945,14 +20949,15 @@ Partial Class Ventas
|
||||
Into x = Group
|
||||
Select ImportePU = x.Sum(Function(s) s("ImportePU").ToString.ToDecimal),
|
||||
ImporteTotal = x.Sum(Function(s) s("ImporteTotal").ToString.ToDecimal),
|
||||
ImporteIVA = x.Sum(Function(s) s("ImporteIVA").ToString.ToDecimal),
|
||||
ImporteRetIVA = x.Sum(Function(s) s("ImporteRetIVA").ToString.ToDecimal),
|
||||
ImporteRetISR = x.Sum(Function(s) s("ImporteRetISR").ToString.ToDecimal),
|
||||
ImporteIEPS = x.Sum(Function(s) s("ImporteIEPS").ToString.ToDecimal),
|
||||
ImporteIVA = x.Sum(Function(s) Math.Round(s("ImportePU").ToString.ToDecimal, 2)) * (1 + PorcentajeIEPS) * PorcentajeIVA,
|
||||
ImporteRetIVA = x.Sum(Function(s) Math.Round(s("ImportePU").ToString.ToDecimal, 2)) * PorcentajeRetIVA,
|
||||
ImporteRetISR = x.Sum(Function(s) Math.Round(s("ImportePU").ToString.ToDecimal, 2)) * PorcentajeRetISR,
|
||||
ImporteIEPS = x.Sum(Function(s) Math.Round(s("ImportePU").ToString.ToDecimal, 2)) * PorcentajeIEPS,
|
||||
PorcentajeIVA = PorcentajeIVA,
|
||||
PorcentajeRetIVA = PorcentajeRetIVA,
|
||||
PorcentajeRetISR = PorcentajeRetISR,
|
||||
PorcentajeIEPS = PorcentajeIEPS
|
||||
'(1 + DrPS("IEPSPorcentaje").ToString.ToDecimal)
|
||||
|
||||
Dim DrSubProyecto = GlobalDTSubProyectos(-1, TmpDT.FiltroPrimeroValor("CveSubProyecto", "", "ImporteTotal DESC").ToEntero, UsuarioActual.CveEmpresa, -1).FiltroPrimero("")
|
||||
If DrSubProyecto Is Nothing Then
|
||||
@@ -21058,25 +21063,24 @@ Partial Class Ventas
|
||||
ObjVentas.Dispose()
|
||||
|
||||
Dim DtImpuestosLocal = TmpDT.FiltraParametros("", "", {"PorcentajeIVA", "PorcentajeRetIVA", "PorcentajeRetISR", "PorcentajeIEPS", "CveSubProyecto"}).Copy
|
||||
DtImpuestosLocal.Columns.Add("ImportePU", GetType(Double))
|
||||
DtImpuestosLocal.Columns.Add("ImporteTotal", GetType(Double))
|
||||
DtImpuestosLocal.Columns.Add("ImporteIVA", GetType(Double))
|
||||
DtImpuestosLocal.Columns.Add("ImporteRetIVA", GetType(Double))
|
||||
DtImpuestosLocal.Columns.Add("ImporteRetISR", GetType(Double))
|
||||
DtImpuestosLocal.Columns.Add("ImporteIEPS", GetType(Double))
|
||||
DtImpuestosLocal.Columns.Add("ImportePU", GetType(Decimal))
|
||||
DtImpuestosLocal.Columns.Add("ImporteTotal", GetType(Decimal))
|
||||
DtImpuestosLocal.Columns.Add("ImporteIVA", GetType(Decimal))
|
||||
DtImpuestosLocal.Columns.Add("ImporteRetIVA", GetType(Decimal))
|
||||
DtImpuestosLocal.Columns.Add("ImporteRetISR", GetType(Decimal))
|
||||
DtImpuestosLocal.Columns.Add("ImporteIEPS", GetType(Decimal))
|
||||
|
||||
Dim ImporteReferencia As Decimal = If(DdlNCNivelImporte.SelectedValue.ToEntero = 1, Total, SubTotal)
|
||||
Dim Porcentaje As Decimal = ((Importe * 100) / ImporteReferencia) / 100
|
||||
|
||||
Dim FiltroStr As String = ""
|
||||
For Each Dr As DataRow In DtImpuestosLocal.Rows
|
||||
Dr("ImporteTotal") = Math.Round(Porcentaje * (TmpDT.SUM("TotalImporte", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}' ") - TmpDT.SUM("Descuento", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}' ")), 2)
|
||||
' COMENTANDO POR JESUS MURUA ALIAS EL CHOLO, LO HIZO EL RAUL ARRIBA ALV ! 28/02/2018
|
||||
'Dr("ImporteTotal") = Porcentaje * TmpDT.SUM("TotalImporte", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}' ")
|
||||
FiltroStr = String.Format("ISNULL(PorcentajeIVA,0) = {0} AND ISNULL(PorcentajeRetIVA,0) = {1} AND ISNULL(PorcentajeRetISR,0) = {2} AND ISNULL(PorcentajeIEPS,0) = {3} AND ISNULL(CveSubProyecto,0) = {4} ", Dr("PorcentajeIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString.ToDecimal, Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("CveSubProyecto"))
|
||||
Dr("ImporteTotal") = Math.Round(Porcentaje * (TmpDT.SUM("TotalImporte", FiltroStr) - TmpDT.SUM("Descuento", FiltroStr)), 2)
|
||||
|
||||
Dr("ImporteIVA") = (Porcentaje * Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||
Dr("ImporteRetIVA") = (Porcentaje * Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeRetIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||
Dr("ImporteRetISR") = (Porcentaje * Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeRetISR").ToString().ToDecimal()).RoundSQL(2)
|
||||
Dr("ImporteIEPS") = (Porcentaje * Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeIEPS").ToString().ToDecimal()).RoundSQL(2)
|
||||
Dr("ImporteIVA") = (Dr("ImporteTotal").ToString().ToDecimal() * (1 + Dr("PorcentajeIEPS").ToString().ToDecimal()) * Dr("PorcentajeIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||
Dr("ImporteRetIVA") = (Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeRetIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||
Dr("ImporteRetISR") = (Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeRetISR").ToString().ToDecimal()).RoundSQL(2)
|
||||
Dr("ImporteIEPS") = (Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeIEPS").ToString().ToDecimal()).RoundSQL(2)
|
||||
|
||||
'Dr("ImporteIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIVA", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}' "), 2)
|
||||
'Dr("ImporteRetIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetIVA", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}' "), 2)
|
||||
|
||||
Reference in New Issue
Block a user