Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -3201,7 +3201,7 @@ Public Class ClsContratos
|
|||||||
End Function
|
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
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Con_PresupuestosResumenGet")
|
DataAdapter("PA_Con_PresupuestosResumenGet")
|
||||||
@@ -3209,6 +3209,8 @@ Public Class ClsContratos
|
|||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||||
|
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||||
|
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ Option Strict On
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Web.XmlTransform
|
|
||||||
Imports Telerik.Web.UI.ComboBox.ComboBoxStyles
|
|
||||||
|
|
||||||
Public Class ClsInventarios
|
Public Class ClsInventarios
|
||||||
Implements IDisposable
|
Implements IDisposable
|
||||||
|
|||||||
@@ -481,7 +481,7 @@ Public Class ClsSisUsuarios
|
|||||||
Retorno.Portal = True
|
Retorno.Portal = True
|
||||||
Retorno.Referencia = Data.Rows(0)("Referencia").ToString
|
Retorno.Referencia = Data.Rows(0)("Referencia").ToString
|
||||||
Retorno.EsSupervisorRH = If(Data.Rows(0)("EsSupervisorRH").ToString = "1", True, False)
|
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ú
|
'cargo los modulos del usuario y genero el menú
|
||||||
Dim dttmp As DataTable = GetUsuariosRolesModulos(Retorno.CveUsuario, Retorno.CveCliente)
|
Dim dttmp As DataTable = GetUsuariosRolesModulos(Retorno.CveUsuario, Retorno.CveCliente)
|
||||||
|
|
||||||
@@ -538,7 +538,7 @@ Public Class ClsSisUsuarios
|
|||||||
Retorno.Portal = True
|
Retorno.Portal = True
|
||||||
Retorno.Referencia = Data.Rows(0)("Referencia").ToString
|
Retorno.Referencia = Data.Rows(0)("Referencia").ToString
|
||||||
Retorno.EsSupervisorRH = If(Data.Rows(0)("EsSupervisorRH").ToString = "1", True, False)
|
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ú
|
'cargo los modulos del usuario y genero el menú
|
||||||
Dim dttmp As DataTable = GetUsuariosRolesModulos(Retorno.CveUsuario, Retorno.CveProveedor)
|
Dim dttmp As DataTable = GetUsuariosRolesModulos(Retorno.CveUsuario, Retorno.CveProveedor)
|
||||||
|
|
||||||
|
|||||||
@@ -1977,14 +1977,14 @@ Public Class ClsVentas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
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 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
|
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
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_RepPSEconoGet")
|
DataAdapter("PA_Vta_RepPSEconoGet")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyectos", SqlDbType.VarChar).Value = CveSubProyectos
|
||||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
|
|||||||
@@ -930,19 +930,23 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Dim CveAlmacen = IfNull(context.Request("cvealmacen"), "-1").ToString.ToEntero
|
Dim CveAlmacen = IfNull(context.Request("cvealmacen"), "-1").ToString.ToEntero
|
||||||
|
|
||||||
Dim UsaGlobal As Boolean = True
|
Dim UsaGlobal As Boolean = True
|
||||||
Dim MostrarTodosAlmacenes As Boolean = False
|
Dim MostrarTodosAlmacenes As Boolean = True
|
||||||
|
|
||||||
'verifica existencias
|
'verifica existencias
|
||||||
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso usuario.Empresa.Funcionalidad(141) = "1" Then
|
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso usuario.Empresa.Funcionalidad(141) = "1" Then
|
||||||
UsaGlobal = False
|
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
|
'If (usuario.Empresa.Funcionalidad(578) = "1") AndAlso Pagina.Contiene("ventas/ventas") Then 'sms
|
||||||
MostrarTodosAlmacenes = True
|
' MostrarTodosAlmacenes = True
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If (usuario.Empresa.Funcionalidad(578) = "1") AndAlso Pagina.Contiene("ventas/ventas") Then 'sms
|
'If (usuario.Empresa.CveEmpresa.Contiene(189, 193, 195, 197)) AndAlso Pagina.Contiene("ventas/ventas") Then 'sms
|
||||||
MostrarTodosAlmacenes = True
|
' MostrarTodosAlmacenes = True
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Dim objInv As New ClsInventarios
|
Dim objInv As New ClsInventarios
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<li>
|
<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>
|
</li>
|
||||||
<asp:UpdatePanel ID="UppEliminarIE" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UppEliminarIE" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|||||||
@@ -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">
|
<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>
|
<Columns>
|
||||||
|
|
||||||
<asp:BoundField ItemStyle-Width="5%" ItemStyle-CssClass="Texto" DataField="NumCuenta" HeaderText="Cuenta" Visible="false"></asp:BoundField>
|
<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: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="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="15%" DataField="Observaciones" HeaderText="Observaciones" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
|
||||||
<asp:BoundField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" DataField="EstatusIE" HeaderText="Estatus"></asp:BoundField>
|
<asp:BoundField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" DataField="EstatusIE" HeaderText="Estatus"></asp:BoundField>
|
||||||
|
|||||||
@@ -3549,10 +3549,21 @@ Partial Class Compras_Compras
|
|||||||
ViewState("CveProveedor") = ObjProveedor.CveProveedor
|
ViewState("CveProveedor") = ObjProveedor.CveProveedor
|
||||||
HdnCveProveedor.Value = ObjProveedor.CveProveedor.ToString
|
HdnCveProveedor.Value = ObjProveedor.CveProveedor.ToString
|
||||||
TxtFechaPago.Text = (TxtFecha.Text.ToDate.AddDays(LblDiasCredito.Text.ToEntero)).ToShortDateString
|
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
|
' Dim ImporteAnticipoComision As Decimal = 0
|
||||||
If CveFactura > 0 Then
|
' 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
|
If RetIVAOriginal > 0 Then
|
||||||
Dim CalRetIVAPor As Decimal = (RetIVAOriginal * 1 / SubTotal2Original).RoundAD(6).ToDecimal
|
Dim CalRetIVAPor As Decimal = (RetIVAOriginal * 1 / SubTotal2Original).RoundAD(6).ToDecimal
|
||||||
@@ -4193,26 +4204,11 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
'------------------ INICIA VALIDACIONES ------------------
|
'------------------ INICIA VALIDACIONES ------------------
|
||||||
|
|
||||||
|
If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 AndAlso LblSaldoFactura.Text.ToDecimal > 0 Then
|
||||||
|
|
||||||
|
|
||||||
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
|
|
||||||
Alert("La orden de compra se definió de contado, favor de especificar la compra de contado.", TipoMensaje.MsgAdvertencia)
|
Alert("La orden de compra se definió de contado, favor de especificar la compra de contado.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim CveSubProyectoPrincipal As Integer = AsignarSubProyectoPrincipal()
|
Dim CveSubProyectoPrincipal As Integer = AsignarSubProyectoPrincipal()
|
||||||
|
|
||||||
If Not CveSubProyectoPrincipal > 0 Then
|
If Not CveSubProyectoPrincipal > 0 Then
|
||||||
@@ -13133,11 +13129,15 @@ Partial Class Compras_Compras
|
|||||||
Dim objcompras As New ClsCompras()
|
Dim objcompras As New ClsCompras()
|
||||||
If objcompras.GetCompraParaDevolucion(CveProveedor, UsuarioActual.CveEmpresa, SubTotal) Then
|
If objcompras.GetCompraParaDevolucion(CveProveedor, UsuarioActual.CveEmpresa, SubTotal) Then
|
||||||
DDLDevolucion.Items.Clear()
|
DDLDevolucion.Items.Clear()
|
||||||
DDLDevolucion.DataSource = objcompras.DtResultados
|
Dim dtt As DataTable = objcompras.DtResultados
|
||||||
DDLDevolucion.DataBind()
|
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"))
|
DDLDevolucion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
End If
|
End If
|
||||||
objcompras.Dispose()
|
objcompras.Dispose()
|
||||||
|
DDLDevolucion.DataBind()
|
||||||
UPDevolucion.Update()
|
UPDevolucion.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -13150,9 +13150,9 @@ Partial Class Compras_Compras
|
|||||||
Dim objcompras As New ClsCompras()
|
Dim objcompras As New ClsCompras()
|
||||||
If objcompras.GetCompraDetalleAlmacen(UsuarioActual.CveEmpresa, DDLDevolucion.SelectedValue.ToEntero) Then
|
If objcompras.GetCompraDetalleAlmacen(UsuarioActual.CveEmpresa, DDLDevolucion.SelectedValue.ToEntero) Then
|
||||||
GVDevolucion.DataSource = objcompras.DtResultados
|
GVDevolucion.DataSource = objcompras.DtResultados
|
||||||
GVDevolucion.DataBind()
|
|
||||||
End If
|
End If
|
||||||
objcompras.Dispose()
|
objcompras.Dispose()
|
||||||
|
GVDevolucion.DataBind()
|
||||||
Dim CveAlmacen As Integer = -1
|
Dim CveAlmacen As Integer = -1
|
||||||
For Each GvRow As GridViewRow In GVDevolucion.Rows
|
For Each GvRow As GridViewRow In GVDevolucion.Rows
|
||||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||||
@@ -20715,8 +20715,6 @@ Partial Class Compras_Compras
|
|||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
|
||||||
|
|
||||||
Dim ObjCon As New ClsContratos
|
Dim ObjCon As New ClsContratos
|
||||||
@@ -20724,7 +20722,7 @@ Partial Class Compras_Compras
|
|||||||
Dim Autorizado As Double = 0
|
Dim Autorizado As Double = 0
|
||||||
Dim Ejercido 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
|
Dim FechaCompra As Date = TxtFecha.Text.ToDate
|
||||||
|
|
||||||
@@ -20733,27 +20731,8 @@ Partial Class Compras_Compras
|
|||||||
FechaCompra <= row.Field(Of Date)("FechaFin")
|
FechaCompra <= row.Field(Of Date)("FechaFin")
|
||||||
Select row
|
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
|
If resultadosFiltrados.Count > 0 Then
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
''.TotalSum = Group.Sum(Function(r) r.Field(Of Decimal)("Total"))
|
''.TotalSum = Group.Sum(Function(r) r.Field(Of Decimal)("Total"))
|
||||||
If Opcion = 1 Then
|
If Opcion = 1 Then
|
||||||
|
|
||||||
@@ -20786,29 +20765,8 @@ Partial Class Compras_Compras
|
|||||||
Else
|
Else
|
||||||
respuesta = True
|
respuesta = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Else
|
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 = (
|
Dim EnumAgrupado = (
|
||||||
From row In TmpDT.AsEnumerable()
|
From row In TmpDT.AsEnumerable()
|
||||||
Group row By
|
Group row By
|
||||||
@@ -20830,22 +20788,15 @@ Partial Class Compras_Compras
|
|||||||
}
|
}
|
||||||
).ToList()
|
).ToList()
|
||||||
|
|
||||||
|
|
||||||
For Each item In EnumAgrupado
|
For Each item In EnumAgrupado
|
||||||
|
|
||||||
|
|
||||||
Dim tieneRegistrosConCveSubProyecto As Boolean = resultadosFiltrados.Any(Function(row) CType(row("CveSubProyecto"), Integer) = item.CveSubProyecto)
|
Dim tieneRegistrosConCveSubProyecto As Boolean = resultadosFiltrados.Any(Function(row) CType(row("CveSubProyecto"), Integer) = item.CveSubProyecto)
|
||||||
|
|
||||||
If tieneRegistrosConCveSubProyecto Then
|
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()
|
Dim saldoTotal As Decimal = (From row In resultadosFiltrados.AsEnumerable()
|
||||||
Where row.Field(Of Integer)("CveSubProyecto") = item.CveSubProyecto AndAlso
|
Where row.Field(Of Integer)("CveSubProyecto") = item.CveSubProyecto AndAlso
|
||||||
If(row.IsNull("CveClasificacion"),
|
If(row.IsNull("CveClasificacion"), 0,
|
||||||
0,
|
|
||||||
row.Field(Of Integer?)("CveClasificacion").GetValueOrDefault()) = item.CveClasificacion
|
row.Field(Of Integer?)("CveClasificacion").GetValueOrDefault()) = item.CveClasificacion
|
||||||
Select row.Field(Of Decimal)("Saldo")).Sum()
|
Select row.Field(Of Decimal)("Saldo")).Sum()
|
||||||
|
|
||||||
@@ -20872,29 +20823,18 @@ Partial Class Compras_Compras
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
'Alert("No hay presupuestos.", TipoMensaje.MsgAdvertencia)
|
'Alert("No hay presupuestos.", TipoMensaje.MsgAdvertencia)
|
||||||
respuesta = True
|
respuesta = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
'Alert("No hay presupuestos.", TipoMensaje.MsgAdvertencia)
|
'Alert("No hay presupuestos.", TipoMensaje.MsgAdvertencia)
|
||||||
respuesta = False
|
respuesta = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjCon.Dispose()
|
ObjCon.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
respuesta = True
|
respuesta = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Return respuesta
|
Return respuesta
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -310,8 +310,8 @@ Partial Class Contratos_RepPresupuestos
|
|||||||
If UsaComprometido Then
|
If UsaComprometido Then
|
||||||
Ejercido = DrPresupuesto("Comprometido").ToString.ToDecimal
|
Ejercido = DrPresupuesto("Comprometido").ToString.ToDecimal
|
||||||
PorEjercer = Autorizado - Ejercido
|
PorEjercer = Autorizado - Ejercido
|
||||||
EjercidoPorcentaje = Ejercido / Autorizado * 100
|
EjercidoPorcentaje = If(Autorizado > 0, Ejercido / Autorizado * 100, 0)
|
||||||
PorEjercerPorcentaje = PorEjercer / Autorizado * 100
|
PorEjercerPorcentaje = If(Autorizado > 0, PorEjercer / Autorizado * 100, 0)
|
||||||
thComprometido.Visible = True
|
thComprometido.Visible = True
|
||||||
GvDatos.Columns(2).Visible = True
|
GvDatos.Columns(2).Visible = True
|
||||||
End If
|
End If
|
||||||
@@ -366,7 +366,7 @@ Partial Class Contratos_RepPresupuestos
|
|||||||
e.Row.Cells(1).Text = "-"
|
e.Row.Cells(1).Text = "-"
|
||||||
End If
|
End If
|
||||||
If e.Row.DBCampo("Comprometido").ToDecimal = 0 Then
|
If e.Row.DBCampo("Comprometido").ToDecimal = 0 Then
|
||||||
e.Row.Cells(1).Text = "-"
|
e.Row.Cells(2).Text = "-"
|
||||||
End If
|
End If
|
||||||
If e.Row.DBCampo("Ejercido").ToDecimal = 0 Then
|
If e.Row.DBCampo("Ejercido").ToDecimal = 0 Then
|
||||||
e.Row.Cells(3).Text = "-"
|
e.Row.Cells(3).Text = "-"
|
||||||
|
|||||||
@@ -9081,59 +9081,50 @@ Partial Class OC_OC
|
|||||||
|
|
||||||
Dim respuesta As Boolean = False
|
Dim respuesta As Boolean = False
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
|
||||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
|
||||||
|
|
||||||
Dim ObjCon As New ClsContratos
|
Dim ObjCon As New ClsContratos
|
||||||
Dim CvePresupuesto As Integer = 0
|
Dim CvePresupuesto As Integer = 0
|
||||||
Dim Autorizado As Double = 0
|
Dim Autorizado As Decimal = 0
|
||||||
Dim Ejercido As Double = 0
|
Dim Ejercido As Decimal = 0
|
||||||
|
|
||||||
If ObjCon.GetPresupuestosResumen(UsuarioActual.CveEmpresa, -1, 2) Then
|
|
||||||
|
|
||||||
Dim FechaCompra As Date = TxtFecha.Text.ToDate
|
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()
|
Dim resultadosFiltrados = From row In ObjCon.DtResultados.AsEnumerable()
|
||||||
Where FechaCompra >= row.Field(Of Date)("FechaInicio") AndAlso
|
|
||||||
FechaCompra <= row.Field(Of Date)("FechaFin")
|
|
||||||
Select row
|
Select row
|
||||||
|
|
||||||
|
If ObjCon.DtResultados.Rows.Count > 0 Then
|
||||||
If resultadosFiltrados.Count > 0 Then
|
|
||||||
|
|
||||||
If Opcion = 1 Then
|
If Opcion = 1 Then
|
||||||
|
|
||||||
|
|
||||||
Dim tieneRegistrosConCveSubProyecto As Boolean = resultadosFiltrados.Any(Function(row) CType(row("CveSubProyecto"), Integer) = ValCveSubProyecto)
|
Dim tieneRegistrosConCveSubProyecto As Boolean = resultadosFiltrados.Any(Function(row) CType(row("CveSubProyecto"), Integer) = ValCveSubProyecto)
|
||||||
|
|
||||||
If tieneRegistrosConCveSubProyecto Then
|
If tieneRegistrosConCveSubProyecto Then
|
||||||
Dim saldoTotal As Decimal = (From row In resultadosFiltrados
|
Dim saldoTotal As Decimal = (From row In resultadosFiltrados
|
||||||
Where row.Field(Of Integer)("CveSubProyecto") = ValCveSubProyecto AndAlso
|
Where row.Field(Of Integer)("CveSubProyecto") = ValCveSubProyecto AndAlso
|
||||||
row.Field(Of Integer)("CveClasificacion") = ValCveClasificacion
|
row.Field(Of Integer)("CveClasificacion") = ValCveClasificacion
|
||||||
Select row.Field(Of Decimal)("Saldo")).Sum()
|
Select row.Field(Of Decimal)(ColumnaSaldo)).Sum()
|
||||||
If saldoTotal > 0 Then
|
If saldoTotal > 0 Then
|
||||||
|
|
||||||
Dim TotalAcumuladoTabla As Decimal = (DtDetalle.SUM("Total", $" CveSubProyecto = {ValCveSubProyecto} AND CveClasificacion = {ValCveClasificacion} "))
|
Dim TotalAcumuladoTabla As Decimal = (DtDetalle.SUM("Total", $" CveSubProyecto = {ValCveSubProyecto} AND CveClasificacion = {ValCveClasificacion} "))
|
||||||
Dim Diferencia As Decimal = saldoTotal - TotalAcumuladoTabla - ValImporte
|
Dim Diferencia As Decimal = saldoTotal - TotalAcumuladoTabla - ValImporte
|
||||||
|
|
||||||
If (Diferencia) < 0 Then
|
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
|
respuesta = False
|
||||||
|
|
||||||
Else
|
Else
|
||||||
respuesta = True
|
respuesta = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
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
|
respuesta = False
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
respuesta = True
|
respuesta = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
Dim EnumAgrupado = (From row In DtDetalle.AsEnumerable()
|
Dim EnumAgrupado = (From row In DtDetalle.AsEnumerable()
|
||||||
Group row By
|
Group row By
|
||||||
SubProyecto = row.Field(Of String)("SubProyecto"),
|
SubProyecto = row.Field(Of String)("SubProyecto"),
|
||||||
@@ -9157,21 +9148,20 @@ Partial Class OC_OC
|
|||||||
Dim saldoTotal As Decimal = (From row In resultadosFiltrados
|
Dim saldoTotal As Decimal = (From row In resultadosFiltrados
|
||||||
Where row.Field(Of Integer)("CveSubProyecto") = item.CveSubProyecto AndAlso
|
Where row.Field(Of Integer)("CveSubProyecto") = item.CveSubProyecto AndAlso
|
||||||
row.Field(Of Integer)("CveClasificacion") = item.CveClasificacion
|
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
|
If saldoTotal > 0 Then
|
||||||
|
|
||||||
Dim Diferencia As Decimal = saldoTotal - item.TotalSum
|
Dim Diferencia As Decimal = saldoTotal - item.TotalSum
|
||||||
|
|
||||||
If (Diferencia) < 0 Then
|
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
|
respuesta = False
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
respuesta = True
|
respuesta = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
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
|
respuesta = False
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -9179,7 +9169,6 @@ Partial Class OC_OC
|
|||||||
respuesta = True
|
respuesta = True
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
@@ -9190,16 +9179,10 @@ Partial Class OC_OC
|
|||||||
'Alert("No hay presupuestos.", TipoMensaje.MsgAdvertencia)
|
'Alert("No hay presupuestos.", TipoMensaje.MsgAdvertencia)
|
||||||
respuesta = False
|
respuesta = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjCon.Dispose()
|
ObjCon.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
respuesta = True
|
respuesta = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Return respuesta
|
Return respuesta
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -302,21 +302,27 @@ Partial Class Portal_PortalProveedor
|
|||||||
#Region "C A R G A - D A T O S"
|
#Region "C A R G A - D A T O S"
|
||||||
|
|
||||||
Protected Sub CargaDatos()
|
Protected Sub CargaDatos()
|
||||||
GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimero($"CveProveedor = {CveProveedor}")
|
Dim drp As DataRow = 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
|
|
||||||
|
|
||||||
'CxP
|
If drp IsNot Nothing Then
|
||||||
LtlProveedor.Text = ObjProveedor.RazonSocial
|
LtlProveedor.Text = drp("RazonSocial").ToString
|
||||||
lblLimiteCredito.Text = ObjProveedor.LimiteCredito.ToString
|
lblLimiteCredito.Text = drp("LimiteCredito").ToString.ToDecimal.FormatoNumero
|
||||||
lblPlazoCobranza.Text = ObjProveedor.PlazoPago.ToString
|
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
|
' 'CxP
|
||||||
Alert("Ocurrió un error al cargar los datos.", TipoMensaje.MsgError)
|
' LtlProveedor.Text = ObjProveedor.RazonSocial
|
||||||
End If
|
' lblLimiteCredito.Text = ObjProveedor.LimiteCredito.ToString
|
||||||
End If
|
' lblPlazoCobranza.Text = ObjProveedor.PlazoPago.ToString
|
||||||
ObjProveedor.Dispose()
|
|
||||||
|
' Else
|
||||||
|
' Alert("Ocurrió un error al cargar los datos.", TipoMensaje.MsgError)
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
'ObjProveedor.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ Partial Class Sistemas_PopUpCambiaUsuarioEmpresa
|
|||||||
|
|
||||||
'Dim DtEmp As DataTable = GlobalDTEmpresas.Copy
|
'Dim DtEmp As DataTable = GlobalDTEmpresas.Copy
|
||||||
Dim NombreEmp As String = UsuarioActual.Empresa.Empresa
|
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
|
''If UsuarioActual.CveUsuario = 100 Then
|
||||||
|
|
||||||
'' Dim customerRow() As Data.DataRow
|
'' Dim customerRow() As Data.DataRow
|
||||||
@@ -92,8 +92,25 @@ Partial Class Sistemas_PopUpCambiaUsuarioEmpresa
|
|||||||
tUsuario = gvr.DataKey("Usuario").ToString
|
tUsuario = gvr.DataKey("Usuario").ToString
|
||||||
tContraseña = gvr.DataKey("Contraseña").ToString
|
tContraseña = gvr.DataKey("Contraseña").ToString
|
||||||
tCveEmpresa = gvr.DataKey("CveEmpresa").ToString.ToEntero
|
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 Usuario As Usuario
|
||||||
'Dim UsuarioAsignaciones As Usuario
|
'Dim UsuarioAsignaciones As Usuario
|
||||||
|
|
||||||
|
|||||||
@@ -60,9 +60,25 @@ Partial Class PopUpSeleccionarEmpresa
|
|||||||
Dim gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, LinkButton).BindingContainer, GridViewRow)
|
Dim gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, LinkButton).BindingContainer, GridViewRow)
|
||||||
|
|
||||||
If gvr IsNot Nothing Then
|
If gvr IsNot Nothing Then
|
||||||
|
Dim tGrupoEmpresa As String = ""
|
||||||
Dim ObjUsuario As New ClsSisUsuarios
|
Dim NombreCadena As String = "Conexion"
|
||||||
Dim Usuario As Usuario = Nothing
|
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)
|
Usuario = ObjUsuario.ValidaUsuario(gvr.DataKey("Usuario"), gvr.DataKey("Contraseña"), CveEmpresa:=gvr.DataKey("CveEmpresa").ToEntero)
|
||||||
ObjUsuario.Dispose()
|
ObjUsuario.Dispose()
|
||||||
|
|
||||||
@@ -138,9 +154,25 @@ Partial Class PopUpSeleccionarEmpresa
|
|||||||
Dim gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, LinkButton).BindingContainer, GridViewRow)
|
Dim gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, LinkButton).BindingContainer, GridViewRow)
|
||||||
|
|
||||||
If gvr IsNot Nothing Then
|
If gvr IsNot Nothing Then
|
||||||
|
Dim tGrupoEmpresa As String = ""
|
||||||
Dim ObjUsuario As New ClsSisUsuarios
|
Dim NombreCadena As String = "Conexion"
|
||||||
Dim Usuario As Usuario = Nothing
|
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"))
|
Usuario = ObjUsuario.ValidaUsuarioPortalProveedor(gvr.DataKey("CveProveedor").ToEntero(), gvr.DataKey("Usuario"), gvr.DataKey("Contraseña"))
|
||||||
|
|
||||||
ObjUsuario.Dispose()
|
ObjUsuario.Dispose()
|
||||||
|
|||||||
@@ -1384,8 +1384,10 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
GlobalDTAlmacenUsuarios(-1, tCveEmpresa) = Nothing
|
GlobalDTAlmacenUsuarios(-1, tCveEmpresa) = Nothing
|
||||||
GlobalDTUsuarioResponsable(tCveEmpresa) = Nothing
|
GlobalDTUsuarioResponsable(tCveEmpresa) = Nothing
|
||||||
GlobalDTUsuarios(CveEmpresa:=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
|
'If ObjUsuarios.GetUsuariosEmpresas(-1, UsuarioActual.CveEmpresa) Then
|
||||||
' Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados
|
' Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
|
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
|
||||||
<div runat="server" id="DivSubProyecto" class="col-md-2">
|
<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>
|
||||||
<div class="col-md-1 truncate">
|
<div class="col-md-1 truncate">
|
||||||
Fecha Inicio:
|
Fecha Inicio:
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ Partial Class Ventas_RepPS
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaCombos()
|
Private Sub CargaCombos()
|
||||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, LblSubProyecto)
|
||||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||||
DdlClasificacion.DataBind()
|
DdlClasificacion.DataBind()
|
||||||
|
|
||||||
@@ -77,12 +77,13 @@ Partial Class Ventas_RepPS
|
|||||||
LblLinea.Visible = True
|
LblLinea.Visible = True
|
||||||
DivLinea.Visible = True
|
DivLinea.Visible = True
|
||||||
|
|
||||||
Using ObjMarcas As New ClsProductosServicios
|
DdlMarcaPSDes.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
|
||||||
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
|
'Using ObjMarcas As New ClsProductosServicios
|
||||||
DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
|
' If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
|
||||||
DdlMarcaPSDes.DataBind()
|
' DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
|
||||||
End If
|
' DdlMarcaPSDes.DataBind()
|
||||||
End Using
|
' End If
|
||||||
|
'End Using
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlLinea.DataSource = GlobalDTClasificacionesDetalle(UsuarioActual.CveEmpresa)
|
DdlLinea.DataSource = GlobalDTClasificacionesDetalle(UsuarioActual.CveEmpresa)
|
||||||
@@ -95,7 +96,8 @@ Partial Class Ventas_RepPS
|
|||||||
Dim Clasificacion As String = If(DdlClasificacion.GetSelectedValuesM = "", "-1", DdlClasificacion.GetSelectedValuesM)
|
Dim Clasificacion As String = If(DdlClasificacion.GetSelectedValuesM = "", "-1", DdlClasificacion.GetSelectedValuesM)
|
||||||
Dim Linea As String = If(DdlLinea.GetSelectedValuesM = "", "-1", DdlLinea.GetSelectedValuesM)
|
Dim Linea As String = If(DdlLinea.GetSelectedValuesM = "", "-1", DdlLinea.GetSelectedValuesM)
|
||||||
Dim Marca As String = If(DdlMarcaPSDes.GetSelectedValuesM = "", "-1", DdlMarcaPSDes.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 Grupo As Integer = DdlGrupo.SelectedValue.ToEntero()
|
||||||
Dim CvePS As Integer = DdlPS.SelectedValue.ToEntero()
|
Dim CvePS As Integer = DdlPS.SelectedValue.ToEntero()
|
||||||
Dim CveMoneda As Integer = -1
|
Dim CveMoneda As Integer = -1
|
||||||
@@ -106,7 +108,7 @@ Partial Class Ventas_RepPS
|
|||||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas()
|
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()
|
DtReporte = ObjVentas.DtResultados.Copy()
|
||||||
GvDatos.DataSource = DtReporte
|
GvDatos.DataSource = DtReporte
|
||||||
Else
|
Else
|
||||||
@@ -167,7 +169,7 @@ Partial Class Ventas_RepPS
|
|||||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
||||||
If DtReporte IsNot Nothing AndAlso DtReporte.Rows.Count > 0 Then
|
If DtReporte IsNot Nothing AndAlso DtReporte.Rows.Count > 0 Then
|
||||||
Dim SbParametros As New StringBuilder
|
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)
|
SbParametros.AppendFormat(", Orden:{0}", DdlGrupo.SelectedItem.Text)
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||||
|
|||||||
@@ -5576,7 +5576,6 @@ Partial Class Ventas
|
|||||||
HdnFolioFiscalNC.Value = DbRowVenta("FolioFiscalPadre").ToString()
|
HdnFolioFiscalNC.Value = DbRowVenta("FolioFiscalPadre").ToString()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
TxtOrdenCompra.Text = DbRowVenta("OrdenCompra").ToString()
|
TxtOrdenCompra.Text = DbRowVenta("OrdenCompra").ToString()
|
||||||
TxtOrdenCompra.Enabled = False
|
TxtOrdenCompra.Enabled = False
|
||||||
|
|
||||||
@@ -12179,6 +12178,11 @@ Partial Class Ventas
|
|||||||
ObjFactura.Alfa1 = TxtAlfa1.Text.Trim
|
ObjFactura.Alfa1 = TxtAlfa1.Text.Trim
|
||||||
End If
|
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
|
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
|
||||||
If (ObjFactura.CveMoneda = 2 AndAlso ObjFactura.ConvertirPesos = True AndAlso ObjFactura.TipodeComprobante = "Ingresos" AndAlso RemisionesLista.Count > 0) Then
|
If (ObjFactura.CveMoneda = 2 AndAlso ObjFactura.ConvertirPesos = True AndAlso ObjFactura.TipodeComprobante = "Ingresos" AndAlso RemisionesLista.Count > 0) Then
|
||||||
Dim TotalCalculableImpuestos, TotalCalculableImpuestosIVA As Decimal
|
Dim TotalCalculableImpuestos, TotalCalculableImpuestosIVA As Decimal
|
||||||
@@ -25673,7 +25677,7 @@ Partial Class Ventas
|
|||||||
Dim SegundosRespuesta As Double = SWatch.ElapsedMilliseconds / 1000
|
Dim SegundosRespuesta As Double = SWatch.ElapsedMilliseconds / 1000
|
||||||
SegundosRespuesta = SegundosRespuesta.ToEntero
|
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, "")
|
Alert($"Los servicios de cancelación del SAT presentan lentitud en la respuesta [{ SegundosRespuesta } s].", TipoMensaje.ToastAdventencia, "")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -32535,11 +32539,11 @@ Partial Class Ventas
|
|||||||
|
|
||||||
For Each Dr As DataRow In dtSeleccionadas.Rows
|
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}")
|
MensajeRemisionesMedicas.Append($"Dr. {Dr("Medico").ToString}{vbCrLf}")
|
||||||
EsRemisionMedica = True
|
EsRemisionMedica = True
|
||||||
End If
|
End If
|
||||||
If Dr("Medico").ToString().Trim().Length > 0 Then
|
If Dr("Procedimiento").ToString.Trim.Length > 0 Then
|
||||||
MensajeRemisionesMedicas.Append($"Procedimiento {Dr("Procedimiento")}{vbCrLf}")
|
MensajeRemisionesMedicas.Append($"Procedimiento {Dr("Procedimiento")}{vbCrLf}")
|
||||||
EsRemisionMedica = True
|
EsRemisionMedica = True
|
||||||
End If
|
End If
|
||||||
@@ -32562,7 +32566,6 @@ Partial Class Ventas
|
|||||||
TxtObsFact.Text = If(MensajeRemisiones.ToString().Length > 0, MensajeRemisiones.ToString().Substring(0, MensajeRemisiones.ToString().Length - 2), "")
|
TxtObsFact.Text = If(MensajeRemisiones.ToString().Length > 0, MensajeRemisiones.ToString().Substring(0, MensajeRemisiones.ToString().Length - 2), "")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
TxtOrdenCompra.Text = If(ObsOC.ToString().Length > 0, ObsOC.ToString().Substring(0, ObsOC.ToString().Length - 2), "")
|
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), "")
|
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), "")
|
TxtObsAlmacen.Text = If(ObsInv.ToString().Length > 0, ObsInv.ToString().Substring(0, ObsInv.ToString().Length - 2), "")
|
||||||
|
|||||||
Reference in New Issue
Block a user