This commit is contained in:
2024-05-24 19:35:47 -07:00
17 changed files with 549 additions and 561 deletions

View File

@@ -3201,7 +3201,7 @@ Public Class ClsContratos
End Function
Public Function GetPresupuestosResumen(CveEmpresa As Integer, CveSubProyecto As Integer, Opcion As Integer) As Boolean
Public Function GetPresupuestosResumen(CveEmpresa As Integer, CveSubProyecto As Integer, FechaInicio As Date, FechaFin As Date, Opcion As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Con_PresupuestosResumenGet")
@@ -3209,6 +3209,8 @@ Public Class ClsContratos
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@Opcion", SqlDbType.Int).Value = Opcion
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
End With
Try

View File

@@ -3,8 +3,6 @@ Option Strict On
Imports System.Data
Imports System.Data.SqlClient
Imports Extensiones
Imports Microsoft.Web.XmlTransform
Imports Telerik.Web.UI.ComboBox.ComboBoxStyles
Public Class ClsInventarios
Implements IDisposable

View File

@@ -481,7 +481,7 @@ Public Class ClsSisUsuarios
Retorno.Portal = True
Retorno.Referencia = Data.Rows(0)("Referencia").ToString
Retorno.EsSupervisorRH = If(Data.Rows(0)("EsSupervisorRH").ToString = "1", True, False)
'Retorno.Liga = Data.Rows(0)("Liga").ToString
Retorno.RutaDB = ConnStr
'cargo los modulos del usuario y genero el menú
Dim dttmp As DataTable = GetUsuariosRolesModulos(Retorno.CveUsuario, Retorno.CveCliente)
@@ -538,7 +538,7 @@ Public Class ClsSisUsuarios
Retorno.Portal = True
Retorno.Referencia = Data.Rows(0)("Referencia").ToString
Retorno.EsSupervisorRH = If(Data.Rows(0)("EsSupervisorRH").ToString = "1", True, False)
'Retorno.Liga = Data.Rows(0)("Liga").ToString
Retorno.RutaDB = ConnStr
'cargo los modulos del usuario y genero el menú
Dim dttmp As DataTable = GetUsuariosRolesModulos(Retorno.CveUsuario, Retorno.CveProveedor)

View File

@@ -1977,14 +1977,14 @@ Public Class ClsVentas
Return Retorno
End Function
Public Function GetRepPSEcono(CveSubProyecto As Integer, CvePS As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional GPO As Integer = -1,
Public Function GetRepPSEcono(CveSubProyectos As String, CvePS As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional GPO As Integer = -1,
Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0,
Optional Clasificacion As String = "-1", Optional Linea As String = "-1", Optional Marca As String = "-1", Optional orden As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_RepPSEconoGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveSubProyectos", SqlDbType.VarChar).Value = CveSubProyectos
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF

View File

@@ -930,19 +930,23 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Dim CveAlmacen = IfNull(context.Request("cvealmacen"), "-1").ToString.ToEntero
Dim UsaGlobal As Boolean = True
Dim MostrarTodosAlmacenes As Boolean = False
Dim MostrarTodosAlmacenes As Boolean = True
'verifica existencias
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso usuario.Empresa.Funcionalidad(141) = "1" Then
UsaGlobal = False
If usuario.CveEmpresa = 119 Then MostrarTodosAlmacenes = False
'If (usuario.Empresa.Funcionalidad(558) = "1") AndAlso Pagina.Contiene("ventas/ventas") Then
' MostrarTodosAlmacenes = True
'End If
If (usuario.Empresa.Funcionalidad(558) = "1") AndAlso Pagina.Contiene("ventas/ventas") Then
MostrarTodosAlmacenes = True
End If
'If (usuario.Empresa.Funcionalidad(578) = "1") AndAlso Pagina.Contiene("ventas/ventas") Then 'sms
' MostrarTodosAlmacenes = True
'End If
If (usuario.Empresa.Funcionalidad(578) = "1") AndAlso Pagina.Contiene("ventas/ventas") Then 'sms
MostrarTodosAlmacenes = True
End If
'If (usuario.Empresa.CveEmpresa.Contiene(189, 193, 195, 197)) AndAlso Pagina.Contiene("ventas/ventas") Then 'sms
' MostrarTodosAlmacenes = True
'End If
Dim objInv As New ClsInventarios
Try

View File

@@ -27,7 +27,7 @@
</ContentTemplate>
</asp:UpdatePanel>
<li>
<asp:HyperLink ID="HpLPrePoliza" NavigateUrl="#" runat="server" Visible="false" Style="color: #686868;"><i class="" style="color:#686868;"></i> PrePoliza</asp:HyperLink>
<asp:HyperLink ID="HpLPrePoliza" NavigateUrl="#" runat="server" Visible="false" Style="color: #686868;"><i class="" style="color:#686868;"></i> Póliza</asp:HyperLink>
</li>
<asp:UpdatePanel ID="UppEliminarIE" runat="server" UpdateMode="Conditional">
<ContentTemplate>

View File

@@ -55,11 +55,10 @@
<asp:GridView ID="GvS" runat="server" AutoGenerateColumns="False" ShowFooter="True" EmptyDataText="No se encontraron Cuentas X Pagar Pendientes" CssClass="table table-striped table-hover Widthall" GridLines="None">
<Columns>
<asp:BoundField ItemStyle-Width="5%" ItemStyle-CssClass="Texto" DataField="NumCuenta" HeaderText="Cuenta" Visible="false"></asp:BoundField>
<asp:HyperLinkField ItemStyle-Width="5%" ItemStyle-CssClass="Texto" DataTextField="TipoTransaccionAbrev" HeaderText="Tipo" DataNavigateUrlFormatString="IE.aspx?CveIE={0}" DataNavigateUrlFields="CveIE"></asp:HyperLinkField>
<asp:HyperLinkField ItemStyle-Width="5%" ItemStyle-CssClass="Texto" DataTextField="Folio" HeaderText="Folio" DataNavigateUrlFormatString="IE.aspx?CveIE={0}" DataNavigateUrlFields="CveIE"></asp:HyperLinkField>
<asp:BoundField ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" DataField="FechaDocumento" DataFormatString="{0:d}" HeaderText="Fecha"></asp:BoundField>
<asp:BoundField ItemStyle-Width="15%" ItemStyle-CssClass="Texto" DataField="TipoTransaccion" HeaderText="Tipo" ></asp:BoundField>
<asp:BoundField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" DataField="FechaDocumento" DataFormatString="{0:d}" HeaderText="Fecha"></asp:BoundField>
<asp:BoundField ItemStyle-Width="15%" DataField="PagueseA" HeaderText="Beneficiario/Pagador" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField ItemStyle-Width="15%" DataField="Observaciones" HeaderText="Observaciones" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" DataField="EstatusIE" HeaderText="Estatus"></asp:BoundField>

View File

@@ -3549,10 +3549,21 @@ Partial Class Compras_Compras
ViewState("CveProveedor") = ObjProveedor.CveProveedor
HdnCveProveedor.Value = ObjProveedor.CveProveedor.ToString
TxtFechaPago.Text = (TxtFecha.Text.ToDate.AddDays(LblDiasCredito.Text.ToEntero)).ToShortDateString
RFCProveedor = ObjProveedor.RFC
'comentado RMF.2024.05.21. en anticipos parciales, está bloquenado
'If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 Then
CveRegimenFiscalProveedor = ObjProveedor.CveRegimenFiscal
If CveFactura > 0 Then
' Dim ImporteAnticipoComision As Decimal = 0
' If ArrAnticipos.Count > 0 Then
' For Each Ant As Compras_Compras.Anticipos In ArrAnticipos
' ImporteAnticipoComision += Ant.ImporteComision
' Next
' End If
' If (LblSaldoFactura.Text.ToDecimal - ImporteAnticipoComision) > 0 Then
' Alert("La orden de compra se definió de contado, favor de especificar la compra de contado.", TipoMensaje.MsgAdvertencia)
' Exit Sub
' End If
'End If
If RetIVAOriginal > 0 Then
Dim CalRetIVAPor As Decimal = (RetIVAOriginal * 1 / SubTotal2Original).RoundAD(6).ToDecimal
@@ -4193,26 +4204,11 @@ Partial Class Compras_Compras
'------------------ INICIA VALIDACIONES ------------------
If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 Then
Dim ImporteAnticipoComision As Decimal = 0
If ArrAnticipos.Count > 0 Then
For Each Ant As Compras_Compras.Anticipos In ArrAnticipos
ImporteAnticipoComision += Ant.ImporteComision
Next
End If
If (LblSaldoFactura.Text.ToDecimal - ImporteAnticipoComision) > 0 Then
If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 AndAlso LblSaldoFactura.Text.ToDecimal > 0 Then
Alert("La orden de compra se definió de contado, favor de especificar la compra de contado.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
Dim CveSubProyectoPrincipal As Integer = AsignarSubProyectoPrincipal()
If Not CveSubProyectoPrincipal > 0 Then
@@ -13133,11 +13129,15 @@ Partial Class Compras_Compras
Dim objcompras As New ClsCompras()
If objcompras.GetCompraParaDevolucion(CveProveedor, UsuarioActual.CveEmpresa, SubTotal) Then
DDLDevolucion.Items.Clear()
DDLDevolucion.DataSource = objcompras.DtResultados
DDLDevolucion.DataBind()
Dim dtt As DataTable = objcompras.DtResultados
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then 'solo los últimos 3 meses
dtt = dtt.FiltraParametros($"Fecha >= #{NowADS.AddMonths(-3).ToString("yyyy/MM/dd")}#")
End If
DDLDevolucion.DataSource = dtt
DDLDevolucion.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
objcompras.Dispose()
DDLDevolucion.DataBind()
UPDevolucion.Update()
End Sub
@@ -13150,9 +13150,9 @@ Partial Class Compras_Compras
Dim objcompras As New ClsCompras()
If objcompras.GetCompraDetalleAlmacen(UsuarioActual.CveEmpresa, DDLDevolucion.SelectedValue.ToEntero) Then
GVDevolucion.DataSource = objcompras.DtResultados
GVDevolucion.DataBind()
End If
objcompras.Dispose()
GVDevolucion.DataBind()
Dim CveAlmacen As Integer = -1
For Each GvRow As GridViewRow In GVDevolucion.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
@@ -20715,8 +20715,6 @@ Partial Class Compras_Compras
Return True
End If
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
Dim ObjCon As New ClsContratos
@@ -20724,7 +20722,7 @@ Partial Class Compras_Compras
Dim Autorizado As Double = 0
Dim Ejercido As Double = 0
If ObjCon.GetPresupuestosResumen(UsuarioActual.CveEmpresa, -1, 1) Then
If ObjCon.GetPresupuestosResumen(UsuarioActual.CveEmpresa, -1, TxtFecha.Text.ToDate.FirstDayOfMonth, TxtFecha.Text.ToDate.LastDayOfMonth, 1) Then
Dim FechaCompra As Date = TxtFecha.Text.ToDate
@@ -20733,27 +20731,8 @@ Partial Class Compras_Compras
FechaCompra <= row.Field(Of Date)("FechaFin")
Select row
'Dim dataTable As New DataTable
'Dim rowFilter As String = ""
'Dim orderby As String = ""
'Dim groupByColumns As String()() = {New String() {"SubProyecto", "CveSubProyecto", "Clasificacion", "CveClasificacion", "TipoGasto", "CveTipoGasto"}}
'Dim sumColumns As String() = {"Total"}
'Dim resultDataTable As DataTable = GroupByDT(TmpDT, rowFilter, orderby, groupByColumns, sumColumns)
If resultadosFiltrados.Count > 0 Then
''.TotalSum = Group.Sum(Function(r) r.Field(Of Decimal)("Total"))
If Opcion = 1 Then
@@ -20786,29 +20765,8 @@ Partial Class Compras_Compras
Else
respuesta = True
End If
Else
'Dim EnumAgrupado = (From row In TmpDT.AsEnumerable()
' Group row By
' SubProyecto = row.Field(Of String)("SubProyecto"),
' CveSubProyecto = row.Field(Of Integer)("CveSubProyecto"),
' Clasificacion = row.Field(Of String)("Clasificacion"),
' CveClasificacion = row.Field(Of Integer)("CveClasificacion"),
' TipoGasto = row.Field(Of String)("TipoGasto"),
' CveTipoGasto = row.Field(Of Integer)("CveTipoGasto")
' Into Group
' Select New With {
' .SubProyecto = SubProyecto,
' .CveSubProyecto = CveSubProyecto,
' .Clasificacion = Clasificacion,
' .CveClasificacion = CveClasificacion,
' .CveTipoGasto = CveTipoGasto,
' .TipoGasto = TipoGasto,
' .TotalSum = Group.Sum(Function(r) If(IsDBNull(r("Total")), 0D, Convert.ToDecimal(r("Total"))))
' }).ToList()
Dim EnumAgrupado = (
From row In TmpDT.AsEnumerable()
Group row By
@@ -20830,22 +20788,15 @@ Partial Class Compras_Compras
}
).ToList()
For Each item In EnumAgrupado
Dim tieneRegistrosConCveSubProyecto As Boolean = resultadosFiltrados.Any(Function(row) CType(row("CveSubProyecto"), Integer) = item.CveSubProyecto)
If tieneRegistrosConCveSubProyecto Then
'Dim saldoTotal As Decimal = (From row In resultadosFiltrados
' Where row.Field(Of Integer)("CveSubProyecto") = item.CveSubProyecto AndAlso
' row.Field(Of Integer)("CveClasificacion") = item.CveClasificacion
' Select row.Field(Of Decimal)("Saldo")).Sum()
Dim saldoTotal As Decimal = (From row In resultadosFiltrados.AsEnumerable()
Where row.Field(Of Integer)("CveSubProyecto") = item.CveSubProyecto AndAlso
If(row.IsNull("CveClasificacion"),
0,
If(row.IsNull("CveClasificacion"), 0,
row.Field(Of Integer?)("CveClasificacion").GetValueOrDefault()) = item.CveClasificacion
Select row.Field(Of Decimal)("Saldo")).Sum()
@@ -20872,29 +20823,18 @@ Partial Class Compras_Compras
Next
End If
Else
'Alert("No hay presupuestos.", TipoMensaje.MsgAdvertencia)
respuesta = True
End If
Else
'Alert("No hay presupuestos.", TipoMensaje.MsgAdvertencia)
respuesta = False
End If
ObjCon.Dispose()
Else
respuesta = True
End If
Return respuesta
End Function

View File

@@ -310,8 +310,8 @@ Partial Class Contratos_RepPresupuestos
If UsaComprometido Then
Ejercido = DrPresupuesto("Comprometido").ToString.ToDecimal
PorEjercer = Autorizado - Ejercido
EjercidoPorcentaje = Ejercido / Autorizado * 100
PorEjercerPorcentaje = PorEjercer / Autorizado * 100
EjercidoPorcentaje = If(Autorizado > 0, Ejercido / Autorizado * 100, 0)
PorEjercerPorcentaje = If(Autorizado > 0, PorEjercer / Autorizado * 100, 0)
thComprometido.Visible = True
GvDatos.Columns(2).Visible = True
End If
@@ -366,7 +366,7 @@ Partial Class Contratos_RepPresupuestos
e.Row.Cells(1).Text = "-"
End If
If e.Row.DBCampo("Comprometido").ToDecimal = 0 Then
e.Row.Cells(1).Text = "-"
e.Row.Cells(2).Text = "-"
End If
If e.Row.DBCampo("Ejercido").ToDecimal = 0 Then
e.Row.Cells(3).Text = "-"

View File

@@ -9081,59 +9081,50 @@ Partial Class OC_OC
Dim respuesta As Boolean = False
'If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
Dim ObjCon As New ClsContratos
Dim CvePresupuesto As Integer = 0
Dim Autorizado As Double = 0
Dim Ejercido As Double = 0
If ObjCon.GetPresupuestosResumen(UsuarioActual.CveEmpresa, -1, 2) Then
Dim Autorizado As Decimal = 0
Dim Ejercido As Decimal = 0
Dim FechaCompra As Date = TxtFecha.Text.ToDate
If ObjCon.GetPresupuestosResumen(UsuarioActual.CveEmpresa, -1, FechaCompra.FirstDayOfMonth, FechaCompra.LastDayOfMonth, 2) Then
Dim ColumnaSaldo As String = "Saldo"
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then ColumnaSaldo = "SaldoComprometido"
Dim resultadosFiltrados = From row In ObjCon.DtResultados.AsEnumerable()
Where FechaCompra >= row.Field(Of Date)("FechaInicio") AndAlso
FechaCompra <= row.Field(Of Date)("FechaFin")
Select row
If resultadosFiltrados.Count > 0 Then
If ObjCon.DtResultados.Rows.Count > 0 Then
If Opcion = 1 Then
Dim tieneRegistrosConCveSubProyecto As Boolean = resultadosFiltrados.Any(Function(row) CType(row("CveSubProyecto"), Integer) = ValCveSubProyecto)
If tieneRegistrosConCveSubProyecto Then
Dim saldoTotal As Decimal = (From row In resultadosFiltrados
Where row.Field(Of Integer)("CveSubProyecto") = ValCveSubProyecto AndAlso
row.Field(Of Integer)("CveClasificacion") = ValCveClasificacion
Select row.Field(Of Decimal)("Saldo")).Sum()
Select row.Field(Of Decimal)(ColumnaSaldo)).Sum()
If saldoTotal > 0 Then
Dim TotalAcumuladoTabla As Decimal = (DtDetalle.SUM("Total", $" CveSubProyecto = {ValCveSubProyecto} AND CveClasificacion = {ValCveClasificacion} "))
Dim Diferencia As Decimal = saldoTotal - TotalAcumuladoTabla - ValImporte
If (Diferencia) < 0 Then
Alert($"No hay presupuesto disponible en el subproyecto <b>{ValSubProyecto}</b> con la clasificación <b>{ValClasificacion}</b>. Se excede por <b>{ Math.Abs(Diferencia).FormatoNumero}</b>", TipoMensaje.MsgAdvertencia)
Alert($"No hay presupuesto disponible en: <br/> Subproyecto:<b> {ValSubProyecto}</b> Clasificación:<b> {ValClasificacion}</b>. Se excede por <b>{ Math.Abs(Diferencia).FormatoNumero}</b>", TipoMensaje.MsgAdvertencia)
respuesta = False
Else
respuesta = True
End If
Else
Alert($"No hay presupuesto disponible en el subproyecto <b>{ValSubProyecto}</b> con la clasificación <b>{ValClasificacion}</b>.", TipoMensaje.MsgAdvertencia)
Alert($"No hay presupuesto disponible en: <br/> Subproyecto:<b> {ValSubProyecto}</b> Clasificación:<b> {ValClasificacion}</b>.", TipoMensaje.MsgAdvertencia)
respuesta = False
End If
Else
respuesta = True
End If
Else
Dim EnumAgrupado = (From row In DtDetalle.AsEnumerable()
Group row By
SubProyecto = row.Field(Of String)("SubProyecto"),
@@ -9157,21 +9148,20 @@ Partial Class OC_OC
Dim saldoTotal As Decimal = (From row In resultadosFiltrados
Where row.Field(Of Integer)("CveSubProyecto") = item.CveSubProyecto AndAlso
row.Field(Of Integer)("CveClasificacion") = item.CveClasificacion
Select row.Field(Of Decimal)("Saldo")).Sum()
Select row.Field(Of Decimal)(ColumnaSaldo)).Sum()
If saldoTotal > 0 Then
Dim Diferencia As Decimal = saldoTotal - item.TotalSum
If (Diferencia) < 0 Then
Alert($"No hay presupuesto disponible en el subproyecto <b>{item.SubProyecto}</b> con la clasificación <b>{item.Clasificacion}</b>. Se excede por <b>{Math.Abs(Diferencia).FormatoNumero}</b>", TipoMensaje.MsgAdvertencia)
Alert($"No hay presupuesto disponible en: <br/> Subproyecto <b>{item.SubProyecto}</b> con la clasificación <b>{item.Clasificacion}</b>. Se excede por <b>{Math.Abs(Diferencia).FormatoNumero}</b>", TipoMensaje.MsgAdvertencia)
respuesta = False
Exit For
Else
respuesta = True
End If
Else
Alert($"No hay presupuesto disponible en el subproyecto <b>{item.SubProyecto}</b> con la clasificación <b>{item.Clasificacion}</b>.", TipoMensaje.MsgAdvertencia)
Alert($"No hay presupuesto disponible en: <br/> Subproyecto <b>{item.SubProyecto}</b> con la clasificación <b>{item.Clasificacion}</b>.", TipoMensaje.MsgAdvertencia)
respuesta = False
Exit For
End If
@@ -9179,7 +9169,6 @@ Partial Class OC_OC
respuesta = True
End If
Next
End If
Else
@@ -9190,16 +9179,10 @@ Partial Class OC_OC
'Alert("No hay presupuestos.", TipoMensaje.MsgAdvertencia)
respuesta = False
End If
ObjCon.Dispose()
Else
respuesta = True
End If
Return respuesta
End Function

View File

@@ -302,21 +302,27 @@ Partial Class Portal_PortalProveedor
#Region "C A R G A - D A T O S"
Protected Sub CargaDatos()
GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimero($"CveProveedor = {CveProveedor}")
Dim ObjProveedor As New ClsCompProveedores()
If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", 1, UsuarioActual.CveEmpresa) Then
If ObjProveedor.DtResultados.Rows.Count > 0 Then
Dim drp As DataRow = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimero($"CveProveedor = {CveProveedor}")
'CxP
LtlProveedor.Text = ObjProveedor.RazonSocial
lblLimiteCredito.Text = ObjProveedor.LimiteCredito.ToString
lblPlazoCobranza.Text = ObjProveedor.PlazoPago.ToString
If drp IsNot Nothing Then
LtlProveedor.Text = drp("RazonSocial").ToString
lblLimiteCredito.Text = drp("LimiteCredito").ToString.ToDecimal.FormatoNumero
lblPlazoCobranza.Text = drp("PlazoPago").ToString
End If
'Dim ObjProveedor As New ClsCompProveedores()
'If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", 1, UsuarioActual.CveEmpresa) Then
' If ObjProveedor.DtResultados.Rows.Count > 0 Then
Else
Alert("Ocurrió un error al cargar los datos.", TipoMensaje.MsgError)
End If
End If
ObjProveedor.Dispose()
' 'CxP
' LtlProveedor.Text = ObjProveedor.RazonSocial
' lblLimiteCredito.Text = ObjProveedor.LimiteCredito.ToString
' lblPlazoCobranza.Text = ObjProveedor.PlazoPago.ToString
' Else
' Alert("Ocurrió un error al cargar los datos.", TipoMensaje.MsgError)
' End If
'End If
'ObjProveedor.Dispose()
End Sub

View File

@@ -27,7 +27,7 @@ Partial Class Sistemas_PopUpCambiaUsuarioEmpresa
'Dim DtEmp As DataTable = GlobalDTEmpresas.Copy
Dim NombreEmp As String = UsuarioActual.Empresa.Empresa
'''condición para ocultar los nombres de las empresas y ponerles "mi empresa de venta (xxx)"
''condición para ocultar los nombres de las empresas y ponerles "mi empresa de venta (xxx)"
''If UsuarioActual.CveUsuario = 100 Then
'' Dim customerRow() As Data.DataRow
@@ -92,8 +92,25 @@ Partial Class Sistemas_PopUpCambiaUsuarioEmpresa
tUsuario = gvr.DataKey("Usuario").ToString
tContraseña = gvr.DataKey("Contraseña").ToString
tCveEmpresa = gvr.DataKey("CveEmpresa").ToString.ToEntero
Dim tGrupoEmpresa As String = ""
Dim NombreCadena As String = "Conexion"
Dim ObjUsuario As New ClsSisUsuarios
If Request.Url.Host.ToUpper().Contains("EMD".ToUpper()) Then tGrupoEmpresa = "EMD"
If Request.Url.Host.ToUpper().Contains("BDH".ToUpper()) Then tGrupoEmpresa = "BDH"
If Request.Url.Host.ToUpper().Contains("ECONOLLANTAS".ToUpper()) Then tGrupoEmpresa = "ECONOLLANTAS" : NombreCadena = "Conexion"
If Request.Url.Host.ToUpper().Contains("JAM".ToUpper()) Then tGrupoEmpresa = "JAM"
If Request.Url.Host.ToUpper().Contains("CITRUS".ToUpper()) Then tGrupoEmpresa = "CITRUS"
If Request.Url.Host.ToUpper().Contains("KINO".ToUpper()) Then tGrupoEmpresa = "KINO"
If Request.Url.Host.ToUpper().Contains("VSH".ToUpper()) Then tGrupoEmpresa = "VSH"
If Request.Url.Host.ToUpper().Contains("AJAM".ToUpper()) Then tGrupoEmpresa = "AJAM"
If Request.Url.Host.ToUpper().Contains("ALATEL".ToUpper()) Then tGrupoEmpresa = "ALATEL"
If Request.Url.Host.ToUpper().Contains("SERVEC".ToUpper()) Then tGrupoEmpresa = "SERVEC"
If Request.Url.Host.ToUpper().Contains("SMS".ToUpper()) Then tGrupoEmpresa = "SMS"
If Request.Url.Host.ToUpper().Contains("VYA".ToUpper()) Then tGrupoEmpresa = "VYA"
If Request.Url.Host.ToUpper().Contains("GRUPODIAZ".ToUpper()) Then tGrupoEmpresa = "GRUPODIAZ"
If Request.Url.Host.ToUpper().Contains("FERRETERA".ToUpper()) Then tGrupoEmpresa = "FERRETERA"
Dim ObjUsuario As New ClsSisUsuarios(NombreCadena:=NombreCadena)
Dim Usuario As Usuario
'Dim UsuarioAsignaciones As Usuario

View File

@@ -60,9 +60,25 @@ Partial Class PopUpSeleccionarEmpresa
Dim gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, LinkButton).BindingContainer, GridViewRow)
If gvr IsNot Nothing Then
Dim ObjUsuario As New ClsSisUsuarios
Dim tGrupoEmpresa As String = ""
Dim NombreCadena As String = "Conexion"
Dim Usuario As Usuario = Nothing
If Request.Url.Host.ToUpper().Contains("EMD".ToUpper()) Then tGrupoEmpresa = "EMD"
If Request.Url.Host.ToUpper().Contains("BDH".ToUpper()) Then tGrupoEmpresa = "BDH"
If Request.Url.Host.ToUpper().Contains("ECONOLLANTAS".ToUpper()) Then tGrupoEmpresa = "ECONOLLANTAS" : NombreCadena = "Conexion"
If Request.Url.Host.ToUpper().Contains("JAM".ToUpper()) Then tGrupoEmpresa = "JAM"
If Request.Url.Host.ToUpper().Contains("CITRUS".ToUpper()) Then tGrupoEmpresa = "CITRUS"
If Request.Url.Host.ToUpper().Contains("KINO".ToUpper()) Then tGrupoEmpresa = "KINO"
If Request.Url.Host.ToUpper().Contains("VSH".ToUpper()) Then tGrupoEmpresa = "VSH"
If Request.Url.Host.ToUpper().Contains("AJAM".ToUpper()) Then tGrupoEmpresa = "AJAM"
If Request.Url.Host.ToUpper().Contains("ALATEL".ToUpper()) Then tGrupoEmpresa = "ALATEL"
If Request.Url.Host.ToUpper().Contains("SERVEC".ToUpper()) Then tGrupoEmpresa = "SERVEC"
If Request.Url.Host.ToUpper().Contains("SMS".ToUpper()) Then tGrupoEmpresa = "SMS"
If Request.Url.Host.ToUpper().Contains("VYA".ToUpper()) Then tGrupoEmpresa = "VYA"
If Request.Url.Host.ToUpper().Contains("GRUPODIAZ".ToUpper()) Then tGrupoEmpresa = "GRUPODIAZ"
If Request.Url.Host.ToUpper().Contains("FERRETERA".ToUpper()) Then tGrupoEmpresa = "FERRETERA"
Dim ObjUsuario As New ClsSisUsuarios(NombreCadena:=NombreCadena)
Usuario = ObjUsuario.ValidaUsuario(gvr.DataKey("Usuario"), gvr.DataKey("Contraseña"), CveEmpresa:=gvr.DataKey("CveEmpresa").ToEntero)
ObjUsuario.Dispose()
@@ -138,9 +154,25 @@ Partial Class PopUpSeleccionarEmpresa
Dim gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, LinkButton).BindingContainer, GridViewRow)
If gvr IsNot Nothing Then
Dim ObjUsuario As New ClsSisUsuarios
Dim tGrupoEmpresa As String = ""
Dim NombreCadena As String = "Conexion"
Dim Usuario As Usuario = Nothing
If Request.Url.Host.ToUpper().Contains("EMD".ToUpper()) Then tGrupoEmpresa = "EMD"
If Request.Url.Host.ToUpper().Contains("BDH".ToUpper()) Then tGrupoEmpresa = "BDH"
If Request.Url.Host.ToUpper().Contains("ECONOLLANTAS".ToUpper()) Then tGrupoEmpresa = "ECONOLLANTAS" : NombreCadena = "Conexion"
If Request.Url.Host.ToUpper().Contains("JAM".ToUpper()) Then tGrupoEmpresa = "JAM"
If Request.Url.Host.ToUpper().Contains("CITRUS".ToUpper()) Then tGrupoEmpresa = "CITRUS"
If Request.Url.Host.ToUpper().Contains("KINO".ToUpper()) Then tGrupoEmpresa = "KINO"
If Request.Url.Host.ToUpper().Contains("VSH".ToUpper()) Then tGrupoEmpresa = "VSH"
If Request.Url.Host.ToUpper().Contains("AJAM".ToUpper()) Then tGrupoEmpresa = "AJAM"
If Request.Url.Host.ToUpper().Contains("ALATEL".ToUpper()) Then tGrupoEmpresa = "ALATEL"
If Request.Url.Host.ToUpper().Contains("SERVEC".ToUpper()) Then tGrupoEmpresa = "SERVEC"
If Request.Url.Host.ToUpper().Contains("SMS".ToUpper()) Then tGrupoEmpresa = "SMS"
If Request.Url.Host.ToUpper().Contains("VYA".ToUpper()) Then tGrupoEmpresa = "VYA"
If Request.Url.Host.ToUpper().Contains("GRUPODIAZ".ToUpper()) Then tGrupoEmpresa = "GRUPODIAZ"
If Request.Url.Host.ToUpper().Contains("FERRETERA".ToUpper()) Then tGrupoEmpresa = "FERRETERA"
Dim ObjUsuario As New ClsSisUsuarios(NombreCadena:=NombreCadena)
Usuario = ObjUsuario.ValidaUsuarioPortalProveedor(gvr.DataKey("CveProveedor").ToEntero(), gvr.DataKey("Usuario"), gvr.DataKey("Contraseña"))
ObjUsuario.Dispose()

View File

@@ -1384,8 +1384,10 @@ Partial Class Sistemas_UsuarioDetalle
GlobalDTAlmacenUsuarios(-1, tCveEmpresa) = Nothing
GlobalDTUsuarioResponsable(tCveEmpresa) = Nothing
GlobalDTUsuarios(CveEmpresa:=tCveEmpresa) = Nothing
GlobalDTUsuarios(CveEmpresa:=-1) = Nothing
GlobalDTUsuarios(CveEmpresa:=tCveEmpresa) = Nothing
'si hay diferencia en la empresa asignada y la asociada.
If tCveEmpresa <> DdlEmpresa.SelectedValue.ToEntero Then GlobalDTUsuarios(CveEmpresa:=DdlEmpresa.SelectedValue.ToEntero) = Nothing
'If ObjUsuarios.GetUsuariosEmpresas(-1, UsuarioActual.CveEmpresa) Then
' Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados

View File

@@ -88,7 +88,7 @@
<div class="row">
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
<div runat="server" id="DivSubProyecto" class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
<asp:ListBox ID="DdlSubProyectos" CssClass="select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="width: 100%" data-text="Todos" SelectionMode="Multiple"></asp:ListBox>
</div>
<div class="col-md-1 truncate">
Fecha Inicio:

View File

@@ -54,7 +54,7 @@ Partial Class Ventas_RepPS
End Sub
Private Sub CargaCombos()
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, LblSubProyecto)
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
DdlClasificacion.DataBind()
@@ -77,12 +77,13 @@ Partial Class Ventas_RepPS
LblLinea.Visible = True
DivLinea.Visible = True
Using ObjMarcas As New ClsProductosServicios
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
DdlMarcaPSDes.DataBind()
End If
End Using
DdlMarcaPSDes.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
'Using ObjMarcas As New ClsProductosServicios
' If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
' DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
' DdlMarcaPSDes.DataBind()
' End If
'End Using
End If
DdlLinea.DataSource = GlobalDTClasificacionesDetalle(UsuarioActual.CveEmpresa)
@@ -95,7 +96,8 @@ Partial Class Ventas_RepPS
Dim Clasificacion As String = If(DdlClasificacion.GetSelectedValuesM = "", "-1", DdlClasificacion.GetSelectedValuesM)
Dim Linea As String = If(DdlLinea.GetSelectedValuesM = "", "-1", DdlLinea.GetSelectedValuesM)
Dim Marca As String = If(DdlMarcaPSDes.GetSelectedValuesM = "", "-1", DdlMarcaPSDes.GetSelectedValuesM)
Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero()
'Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero()
Dim CveSubProyectos As String = If(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM)
Dim Grupo As Integer = DdlGrupo.SelectedValue.ToEntero()
Dim CvePS As Integer = DdlPS.SelectedValue.ToEntero()
Dim CveMoneda As Integer = -1
@@ -106,7 +108,7 @@ Partial Class Ventas_RepPS
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
Dim ObjVentas As New ClsVentas()
If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico, Clasificacion:=Clasificacion, Linea:=Linea, Marca:=Marca, orden:=DdlOrden.SelectedValue.ToEntero()) Then
If ObjVentas.GetRepPSEcono(CveSubProyectos, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico, Clasificacion:=Clasificacion, Linea:=Linea, Marca:=Marca, orden:=DdlOrden.SelectedValue.ToEntero()) Then
DtReporte = ObjVentas.DtResultados.Copy()
GvDatos.DataSource = DtReporte
Else
@@ -167,7 +169,7 @@ Partial Class Ventas_RepPS
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
If DtReporte IsNot Nothing AndAlso DtReporte.Rows.Count > 0 Then
Dim SbParametros As New StringBuilder
SbParametros.AppendFormat("Sucursal:{0}", DdlSubProyecto.SelectedItem.Text)
SbParametros.AppendFormat("Sucursal:{0}", DdlSubProyectos.GetSelectedText)
SbParametros.AppendFormat(", Orden:{0}", DdlGrupo.SelectedItem.Text)
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")

View File

@@ -5576,7 +5576,6 @@ Partial Class Ventas
HdnFolioFiscalNC.Value = DbRowVenta("FolioFiscalPadre").ToString()
End If
TxtOrdenCompra.Text = DbRowVenta("OrdenCompra").ToString()
TxtOrdenCompra.Enabled = False
@@ -12179,6 +12178,11 @@ Partial Class Ventas
ObjFactura.Alfa1 = TxtAlfa1.Text.Trim
End If
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
ObjFactura.Medico = DdlMedico.SelectedItem.Text
ObjFactura.Procedimiento = DdlProcedimiento.SelectedItem.Text
End If
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
If (ObjFactura.CveMoneda = 2 AndAlso ObjFactura.ConvertirPesos = True AndAlso ObjFactura.TipodeComprobante = "Ingresos" AndAlso RemisionesLista.Count > 0) Then
Dim TotalCalculableImpuestos, TotalCalculableImpuestosIVA As Decimal
@@ -25673,7 +25677,7 @@ Partial Class Ventas
Dim SegundosRespuesta As Double = SWatch.ElapsedMilliseconds / 1000
SegundosRespuesta = SegundosRespuesta.ToEntero
If SegundosRespuesta >= 5 Then
If SegundosRespuesta >= 5 AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Ing", "Ant", "Dev", "Egs") Then
Alert($"Los servicios de cancelación del SAT presentan lentitud en la respuesta [{ SegundosRespuesta } s].", TipoMensaje.ToastAdventencia, "")
End If
@@ -32535,11 +32539,11 @@ Partial Class Ventas
For Each Dr As DataRow In dtSeleccionadas.Rows
If Dr("Medico").ToString().Trim().Length > 0 Then
If Dr("Medico").ToString.Trim.Length > 0 Then
MensajeRemisionesMedicas.Append($"Dr. {Dr("Medico").ToString}{vbCrLf}")
EsRemisionMedica = True
End If
If Dr("Medico").ToString().Trim().Length > 0 Then
If Dr("Procedimiento").ToString.Trim.Length > 0 Then
MensajeRemisionesMedicas.Append($"Procedimiento {Dr("Procedimiento")}{vbCrLf}")
EsRemisionMedica = True
End If
@@ -32562,7 +32566,6 @@ Partial Class Ventas
TxtObsFact.Text = If(MensajeRemisiones.ToString().Length > 0, MensajeRemisiones.ToString().Substring(0, MensajeRemisiones.ToString().Length - 2), "")
End If
TxtOrdenCompra.Text = If(ObsOC.ToString().Length > 0, ObsOC.ToString().Substring(0, ObsOC.ToString().Length - 2), "")
TxtPedidoContrato.Text = If(ObsPedido.ToString().Length > 0, ObsPedido.ToString().Substring(0, ObsPedido.ToString().Length - 2), "")
TxtObsAlmacen.Text = If(ObsInv.ToString().Length > 0, ObsInv.ToString().Substring(0, ObsInv.ToString().Length - 2), "")