This commit is contained in:
2022-10-03 17:38:54 -07:00
32 changed files with 13797 additions and 2673 deletions

View File

@@ -2672,7 +2672,7 @@ Public Class ClsGenerales
CveActivoFijo As Integer, CveOS As Integer, CvePS As Integer, CveCompra As Integer,
CveIE As Integer, Actual As String, Anterior As String, CveUsuario As Integer,
CveEmpresa As Integer, SeElimino As Integer, Descripcion As String, Tipo As String,
Id_Clave As String, Optional IdPoliza As Integer = -1, Optional CvePromocion As Integer = -1) As Boolean
Id_Clave As String, Optional IdPoliza As Integer = -1, Optional CvePromocion As Integer = -1, Optional CveUsuarioTabla As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_HistorialBitacoraAdd")
@@ -2695,7 +2695,9 @@ Public Class ClsGenerales
.Add("@Id_Clave", SqlDbType.VarChar, 100).Value = Id_Clave
.Add("@IdPoliza", SqlDbType.Int).Value = IdPoliza
.Add("@CvePromocion", SqlDbType.Int).Value = CvePromocion
.Add("@CveUsuarioTabla", SqlDbType.Int).Value = CveUsuarioTabla
End With
'SqlTypes.SqlDateTime.Null
Try

View File

@@ -4285,7 +4285,6 @@ Public Class ClsPaginas
PaginaDict.Add("/GPS/ReporteUnidadesnoTransmiten.aspx".ToUpper(), 917)
PaginaDict.Add("/GPS/RepArrastre.aspx".ToUpper(), 718)
PaginaDict.Add("/Ventas/RepConciliacionEmitidosSat.aspx".ToUpper(), -1)
PaginaDict.Add("/Ventas/RepConciliacionSat.aspx".ToUpper(), 716)
PaginaDict.Add("/Ventas/SolicitudesSAT.aspx".ToUpper(), 717)
@@ -5400,7 +5399,8 @@ Public Class ClsPaginas
#End Region
#Region "Sistema"
'Cargo las páginas que deben tener restricción
PaginaDict.Add("/Sistemas/CatEmpresas.aspx".ToUpper(), 2)
'PaginaDict.Add("/Sistemas/CatEmpresas.aspx".ToUpper(), 2)
PaginaDict.Add("/Sistemas/CatEmpresas.aspx".ToUpper(), 24)
PaginaDict.Add("/Sistemas/Empresa.aspx".ToUpper(), 2)
PaginaDict.Add("/Sistemas/CatUsuarios.aspx".ToUpper(), 20)
PaginaDict.Add("/Sistemas/Usuarios.aspx".ToUpper(), 20)
@@ -5518,7 +5518,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Ventas/RepPUESinPago.aspx".ToUpper(), 672)
PaginaDict.Add("/Ventas/RepVentasResumen.aspx".ToUpper(), 674)
PaginaDict.Add("/Ventas/RepAnticiposEspeciales.aspx".ToUpper(), 678)
PaginaDict.Add("/Ventas/RepArqueos.aspx".ToUpper(), 679)
PaginaDict.Add("/Ventas/RepArqueosDetalle.aspx".ToUpper(), 680)
PaginaDict.Add("/Ventas/RepCotizacionesxFacturar.aspx".ToUpper(), 686)
PaginaDict.Add("/Ventas/RepRemisionesNC.aspx".ToUpper(), 687)
@@ -8493,7 +8493,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("UsoCFDI", ObjOC.UsoCFDI))
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
If UsuarioActual.CveEmpresa.Contiene(72, 80, 172) Then
params.Add(New ReportParameter("FolioAdicional", dtOC(0)("FolioAdicional").ToString))
params.Add(New ReportParameter("Vendedor", dtOC(0)("Vendedor").ToString))

View File

@@ -312,7 +312,7 @@ Public Class ClsSisEmpresas
End Try
Return Retorno
End Function
Public Function GetEmpresas(CveEmpresa As Integer, Empresa As String, RFC As String, Telefono As String, Contacto As String) As Boolean
Public Function GetEmpresas(CveEmpresa As Integer, Empresa As String, RFC As String, Telefono As String, Contacto As String, Optional CveUsuarioEmpresas As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Sis_EmpresasGet")
@@ -323,6 +323,7 @@ Public Class ClsSisEmpresas
.Add("@RFC", SqlDbType.VarChar).Value = RFC
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
.Add("@Contacto", SqlDbType.VarChar).Value = Contacto
.Add("@CveUsuarioEmpresas", SqlDbType.Int).Value = CveUsuarioEmpresas
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -5576,7 +5576,7 @@ Public Class ClsVentas
Public Function GetLineasAdicionales(CveLineaAdicional As Integer, CveCliente As Integer, CveProveedor As Integer, TipoLinea As Integer, CveMoneda As Integer,
FechaI As Date, FechaF As Date, CveEstatus As Integer, CveEmpresa As Integer) As Boolean
FechaI As Date, FechaF As Date, CveLineaAdicionalEstatus As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_LineasAdicionalesGet")
@@ -5589,7 +5589,7 @@ Public Class ClsVentas
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
.Add("@CveLineaAdicionalEstatus", SqlDbType.Int).Value = CveLineaAdicionalEstatus
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
@@ -5603,7 +5603,7 @@ Public Class ClsVentas
End Function
Public Function GetLineasAdicionalesSaldo(CveLineaAdicional As Integer, CveCliente As Integer, CveProveedor As Integer, CveMoneda As Integer, CveEmpresa As Integer, Optional ConSaldo As Integer = -1) As Boolean
Public Function GetLineasAdicionalesSaldo(CveLineaAdicional As Integer, CveCliente As Integer, CveProveedor As Integer, CveMoneda As Integer, CveEmpresa As Integer, Optional ConSaldo As Integer = -1, Optional FechaVencimientoConsulta As DateTime = MaxFecha) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_LineasAdicionalesSaldoGet")
@@ -5615,6 +5615,7 @@ Public Class ClsVentas
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@ConSaldo", SqlDbType.Int).Value = ConSaldo
.Add("@FechaVencimientoConsulta", SqlDbType.Date).Value = FechaVencimientoConsulta
End With
Try
SqlAdapter.Fill(Data)
@@ -5648,7 +5649,8 @@ Public Class ClsVentas
End Function
Public Function AddLineasAdicionales(LineaAdicional As String, CveCliente As Integer, CveProveedor As Integer, TipoLinea As Integer, Importe As Decimal,
CveMoneda As Integer, FechaVencimiento As Date, CveUsuario As Integer, CveClasificacionPS As Integer, CveEstatus As Integer) As Boolean
CveMoneda As Integer, FechaVencimiento As Date, CveUsuario As Integer, CveCategoria As Integer,
Optional DiasVencimiento As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_LineasAdicionalesAdd")
@@ -5663,8 +5665,8 @@ Public Class ClsVentas
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveClasificacionPS", SqlDbType.Int).Value = CveClasificacionPS
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
.Add("@DiasVencimiento", SqlDbType.VarChar).Value = DiasVencimiento
End With
@@ -5681,7 +5683,8 @@ Public Class ClsVentas
Public Function UpdateLineasAdicionales(CveLineaAdicional As Integer, LineaAdicional As String, CveCliente As Integer, CveProveedor As Integer, TipoLinea As Integer, Importe As Decimal,
CveMoneda As Integer, FechaVencimiento As Date, CveUsuario As Integer, CveClasificacionPS As Integer, CveEstatus As Integer, CveEmpresa As Integer, Optional Comprobante As String = "-1") As Boolean
CveMoneda As Integer, FechaVencimiento As Date, CveUsuario As Integer, CveCategoria As Integer, CveEmpresa As Integer,
Optional Comprobante As String = "-1", Optional DiasVencimiento As Integer = -1, Optional CveVenta As Integer = -1, Optional CveLineaAdicionalEstatus As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_LineasAdicionalesUpdate")
@@ -5696,10 +5699,12 @@ Public Class ClsVentas
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveClasificacionPS", SqlDbType.Int).Value = CveClasificacionPS
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Comprobante", SqlDbType.VarChar).Value = Comprobante
.Add("@DiasVencimiento", SqlDbType.VarChar).Value = DiasVencimiento
.Add("@CveVenta", SqlDbType.VarChar).Value = CveVenta
.Add("@CveLineaAdicionalEstatus", SqlDbType.Int).Value = CveLineaAdicionalEstatus
End With

View File

@@ -25,10 +25,18 @@
<DataField>CodigoPS</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Inicial">
<DataField>Inicial</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="E_Almacen">
<DataField>E_Almacen</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="E_Pub">
<DataField>E_Pub</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="E_Traspaso">
<DataField>E_Traspaso</DataField>
<rd:TypeName>System.String</rd:TypeName>
@@ -37,6 +45,10 @@
<DataField>E_Compra</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="E_Otros">
<DataField>E_Otros</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="S_Almacen">
<DataField>S_Almacen</DataField>
<rd:TypeName>System.String</rd:TypeName>
@@ -537,17 +549,18 @@
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="TipoAgrupador">
<Textbox Name="Inicial">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>0</Value>
<Value>=Fields!Inicial.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=IIF(Fields!CvePSCargo.Value &gt; 0, "Default","Bold")</FontWeight>
<Format>#,0;(#,0)</Format>
</Style>
</TextRun>
</TextRuns>
@@ -556,7 +569,7 @@
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>TipoAgrupador</rd:DefaultName>
<rd:DefaultName>Inicial</rd:DefaultName>
<Style>
<Border>
<Color>=IIF(Fields!CvePSCargo.Value &gt; 0, "White","Silver")</Color>
@@ -610,18 +623,18 @@
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Paqueteria1">
<Textbox Name="E_Pub">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>0</Value>
<Value>=Fields!E_Pub.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=IIF(Fields!CvePSCargo.Value &gt; 0, "Default","Bold")</FontWeight>
<Format>d</Format>
<Format>#,0;(#,0)</Format>
</Style>
</TextRun>
</TextRuns>
@@ -630,7 +643,7 @@
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Paqueteria1</rd:DefaultName>
<rd:DefaultName>E_Pub</rd:DefaultName>
<Style>
<Border>
<Color>=IIF(Fields!CvePSCargo.Value &gt; 0, "White","Silver")</Color>
@@ -721,18 +734,18 @@
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Fecha">
<Textbox Name="E_Otros">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>0</Value>
<Value>=Fields!E_Otros.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=IIF(Fields!CvePSCargo.Value &gt; 0, "Default","Bold")</FontWeight>
<Format>d</Format>
<Format>#,0;(#,0)</Format>
</Style>
</TextRun>
</TextRuns>
@@ -741,7 +754,7 @@
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Fecha</rd:DefaultName>
<rd:DefaultName>E_Otros</rd:DefaultName>
<Style>
<Border>
<Color>=IIF(Fields!CvePSCargo.Value &gt; 0, "White","Silver")</Color>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

BIN
Empresas/171/Logo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
Empresas/171/Logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -655,10 +655,6 @@ Partial Class General_SaldosIniciales
Exit Sub
End If
End If

View File

@@ -45,7 +45,7 @@ Partial Class Sistemas_CatEmpresas
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
If UsuarioActual.CveRol <> 1 Then Response.Redirect("/Inicio.aspx")
'If UsuarioActual.CveRol <> 1 Then Response.Redirect("/Inicio.aspx")
ViewState("Orden") = "CveEmpresa ASC"
ViewState("CveRol") = -1
@@ -117,16 +117,20 @@ Partial Class Sistemas_CatEmpresas
End Sub
Private Sub CargaGrid(Orden As String)
If Orden <> String.Empty Then
Dim DV As New DataView(GlobalDTEmpresas, "", Orden, DataViewRowState.CurrentRows)
GvDatos.DataSource = DV.ToTable()
DV.Dispose()
Else
GvDatos.DataSource = GlobalDTEmpresas
End If
Using ObjEmpresas As New ClsSisEmpresas()
If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario) Then
GvDatos.DataSource = ObjEmpresas.DtResultados
Else
GvDatos.DataSource = Nothing
End If
End Using
GvDatos.DataBind()
UpDatos.Update()
End Sub
#End Region
End Class

View File

@@ -948,6 +948,7 @@
</div>
</div>
<div class="portlet-body">
<asp:TabContainer runat="server" ID="TabPadres">
<asp:TabPanel ID="ContPAQ" runat="server" HeaderText="ContPAQ">
<ContentTemplate>
@@ -1048,7 +1049,8 @@
</table>
</ContentTemplate>
</asp:TabPanel>
<ajax:TabPanel ID="TabContSIG" runat="server" HeaderText="ContSIG">
<%--<ajax:TabPanel ID="TabContSIG" runat="server" HeaderText="ContSIG">
<ContentTemplate>
<table border="0" width="100%">
@@ -1146,8 +1148,13 @@
</tr>
</table>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabPanel>--%>
</asp:TabContainer>
</div>
</div>
</div>

View File

@@ -6,6 +6,7 @@ Imports Extensiones
Imports System.Runtime.InteropServices
Imports System.IO
Imports Microsoft.Reporting.WebForms
Imports Microsoft.Owin.Security.Provider
Partial Class Sistemas_Empresa
Inherits ClsPaginas
@@ -152,6 +153,18 @@ Partial Class Sistemas_Empresa
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
If UsuarioActual.CveRol <> 1 AndAlso (Request("CveEmpresa") IsNot Nothing AndAlso Request("CveEmpresa").ToEntero > 0) Then
If Not ValidaCveEmpresaUsaurio(UsuarioActual.CveUsuario, Request("CveEmpresa").ToEntero) Then
'Response.Redirect("../Inicio.aspx")
Alert("No tiene acceso a esta empresa.", TipoMensaje.MsgAdvertencia, "document.location.href = ""../Inicio.aspx""")
Exit Sub
End If
End If
CargaDdlPac()
CargaRegimenFiscal()
CargaGridIndicadores()
@@ -159,6 +172,7 @@ Partial Class Sistemas_Empresa
DtFuncionalidades = Nothing
DtCuentas = Nothing
CveClasificacionPorcentaje = 0
If (Request("CveEmpresa") IsNot Nothing AndAlso IsNumeric(Request("CveEmpresa")) AndAlso Request("CveEmpresa").ToEntero > 0 AndAlso UsuarioActual.CveRol = 1) OrElse UsuarioActual.CveRol <> 1 Then
ViewState("CveEmpresa") = If(UsuarioActual.CveRol <> 1, UsuarioActual.Empresa.CveEmpresa.ToString, Request("CveEmpresa")) ' Request("CveEmpresa")
' Session("FileUpload") = CveEmpresa
@@ -207,6 +221,22 @@ Partial Class Sistemas_Empresa
End If
End Sub
Private Function ValidaCveEmpresaUsaurio(CveUsuario As Integer, CveEmpresaValidar As Integer) As Boolean
Dim Respuesta As Boolean = False
Using ObjEmpresas As New ClsSisEmpresas()
If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario) Then
If ObjEmpresas.DtResultados.FiltraParametros($"CveEmpresa = {CveEmpresaValidar}").Rows.Count = 1 Then
Respuesta = True
End If
End If
End Using
Return Respuesta
End Function
Private Sub CargaDatos()
Dim ObjEmpresas As New ClsSisEmpresas()
@@ -426,30 +456,30 @@ Partial Class Sistemas_Empresa
CargaFuncionalidad(221, DdlActivoFijo)
CargaFuncionalidad(232, DdlProveedoresSIG)
CargaFuncionalidad(233, DdlClientesSIG)
CargaFuncionalidad(234, DdlDeudoresSIG)
CargaFuncionalidad(235, DdlAcreedoresSIG)
CargaFuncionalidad(236, DdlDocxPagarSIG)
CargaFuncionalidad(237, DdlAnticipoClienteSIG)
CargaFuncionalidad(238, DdlAnticipoProveedoresSIG)
CargaFuncionalidad(239, DdlInventarioSIG)
CargaFuncionalidad(240, DdlGastoSIG)
CargaFuncionalidad(241, DdlBancosSIG)
CargaFuncionalidad(242, DdlCajaSIG)
CargaFuncionalidad(243, DdlFyESIG)
CargaFuncionalidad(244, DdlActivoFijoSIG)
'CargaFuncionalidad(232, DdlProveedoresSIG)
'CargaFuncionalidad(233, DdlClientesSIG)
'CargaFuncionalidad(234, DdlDeudoresSIG)
'CargaFuncionalidad(235, DdlAcreedoresSIG)
'CargaFuncionalidad(236, DdlDocxPagarSIG)
'CargaFuncionalidad(237, DdlAnticipoClienteSIG)
'CargaFuncionalidad(238, DdlAnticipoProveedoresSIG)
'CargaFuncionalidad(239, DdlInventarioSIG)
'CargaFuncionalidad(240, DdlGastoSIG)
'CargaFuncionalidad(241, DdlBancosSIG)
'CargaFuncionalidad(242, DdlCajaSIG)
'CargaFuncionalidad(243, DdlFyESIG)
'CargaFuncionalidad(244, DdlActivoFijoSIG)
LbBannerDescarga.OnClientClick = "javascript:AbrirVentana('/Banners/" & .Banner & "', 500, 500, 'N', 'Banner Empresa');"
Session("FileUpload") = .Banner
'LbArchivoKeyDescarga.OnClientClick = "javascript:AbrirVentana('/Key/" & .ArchivoKey & "', 500, 500, 'N', 'ArchivoKey Empresa');"
Session("FileUpload") = .ArchivoKey
LbBannerDescarga.OnClientClick = "javascript:AbrirVentana('/Cer/" & .ArchivoCer & "', 500, 500, 'N', 'ArchivoCer Empresa');"
Session("FileUpload") = .ArchivoCer
'LbArchivoPfxDescarga.OnClientClick = "javascript:AbrirVentana('/Pfx/" & .ArchivoPfx & "', 500, 500, 'N', 'ArchivoPfx Empresa');"
Session("FileUpload") = .ArchivoPfx
End With
@@ -665,20 +695,20 @@ Partial Class Sistemas_Empresa
If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 246, DdlClientes)
If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 237, DdlAnticipoCliente)
'AGREGAR FUNCIONALIDADES
If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 232, DdlProveedoresSIG)
If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 233, DdlClientesSIG)
If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 239, DdlInventarioSIG)
If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 240, DdlGastoSIG)
If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 241, DdlBancosSIG)
If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 234, DdlDeudoresSIG)
If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 235, DdlAcreedoresSIG)
If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 236, DdlDocxPagarSIG)
If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 237, DdlAnticipoClienteSIG)
If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 238, DdlAnticipoProveedoresSIG)
If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 242, DdlCajaSIG)
If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 243, DdlFyESIG)
If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 244, DdlActivoFijoSIG)
''AGREGAR FUNCIONALIDADES
'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 232, DdlProveedoresSIG)
'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 233, DdlClientesSIG)
'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 239, DdlInventarioSIG)
'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 240, DdlGastoSIG)
'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 241, DdlBancosSIG)
'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 234, DdlDeudoresSIG)
'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 235, DdlAcreedoresSIG)
'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 236, DdlDocxPagarSIG)
'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 237, DdlAnticipoClienteSIG)
'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 238, DdlAnticipoProveedoresSIG)
'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 242, DdlCajaSIG)
'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 243, DdlFyESIG)
'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 244, DdlActivoFijoSIG)
'TRIGGER
@@ -1057,85 +1087,86 @@ Partial Class Sistemas_Empresa
DdlCuentaOtrosIngresos.AutoPostBack = False : DdlCuentaOtrosIngresos.Attributes.Remove("onclick") : DdlCuentaOtrosIngresos.CssClass &= " select2me"
'PADRES SIG
Case "42"
If DdlProveedoresSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
Seleccionado = DdlProveedoresSIG.SelectedValue
DdlProveedoresSIG.Items.Clear() : DdlProveedoresSIG.Items.Add(New ListItem("Seleccione", "0"))
DdlProveedoresSIG.DataSource = DtCuentasContablesSIG : DdlProveedoresSIG.DataBind() : DdlProveedoresSIG.SelectedValue = Seleccionado
DdlProveedoresSIG.AutoPostBack = False : DdlProveedoresSIG.Attributes.Remove("onclick") : DdlProveedoresSIG.CssClass &= " select2me"
Case "43"
If DdlClientesSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
Seleccionado = DdlClientesSIG.SelectedValue
DdlClientesSIG.Items.Clear() : DdlClientesSIG.Items.Add(New ListItem("Seleccione", "0"))
DdlClientesSIG.DataSource = DtCuentasContablesSIG : DdlClientesSIG.DataBind() : DdlClientesSIG.SelectedValue = Seleccionado
DdlClientesSIG.AutoPostBack = False : DdlClientesSIG.Attributes.Remove("onclick") : DdlClientesSIG.CssClass &= " select2me"
Case "44"
If DdlInventarioSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
Seleccionado = DdlInventarioSIG.SelectedValue
DdlInventarioSIG.Items.Clear() : DdlInventarioSIG.Items.Add(New ListItem("Seleccione", "0"))
DdlInventarioSIG.DataSource = DtCuentasContablesSIG : DdlInventarioSIG.DataBind() : DdlInventarioSIG.SelectedValue = Seleccionado
DdlInventarioSIG.AutoPostBack = False : DdlInventarioSIG.Attributes.Remove("onclick") : DdlInventarioSIG.CssClass &= " select2me"
Case "45"
If DdlGastoSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
Seleccionado = DdlGasto.SelectedValue
DdlGastoSIG.Items.Clear() : DdlGastoSIG.Items.Add(New ListItem("Seleccione", "0"))
DdlGastoSIG.DataSource = DtCuentasContablesSIG : DdlGastoSIG.DataBind() : DdlGastoSIG.SelectedValue = Seleccionado
DdlGastoSIG.AutoPostBack = False : DdlGastoSIG.Attributes.Remove("onclick") : DdlGastoSIG.CssClass &= " select2me"
Case "46"
If DdlBancosSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
Seleccionado = DdlBancosSIG.SelectedValue
DdlBancosSIG.Items.Clear() : DdlBancosSIG.Items.Add(New ListItem("Seleccione", "0"))
DdlBancosSIG.DataSource = DtCuentasContablesSIG : DdlBancosSIG.DataBind() : DdlBancosSIG.SelectedValue = Seleccionado
DdlBancosSIG.AutoPostBack = False : DdlBancosSIG.Attributes.Remove("onclick") : DdlBancosSIG.CssClass &= " select2me"
Case "47"
If DdlDeudoresSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
Seleccionado = DdlDeudoresSIG.SelectedValue
DdlDeudoresSIG.Items.Clear() : DdlDeudoresSIG.Items.Add(New ListItem("Seleccione", "0"))
DdlDeudoresSIG.DataSource = DtCuentasContablesSIG : DdlDeudoresSIG.DataBind() : DdlDeudoresSIG.SelectedValue = Seleccionado
DdlDeudoresSIG.AutoPostBack = False : DdlDeudoresSIG.Attributes.Remove("onclick") : DdlDeudoresSIG.CssClass &= " select2me"
Case "48"
If DdlAcreedoresSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
Seleccionado = DdlAcreedoresSIG.SelectedValue
DdlAcreedoresSIG.Items.Clear() : DdlAcreedoresSIG.Items.Add(New ListItem("Seleccione", "0"))
DdlAcreedoresSIG.DataSource = DtCuentasContablesSIG : DdlAcreedoresSIG.DataBind() : DdlAcreedoresSIG.SelectedValue = Seleccionado
DdlAcreedoresSIG.AutoPostBack = False : DdlAcreedoresSIG.Attributes.Remove("onclick") : DdlAcreedoresSIG.CssClass &= " select2me"
Case "49"
If DdlDocxPagarSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
Seleccionado = DdlDocxPagarSIG.SelectedValue
DdlDocxPagarSIG.Items.Clear() : DdlDocxPagarSIG.Items.Add(New ListItem("Seleccione", "0"))
DdlDocxPagarSIG.DataSource = DtCuentasContablesSIG : DdlDocxPagarSIG.DataBind() : DdlDocxPagarSIG.SelectedValue = Seleccionado
DdlDocxPagarSIG.AutoPostBack = False : DdlDocxPagarSIG.Attributes.Remove("onclick") : DdlDocxPagarSIG.CssClass &= " select2me"
Case "50"
If DdlAnticipoClienteSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
Seleccionado = DdlAnticipoClienteSIG.SelectedValue
DdlAnticipoClienteSIG.Items.Clear() : DdlAnticipoClienteSIG.Items.Add(New ListItem("Seleccione", "0"))
DdlAnticipoClienteSIG.DataSource = DtCuentasContablesSIG : DdlAnticipoClienteSIG.DataBind() : DdlAnticipoClienteSIG.SelectedValue = Seleccionado
DdlAnticipoClienteSIG.AutoPostBack = False : DdlAnticipoClienteSIG.Attributes.Remove("onclick") : DdlAnticipoClienteSIG.CssClass &= " select2me"
Case "51"
If DdlAnticipoProveedoresSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
Seleccionado = DdlAnticipoProveedoresSIG.SelectedValue
DdlAnticipoProveedoresSIG.Items.Clear() : DdlAnticipoProveedoresSIG.Items.Add(New ListItem("Seleccione", "0"))
DdlAnticipoProveedoresSIG.DataSource = DtCuentasContablesSIG : DdlAnticipoProveedoresSIG.DataBind() : DdlAnticipoProveedoresSIG.SelectedValue = Seleccionado
DdlAnticipoProveedoresSIG.AutoPostBack = False : DdlAnticipoProveedoresSIG.Attributes.Remove("onclick") : DdlAnticipoProveedoresSIG.CssClass &= " select2me"
Case "52"
If DdlCajaSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
Seleccionado = DdlCajaSIG.SelectedValue
DdlCajaSIG.Items.Clear() : DdlCajaSIG.Items.Add(New ListItem("Seleccione", "0"))
DdlCajaSIG.DataSource = DtCuentasContablesSIG : DdlCajaSIG.DataBind() : DdlCajaSIG.SelectedValue = Seleccionado
DdlCajaSIG.AutoPostBack = False : DdlCajaSIG.Attributes.Remove("onclick") : DdlCajaSIG.CssClass &= " select2me"
Case "53"
If DdlFyESIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
Seleccionado = DdlFyESIG.SelectedValue
DdlFyESIG.Items.Clear() : DdlFyESIG.Items.Add(New ListItem("Seleccione", "0"))
DdlFyESIG.DataSource = DtCuentasContablesSIG : DdlFyESIG.DataBind() : DdlFyESIG.SelectedValue = Seleccionado
DdlFyESIG.AutoPostBack = False : DdlFyESIG.Attributes.Remove("onclick") : DdlFyESIG.CssClass &= " select2me"
Case "54"
If DdlActivoFijoSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
Seleccionado = DdlActivoFijoSIG.SelectedValue
DdlActivoFijoSIG.Items.Clear() : DdlActivoFijoSIG.Items.Add(New ListItem("Seleccione", "0"))
DdlActivoFijoSIG.DataSource = DtCuentasContablesSIG : DdlActivoFijoSIG.DataBind() : DdlActivoFijoSIG.SelectedValue = Seleccionado
DdlActivoFijoSIG.AutoPostBack = False : DdlActivoFijoSIG.Attributes.Remove("onclick") : DdlActivoFijoSIG.CssClass &= " select2me"
' 'PADRES SIG
'Case "42"
' If DdlProveedoresSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
' Seleccionado = DdlProveedoresSIG.SelectedValue
' DdlProveedoresSIG.Items.Clear() : DdlProveedoresSIG.Items.Add(New ListItem("Seleccione", "0"))
' DdlProveedoresSIG.DataSource = DtCuentasContablesSIG : DdlProveedoresSIG.DataBind() : DdlProveedoresSIG.SelectedValue = Seleccionado
' DdlProveedoresSIG.AutoPostBack = False : DdlProveedoresSIG.Attributes.Remove("onclick") : DdlProveedoresSIG.CssClass &= " select2me"
'Case "43"
' If DdlClientesSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
' Seleccionado = DdlClientesSIG.SelectedValue
' DdlClientesSIG.Items.Clear() : DdlClientesSIG.Items.Add(New ListItem("Seleccione", "0"))
' DdlClientesSIG.DataSource = DtCuentasContablesSIG : DdlClientesSIG.DataBind() : DdlClientesSIG.SelectedValue = Seleccionado
' DdlClientesSIG.AutoPostBack = False : DdlClientesSIG.Attributes.Remove("onclick") : DdlClientesSIG.CssClass &= " select2me"
'Case "44"
' If DdlInventarioSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
' Seleccionado = DdlInventarioSIG.SelectedValue
' DdlInventarioSIG.Items.Clear() : DdlInventarioSIG.Items.Add(New ListItem("Seleccione", "0"))
' DdlInventarioSIG.DataSource = DtCuentasContablesSIG : DdlInventarioSIG.DataBind() : DdlInventarioSIG.SelectedValue = Seleccionado
' DdlInventarioSIG.AutoPostBack = False : DdlInventarioSIG.Attributes.Remove("onclick") : DdlInventarioSIG.CssClass &= " select2me"
'Case "45"
' If DdlGastoSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
' Seleccionado = DdlGasto.SelectedValue
' DdlGastoSIG.Items.Clear() : DdlGastoSIG.Items.Add(New ListItem("Seleccione", "0"))
' DdlGastoSIG.DataSource = DtCuentasContablesSIG : DdlGastoSIG.DataBind() : DdlGastoSIG.SelectedValue = Seleccionado
' DdlGastoSIG.AutoPostBack = False : DdlGastoSIG.Attributes.Remove("onclick") : DdlGastoSIG.CssClass &= " select2me"
'Case "46"
' If DdlBancosSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
' Seleccionado = DdlBancosSIG.SelectedValue
' DdlBancosSIG.Items.Clear() : DdlBancosSIG.Items.Add(New ListItem("Seleccione", "0"))
' DdlBancosSIG.DataSource = DtCuentasContablesSIG : DdlBancosSIG.DataBind() : DdlBancosSIG.SelectedValue = Seleccionado
' DdlBancosSIG.AutoPostBack = False : DdlBancosSIG.Attributes.Remove("onclick") : DdlBancosSIG.CssClass &= " select2me"
'Case "47"
' If DdlDeudoresSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
' Seleccionado = DdlDeudoresSIG.SelectedValue
' DdlDeudoresSIG.Items.Clear() : DdlDeudoresSIG.Items.Add(New ListItem("Seleccione", "0"))
' DdlDeudoresSIG.DataSource = DtCuentasContablesSIG : DdlDeudoresSIG.DataBind() : DdlDeudoresSIG.SelectedValue = Seleccionado
' DdlDeudoresSIG.AutoPostBack = False : DdlDeudoresSIG.Attributes.Remove("onclick") : DdlDeudoresSIG.CssClass &= " select2me"
'Case "48"
' If DdlAcreedoresSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
' Seleccionado = DdlAcreedoresSIG.SelectedValue
' DdlAcreedoresSIG.Items.Clear() : DdlAcreedoresSIG.Items.Add(New ListItem("Seleccione", "0"))
' DdlAcreedoresSIG.DataSource = DtCuentasContablesSIG : DdlAcreedoresSIG.DataBind() : DdlAcreedoresSIG.SelectedValue = Seleccionado
' DdlAcreedoresSIG.AutoPostBack = False : DdlAcreedoresSIG.Attributes.Remove("onclick") : DdlAcreedoresSIG.CssClass &= " select2me"
'Case "49"
' If DdlDocxPagarSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
' Seleccionado = DdlDocxPagarSIG.SelectedValue
' DdlDocxPagarSIG.Items.Clear() : DdlDocxPagarSIG.Items.Add(New ListItem("Seleccione", "0"))
' DdlDocxPagarSIG.DataSource = DtCuentasContablesSIG : DdlDocxPagarSIG.DataBind() : DdlDocxPagarSIG.SelectedValue = Seleccionado
' DdlDocxPagarSIG.AutoPostBack = False : DdlDocxPagarSIG.Attributes.Remove("onclick") : DdlDocxPagarSIG.CssClass &= " select2me"
'Case "50"
' If DdlAnticipoClienteSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
' Seleccionado = DdlAnticipoClienteSIG.SelectedValue
' DdlAnticipoClienteSIG.Items.Clear() : DdlAnticipoClienteSIG.Items.Add(New ListItem("Seleccione", "0"))
' DdlAnticipoClienteSIG.DataSource = DtCuentasContablesSIG : DdlAnticipoClienteSIG.DataBind() : DdlAnticipoClienteSIG.SelectedValue = Seleccionado
' DdlAnticipoClienteSIG.AutoPostBack = False : DdlAnticipoClienteSIG.Attributes.Remove("onclick") : DdlAnticipoClienteSIG.CssClass &= " select2me"
'Case "51"
' If DdlAnticipoProveedoresSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
' Seleccionado = DdlAnticipoProveedoresSIG.SelectedValue
' DdlAnticipoProveedoresSIG.Items.Clear() : DdlAnticipoProveedoresSIG.Items.Add(New ListItem("Seleccione", "0"))
' DdlAnticipoProveedoresSIG.DataSource = DtCuentasContablesSIG : DdlAnticipoProveedoresSIG.DataBind() : DdlAnticipoProveedoresSIG.SelectedValue = Seleccionado
' DdlAnticipoProveedoresSIG.AutoPostBack = False : DdlAnticipoProveedoresSIG.Attributes.Remove("onclick") : DdlAnticipoProveedoresSIG.CssClass &= " select2me"
'Case "52"
' If DdlCajaSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
' Seleccionado = DdlCajaSIG.SelectedValue
' DdlCajaSIG.Items.Clear() : DdlCajaSIG.Items.Add(New ListItem("Seleccione", "0"))
' DdlCajaSIG.DataSource = DtCuentasContablesSIG : DdlCajaSIG.DataBind() : DdlCajaSIG.SelectedValue = Seleccionado
' DdlCajaSIG.AutoPostBack = False : DdlCajaSIG.Attributes.Remove("onclick") : DdlCajaSIG.CssClass &= " select2me"
'Case "53"
' If DdlFyESIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
' Seleccionado = DdlFyESIG.SelectedValue
' DdlFyESIG.Items.Clear() : DdlFyESIG.Items.Add(New ListItem("Seleccione", "0"))
' DdlFyESIG.DataSource = DtCuentasContablesSIG : DdlFyESIG.DataBind() : DdlFyESIG.SelectedValue = Seleccionado
' DdlFyESIG.AutoPostBack = False : DdlFyESIG.Attributes.Remove("onclick") : DdlFyESIG.CssClass &= " select2me"
'Case "54"
' If DdlActivoFijoSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG()
' Seleccionado = DdlActivoFijoSIG.SelectedValue
' DdlActivoFijoSIG.Items.Clear() : DdlActivoFijoSIG.Items.Add(New ListItem("Seleccione", "0"))
' DdlActivoFijoSIG.DataSource = DtCuentasContablesSIG : DdlActivoFijoSIG.DataBind() : DdlActivoFijoSIG.SelectedValue = Seleccionado
' DdlActivoFijoSIG.AutoPostBack = False : DdlActivoFijoSIG.Attributes.Remove("onclick") : DdlActivoFijoSIG.CssClass &= " select2me"
End Select
@@ -1171,20 +1202,20 @@ Partial Class Sistemas_Empresa
DdlCuentaDescuentoVenta.AutoPostBack = True
DdlCuentaOtrosIngresos.AutoPostBack = True
'CUENTAS PADRES SIG
DdlProveedoresSIG.AutoPostBack = True
DdlClientesSIG.AutoPostBack = True
DdlInventarioSIG.AutoPostBack = True
DdlGastoSIG.AutoPostBack = True
DdlBancosSIG.AutoPostBack = True
DdlDeudoresSIG.AutoPostBack = True
DdlAcreedoresSIG.AutoPostBack = True
DdlDocxPagarSIG.AutoPostBack = True
DdlAnticipoClienteSIG.AutoPostBack = True
DdlAnticipoProveedoresSIG.AutoPostBack = True
DdlCajaSIG.AutoPostBack = True
DdlFyESIG.AutoPostBack = True
DdlActivoFijoSIG.AutoPostBack = True
''CUENTAS PADRES SIG
'DdlProveedoresSIG.AutoPostBack = True
'DdlClientesSIG.AutoPostBack = True
'DdlInventarioSIG.AutoPostBack = True
'DdlGastoSIG.AutoPostBack = True
'DdlBancosSIG.AutoPostBack = True
'DdlDeudoresSIG.AutoPostBack = True
'DdlAcreedoresSIG.AutoPostBack = True
'DdlDocxPagarSIG.AutoPostBack = True
'DdlAnticipoClienteSIG.AutoPostBack = True
'DdlAnticipoProveedoresSIG.AutoPostBack = True
'DdlCajaSIG.AutoPostBack = True
'DdlFyESIG.AutoPostBack = True
'DdlActivoFijoSIG.AutoPostBack = True
DdlIVAxAcreditar.Attributes.Add("onclick", "CargaCuentas(1);")
@@ -1217,20 +1248,20 @@ Partial Class Sistemas_Empresa
DdlCuentaDescuentoVenta.Attributes.Add("onclick", "CargaCuentas(40);")
DdlCuentaOtrosIngresos.Attributes.Add("onclick", "CargaCuentas(41);")
'CUENTAS PADRES
DdlProveedoresSIG.Attributes.Add("onclick", "CargaCuentas(42);")
DdlClientesSIG.Attributes.Add("onclick", "CargaCuentas(43);")
DdlInventarioSIG.Attributes.Add("onclick", "CargaCuentas(44);")
DdlGastoSIG.Attributes.Add("onclick", "CargaCuentas(45);")
DdlBancosSIG.Attributes.Add("onclick", "CargaCuentas(46);")
DdlDeudoresSIG.Attributes.Add("onclick", "CargaCuentas(47);")
DdlAcreedoresSIG.Attributes.Add("onclick", "CargaCuentas(48);")
DdlDocxPagarSIG.Attributes.Add("onclick", "CargaCuentas(49);")
DdlAnticipoClienteSIG.Attributes.Add("onclick", "CargaCuentas(50);")
DdlAnticipoProveedoresSIG.Attributes.Add("onclick", "CargaCuentas(51);")
DdlCajaSIG.Attributes.Add("onclick", "CargaCuentas(52);")
DdlFyESIG.Attributes.Add("onclick", "CargaCuentas(53);")
DdlActivoFijoSIG.Attributes.Add("onclick", "CargaCuentas(54);")
''CUENTAS PADRES
'DdlProveedoresSIG.Attributes.Add("onclick", "CargaCuentas(42);")
'DdlClientesSIG.Attributes.Add("onclick", "CargaCuentas(43);")
'DdlInventarioSIG.Attributes.Add("onclick", "CargaCuentas(44);")
'DdlGastoSIG.Attributes.Add("onclick", "CargaCuentas(45);")
'DdlBancosSIG.Attributes.Add("onclick", "CargaCuentas(46);")
'DdlDeudoresSIG.Attributes.Add("onclick", "CargaCuentas(47);")
'DdlAcreedoresSIG.Attributes.Add("onclick", "CargaCuentas(48);")
'DdlDocxPagarSIG.Attributes.Add("onclick", "CargaCuentas(49);")
'DdlAnticipoClienteSIG.Attributes.Add("onclick", "CargaCuentas(50);")
'DdlAnticipoProveedoresSIG.Attributes.Add("onclick", "CargaCuentas(51);")
'DdlCajaSIG.Attributes.Add("onclick", "CargaCuentas(52);")
'DdlFyESIG.Attributes.Add("onclick", "CargaCuentas(53);")
'DdlActivoFijoSIG.Attributes.Add("onclick", "CargaCuentas(54);")
UpDatos.Update()

View File

@@ -493,7 +493,7 @@
<ajax:TabPanel runat="server" HeaderText="Requisiciones" ID="tabRequisiciones">
<ContentTemplate>
<div style="max-height: 300px; overflow-y: auto;">
<asp:GridView ID="GvEstatusUsuariosREQ" GridLines="None" DataKeyNames="CveProyecto,CveSubProyecto" CssClass="table table-striped table-advance table-hover Widthall" Width="100%" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Usuarios Registrados" ToolTip="Listado de Usuarios">
<asp:GridView ID="GvEstatusUsuariosREQ" GridLines="None" DataKeyNames="CveProyecto,CveSubProyecto,SubProyecto" CssClass="table table-striped table-advance table-hover Widthall" Width="100%" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Usuarios Registrados" ToolTip="Listado de Usuarios">
<HeaderStyle VerticalAlign="Middle" />
<Columns>
<asp:BoundField HeaderText="Proyecto" DataField="Proyecto" ItemStyle-HorizontalAlign="Left" />
@@ -836,7 +836,7 @@
<ajax:TabPanel ID="tabOrdenesCompra" runat="server" HeaderText="Ordenes de Compra">
<ContentTemplate>
<div style="max-height: 300px; overflow-y: auto;">
<asp:GridView ID="GvEstatusUsuariosOC" DataKeyNames="CveProyecto,CveSubProyecto" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None" Width="100%" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Usuarios Registrados" ToolTip="Listado de Usuarios">
<asp:GridView ID="GvEstatusUsuariosOC" DataKeyNames="CveProyecto,CveSubProyecto,SubProyecto" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None" Width="100%" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Usuarios Registrados" ToolTip="Listado de Usuarios">
<HeaderStyle VerticalAlign="Middle" />
<Columns>
<asp:BoundField HeaderText="Proyecto" DataField="Proyecto" ItemStyle-HorizontalAlign="Left" />

View File

@@ -371,6 +371,15 @@ Partial Class Sistemas_UsuarioDetalle
End Set
End Property
Private Property DTOCEstatus As DataTable
Get
Return CType(ViewState("DTOCEstatus"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTOCEstatus") = value
End Set
End Property
'Private Property CveSucursal As Integer
' Get
' If ViewState("CveSucursal") Is Nothing Then
@@ -462,6 +471,16 @@ Partial Class Sistemas_UsuarioDetalle
CreaDtAsignacionesMultiEmpresa()
CveEmpresaAnterior = DdlEmpresaAsignaciones.SelectedValue.ToEntero
Using ObjOc As New ClsOC
If ObjOc.GetEstatus() Then
DTOCEstatus = ObjOc.DtResultados
Else
DTOCEstatus = New DataTable
End If
End Using
End If
End Sub
@@ -804,6 +823,7 @@ Partial Class Sistemas_UsuarioDetalle
Dim ObjOS As New ClsOS(ObjUsuarios.IniciaTransacSQL())
Dim Indicador As New ClsIndicadores(ObjUsuarios.IniciaTransacSQL())
Dim ObjBancos As New ClsBancos(ObjUsuarios.IniciaTransacSQL())
Dim ObjGenerales As New ClsGenerales(ObjUsuarios.IniciaTransacSQL)
Dim TieneError = False
Dim EsNuevoUsuario As Boolean = False
@@ -972,10 +992,19 @@ Partial Class Sistemas_UsuarioDetalle
Exit For
End If
ElseIf dr("Accion").ToString = "2" Then
If Not ObjUsuarios.RemoveSubProyectos(CveUsuario, dr("CveSubProyecto").ToString.ToEntero, UsuarioActual.CveUsuario) Then
If ObjUsuarios.RemoveSubProyectos(CveUsuario, dr("CveSubProyecto").ToString.ToEntero, UsuarioActual.CveUsuario) Then
If Not ObjGenerales.AddHistorialBitacora(406, -1, -1, -1, -1, -1, -1, -1, "", dr("SubProyecto").ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, "-1", "-1", "-1", CveUsuarioTabla:=CveUsuario) Then
TieneError = True
Exit For
End If
Else
TieneError = True
Exit For
End If
ElseIf dr("Accion").ToString = "4" Then
If Not ObjUsuarios.UpdateSubProyectos(CveUsuario, dr("CveSubProyecto").ToString.ToEntero, dr("ViejoCveSubProyecto").ToString.ToEntero, UsuarioActual.CveUsuario) Then
TieneError = True
@@ -2372,13 +2401,21 @@ Partial Class Sistemas_UsuarioDetalle
UpAsignaciones.Update()
End Sub
Private Sub GuardaEstatusProyectosREQ(ByRef ObjOC As ClsOC, ByRef HuboErrores As Boolean)
Dim ObjGenerales As New ClsGenerales(ObjOC.IniciaTransacSQL)
For Each Row As GridViewRow In GvEstatusUsuariosREQ.Rows
Dim CveSubProyecto As Integer = Row.DataKey("CveSubProyecto").ToEntero
Dim CveProyecto As Integer = Row.DataKey("CveProyecto").ToEntero
Dim SubProyecto As String = Row.DataKey("SubProyecto")
Dim r As Integer = 1
For i = 2 To Row.Cells.Count - 1
Dim CveEstatus As Integer = If(IsNumeric(GvEstatusUsuariosREQ.Columns(i).FooterText), GvEstatusUsuariosREQ.Columns(i).FooterText.ToEntero, 0)
Dim EstatusReqStr As String = DTOCEstatus.FiltroPrimeroValor("Estatus", $"CveEmpresa = {UsuarioActual.CveEmpresa} and CveEstatus = {CveEstatus}").ToString
If CveEstatus > -1 Then
If Row.FCCheckBox("chkEstatus" + r.ToString).Checked = False And Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero > 0 Then
'Eliminar el registro existente
@@ -2386,11 +2423,19 @@ Partial Class Sistemas_UsuarioDetalle
HuboErrores = True
Exit For
End If
If Not ObjGenerales.AddHistorialBitacora(410, -1, -1, -1, -1, -1, -1, -1, "", $"{SubProyecto} {EstatusReqStr}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, "-1", "-1", "-1", CveUsuarioTabla:=CveUsuario) Then
HuboErrores = True
Exit For
End If
ElseIf Row.FCCheckBox("chkEstatus" + r.ToString).Checked = True And Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero = -1 Then
If Not ObjOC.AddEstatusUsuarios(CveEstatus, CveSubProyecto, CveUsuario, True, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
HuboErrores = True
Exit For
End If
If Not ObjGenerales.AddHistorialBitacora(409, -1, -1, -1, -1, -1, -1, -1, $"{SubProyecto} {EstatusReqStr}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, "-1", "-1", "-1", CveUsuarioTabla:=CveUsuario) Then
HuboErrores = True
Exit For
End If
End If
r += 1
@@ -2399,12 +2444,21 @@ Partial Class Sistemas_UsuarioDetalle
Next
End Sub
Private Sub GuardaEstatusProyectoOC(ByRef ObjOC As ClsOC, ByRef HuboErrores As Boolean)
Dim ObjGenerales As New ClsGenerales(ObjOC.IniciaTransacSQL)
For Each Row As GridViewRow In GvEstatusUsuariosOC.Rows
Dim CveSubProyecto As Integer = Row.DataKey("CveSubProyecto").ToEntero
Dim CveProyecto As Integer = Row.DataKey("CveProyecto").ToEntero
Dim SubProyecto As String = Row.DataKey("SubProyecto")
Dim r As Integer = 1
For i = 0 To Row.Cells.Count - 1
Dim CveEstatus As Integer = If(IsNumeric(GvEstatusUsuariosOC.Columns(i).FooterText), GvEstatusUsuariosOC.Columns(i).FooterText.ToEntero, -1)
Dim EstatusOCStr As String = DTOCEstatus.FiltroPrimeroValor("Estatus", $"CveEmpresa = {UsuarioActual.CveEmpresa} and CveEstatus = {CveEstatus}").ToString
If CveEstatus > -1 Then
If Row.FCCheckBox("chkEstatus" + r.ToString).Checked = False And Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero > 0 Then
'Eliminar el registro existente
@@ -2412,11 +2466,21 @@ Partial Class Sistemas_UsuarioDetalle
HuboErrores = True
Exit For
End If
If Not ObjGenerales.AddHistorialBitacora(408, -1, -1, -1, -1, -1, -1, -1, "", $"{SubProyecto} {EstatusOCStr}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, "-1", "-1", "-1", CveUsuarioTabla:=CveUsuario) Then
HuboErrores = True
Exit For
End If
ElseIf Row.FCCheckBox("chkEstatus" + r.ToString).Checked = True And Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero = -1 Then
If Not ObjOC.AddEstatusUsuarios(CveEstatus, CveSubProyecto, CveUsuario, True, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
HuboErrores = True
Exit For
End If
If Not ObjGenerales.AddHistorialBitacora(407, -1, -1, -1, -1, -1, -1, -1, $"{SubProyecto} {EstatusOCStr}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, "-1", "-1", "-1", CveUsuarioTabla:=CveUsuario) Then
HuboErrores = True
Exit For
End If
End If
r += 1
End If

View File

@@ -4574,14 +4574,14 @@
<ContentTemplate>
<asp:GridView ID="GvLineasAdicionales" Width="100%" runat="server" GridLines="None"
DataKeyNames="CveLineaAdicional,LineaAdicional,CveCliente,CveProveedor,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveClasificacionPS,FechaIng,CveEstatus,Proveedor"
DataKeyNames="CveLineaAdicional,LineaAdicional,CveCliente,CveProveedor,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveCategoria,FechaIng,CveLineaAdicionalEstatus,Proveedor,DiasVencimiento"
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns>
<asp:BoundField DataField="LineaAdicional" HeaderText="Linea Adicional" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Proveedor" HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Proveedor" HeaderText="Comercializador" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="Abreviatura" HeaderText="Moneda" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="FechaVencimiento" HeaderText="F. Vencimiento" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
@@ -6724,16 +6724,17 @@
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" style="padding-top:-5px!important">
<ADS:Dropdownlost ID="DdlProveedorLineaAdicionalModal" SelectedText="-" IncluyeTodos="false" runat="server" CssStyle="width: 250px; selected2me; margin-top:4px;" Width="250px" DataTextField="RazonSocial" DataValueField="CveProveedor" CssClass="form-control input-sm DdlPS"></ADS:Dropdownlost>
<label for="<%= DdlProveedorLineaAdicionalModal.ClientID.ToString()%>">Proveedor: </label>
<ADS:Dropdownlost ID="DdlProveedorLineaAdicionalModal" SelectedText="-" IncluyeTodos="false" runat="server" CssStyle="width: 250px; selected2me; margin-top:4px;" Width="250px"
DataTextField="RazonSocial" DataValueField="CveProveedor" CssClass="form-control input-sm DdlPS" ></ADS:Dropdownlost>
<label for="<%= DdlProveedorLineaAdicionalModal.ClientID.ToString()%>">Comercializador: </label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoLineaAdicionalModal" CssClass="form-control select2me" runat="server" Width="250px">
<asp:DropDownList ID="DdlTipoLineaAdicionalModal" CssClass="form-control select2me" runat="server" Width="250px" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoLineaAdicionalModal_SelectedIndexChanged">
<asp:ListItem Text="Seleccione" Value="-1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Normal" Value="1"></asp:ListItem>
<asp:ListItem Text="Pagaré Especial" Value="1"></asp:ListItem>
<asp:ListItem Text="PO" Value="2"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlTipoLinea" InitialValue="-1" runat="server" ControlToValidate="TxtLineaAdicionalModal" CssClass="help-block errorimput"
@@ -6796,8 +6797,18 @@
</div>
<div class="col-md-8">
<div class="col-md-2">
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" runat="server" id="DvLineaAdicionalDiasVenciemientoModal" visible="false">
<asp:TextBox ID="TxtDiasVencimientoLineaAdicionalModal" CssClass="form-control " runat="server" MaxLength="20" CausesValidation="true" Width="250px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtDiasVencimientoLineaAdicionalModal" runat="server" ControlToValidate="TxtDiasVencimientoLineaAdicionalModal" CssClass="help-block errorimput"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpLineaAdicional"></asp:RequiredFieldValidator>
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDiasVencimientoLineaAdicionalModal" ValidChars="1234567890" FilterType="Custom" />
<label for="<%= TxtDiasVencimientoLineaAdicionalModal.ClientID.ToString()%>">Días de Vencimiento: </label>
</div>
</div>
</div>
@@ -6807,9 +6818,9 @@
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlClasificacionLienaAdicionalModal" DataValueField="CveClasificacion" DataTextField="Clasificacion" Width="250px" runat="server" CssClass="form-control select2me">
<asp:DropDownList ID="DdlCategoriaLineaAdicionalModal" DataValueField="CveCategoria" DataTextField="Categoria" Width="250px" runat="server" CssClass="form-control select2me">
</asp:DropDownList>
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Clasificación:</label>
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Categoria:</label>
</div>

View File

@@ -10359,9 +10359,9 @@ Partial Class Clientes
DdlClasificacionLienaAdicionalModal.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
DdlClasificacionLienaAdicionalModal.DataBind()
DdlClasificacionLienaAdicionalModal.Items.Insert(0, New ListItem("-", "-1"))
DdlCategoriaLineaAdicionalModal.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
DdlCategoriaLineaAdicionalModal.DataBind()
DdlCategoriaLineaAdicionalModal.Items.Insert(0, New ListItem("-", "-1"))
@@ -10397,9 +10397,11 @@ Partial Class Clientes
DdlProveedorLineaAdicionalModal.txtValue.Value = ""
DdlTipoLineaAdicionalModal.SelectedValueExist(-1)
TxtFechaVencimientoLineaAdicionalModal.Text = ""
DdlClasificacionLienaAdicionalModal.SelectedValueExist(-1)
DdlCategoriaLineaAdicionalModal.SelectedValueExist(-1)
TxtImporteLineaAdicionalModal.Text = ""
DdlMonedaLineAdicionalModal.SelectedValueExist(-1)
TxtDiasVencimientoLineaAdicionalModal.Text = ""
DdlTipoLineaAdicionalModal_SelectedIndexChanged(Nothing, Nothing)
UpLineaAdicionalmodal.Update()
@@ -10419,14 +10421,16 @@ Partial Class Clientes
If CveLineaAdicional > 0 Then
If Not ObjVentas.UpdateLineasAdicionales(CveLineaAdicional, TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal,
DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlClasificacionLienaAdicionalModal.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlCategoriaLineaAdicionalModal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
DiasVencimiento:=TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero) Then
ErrorAgregar = True
Else
Alert("Linea Adicional Actualizada Correctamente")
End If
Else
If Not ObjVentas.AddLineasAdicionales(TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal,
DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlClasificacionLienaAdicionalModal.SelectedValue.ToEntero, 0) Then
DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlCategoriaLineaAdicionalModal.SelectedValue.ToEntero,
DiasVencimiento:=TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero) Then
ErrorAgregar = True
Else
Alert("Linea Adicional Agregada Correctamente")
@@ -10455,10 +10459,11 @@ Partial Class Clientes
DdlProveedorLineaAdicionalModal.txtValue.Value = GvRow.DataKey("CveProveedor")
DdlTipoLineaAdicionalModal.SelectedValueExist(GvRow.DataKey("TipoLinea").ToEntero)
TxtFechaVencimientoLineaAdicionalModal.Text = GvRow.DataKey("FechaVencimiento").ToDate.ToString("dd/MM/yyyy")
DdlClasificacionLienaAdicionalModal.SelectedValueExist(GvRow.DataKey("CveClasificacionPS").ToEntero)
DdlCategoriaLineaAdicionalModal.SelectedValueExist(GvRow.DataKey("CveCategoria").ToEntero)
TxtImporteLineaAdicionalModal.Text = GvRow.DataKey("Importe").ToDecimal.ToString("###,###,###.00")
DdlMonedaLineAdicionalModal.SelectedValueExist(GvRow.DataKey("CveMoneda").ToEntero)
TxtDiasVencimientoLineaAdicionalModal.Text = GvRow.DataKey("DiasVencimiento").ToEntero.ToString
DdlTipoLineaAdicionalModal_SelectedIndexChanged(Nothing, Nothing)
RegistraScript("$('#DVLineasAdicionales').modal('show')")
UpLineaAdicionalmodal.Update()
@@ -10490,8 +10495,11 @@ Partial Class Clientes
Protected Sub DdlTipoLineaAdicionalModal_SelectedIndexChanged(sender As Object, e As EventArgs)
DvLineaAdicionalDiasVenciemientoModal.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, True, False)
UpLineaAdicionalmodal.Update()
End Sub
End Class

View File

@@ -2959,7 +2959,7 @@
</div>
</div>
<div class="col-md-6">
<label for="<%= TxtFechaAjuste.ClientID.ToString()%>">Fecha Vigencia:</label>
<label for="<%= TxtFechaVigencia.ClientID.ToString()%>">Fecha Vigencia:</label>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;">
<asp:TextBox ID="TxtFechaVigencia" CssClass="form-control input-sm ADSMaskDate" Width="100%" runat="server"></asp:TextBox>
<span class="input-group-btn ">
@@ -3174,6 +3174,7 @@
</span>
<ajax:MaskedEditExtender ID="MEEFechaAjuste" runat="server" TargetControlID="TxtFechaAjuste" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEEFechaAjuste" TargetControlID="TxtFechaAjuste" PopupButtonID="LnkFechaAjuste" PopupPosition="BottomLeft" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVFechaAJuste" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpAddVenta"></asp:CompareValidator>
<asp:RequiredFieldValidator ID="RFVFechaAjuste" runat="server" ControlToValidate="TxtFechaAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFechaAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaAjuste"></ajax:ValidatorCalloutExtender>
</div>

View File

@@ -7130,12 +7130,22 @@ Partial Class PV
'End Sub
Private Function CalculaMesesUso() As Boolean
Dim FechaI As Date = TxtFechaAjuste.Text.ToDate.AddDays(1)
Dim FechaI As Date = Now
If IsDate(TxtFechaAjuste.Text) Then
FechaI = TxtFechaAjuste.Text.ToDate.AddDays(1)
Else
TxtMesesUso.Text = ""
Alert("La fecha de ajuste no tiene el formato correcto", TipoMensaje.MsgAdvertencia)
Return False
End If
Dim FechaF As Date = Now
If FechaI.AddDays(-1) > FechaF Then
TxtMesesUso.Text = ""
TxtFechaAjuste.Text = FechaF.ToString("dd/MM/yyyy")
Alert("La fecha de ajuste debe ser menor a la fecha actual", TipoMensaje.ToastAdventencia)
Alert("La fecha de ajuste debe ser menor a la fecha actual", TipoMensaje.MsgAdvertencia)
Return False
End If

View File

@@ -59,7 +59,7 @@
<tr align="left">
<td class="text-right"><b>Folio:</b></td>
<td>
<asp:TextBox ID="TxtFolio" runat="server" MaxLength="12" Width="230px" Height="30px" autofocus></asp:TextBox>
<asp:TextBox ID="TxtFolio" runat="server" MaxLength="12" Width="230px" Height="30px"></asp:TextBox>
</td>
<td class="text-right"><b>Folio Fiscal (UUID):</b></td>
<td>

View File

@@ -26,6 +26,8 @@ Partial Class PopUpBuscarFolio
CargaClasificaciones()
CargaPS(-1)
'CargaCodigoCliente()
RegistraScript($"$('#{TxtFolio.ClientID}').focus();", "A1")
End If
End Sub

View File

@@ -1,136 +0,0 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepArqueos.aspx.vb" Inherits="Ventas_RepArqueos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Reporte de Arqueos
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkPdf" runat="server" OnClick="LnkPdf_Click"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkExportar" runat="server" OnClick="LnkExportar_Click"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkPdf" />
<asp:PostBackTrigger ControlID="LnkExportar" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style="">
<div class="portlet-title portlet-filterT smalltitle " style="">
<div class="tools">
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" />
</div>
<div class="titlefiltros caption" style="margin-top: -8px;">
<ul class="list-inline" style="font-size: 12px;">
<li>Sucursal:
<asp:DropDownList AppendDataBoundItems="true" ID="DdlSubProyecto" runat="server" Width="200px" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me">
<asp:ListItem Value="-1" Text="Todos"></asp:ListItem>
</asp:DropDownList>
</li>
</ul>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet light smmallpadding traspasorow bordered">
<div class="portlet-title">
<div class="caption font-green">
<span class="caption-subject bold uppercase" style="line-height: 2;">Productos</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body rowpadding">
<div class="row">
<div class="col-md-12">
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
<div style="margin-right: 15px">
<input type="text" id="TxtBusqueda1" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda1','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron solicitudes de cancelación"
DataKeyNames=""
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%">
<Columns>
<asp:BoundField HeaderText="Conceptos" DataField="Clasificacion" ItemStyle-Width="25%" />
<asp:BoundField HeaderText="Anterior" DataField="Anterior" DataFormatString="{0:N0}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="DiaActual" DataField="DiaActual" DataFormatString="{0:N0}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Acumulado" DataField="Acumulado" DataFormatString="{0:N0}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Center" />
</Columns>
<RowStyle CssClass="Texto" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</div>
</div>
</div>
</div>
<div class="portlet light smmallpadding traspasorow bordered">
<div class="portlet-title">
<div class="caption font-green">
<span class="caption-subject bold uppercase" style="line-height: 2;">DEPOSITOS</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body rowpadding">
<div class="row">
<div class="col-md-12">
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
<div style="margin-right: 15px">
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvTotales.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvTotales.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<asp:GridView ID="GvTotales" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron solicitudes de cancelación"
DataKeyNames="" OnRowDataBound="GvTotales_RowDataBound"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%">
<Columns>
<asp:BoundField HeaderText="Transacción" DataField="TipoTransaccion" ItemStyle-Width="75%" />
<asp:TemplateField ItemStyle-Width="25%" HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:HyperLink ID="HpTotal" runat="server" Target="_blank" Text='<%# String.Format("{0:N2}", Eval("Total"))%>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -1,104 +0,0 @@
Option Explicit On
Option Strict On
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Imports System.Data
Partial Class Ventas_RepArqueos
Inherits ClsPaginas
#Region "P R O P I E D A D E S"
Private Property DtProductos As DataTable
Get
Return DirectCast(ViewState("DtProductos"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtProductos") = value
End Set
End Property
Private Property DtDepositos As DataTable
Get
Return DirectCast(ViewState("DtDepositos"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtDepositos") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CargaCombos()
CargaDatos(Now.Year, -1)
End If
End Sub
Private Sub CargaCombos()
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("TipoSucursal = 1")
DdlSubProyecto.DataBind()
UPFiltros.Update()
End Sub
Private Sub CargaDatos(Anio As Integer, CveSubProyecto As Integer)
Dim ObjVentas As New ClsVentas()
If ObjVentas.GetRepArqueos(Anio, CveSubProyecto, UsuarioActual.CveEmpresa) Then
DtProductos = ObjVentas.DataSetResultados.Tables(0).Copy()
DtDepositos = ObjVentas.DataSetResultados.Tables(1).Copy()
End If
ObjVentas.Dispose()
GvDatos.DataSource = DtProductos
GvTotales.DataSource = DtDepositos
GvDatos.DataBind()
GvTotales.DataBind()
UPDatos.Update()
End Sub
Protected Sub GvTotales_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveTipoTransaccion") = "-1" Then
e.Row.CssClass = "Totales"
End If
e.Row.FCHyperLink("HpTotal").NavigateUrl = String.Format("/Ventas/RepArqueosDetalle.aspx?CveSubProyecto={0}&Fecha={1}", DdlSubProyecto.SelectedValue.ToEntero(), Now.ToString("dd/MM/yyyy"))
End If
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CargaDatos(Now.Year, DdlSubProyecto.SelectedValue.ToEntero())
End Sub
Protected Sub GeneraPDF(Formato As String)
Dim params As List(Of ReportParameter) = New List(Of ReportParameter)()
Dim Imagen As System.IO.FileInfo = New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString()))
params.Add(New ReportParameter("Encabezado", String.Format("Sucursal:{0}", DdlSubProyecto.SelectedItem.Text)))
Dim lrds As List(Of ReportDataSource) = New List(Of ReportDataSource)()
Dim rds As ReportDataSource = New ReportDataSource()
rds.Name = "DataSet1"
rds.Value = DtProductos
Dim rds2 As ReportDataSource = New ReportDataSource()
rds2.Name = "DataSet2"
rds2.Value = DtDepositos
lrds.Add(rds)
lrds.Add(rds2)
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
ImprimirPDF("Empresas/Grales/Formatos/RepArqueos.rdlc", lrds, params, "Rep Arqueos", Formato)
End Sub
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs)
GeneraPDF("PDF")
End Sub
Protected Sub LnkExportar_Click(sender As Object, e As EventArgs)
GeneraPDF("EXCEL")
End Sub
End Class

View File

@@ -1,252 +0,0 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepConciliacionEmitidosSat.aspx.cs" Inherits="Ventas_RepConciliacionEmitidosSat" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.GVConciliacionemitidasSAT tr th {
text-align: left;
}
.GVConciliacionemitidasSAT tr th:nth-child(7) {
text-align: center;
}
.GVConciliacionemitidasSAT tr td:nth-child(7) {
text-align: right;
}
.GVConciliacionemitidasSAT tr th:nth-child(8),
.GVConciliacionemitidasSAT tr td:nth-child(8) {
text-align: center;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Conciliacion Emitidas Sat
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpDatosReporte" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 51px;">
<div class="tools">
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript:;" class="expand"></a>
</div>
<div class="titlefiltros caption">
<div class="row">
<label class="col-md-1" style="padding-top: 13px; display: none;">Tipo: </label>
<div class="col-md-2" style="display: none;">
<asp:ListBox ID="DdlTipoComprobante" data-text="Todos" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server">
<asp:ListItem Text="Ingresos" Value="Ing"></asp:ListItem>
<asp:ListItem Text="Egresos" Value="Egs"></asp:ListItem>
<asp:ListItem Text="Remisión" Value="Rem"></asp:ListItem>
<asp:ListItem Text="Cotización" Value="Cot"></asp:ListItem>
<asp:ListItem Text="Anticipos" Value="Ant"></asp:ListItem>
<asp:ListItem Text="Pedido Con" Value="Ped"></asp:ListItem>
<asp:ListItem Text="Devolucion" Value="Dev"></asp:ListItem>
<asp:ListItem Text="Pedido" Value="Pd2"></asp:ListItem>
</asp:ListBox>
</div>
<div class="col-md-2" style="padding-top: 13px;" >
<asp:DropDownList ID="ddlRegistroen" CssClass="select2me form-control " Width="100%" runat="server">
<asp:ListItem Text="Todos" Value="0"></asp:ListItem>
<asp:ListItem Text="SIG" Value="1"></asp:ListItem>
<asp:ListItem Text="SAT" Value="2"></asp:ListItem>
<asp:ListItem Text="SIG Sin Encontrar SAT" Value="3"></asp:ListItem>
<asp:ListItem Text="SAT Sin Encontrar SIG" Value="4"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1 truncate" style="padding-top: 13px;">
Fecha Inicio:
</div>
<div class="col-md-1" style="padding-top: 9px;">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1 truncate" style="padding-top: 13px;">
Fecha Fin:
</div>
<div class="col-md-1" style="padding-top: 9px;">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
<div class="portlet-body" style="display: none">
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div class="portlet light xspadding bordered " id="PorletDatos" style="margin-bottom: 0px;">
<div class="portlet-title">
<div class="caption font-blue">
<i class="fa fa-file-text-o font-blue"></i>
<span class="caption-subject bold uppercase">Facturas emitidas en el sat sin registrar <asp:Literal ID="Ltlsinregistrar" runat="server"></asp:Literal> de <asp:Literal ID="ltlTotal" runat="server"></asp:Literal></span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
<div style="float: right;"><label id="Contador"></label>
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="FiltrarTabla('#TxtBusqueda','.GVConciliacionemitidasSAT','#Contador')" style="display: inline-block; margin-right: -20px; width: 150px;">
<a href="javascript:;" onclick="FiltrarTabla('#TxtBusqueda','.GVConciliacionemitidasSAT','#Contador')" style="margin-top: -3px;" class="btn btn-circle btn-sm font-bold blue"><i class="icon-magnifier" style="font-weight: bold;"></i></a>
</div>
</div>
<div class="portlet-body ">
<asp:GridView ID="GVConciliacionemitidasSAT" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVConciliacionemitidasSAT" AutoGenerateColumns="False"
DataKeyNames="FolioFiscal,TipoDocto,ImporteTotal,Estatus,Fecha,Moneda,RFCReceptor,CveEmpresa,RutaXml,RFCEmisor,TipoDoctoTexto" OnRowDataBound="GVConciliacionemitidasSAT_RowDataBound">
<Columns>
<asp:TemplateField HeaderText=" ">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("TipoText")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Tipo documento">
<ItemTemplate>
<asp:Label ID="lbltipoDocto" runat="server" Text='<%# Eval("TipoDoctoTexto")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Receptor">
<ItemTemplate>
<asp:Label ID="lblrFCReceptor" runat="server" Text='<%# Eval("RFCReceptor")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha">
<ItemTemplate>
<asp:Label ID="lblfecha" runat="server" Text='<%# Eval("Fecha","{0:dd/MM/yyyy}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha SIG">
<ItemTemplate>
<asp:Label ID="lblfechaSIG" runat="server" Text='<%# Eval("FechaSIG","{0:dd/MM/yyyy}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Serie-Folio">
<ItemTemplate>
<asp:Label ID="lblSerieFolio" runat="server" Text='<%# string.Format("{0}-{1}",Eval("Serie"),Eval("Folio"))%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Folio Fiscal">
<ItemTemplate>
<asp:Label ID="lblfolioFiscal" runat="server" Text='<%# Eval("FolioFiscal")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total">
<ItemTemplate>
<asp:Label ID="lblimporteTotal" runat="server" Text='<%# Eval("ImporteTotal","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Moneda">
<ItemTemplate>
<asp:Label ID="lblmoneda" runat="server" Text='<%# Eval("Moneda")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus">
<ItemTemplate>
<asp:Label ID="lblestatus" runat="server" Text='<%# Eval("Estatus")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Xml" >
<ItemTemplate>
<%--<asp:Label ID="lblrutaXml" runat="server" Text='<%# Eval("RutaXml")%>'> </asp:Label>--%>
<asp:HyperLink ID="HypXml" runat="server" target="_blank"><i class="fa fa-download" aria-hidden="true"></i>XML</asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:HyperLink runat="server" NavigateUrl='<%# Eval("CveVenta","/Ventas/Ventas.aspx?CveVenta={0}") %>' CssClass="btn btn-circle btn-sm btn-success" Visible='<%# (Eval("CveVenta").ToString() =="" ? false :true) %>'><i class="fa fa-info"></i>r</asp:HyperLink>
<asp:LinkButton ID="LnkRegistrar" Visible='<%# Eval("CveVenta").ToString() =="" %>' runat="server" data-toggle="tooltip" ToolTip="Registrar" CssClass="btn btn-circle btn-sm blue" OnClick="LnkRegistrar_Click"><i class="fa fa-plus"></i></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass ="SearchADHeader" />
</asp:GridView>
</div>
</div>
<div id="DModalDefaults" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpModalDefaults" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content rowpadding">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" runat="server" style="text-align: left">Valores reconstruccion</h4>
</div>
<div class="modal-body">
Estos Valores seran asignados en la venta en caso de que no coincida los valores del Xml con los ingresados en el sistema.
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
<asp:Label runat="server" Text="Sucursal" AssociatedControlID="DdlSubProyectoDatos"></asp:Label>
<asp:DropDownList ID="DdlSubProyectoDatos" AutoPostBack="True" runat="server" CssClass="form-control input-sm select2me " DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%"></asp:DropDownList>
</div>
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
<asp:Label runat="server" Text="Clasificación" AssociatedControlID="DdlClasificacion"></asp:Label>
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged" >
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
<asp:Label runat="server" Text="Producto o Servicio" AssociatedControlID="DdlPS"></asp:Label>
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 100%;" CssClass="DdlPS " CssClassDdl="select2me " IncluyeTodos="false" DataTextField="PSCodigo" DataValueField="CvePS" />
</div>
</div>
<div class="modal-footer">
<asp:LinkButton ID="LnkAceptarDefault" OnClick="LnkAceptarDefault_Click" CssClass="btn btn-success" runat="server">Aceptar</asp:LinkButton>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<script>
function FiltrarTabla(idtxt, idtable, idcontador) {
if ($('' + idtxt).val() == '') { $('table' + idtable + ' tr').css('display', 'table-row'); }
else { $('table' + idtable + ' tr:not(.ADtr):not(.SearchADHeader)').css('display', 'none'); $('table' + idtable + ' tr:contains("' + $('' + idtxt).val() + '")').css('display', 'table-row'); }
if ($('' + idcontador).length > 0) {
$('' + idcontador).html('(' + $('' + idtable + ' tr:not(.ADtr):not(.SearchADHeader):visible').length +'/'+ $('' + idtable + ' tr:not(.ADtr):not(.SearchADHeader)').length + ')');
}
}
</script>
</asp:Content>

File diff suppressed because it is too large Load Diff

View File

@@ -129,7 +129,7 @@
<ContentTemplate>
<asp:GridView ID="GvLineasAdicionales" Width="100%" runat="server" GridLines="None"
DataKeyNames="CveLineaAdicional,LineaAdicional,CveCliente,CveProveedor,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveClasificacionPS,FechaIng,CveEstatus,Proveedor,Comprobante"
DataKeyNames="CveLineaAdicional,LineaAdicional,CveCliente,CveProveedor,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveCategoria,FechaIng,CveLineaAdicionalEstatus,Proveedor,Comprobante,DiasVencimiento,CveVenta"
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"
OnRowDataBound="GvLineasAdicionales_RowDataBound"
@@ -139,11 +139,14 @@
<asp:BoundField DataField="LineaAdicional" HeaderText="Linea Adicional" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="NombreCliente" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Proveedor" HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Proveedor" HeaderText="Comercializador" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="Abreviatura" HeaderText="Moneda" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="FechaVencimiento" HeaderText="F. Vencimiento" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:BoundField DataField="Estatus" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
<%--<asp:BoundField DataField="FechaVencimiento" HeaderText="F. Vencimiento" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" Visible="false" />--%>
<asp:BoundField DataField="SerieFolio" HeaderText="Serie Folio" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="Saldo" HeaderText="Saldo" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="DiasVencimiento" HeaderText="Dias de Vencimiento" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="Estatus" HeaderText="Estatus" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField HeaderText="Opciones" Visible="false" ItemStyle-Width="120px">
@@ -156,7 +159,7 @@
<asp:LinkButton ID="LnkDescargaComprobante" runat="server" AlternateText="Descarga" CausesValidation="False" CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-download'></i>" OnClick="LnkDescargaComprobante_Click" Visible="false" />
</div>
<div class="col-md-4">
<asp:LinkButton ID="LnkCambiarEstatus" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-arrow-right'></i>"
<asp:LinkButton ID="LnkCambiarEstatus" runat="server" AlternateText="CambiarEstatus" CausesValidation="False" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-arrow-right'></i>"
data-toggle="confirmation" data-popout="true" data-original-title="¿Cambiar Estado a Enviado?" data-btn-ok-label="si" OnClick="LnkCambiarEstatus_Click" Visible="false" />
</div>
</div>

View File

@@ -65,7 +65,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
private void InicializaValores()
{
if (Request["OP"] != null && Request["OP"].ToString() == "PO")
if (Request["OP"] != null && Request["OP"].ToString() == "PO")
{
DVProveedor1.Visible = true;
DVProveedor2.Visible = true;
@@ -221,7 +221,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
{
errorCargaComprobante = true;
}
if (!errorCargaComprobante)
{
ClsVentas objVentas = new ClsVentas();
@@ -248,11 +248,13 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
UpAddComprobancte.Update();
}
protected void LnkCambiarEstatus_Click(object sender, EventArgs e)
{
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
int CveLineaAdicionalActualzarEstatus = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero();
int CveVenta = GvRow.DataKey("CveVenta").ToString().ToEntero();
bool errorCambioEstatus = false;
bool errorCambioEstatus = false;
ClsVentas objVentas = new ClsVentas();
@@ -278,12 +280,12 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
protected void GvLineasAdicionales_RowDataBound(object sender, GridViewRowEventArgs e)
protected void GvLineasAdicionales_RowDataBound(object sender, GridViewRowEventArgs e)
{
if(e.Row.RowType == DataControlRowType.DataRow)
{
if(e.Row.DataKey("CveLineaAdicionalEstatus").ToEntero().Contiene(1) && e.Row.DataKey("CveVenta").ToEntero() > 0)
{
{
e.Row.FCLinkButton("LnkCambiarEstatus").Visible = true;
}

View File

@@ -713,6 +713,15 @@
</asp:UpdatePanel>
</td>
</tr>
<tr id="TrLineaAdicional" runat="server" visible="false">
<td align="left"><b>Linea Adicional:</b></td>
<td align="left">
<asp:DropDownList ID="DdlLineaAdicional" DataTextField="InfoGeneral" DataValueField="CveLineaAdicional" AutoPostBack="true" CssClass=" form-control input-sm select2me" runat="server" Width="80%" OnSelectedIndexChanged="DdlLineaAdicional_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:LinkButton runat="server" Visible="false" ID="LnkUpdateLineaAdicional" OnClick="LnkUpdateLineaAdicional_Click" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea actualizar la linea adicional de crédito de la factura?" data-btn-ok-label="si" Text="<i class='fa fa-check' style='color:green'></i>" CssClass="btn btn-default btn-circle btn-xs" ToolTip="Actualizar Linea adicional" />
</td>
</tr>
<tr align="left" id="TrAlmacenOrigen" runat="server" visible="False">
<td>
<asp:Label runat="server" ToolTip="Almacen Asignado" Font-Bold="true" Text="Almacen O:"></asp:Label>
@@ -2406,7 +2415,8 @@
</div>
</div>
</div>
</div> </div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="portlet light xspadding bordered whitoutcol" style="width: 100%;">
@@ -2417,12 +2427,12 @@
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
Emitir <asp:CheckBox ID="ChkEmitirComercioExterior" runat="server" CssClass="chksino" Text=" " OnCheckedChanged="ChkEmitirComercioExterior_CheckedChanged" AutoPostBack="true" />
Emitir
<asp:CheckBox ID="ChkEmitirComercioExterior" runat="server" CssClass="chksino" Text=" " OnCheckedChanged="ChkEmitirComercioExterior_CheckedChanged" AutoPostBack="true" />
<a href="javascript:;" onclick="CargaComercioExterior()" class="expand"></a>
</div>
</div>
@@ -2431,8 +2441,8 @@
<ContentTemplate>
<div class="form-body">
<%-- <div class="row rowpadding">
<%-- <div class="row rowpadding">
<label class="col-md-2">Emitir:</label>
<div class="col-md-10">
@@ -3443,17 +3453,7 @@
</div>
<div class="portlet-body formnombottom">
<table border="0" width="100%">
<tr id="TrLineaAdicional" runat="server" visible="false">
<td align="left">Linea Adicional:</td>
<td align="left">
<asp:DropDownList ID="DdlLineaAdicional" DataTextField="InfoGeneral" DataValueField="CveLineaAdicional" AutoPostBack="true" CssClass=" form-control input-sm select2me" runat="server" Width="200px" OnSelectedIndexChanged="DdlLineaAdicional_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td align="left">
<asp:LinkButton runat="server" Visible="false" ID="LnkUpdateLineaAdicional" OnClick="LnkUpdateLineaAdicional_Click" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea actualizar la linea adicional de crédito de la factura?" data-btn-ok-label="si" Text="<i class='fa fa-check' style='color:green'></i>" CssClass="btn btn-default btn-circle btn-xs" ToolTip="Actualizar Linea adicional" />
</td>
</tr>
<tr id="TrFormaEntrega" runat="server" visible="false">
<td align="left">Forma de entrega:</td>
<td align="left">
@@ -7825,7 +7825,7 @@
</div>
</div>
<div class="tools">
<%-- <a href="javascript:;" class="collapse"></a>--%>
<%-- <a href="javascript:;" class="collapse"></a>--%>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom">

View File

@@ -2249,12 +2249,12 @@ Partial Class Ventas
End Set
End Property
Private Property CveClasificacionLineaAdicional As Integer
Private Property CveCategoriaLineaAdicional As Integer
Get
Return IfNull(ViewState("CveClasificacionLineaAdicional"), "-1", ViewState("CveClasificacionLineaAdicional")).ToString().ToEntero()
Return IfNull(ViewState("CveCategoriaLineaAdicional"), "-1", ViewState("CveCategoriaLineaAdicional")).ToString().ToEntero()
End Get
Set(value As Integer)
ViewState("CveClasificacionLineaAdicional") = value
ViewState("CveCategoriaLineaAdicional") = value
End Set
End Property
@@ -3173,6 +3173,7 @@ Partial Class Ventas
'TabE.Visible = False
LnkOCs.Visible = False
GvPS.Columns(8).Visible = False
DdlSubProyecto.Visible = False
TrEdit.Visible = True
ThProyecto.Visible = False
@@ -3194,6 +3195,7 @@ Partial Class Ventas
TabE.Visible = False
LnkOCs.Visible = False
GvPS.Columns(8).Visible = False
DdlSubProyecto.Visible = False
TrEdit.Visible = False
ThProyecto.Visible = False
@@ -8844,16 +8846,32 @@ Partial Class Ventas
'VALIDAR LINEAS ADICIONALES
If UsuarioActual.Empresa.Funcionalidad(705) = "1" AndAlso DdlLineaAdicional.SelectedValue.ToEntero() > 0 Then
'VERIFICA QUE LA CLASIFICACION DE LOS PRODUCTOS DEBE SER LA MISMA DE LA LINEA ADICIONAL
If TmpDT IsNot Nothing AndAlso Me.CveClasificacionLineaAdicional > 0 Then
For Each Row As DataRow In TmpDT.FiltraParametros("", DistinctColumns:={"CveClasificacion", "Clasificacion"}).Rows
If Me.CveClasificacionLineaAdicional <> Row("CveClasificacion").ToString().ToEntero() Then
Alert($"La clasificación '{Row("Clasificacion")}' no pertenece a la linea adicional.", TipoMensaje.MsgAdvertencia)
'VERIFICA QUE LA CATEGORIA DE LOS PRODUCTOS DEBE SER LA MISMA DE LA LINEA ADICIONAL
If TmpDT IsNot Nothing AndAlso Me.CveCategoriaLineaAdicional > 0 Then
For Each Row As DataRow In TmpDT.FiltraParametros("", DistinctColumns:={"CveClasificacion"}).Rows
Dim RowClasificacion = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=Row("CveClasificacion").ToString().ToEntero()).FiltroPrimero("")
If RowClasificacion IsNot Nothing Then
Dim CveCategoria As Integer = RowClasificacion("CveCategoria").ToString().ToEntero()
Dim Categoria As String = RowClasificacion("Categoria").ToString()
If Me.CveCategoriaLineaAdicional <> CveCategoria Then
Alert($"La categoría '{Categoria}' no pertenece a la linea adicional.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Else
Alert($"No se encontro la clasificación.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Next
End If
'SI NO ES A CREDITO NO SELECCIONAR LINEA ADICIONAL
If RBLPago.SelectedValue <> "1" Then
Alert($"La linea adicional debe ser utilizada en una venta a crédito.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If Me.SaldoLineaAdicional <= 0 Then
Alert("El saldo de la linea adicional debe ser mayor a cero", TipoMensaje.MsgAdvertencia)
Exit Sub
@@ -12906,7 +12924,7 @@ Partial Class Ventas
ErrorList.Add("Ocurrió un error al actualizar el estatus del pedidoA")
Else
'Remision
If Not ObjEventos.AddEventoBitacora($"Remisionado de autorización en: <a href='/Ventas/Ventas.aspx?CveVenta={ObjFactura.CveVenta}' target='_blank' class='Texto'>{ObjFactura.Folio}</a>", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CvePedidoA) Then
If Not ObjEventos.AddEventoBitacora($"Remisionado de autorización en: <a href='/Ventas/Ventas.aspx?CveVenta={ObjFactura.CveVenta}' target='_blank' class='Texto'>{ObjFactura.SerieFolio}</a>", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CvePedidoA) Then
ErrorList.Add("Ocurrió un error al agregar bitácora de Autorización")
End If
End If
@@ -14682,13 +14700,22 @@ Partial Class Ventas
ErrorPrepoliza = True
End If
'Factura
If Not ObjEventos.AddEventoBitacora($"Remisión facturada : <a href='/Ventas/Ventas.aspx?CveVenta={CveRemision}' target='_blank' class='Texto'>{ObjFactura.Folio}</a>", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=ObjFactura.CveVenta) Then
If CveRemision > 0 Then
If ObjVentas.GetVenta(CveRemision, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
Dim SerieFolioRem As String = ObjVentas.DtResultados.Rows(0)("SerieFolio").ToString()
'Factura
If Not ObjEventos.AddEventoBitacora($"Venta facturada de Remisión: <a href='/Ventas/Ventas.aspx?CveVenta={CveRemision}' target='_blank' class='Texto'>{SerieFolioRem}</a>", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=ObjFactura.CveVenta) Then
ErrorPrepoliza = True
End If
Else
ErrorPrepoliza = True
End If
Else
ErrorPrepoliza = True
End If
'Remision
If Not ObjEventos.AddEventoBitacora($"Facturación de remisión en: <a href='/Ventas/Ventas.aspx?CveVenta={ObjFactura.CveVenta}' target='_blank' class='Texto'>{ObjFactura.Folio}</a>", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveRemision) Then
If Not ObjEventos.AddEventoBitacora($"Remisión facturada en Venta: <a href='/Ventas/Ventas.aspx?CveVenta={ObjFactura.CveVenta}' target='_blank' class='Texto'>{ObjFactura.SerieFolio}</a>", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveRemision) Then
ErrorPrepoliza = True
End If
Next
@@ -18067,14 +18094,14 @@ Partial Class Ventas
Using ObjVentas As New ClsVentas
If CveVenta > 0 Then
If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, ConSaldo:=-1) Then
If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
TrLineaAdicional.Visible = True
DdlLineaAdicional.DataSource = ObjVentas.DtResultados.FiltraParametros($"Saldo > 0 OR CveLineaAdicional = {Me.CveLineaAdicionalVenta}")
DdlLineaAdicional.DataSource = ObjVentas.DtResultados.FiltraParametros($"(Saldo > 0 AND FechaVencimiento <= '{Now.ToString("dd/MM/yyyy")}') OR CveLineaAdicional = {Me.CveLineaAdicionalVenta}")
End If
End If
Else
If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, ConSaldo:=1) Then
If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, ConSaldo:=1, FechaVencimientoConsulta:=Now) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
TrLineaAdicional.Visible = True
DdlLineaAdicional.DataSource = ObjVentas.DtResultados
@@ -18095,6 +18122,7 @@ Partial Class Ventas
End If
UpParametros.Update()
UPCondicionesPago.Update()
End Sub
@@ -26969,93 +26997,94 @@ Partial Class Ventas
End Sub
Private Sub CargaRNC(Optional CveVentaUsado As Integer = -1, Optional CargarBonificaciones As Boolean = False, Optional CargarSoloGarantias As Boolean = False)
Dim DtNC As DataTable = Nothing
Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, CveMoneda:=-1) Then
DtNC = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'RNC' AND CveVenta > 0 and Saldo > 0", "Moneda,Fecha,Folio")
End If
ObjMovtos.Dispose()
Me.TmpDTRNCBonificacionesSeleccionadas = Nothing
If DtNC IsNot Nothing Then
Me.TmpDTRNCBonificacionesCliente = DtNC.FiltraParametros("TipoRNC = 2")
Me.TmpDTRNCBonificacionesCliente.Columns.Add("ImporteBonificacion", GetType(Decimal))
Me.TmpDTRNCBonificacionesCliente.Columns.Add("IVABonificacion", GetType(Decimal))
Me.TmpDTRNCBonificacionesCliente.Columns.Add("CveVentaRNCCargo", GetType(Integer))
If CargarBonificaciones Then
'Me.TmpDTRNCBonificacionesSeleccionadas = Me.TmpDTRNCBonificacionesCliente.Copy()
CargaBonificaciones(-1, True)
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, CveMoneda:=-1) Then
DtNC = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'RNC' AND CveVenta > 0 and Saldo > 0", "Moneda,Fecha,Folio")
End If
ObjMovtos.Dispose()
If CargarSoloGarantias Then
GvRemisionesNC.DataSource = DtNC.FiltraParametros("TipoRNC = 1 AND EsGarantia = True")
Else
GvRemisionesNC.DataSource = DtNC.FiltraParametros("TipoRNC = 1 AND EsGarantia = False")
End If
GvRemisionesNC.DataBind()
Me.TmpDTRNCBonificacionesSeleccionadas = Nothing
'GvRemisionesNCBon.DataSource = Me.TmpDTRNCBonificacionesSeleccionadas
'GvRemisionesNCBon.DataBind()
Dim SaldoMaximoUtilizable As Decimal = 0
If DtNC IsNot Nothing Then
Me.TmpDTRNCBonificacionesCliente = DtNC.FiltraParametros("TipoRNC = 2")
Me.TmpDTRNCBonificacionesCliente.Columns.Add("ImporteBonificacion", GetType(Decimal))
Me.TmpDTRNCBonificacionesCliente.Columns.Add("IVABonificacion", GetType(Decimal))
Me.TmpDTRNCBonificacionesCliente.Columns.Add("CveVentaRNCCargo", GetType(Integer))
If CargarSoloGarantias Then
Dim SaldoMaximo As Decimal = DtNC.SUMD("Saldo", "TipoRNC = 1 AND EsGarantia = True")
If SaldoMaximo > 0 Then
SaldoMaximoUtilizable = SaldoMaximo
Else
SaldoMaximoUtilizable = 0
If CargarBonificaciones Then
'Me.TmpDTRNCBonificacionesSeleccionadas = Me.TmpDTRNCBonificacionesCliente.Copy()
CargaBonificaciones(-1, True)
End If
Else
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
Dim RowUsadosNC As DataRow = ObjAcum.DtResultados.Rows(2)
DivSMU.Visible = True
Dim SaldoMaximo As Decimal = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal()
If CargarSoloGarantias Then
GvRemisionesNC.DataSource = DtNC.FiltraParametros("TipoRNC = 1 AND EsGarantia = True")
Else
GvRemisionesNC.DataSource = DtNC.FiltraParametros("TipoRNC = 1 AND EsGarantia = False")
End If
GvRemisionesNC.DataBind()
'GvRemisionesNCBon.DataSource = Me.TmpDTRNCBonificacionesSeleccionadas
'GvRemisionesNCBon.DataBind()
Dim SaldoMaximoUtilizable As Decimal = 0
If CargarSoloGarantias Then
Dim SaldoMaximo As Decimal = DtNC.SUMD("Saldo", "TipoRNC = 1 AND EsGarantia = True")
If SaldoMaximo > 0 Then
SaldoMaximoUtilizable = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal()
SaldoMaximoUtilizable = SaldoMaximo
Else
SaldoMaximoUtilizable = 0
End If
Else
SaldoMaximoUtilizable = 0
End If
ObjAcum.Dispose()
End If
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
Dim RowUsadosNC As DataRow = ObjAcum.DtResultados.Rows(2)
DivSMU.Visible = True
If CveVentaUsado > 0 Then
DivSMU.Visible = True
'Dim FacUsado As New Modelos.Factura(UsuarioActual, CveVentaUsado, UsuarioActual.CveEmpresa, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
Dim DtDetalleUsado As DataTable = Nothing
Using ObjVentas As New ClsVentas
If ObjVentas.GetVentaDetalle(CveVentaUsado) Then
DtDetalleUsado = ObjVentas.DtResultados.Copy()
Dim SaldoMaximo As Decimal = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal()
If SaldoMaximo > 0 Then
SaldoMaximoUtilizable = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal()
Else
SaldoMaximoUtilizable = 0
End If
Else
SaldoMaximoUtilizable = 0
End If
End Using
ObjAcum.Dispose()
End If
If DtDetalleUsado IsNot Nothing Then
Dim SaldoMaximoUsadosFactura As Decimal = DtDetalleUsado.SUM("Total", "EsCargo = True").ToDecimal() + DtDetalleUsado.SUM("ImporteIVA", "EsCargo = True").ToDecimal()
If SaldoMaximoUtilizable < SaldoMaximoUsadosFactura Then
If CveVentaUsado > 0 Then
DivSMU.Visible = True
'Dim FacUsado As New Modelos.Factura(UsuarioActual, CveVentaUsado, UsuarioActual.CveEmpresa, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
Dim DtDetalleUsado As DataTable = Nothing
Using ObjVentas As New ClsVentas
If ObjVentas.GetVentaDetalle(CveVentaUsado) Then
DtDetalleUsado = ObjVentas.DtResultados.Copy()
End If
End Using
If DtDetalleUsado IsNot Nothing Then
Dim SaldoMaximoUsadosFactura As Decimal = DtDetalleUsado.SUM("Total", "EsCargo = True").ToDecimal() + DtDetalleUsado.SUM("ImporteIVA", "EsCargo = True").ToDecimal()
If SaldoMaximoUtilizable < SaldoMaximoUsadosFactura Then
HdnSaldoMaximoUsados.Value = SaldoMaximoUtilizable.ToString()
LtlSMU.Text = String.Format("{0:N2}", SaldoMaximoUtilizable)
Else
HdnSaldoMaximoUsados.Value = SaldoMaximoUsadosFactura.ToString()
LtlSMU.Text = String.Format("{0:N2}", SaldoMaximoUsadosFactura)
End If
Else
HdnSaldoMaximoUsados.Value = SaldoMaximoUtilizable.ToString()
LtlSMU.Text = String.Format("{0:N2}", SaldoMaximoUtilizable)
Else
HdnSaldoMaximoUsados.Value = SaldoMaximoUsadosFactura.ToString()
LtlSMU.Text = String.Format("{0:N2}", SaldoMaximoUsadosFactura)
End If
Else
HdnSaldoMaximoUsados.Value = SaldoMaximoUtilizable.ToString()
LtlSMU.Text = String.Format("{0:N2}", SaldoMaximoUtilizable)
LtlSMU.Text = SaldoMaximoUtilizable.FormatoNumero(2)
End If
Else
HdnSaldoMaximoUsados.Value = SaldoMaximoUtilizable.ToString()
LtlSMU.Text = SaldoMaximoUtilizable.FormatoNumero(2)
HdnSaldoMaximoUsados.Value = "0"
LtlSMU.Text = "0"
End If
Else
HdnSaldoMaximoUsados.Value = "0"
LtlSMU.Text = "0"
End If
UpModalRemisionesNC.Update()
@@ -27064,81 +27093,83 @@ Partial Class Ventas
Private Sub CargaRNCDesc(Optional CargarBonificaciones As Boolean = False, Optional CargarSoloGarantias As Boolean = False)
Dim DtNC As DataTable = Nothing
Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, CveMoneda:=-1) Then
DtNC = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'RNC' AND CveVenta > 0 and Saldo > 0", "Moneda,Fecha,Folio")
End If
ObjMovtos.Dispose()
Me.TmpDTRNCBonificacionesSeleccionadas = Nothing
If DtNC IsNot Nothing Then
Me.TmpDTRNCBonificacionesCliente = DtNC.FiltraParametros("TipoRNC = 2")
Me.TmpDTRNCBonificacionesCliente.Columns.Add("ImporteBonificacion", GetType(Decimal))
Me.TmpDTRNCBonificacionesCliente.Columns.Add("IVABonificacion", GetType(Decimal))
Me.TmpDTRNCBonificacionesCliente.Columns.Add("CveVentaRNCCargo", GetType(Integer))
If CargarBonificaciones Then
'Me.TmpDTRNCBonificacionesSeleccionadas = Me.TmpDTRNCBonificacionesCliente.Copy()
CargaBonificacionesDesc("-1", True)
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, CveMoneda:=-1) Then
DtNC = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'RNC' AND CveVenta > 0 and Saldo > 0", "Moneda,Fecha,Folio")
End If
ObjMovtos.Dispose()
If CargarSoloGarantias Then
GvDescNCCargos.DataSource = DtNC.FiltraParametros("TipoRNC = 1 AND EsGarantia = True")
Else
GvDescNCCargos.DataSource = DtNC.FiltraParametros("TipoRNC = 1 AND EsGarantia = False")
End If
GvDescNCCargos.DataBind()
Me.TmpDTRNCBonificacionesSeleccionadas = Nothing
Dim SaldoMaximoCliente As Decimal = 0
Dim SaldoEntregado As Decimal = 0
If DtNC IsNot Nothing Then
Me.TmpDTRNCBonificacionesCliente = DtNC.FiltraParametros("TipoRNC = 2")
Me.TmpDTRNCBonificacionesCliente.Columns.Add("ImporteBonificacion", GetType(Decimal))
Me.TmpDTRNCBonificacionesCliente.Columns.Add("IVABonificacion", GetType(Decimal))
Me.TmpDTRNCBonificacionesCliente.Columns.Add("CveVentaRNCCargo", GetType(Integer))
If CargarSoloGarantias Then
Dim SaldoMaximo As Decimal = DtNC.SUMD("Saldo", "TipoRNC = 1 AND EsGarantia = True")
If SaldoMaximo > 0 Then
SaldoMaximoCliente = SaldoMaximo
Else
SaldoMaximoCliente = 0
If CargarBonificaciones Then
'Me.TmpDTRNCBonificacionesSeleccionadas = Me.TmpDTRNCBonificacionesCliente.Copy()
CargaBonificacionesDesc("-1", True)
End If
Else
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
Dim RowUsadosNC As DataRow = ObjAcum.DtResultados.Rows(2)
DivSMU.Visible = True
Dim SaldoMaximo As Decimal = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal()
If CargarSoloGarantias Then
GvDescNCCargos.DataSource = DtNC.FiltraParametros("TipoRNC = 1 AND EsGarantia = True")
Else
GvDescNCCargos.DataSource = DtNC.FiltraParametros("TipoRNC = 1 AND EsGarantia = False")
End If
GvDescNCCargos.DataBind()
Dim SaldoMaximoCliente As Decimal = 0
Dim SaldoEntregado As Decimal = 0
If CargarSoloGarantias Then
Dim SaldoMaximo As Decimal = DtNC.SUMD("Saldo", "TipoRNC = 1 AND EsGarantia = True")
If SaldoMaximo > 0 Then
SaldoMaximoCliente = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal()
SaldoMaximoCliente = SaldoMaximo
Else
SaldoMaximoCliente = 0
End If
Dim RowEntregado As DataRow = ObjAcum.DtResultados.Rows(1)
SaldoEntregado = RowEntregado("ValorConImpuestos").ToString().ToDecimal()
Else
SaldoMaximoCliente = 0
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
Dim RowUsadosNC As DataRow = ObjAcum.DtResultados.Rows(2)
DivSMU.Visible = True
Dim SaldoMaximo As Decimal = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal()
If SaldoMaximo > 0 Then
SaldoMaximoCliente = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal()
Else
SaldoMaximoCliente = 0
End If
Dim RowEntregado As DataRow = ObjAcum.DtResultados.Rows(1)
SaldoEntregado = RowEntregado("ValorConImpuestos").ToString().ToDecimal()
Else
SaldoMaximoCliente = 0
End If
ObjAcum.Dispose()
End If
ObjAcum.Dispose()
End If
Dim SaldoMaximoUsadosFactura As Decimal = Me.TmpDT.SUM("Total", "EsCargo = True").ToDecimal() + Me.TmpDT.SUM("ImporteIVA", "EsCargo = True").ToDecimal()
Dim SaldoMaximoUsadosFactura As Decimal = Me.TmpDT.SUM("Total", "EsCargo = True").ToDecimal() + Me.TmpDT.SUM("ImporteIVA", "EsCargo = True").ToDecimal()
If SaldoMaximoCliente > 0 AndAlso SaldoMaximoCliente < SaldoMaximoUsadosFactura Then
SaldoMaximoUsadosFactura = SaldoMaximoCliente
End If
If SaldoMaximoCliente > 0 AndAlso SaldoMaximoCliente < SaldoMaximoUsadosFactura Then
SaldoMaximoUsadosFactura = SaldoMaximoCliente
End If
Dim SaldoMaximoUtilizable = If(SaldoMaximoUsadosFactura < SaldoEntregado, SaldoMaximoUsadosFactura, SaldoEntregado)
Dim SaldoMaximoUtilizable = If(SaldoMaximoUsadosFactura < SaldoEntregado, SaldoMaximoUsadosFactura, SaldoEntregado)
If SaldoMaximoUtilizable > 0 Then
HdnSaldoMaximoUsados.Value = SaldoMaximoUtilizable.ToString()
LblSaldoMaximoUsados.Text = String.Format("{0:N2}", SaldoMaximoUtilizable)
Else
HdnSaldoMaximoUsados.Value = "0"
LblSaldoMaximoUsados.Text = String.Format("{0:N2}", 0)
End If
If SaldoMaximoUtilizable > 0 Then
HdnSaldoMaximoUsados.Value = SaldoMaximoUtilizable.ToString()
LblSaldoMaximoUsados.Text = String.Format("{0:N2}", SaldoMaximoUtilizable)
Else
HdnSaldoMaximoUsados.Value = "0"
LblSaldoMaximoUsados.Text = String.Format("{0:N2}", 0)
LblSaldoMaximoUsados.Text = "0"
End If
Else
HdnSaldoMaximoUsados.Value = "0"
LblSaldoMaximoUsados.Text = "0"
End If
UpDescNC.Update()
@@ -35289,35 +35320,52 @@ Partial Class Ventas
RBLPago.Enabled = False
Using ObjVentas As New ClsVentas
If ObjVentas.GetLineasAdicionalesSaldo(DdlLineaAdicional.SelectedValue.ToEntero(), CveCliente, -1, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
If ObjVentas.GetLineasAdicionalesSaldo(DdlLineaAdicional.SelectedValue.ToEntero(), CveCliente, -1, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, FechaVencimientoConsulta:=MinFecha) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
TxtFechaPago.Text = ObjVentas.DtResultados.Rows(0)("FechaVencimiento").ToString().ToDateTime().ToString("dd/MM/yyyy")
Me.SaldoLineaAdicional = ObjVentas.DtResultados.Rows(0)("Saldo").ToString().ToDecimal()
Me.CveClasificacionLineaAdicional = ObjVentas.DtResultados.Rows(0)("CveClasificacionPS").ToString().ToEntero()
Me.CveCategoriaLineaAdicional = ObjVentas.DtResultados.Rows(0)("CveCategoria").ToString().ToEntero()
Me.CveMonedaLineaAdicional = ObjVentas.DtResultados.Rows(0)("CveMoneda").ToString().ToEntero()
End If
End If
End Using
Else
Me.SaldoLineaAdicional = 0
Me.CveClasificacionLineaAdicional = 0
Me.CveCategoriaLineaAdicional = 0
End If
UpParametros.Update()
UPCondicionesPago.Update()
End Sub
Protected Sub LnkUpdateLineaAdicional_Click(sender As Object, e As EventArgs)
'VALIDAR LINEAS ADICIONALES
If UsuarioActual.Empresa.Funcionalidad(705) = "1" AndAlso DdlLineaAdicional.SelectedValue.ToEntero() > 0 Then
'VERIFICA QUE LA CLASIFICACION DE LOS PRODUCTOS DEBE SER LA MISMA DE LA LINEA ADICIONAL
If TmpDT IsNot Nothing AndAlso Me.CveClasificacionLineaAdicional > 0 Then
For Each Row As DataRow In TmpDT.FiltraParametros("", DistinctColumns:={"CveClasificacion", "Clasificacion"}).Rows
If Me.CveClasificacionLineaAdicional <> Row("CveClasificacion").ToString().ToEntero() Then
Alert($"La clasificación '{Row("Clasificacion")}' no pertenece a la linea adicional.", TipoMensaje.MsgAdvertencia)
'VERIFICA QUE LA CATEGORIA DE LOS PRODUCTOS DEBE SER LA MISMA DE LA LINEA ADICIONAL
If TmpDT IsNot Nothing AndAlso Me.CveCategoriaLineaAdicional > 0 Then
For Each Row As DataRow In TmpDT.FiltraParametros("", DistinctColumns:={"CveClasificacion"}).Rows
Dim RowClasificacion = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=Row("CveClasificacion").ToString().ToEntero()).FiltroPrimero("")
If RowClasificacion IsNot Nothing Then
Dim CveCategoria As Integer = RowClasificacion("CveCategoria").ToString().ToEntero()
Dim Categoria As String = RowClasificacion("Categoria").ToString()
If Me.CveCategoriaLineaAdicional <> CveCategoria Then
Alert($"La categoría '{Categoria}' no pertenece a la linea adicional.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Else
Alert($"No se encontro la clasificación.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Next
End If
'SI NO ES A CREDITO NO SELECCIONAR LINEA ADICIONAL
If RBLPago.SelectedValue <> "1" Then
Alert($"La linea adicional debe ser utilizada en una venta a crédito.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If Me.SaldoLineaAdicional <= 0 Then
Alert("El saldo de la linea adicional debe ser mayor a cero", TipoMensaje.MsgAdvertencia)
Exit Sub

View File

@@ -566,6 +566,12 @@