This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-03-18 13:22:59 -07:00
14 changed files with 339 additions and 223 deletions

View File

@@ -90,8 +90,8 @@
<label class="col-md-1 truncate">Estatus:</label> <label class="col-md-1 truncate">Estatus:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar">
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem> <asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Activo" Value="1"></asp:ListItem> <asp:ListItem Text="Activo" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Inactivo" Value="0"></asp:ListItem> <asp:ListItem Text="Inactivo" Value="0"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
@@ -151,7 +151,7 @@
&nbsp;<asp:Literal ID="LblPuntos" runat="server" Text='<%# Eval("Estatus")%>'></asp:Literal> &nbsp;<asp:Literal ID="LblPuntos" runat="server" Text='<%# Eval("Estatus")%>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="AreaTexto" ItemStyle-Width ="100px" HeaderText="Area" />
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px"> <asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal> &nbsp;<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>

View File

@@ -57,7 +57,7 @@ Partial Class Acumuladores_CatFoliosGarantia
Dim objAcum As New ClsAcumuladores Dim objAcum As New ClsAcumuladores
If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=EstatusValor, TipoFolio:=tipoFolioValor) Then If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=EstatusValor, TipoFolio:=tipoFolioValor, Area:=-1) Then
GvFolioGarantia.DataSource = objAcum.DtResultados GvFolioGarantia.DataSource = objAcum.DtResultados
Else Else
GvFolioGarantia.DataSource = Nothing GvFolioGarantia.DataSource = Nothing
@@ -116,7 +116,7 @@ Partial Class Acumuladores_CatFoliosGarantia
If Not Actualizar Then If Not Actualizar Then
If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, DdlTipoFolioModal.SelectedValue, TxtLimite.Text.ToEntero) Then If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, DdlTipoFolioModal.SelectedValue, TxtLimite.Text.ToEntero, 2) Then
TxtFolioGarantia.Text = "" TxtFolioGarantia.Text = ""
ChkEstatus.Checked = True ChkEstatus.Checked = True

View File

@@ -483,7 +483,7 @@ Public Class ClsAcumuladores
#Region " FOLIOS GARANTÍA " #Region " FOLIOS GARANTÍA "
Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional TipoFolio As String = "-1") As Boolean Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional TipoFolio As String = "-1", Optional Area As Integer = 1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
'Data = New DataTable 'Data = New DataTable
@@ -494,6 +494,7 @@ Public Class ClsAcumuladores
.Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@Estatus", SqlDbType.Int).Value = Estatus
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@tipoFolio", SqlDbType.VarChar).Value = TipoFolio .Add("@tipoFolio", SqlDbType.VarChar).Value = TipoFolio
.Add("@Area", SqlDbType.Int).Value = Area
End With End With
Try Try
@@ -508,7 +509,7 @@ Public Class ClsAcumuladores
Return Retorno Return Retorno
End Function End Function
Public Function FoliosGarantiaAdd(FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoFolio As String, Limite As Integer) As Boolean Public Function FoliosGarantiaAdd(FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoFolio As String, Limite As Integer, Area As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
'Data = New DataTable 'Data = New DataTable
@@ -523,6 +524,7 @@ Public Class ClsAcumuladores
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@TipoFolio", SqlDbType.VarChar).Value = TipoFolio .Add("@TipoFolio", SqlDbType.VarChar).Value = TipoFolio
.Add("@Limite", SqlDbType.Int).Value = Limite .Add("@Limite", SqlDbType.Int).Value = Limite
.Add("@Area", SqlDbType.Int).Value = Area
End With End With

View File

@@ -932,10 +932,10 @@ Public Class ClsPaginas
End Property End Property
Property GlobalDTSubProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable Property GlobalDTSubProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable
Get Get
Dim AppNombre As String = String.Format("GlobalDTSubProyectosUsuarios{0}", CveEmpresa)
If Application("GlobalDTSubProyectosUsuarios") Is Nothing Then If Application(AppNombre) Is Nothing Then
Dim ObjSubProyectos As New ClsSubProyectos() Dim ObjSubProyectos As New ClsSubProyectos()
If ObjSubProyectos.GetSubProyectosUsuarios Then Application("GlobalDTSubProyectosUsuarios") = ObjSubProyectos.DtResultados Else Alert("Ocurrió un error al cargar los SubProyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError) If ObjSubProyectos.GetSubProyectosUsuarios(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = ObjSubProyectos.DtResultados Else Alert("Ocurrió un error al cargar los SubProyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError)
ObjSubProyectos.Dispose() ObjSubProyectos.Dispose()
End If End If
@@ -947,33 +947,26 @@ Public Class ClsPaginas
If CveUsuario <> -1 Then StrSQL.AppendFormat(" AND CveUsuario = {0}", CveUsuario) If CveUsuario <> -1 Then StrSQL.AppendFormat(" AND CveUsuario = {0}", CveUsuario)
If CveEstatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", CveEstatus) If CveEstatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", CveEstatus)
Dim Dv As New DataView(DirectCast(Application("GlobalDTSubProyectosUsuarios"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows) Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
GlobalDTSubProyectosUsuarios = Dv.ToTable GlobalDTSubProyectosUsuarios = Dv.ToTable
Dv.Dispose() Dv.Dispose()
Dim ObjSubProyectos As New ClsSubProyectos() 'Dim ObjSubProyectos As New ClsSubProyectos()
If ObjSubProyectos.GetSubProyectosUsuarios(CveUsuario:=CveUsuario, CveProyecto:=CveProyecto, CveSubProyecto:=CveSubProyecto, CveEstatus:=CveEstatus, CveEmpresa:=CveEmpresa) Then 'If ObjSubProyectos.GetSubProyectosUsuarios(CveUsuario:=CveUsuario, CveProyecto:=CveProyecto, CveSubProyecto:=CveSubProyecto, CveEstatus:=CveEstatus, CveEmpresa:=CveEmpresa) Then
GlobalDTSubProyectosUsuarios = ObjSubProyectos.DtResultados ' GlobalDTSubProyectosUsuarios = ObjSubProyectos.DtResultados
Else 'Else
GlobalDTSubProyectosUsuarios = Nothing ' GlobalDTSubProyectosUsuarios = Nothing
End If 'End If
ObjSubProyectos.Dispose() 'ObjSubProyectos.Dispose()
Else Else
GlobalDTSubProyectosUsuarios = DirectCast(Application("GlobalDTSubProyectosUsuarios"), DataTable) GlobalDTSubProyectosUsuarios = DirectCast(Application(AppNombre), DataTable)
End If End If
End Get End Get
Set(ByVal value As DataTable) Set(ByVal value As DataTable)
If value Is Nothing OrElse value.Rows.Count = 0 Then Dim AppNombre As String = String.Format("GlobalDTSubProyectosUsuarios{0}", CveEmpresa)
Dim msg As String = "aqui no se carga subproyectos" Application(AppNombre) = value
If Request IsNot Nothing Then
msg = msg & Request.ServerVariables("URL")
End If
msg.GuardaLog()
End If
Application("GlobalDTSubProyectosUsuarios") = value
End Set End Set
End Property End Property
Property GlobalDTProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, CveEstatus As Integer) As DataTable Property GlobalDTProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, CveEstatus As Integer) As DataTable

View File

@@ -8828,6 +8828,7 @@ Namespace Modelos
Estado = "" Estado = ""
Pais = "" Pais = ""
CP = "" CP = ""
Telefono = ""
AplicaFord = False AplicaFord = False
Ford_GSDB = "" Ford_GSDB = ""
AplicaFEMSA = False AplicaFEMSA = False

View File

@@ -210,6 +210,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
DtRetorno = dt.FiltraParametros($"NombreComercial like '%{Name}%' OR Nombre like '%{Name}%' ") DtRetorno = dt.FiltraParametros($"NombreComercial like '%{Name}%' OR Nombre like '%{Name}%' ")
End If End If
dt.Dispose()
End If End If
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
@@ -220,6 +221,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Else Else
context.Response.Write("[]") context.Response.Write("[]")
End If End If
DtRetorno.Dispose()
Return retorno Return retorno
End Function End Function
@@ -256,6 +258,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
DtRetorno = dt.FiltraParametros($"NombreCortoProveedor like '%{Name}%'") DtRetorno = dt.FiltraParametros($"NombreCortoProveedor like '%{Name}%'")
End If End If
dt.Dispose()
End If End If
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
@@ -266,7 +269,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Else Else
context.Response.Write("[]") context.Response.Write("[]")
End If End If
DtRetorno.Dispose()
Return retorno Return retorno
End Function End Function
#End Region #End Region
@@ -464,6 +467,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End Try End Try
End If End If
DTPS = Nothing
End If End If
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
DtPSRetorno.Columns("CvePS").ColumnName = "id" DtPSRetorno.Columns("CvePS").ColumnName = "id"
@@ -478,6 +482,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Else Else
context.Response.Write("[]") context.Response.Write("[]")
End If End If
DtPSRetorno.Dispose()
End If End If
Return retorno Return retorno

View File

@@ -322,6 +322,15 @@ Partial Class Bancos_PopIEVentas
End Set End Set
End Property End Property
Private Property CveCorte As Integer
Get
Return ViewState("CveCorte").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveCorte") = value
End Set
End Property
Private Property TipoCambioOriginal As Decimal Private Property TipoCambioOriginal As Decimal
Get Get
Return ViewState("TipoCambioOriginal").ToString.ToDecimal Return ViewState("TipoCambioOriginal").ToString.ToDecimal
@@ -527,7 +536,7 @@ Partial Class Bancos_PopIEVentas
ViewState("IdCtaAnticipo") = 0 ViewState("IdCtaAnticipo") = 0
ViewState("IdCtaContMonedaExtranjeraAnticipo") = 0 ViewState("IdCtaContMonedaExtranjeraAnticipo") = 0
ViewState("IdCtaContMonedaComplementariaAnticipo") = 0 ViewState("IdCtaContMonedaComplementariaAnticipo") = 0
CveCorte = -1
IdCuentaBancariaComplementaria = 0 IdCuentaBancariaComplementaria = 0
@@ -672,48 +681,46 @@ Partial Class Bancos_PopIEVentas
If ObjVenta.DtResultados IsNot Nothing AndAlso ObjVenta.DtResultados.Rows.Count > 0 Then If ObjVenta.DtResultados IsNot Nothing AndAlso ObjVenta.DtResultados.Rows.Count > 0 Then
'CargaProveedor
Dim dr As DataRow = ObjVenta.DtResultados.Rows(0) Dim dr As DataRow = ObjVenta.DtResultados.Rows(0)
Dim Validada As Boolean = True Dim Validada As Boolean = True
'JJMQ:20190606 Se cancela código de validacion ante el SAT por lentitud en el servicio. 'JJMQ:20190606 Se cancela código de validacion ante el SAT por lentitud en el servicio.
'Sustituir la línea anterior por todo lo siguiente hasta donde termina el end if para que valide de nueva cuenta 'Sustituir la línea anterior por todo lo siguiente hasta donde termina el end if para que valide de nueva cuenta
'Dim Validada As Boolean = False 'Dim Validada As Boolean = False
'If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
' Dim Valida As New ClsValidaCFDi(dr("FolioFiscal").ToString(), dr("ClienteRFC").ToString, UsuarioActual.Empresa.RFC) Dim Valida As New ClsValidaCFDi(dr("FolioFiscal").ToString(), dr("ClienteRFC").ToString, UsuarioActual.Empresa.RFC)
' If Valida.EsValida > 0 Then If Valida.EsValida > 0 Then
' If Valida.EsValida = 2 Then If Valida.EsValida = 2 Then
' Validada = False Validada = False
' 'Dim ObjDatos As New ClsCompras 'Dim ObjDatos As New ClsCompras
' 'If ObjDatos.UpdateEstatus(Valida.EsValida, gvr.DataKey("CveFactura").ToEntero) Then 'If ObjDatos.UpdateEstatus(Valida.EsValida, gvr.DataKey("CveFactura").ToEntero) Then
' 'End If 'End If
' 'ObjDatos.Dispose() 'ObjDatos.Dispose()
' BtnGuardar.Enabled = False BtnGuardar.Enabled = False
' If UsuarioActual.Empresa.UsaAC Then If UsuarioActual.Empresa.UsaAC Then
' RegistraScript("if (confirm('La factura está cancelada ante el SAT., ¿Desea eliminar la compra?')) { $get('BtnEliminarCompra').click();}") RegistraScript("if (confirm('La factura está cancelada ante el SAT., ¿Desea eliminar la compra?')) { $get('BtnEliminarCompra').click();}")
' Else Else
' Alert("La factura está cancelada ante el SAT.") Alert("La factura está cancelada ante el SAT.")
' End If End If
' Else Else
' Validada = True Validada = True
' End If End If
' Else Else
' 'no se pudo validar, pero ya tuvo la primera vuelta de validacion 'no se pudo validar, pero ya tuvo la primera vuelta de validacion
' Validada = True Validada = True
' End If End If
' Valida.Dispose() Valida.Dispose()
'Else Else
' Validada = True Validada = True
'End If End If
If Validada Then If Validada Then
@@ -725,7 +732,7 @@ Partial Class Bancos_PopIEVentas
CveMoneda = dr("CveMoneda").ToString.ToEntero CveMoneda = dr("CveMoneda").ToString.ToEntero
CveMonedaVenta = dr("CveMoneda").ToString.ToEntero CveMonedaVenta = dr("CveMoneda").ToString.ToEntero
CveMonedaFiltros = dr("CveMoneda").ToString.ToEntero CveMonedaFiltros = dr("CveMoneda").ToString.ToEntero
NombreCliente = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Nombre", String.Format("CveCliente = {0}", CveCliente)) NombreCliente = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre", String.Format("CveCliente = {0}", CveCliente))
SerieFolio = dr("SerieFolio").ToString SerieFolio = dr("SerieFolio").ToString
TipoCambioOriginal = dr("TipoCambio").ToString.ToDecimal TipoCambioOriginal = dr("TipoCambio").ToString.ToDecimal
CveSubProyectoVenta = dr("CveSubProyecto").ToString.ToEntero CveSubProyectoVenta = dr("CveSubProyecto").ToString.ToEntero
@@ -777,6 +784,12 @@ Partial Class Bancos_PopIEVentas
FechaVenta = dr("Fecha").ToString.ToDate FechaVenta = dr("Fecha").ToString.ToDate
SaldoVenta = dr("Saldo").ToString.ToDouble SaldoVenta = dr("Saldo").ToString.ToDouble
'Cortes de Caja
If UsuarioActual.TienePermisoProceso(160) Then
CargaCorteCaja()
End If
End If End If
@@ -786,6 +799,19 @@ Partial Class Bancos_PopIEVentas
ObjVenta.Dispose() ObjVenta.Dispose()
End Sub End Sub
Private Sub CargaCorteCaja()
'Checar si hay un Turno Abierto
Dim ObjPVenta As New ClsPuntoVenta
If ObjPVenta.GetVta_Cortes("-1", "-1", UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, 0) Then
If ObjPVenta.DtResultados.Rows.Count > 0 Then
CveCorte = ObjPVenta.CveCorte
End If
End If
ObjPVenta.Dispose()
End Sub
Private Sub CargaCliente(ByVal CveCliente As Integer, RFC As String) Private Sub CargaCliente(ByVal CveCliente As Integer, RFC As String)
Dim ObjCliente As New ClsClientes Dim ObjCliente As New ClsClientes
@@ -1497,7 +1523,7 @@ Partial Class Bancos_PopIEVentas
Select Case RBLContado.SelectedValue Select Case RBLContado.SelectedValue
Case "1" ' Banco Case "1" ' Banco
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, ImportePagado, CveMoneda, tipoCambioPago, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), CveCuentaDeposito:=CveCuentaDeposito, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1")) CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, ImportePagado, CveMoneda, tipoCambioPago, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), CveCuentaDeposito:=CveCuentaDeposito, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"), CveCorte:=CveCorte)
If CveIE > 0 Then If CveIE > 0 Then
If CveVenta > 0 Then If CveVenta > 0 Then
CveConcepto = 2 CveConcepto = 2

View File

@@ -12,7 +12,7 @@
<asp:Content ID="Content8" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="H" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content9" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content9" ContentPlaceHolderID="C" runat="Server">
<rvweb:ReportViewer Width="1000" Height="500" ID="ReportViewer1" runat="server"></rvweb:ReportViewer>
</asp:Content> </asp:Content>
<asp:Content ID="Content10" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content10" ContentPlaceHolderID="JS" runat="Server">
</asp:Content> </asp:Content>

View File

@@ -256,7 +256,7 @@
</div> </div>
<asp:Button Text="Recarga" Width="75px" ID="BtnConsultarPendientes" OnClick="BtnConsultarPendientes_Click" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpPendientes" /> <asp:Button Text="Recarga" Width="75px" ID="BtnConsultarPendientes" OnClick="BtnConsultarPendientes_Click" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpPendientes" />
<asp:Timer runat="server" ID="TimmerRefresh" Interval="100000" OnTick="TimmerRefresh_Tick"></asp:Timer> <asp:Timer runat="server" ID="TimmerRefresh" Interval="300000" OnTick="TimmerRefresh_Tick"></asp:Timer>
<a href="javascript:;" class="collapse"></a> <a href="javascript:;" class="collapse"></a>
</asp:Panel> </asp:Panel>
</div> </div>

View File

@@ -283,7 +283,7 @@
<asp:Button Text="Recarga" Width="75px" ID="BtnConsultarPendientes" OnClick="BtnConsultarPendientes_Click" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpPendientes" /> <asp:Button Text="Recarga" Width="75px" ID="BtnConsultarPendientes" OnClick="BtnConsultarPendientes_Click" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpPendientes" />
<asp:Timer runat="server" ID="TimmerRefresh" Interval="100000" OnTick="TimmerRefresh_Tick"></asp:Timer> <asp:Timer runat="server" ID="TimmerRefresh" Interval="300000" OnTick="TimmerRefresh_Tick"></asp:Timer>
<a href="javascript:;" class="collapse"></a> <a href="javascript:;" class="collapse"></a>
</asp:Panel> </asp:Panel>

View File

@@ -2621,7 +2621,7 @@ Partial Class Inventarios_RecepcionUsados
Private Sub CargaFolioAjuste() Private Sub CargaFolioAjuste()
DdlFolioGarantia.Items.Clear() DdlFolioGarantia.Items.Clear()
Dim ObjAcum As New ClsAcumuladores Dim ObjAcum As New ClsAcumuladores
If ObjAcum.FoliosGarantiaGet(-1, UsuarioActual.CveEmpresa) Then If ObjAcum.FoliosGarantiaGet(-1, UsuarioActual.CveEmpresa, Area:=2) Then
DdlFolioGarantia.DataSource = ObjAcum.DtResultados DdlFolioGarantia.DataSource = ObjAcum.DtResultados
DdlFolioGarantia.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlFolioGarantia.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If End If

View File

@@ -1288,12 +1288,14 @@ Partial Class Sistemas_UsuarioDetalle
Private Sub RecargaGlobales(TieneError As Boolean, ObjSubProyectos As ClsSubProyectos, ObjBancos As ClsBancos, ObjOC As ClsOC, ObjUsuarios As ClsSisUsuarios) Private Sub RecargaGlobales(TieneError As Boolean, ObjSubProyectos As ClsSubProyectos, ObjBancos As ClsBancos, ObjOC As ClsOC, ObjUsuarios As ClsSisUsuarios)
'RECARGA GLOBAL SUBPROYECTOS 'RECARGA GLOBAL SUBPROYECTOS
If Not TieneError Then If Not TieneError Then
If ObjSubProyectos.GetSubProyectosUsuarios Then GlobalDTSubProyectosUsuarios(-1, -1, UsuarioActual.CveEmpresa) = Nothing
Application("GlobalDTSubProyectosUsuarios") = ObjSubProyectos.DtResultados
Else 'If ObjSubProyectos.GetSubProyectosUsuarios Then
Application("GlobalDTSubProyectosUsuarios") = Nothing ' Application("GlobalDTSubProyectosUsuarios") = ObjSubProyectos.DtResultados
TieneError = True 'Else
End If ' Application("GlobalDTSubProyectosUsuarios") = Nothing
' TieneError = True
'End If
End If End If
If Not TieneError Then If Not TieneError Then

View File

@@ -3355,7 +3355,7 @@
<asp:Button ID="BtnGenerarRemision" runat="server" Text="Generar Remisión" Visible="false" ValidationGroup="GrpEmitirImprimir" CssClass="btn myventasbutton btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea generar la remisión?" data-btn-ok-label="si" /> <asp:Button ID="BtnGenerarRemision" runat="server" Text="Generar Remisión" Visible="false" ValidationGroup="GrpEmitirImprimir" CssClass="btn myventasbutton btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea generar la remisión?" data-btn-ok-label="si" />
<asp:Button ID="BtnGeneraAutorizacion" runat="server" Text="Generar Autorización" OnClick="BtnGeneraAutorizacion_Click" Visible="false" ValidationGroup="GrpEmitirImprimir" CssClass="btn myventasbutton btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea generar la autorización?" data-btn-ok-label="si" /> <asp:Button ID="BtnGeneraAutorizacion" runat="server" Text="Generar Autorización" OnClick="BtnGeneraAutorizacion_Click" Visible="false" ValidationGroup="GrpEmitirImprimir" CssClass="btn myventasbutton btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea generar la autorización?" data-btn-ok-label="si" />
<asp:Button ID="Button2" runat="server" Text="Button" />
<asp:Button ID="BtnGenerarPoliza" runat="server" Text="GenerarPoliza" Visible="false" CssClass="btn myventasbutton btn-primary" /> <asp:Button ID="BtnGenerarPoliza" runat="server" Text="GenerarPoliza" Visible="false" CssClass="btn myventasbutton btn-primary" />
<asp:Button ID="BtnGenerarOS" runat="server" Text="Generar OS" Visible="false" CssClass="btn myventasbutton btn-primary" /> <asp:Button ID="BtnGenerarOS" runat="server" Text="Generar OS" Visible="false" CssClass="btn myventasbutton btn-primary" />
@@ -3365,7 +3365,6 @@
<asp:Button ID="BtnEditarRemision" runat="server" Text="Actualizar Remision" CssClass="btn myventasbutton btn-primary" Visible="false" /> <asp:Button ID="BtnEditarRemision" runat="server" Text="Actualizar Remision" CssClass="btn myventasbutton btn-primary" Visible="false" />
<asp:Button ID="BtnPermisoEditarRemision" runat="server" Text="Editar Remision" CssClass="btn myventasbutton btn-primary" Visible="false" /> <asp:Button ID="BtnPermisoEditarRemision" runat="server" Text="Editar Remision" CssClass="btn myventasbutton btn-primary" Visible="false" />
<asp:Button ID="BtnMandaMail" runat="server" Text="MandaMail" CssClass="btn myventasbutton btn-primary" Visible="false" /> <asp:Button ID="BtnMandaMail" runat="server" Text="MandaMail" CssClass="btn myventasbutton btn-primary" Visible="false" />
<asp:Button ID="BtnCrearApartirDe" runat="server" Text="Crear a partir de" CssClass="btn myventasbutton btn-primary" Visible="false" /> <asp:Button ID="BtnCrearApartirDe" runat="server" Text="Crear a partir de" CssClass="btn myventasbutton btn-primary" Visible="false" />

View File

@@ -2418,18 +2418,21 @@ Partial Class Ventas
LblSubProyecto.Text = "" LblSubProyecto.Text = ""
divProyectoPyME.Visible = False divProyectoPyME.Visible = False
LblSubProyectoPyME.InnerText = "Sucursal" LblSubProyectoPyME.InnerText = "Sucursal"
Dim dttSub As New DataTable
dttSub = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyecto.Items.Clear() DdlSubProyecto.Items.Clear()
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) DdlSubProyecto.DataSource = dttSub
'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) 'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"})
DdlSubProyecto.DataBind() DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlSubProyectoPyME.Items.Clear() DdlSubProyectoPyME.Items.Clear()
DdlSubProyectoPyME.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) DdlSubProyectoPyME.DataSource = dttSub
'DdlSubProyectoPyME.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) 'DdlSubProyectoPyME.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"})
DdlSubProyectoPyME.DataBind() DdlSubProyectoPyME.DataBind()
DdlSubProyectoPyME.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlSubProyectoPyME.Items.Insert(0, New ListItem("Seleccione", "-1"))
dttSub.Dispose()
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
DdlProyecto.Visible = False DdlProyecto.Visible = False
@@ -2439,18 +2442,21 @@ Partial Class Ventas
LblSubProyecto.Text = "" LblSubProyecto.Text = ""
divProyectoPyME.Visible = False divProyectoPyME.Visible = False
LblSubProyectoPyME.InnerText = "Proyecto" LblSubProyectoPyME.InnerText = "Proyecto"
Dim dttSub As New DataTable
dttSub = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyecto.Items.Clear() DdlSubProyecto.Items.Clear()
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) DdlSubProyecto.DataSource = dttSub
'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) 'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"})
DdlSubProyecto.DataBind() DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlSubProyectoPyME.Items.Clear() DdlSubProyectoPyME.Items.Clear()
DdlSubProyectoPyME.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) DdlSubProyectoPyME.DataSource = dttSub
'DdlSubProyectoPyME.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) 'DdlSubProyectoPyME.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"})
DdlSubProyectoPyME.DataBind() DdlSubProyectoPyME.DataBind()
DdlSubProyectoPyME.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlSubProyectoPyME.Items.Insert(0, New ListItem("Seleccione", "-1"))
dttSub.Dispose()
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then
LblProyectoHeader.Text = "Sucursal" LblProyectoHeader.Text = "Sucursal"
@@ -2603,8 +2609,6 @@ Partial Class Ventas
End If End If
TxtFecha.Enabled = True TxtFecha.Enabled = True
CargaPorcentajeMarcas()
BloqueaCondiconesPago() BloqueaCondiconesPago()
BloqueaClasificaciones() BloqueaClasificaciones()
@@ -3538,13 +3542,17 @@ Partial Class Ventas
Dim DbRowVenta As DataRow = ObjVentas.DtResultados.Rows(0) Dim DbRowVenta As DataRow = ObjVentas.DtResultados.Rows(0)
Dim CveCliente As Integer = DbRowVenta("CveCliente").ToString.ToEntero Dim CveCliente As Integer = DbRowVenta("CveCliente").ToString.ToEntero
HdnCveVenta.Value = CveVenta.ToString HdnCveVenta.Value = CveVenta.ToString
Dim ObjUsados As New ClsVentas
Dim DtUsados As DataTable = Nothing Dim DtUsados As DataTable = Nothing
If ObjUsados.GetVentasUsados(CveVenta, DdlSubProyectoDatos.SelectedValue.ToEntero(), DbRowVenta("Fecha").ToString.ToDateTime, UsuarioActual.CveEmpresa) Then
DtUsados = ObjUsados.DtResultados If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
Dim ObjUsados As New ClsVentas
If ObjUsados.GetVentasUsados(CveVenta, DdlSubProyectoDatos.SelectedValue.ToEntero(), DbRowVenta("Fecha").ToString.ToDateTime, UsuarioActual.CveEmpresa) Then
DtUsados = ObjUsados.DtResultados
End If
ObjUsados.Dispose()
End If End If
ObjUsados.Dispose()
Me.CveEstatusFacturaPadre = DbRowVenta("CveEstatusFacturaPadre").ToString.ToEntero Me.CveEstatusFacturaPadre = DbRowVenta("CveEstatusFacturaPadre").ToString.ToEntero
'CargaEncabezado 'CargaEncabezado
@@ -3605,6 +3613,19 @@ Partial Class Ventas
End If End If
End If End If
'CargaDetalle
If ObjVentas.GetVentaDetalle(CveVenta) Then
TmpDT = ObjVentas.DtResultados
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
GvPS.DataSource = ObjVentas.DtResultados
GvPS.DataBind()
'IEPS A NIVEL DETALLE
'TxtIEPS.Text = If(TmpDT.SUM("IEPS") > 0, TmpDT.SUM("IEPS").FormatoNumero, TxtIEPS.Text)
End If
If DdlTipoComprobante.SelectedValue.Contiene("Egs", "Ing", "Ant", "Dev") AndAlso LblFolioFiscal.Text.Trim = "" Then HplFolioFiscalModal.Visible = True If DdlTipoComprobante.SelectedValue.Contiene("Egs", "Ing", "Ant", "Dev") AndAlso LblFolioFiscal.Text.Trim = "" Then HplFolioFiscalModal.Visible = True
Select Case DbRowVenta("TipoDocto").ToString Select Case DbRowVenta("TipoDocto").ToString
@@ -3622,7 +3643,7 @@ Partial Class Ventas
If TienePermiso <> "" Then ' si tiene acceso en el subproyecto If TienePermiso <> "" Then ' si tiene acceso en el subproyecto
'LkNotaCredito.Visible = UsuarioActual.TienePermisoProceso(175) 'LkNotaCredito.Visible = UsuarioActual.TienePermisoProceso(175)
If UsuarioActual.TienePermisoProceso(264) Then If UsuarioActual.TienePermisoProceso(264) Then
InicializaAplicaDevolucion() InicializaAplicaDevolucion(TmpDT)
End If End If
End If End If
@@ -3754,11 +3775,11 @@ Partial Class Ventas
End If End If
'contado 0, credito 1, terminal 2 'contado 0, credito 1, terminal 2
If ObjVentas.DtResultados(0)("CondicionesPago").ToString.ToEntero = 1 Then If DbRowVenta("CondicionesPago").ToString.ToEntero = 1 Then
RBLPago.SelectedValue = "1" RBLPago.SelectedValue = "1"
RBLPago_SelectedIndexChanged(Nothing, Nothing) RBLPago_SelectedIndexChanged(Nothing, Nothing)
UPCondicionesPago.Update() UPCondicionesPago.Update()
ElseIf ObjVentas.DtResultados(0)("CondicionesPago").ToString.ToEntero = 0 Then ElseIf DbRowVenta("CondicionesPago").ToString.ToEntero = 0 Then
RBLPago.SelectedValue = "2" RBLPago.SelectedValue = "2"
RBLPago.Items(0).Enabled = False RBLPago.Items(0).Enabled = False
RBLPago_SelectedIndexChanged(Nothing, Nothing) RBLPago_SelectedIndexChanged(Nothing, Nothing)
@@ -3771,17 +3792,6 @@ Partial Class Ventas
UPCondicionesPago.Update() UPCondicionesPago.Update()
End If End If
'CargaDetalle
If ObjVentas.GetVentaDetalle(CveVenta) Then
TmpDT = ObjVentas.DtResultados
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
GvPS.DataSource = ObjVentas.DtResultados
GvPS.DataBind()
'IEPS A NIVEL DETALLE
'TxtIEPS.Text = If(TmpDT.SUM("IEPS") > 0, TmpDT.SUM("IEPS").FormatoNumero, TxtIEPS.Text)
End If
'ESCONDE ACCIONES 'ESCONDE ACCIONES
LnkRemisiones.Visible = False LnkRemisiones.Visible = False
@@ -5151,6 +5161,10 @@ Partial Class Ventas
CargaRestriccionesCreditoCliente(True, Me.CveVenta) CargaRestriccionesCreditoCliente(True, Me.CveVenta)
End If End If
' si es empresa acumuladores
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
CargaPorcentajeMarcas()
End If
UpFacturar.Update() UpFacturar.Update()
UpEstatus.Update() UpEstatus.Update()
@@ -5205,124 +5219,122 @@ Partial Class Ventas
End Sub End Sub
Private Sub CargaRestriccionesCreditoCliente(Optional Alertas As Boolean = False, Optional CveVenta As Integer = -1) Private Sub CargaRestriccionesCreditoCliente(Optional Alertas As Boolean = False, Optional CveVenta As Integer = -1)
Dim ObjCliente As New ClsClientes()
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then If UsuarioActual.Empresa.Funcionalidad(570) = "1" AndAlso Me.PermiteCredito = False AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") AndAlso CveVenta < 1 Then
If ObjCliente.DtResultados.Rows.Count > 0 Then RBLPago.SelectedValue = "2"
If UsuarioActual.Empresa.Funcionalidad(570) = "1" AndAlso ObjCliente.DtResultados.Rows(0)("PermiteCredito").ToString = "False" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") AndAlso CveVenta < 1 Then RBLPago.Items(0).Enabled = False
RBLPago.SelectedValue = "2" RBLPago_SelectedIndexChanged(Nothing, Nothing)
RBLPago.Items(0).Enabled = False If UsuarioActual.CveEmpresa.Contiene(119) AndAlso Not UsuarioActual.TienePermisoProceso(268) Then
RBLPago_SelectedIndexChanged(Nothing, Nothing) DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
If UsuarioActual.CveEmpresa.Contiene(119) AndAlso Not UsuarioActual.TienePermisoProceso(268) Then DdlTipoComprobante.SelectedValue = "PA"
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
'si llegó por la opción de cotización no debe de restringuir
If IfNull(Request("Op"), "").ToString = "Cot" Then DdlTipoComprobante.SelectedValue = "Cot"
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing"))
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant"))
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
LnkPedido2SinFacturar.Visible = False
LnkCotizaciones.Visible = False
End If
UPCondicionesPago.Update()
ElseIf UsuarioActual.CveEmpresa.Contiene(72, 119) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta < 1 Then
RBLPago.SelectedValue = "1"
RBLPago_SelectedIndexChanged(Nothing, Nothing)
UPCondicionesPago.Update()
Dim CreditoDispo As Decimal = CargaCreditoDisponible(CveCliente, DdlSucursalCliente.SelectedValue.ToEntero)
If CreditoDispo > 0 Then
TrCreditoDisponible.Visible = True
LblCreditoDisponible.Text = CreditoDispo.FormatoNumero
If PorcentajeCredito > 80 Then TrPorcentajeCredito.Visible = True : LblPorcentajeCredito.Text = $"{PorcentajeCredito.FormatoNumero}%"
If UsuarioActual.CveEmpresa = 119 AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "PA") Then
'If LblRFC.Text.Trim <> "XAXX010101000" Then
Dim Vta As New ClsVentas
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
Vta.Dispose()
If Opcion > 0 Then
'si la cotización no debe de existir este canddado
If Alertas Then Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
'RBLPago.SelectedValue = "2"
'RBLPago.Items(0).Enabled = False
RBLPago_SelectedIndexChanged(Nothing, Nothing)
UPCondicionesPago.Update()
DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización") DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
DdlTipoComprobante.SelectedValue = "PA" DdlTipoComprobante.SelectedValue = "PA"
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
'si llegó por la opción de cotización no debe de restringuir 'si llegó por la opción de cotización no debe de restringuir
If IfNull(Request("Op"), "").ToString = "Cot" Then DdlTipoComprobante.SelectedValue = "Cot" If IfNull(Request("Op"), "").ToString = "Cot" Then DdlTipoComprobante.SelectedValue = "Cot"
'quito remisión y factura
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing")) DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing"))
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant")) DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant"))
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem")) DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
LnkPedido2SinFacturar.Visible = False If Opcion = 1 Then
LnkCotizaciones.Visible = False BtnEmitirImprimir.Visible = False
End If
UPCondicionesPago.Update()
ElseIf UsuarioActual.CveEmpresa.Contiene(72, 119) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta < 1 Then
RBLPago.SelectedValue = "1"
RBLPago_SelectedIndexChanged(Nothing, Nothing)
UPCondicionesPago.Update()
Dim CreditoDispo As Decimal = CargaCreditoDisponible(CveCliente, DdlSucursalCliente.SelectedValue.ToEntero)
If CreditoDispo > 0 Then
TrCreditoDisponible.Visible = True
LblCreditoDisponible.Text = CreditoDispo.FormatoNumero
If PorcentajeCredito > 80 Then TrPorcentajeCredito.Visible = True : LblPorcentajeCredito.Text = $"{PorcentajeCredito.FormatoNumero}%"
If UsuarioActual.CveEmpresa = 119 AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "PA") Then
'If LblRFC.Text.Trim <> "XAXX010101000" Then
Dim Vta As New ClsVentas
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
Vta.Dispose()
If Opcion > 0 Then
'si la cotización no debe de existir este canddado
If Alertas Then Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
'RBLPago.SelectedValue = "2"
'RBLPago.Items(0).Enabled = False
RBLPago_SelectedIndexChanged(Nothing, Nothing)
UPCondicionesPago.Update()
DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
DdlTipoComprobante.SelectedValue = "PA"
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
'si llegó por la opción de cotización no debe de restringuir
If IfNull(Request("Op"), "").ToString = "Cot" Then DdlTipoComprobante.SelectedValue = "Cot"
'quito remisión y factura
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing"))
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant"))
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
If Opcion = 1 Then
BtnEmitirImprimir.Visible = False
BtnsFacturar.Visible = False
BtnGenerarRemision.Visible = False
LnkPedido2SinFacturar.Visible = False
LnkCotizaciones.Visible = False
LnkOCs.Visible = False
End If
Else
' el cliente tiene crédito disponible, no tiene bloqueo
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("PA"))
If UsuarioActual.TienePermisoProceso(60) Then DdlTipoComprobante.SelectedValueExistInsert("Ing", "Ingresos") 'puede facturar
If UsuarioActual.TienePermisoProceso(199) Then DdlTipoComprobante.SelectedValueExistInsert("Rem", "Remisión") ' puede remisionar
DdlTipoComprobante.SelectedValueExist(UsuarioActual.CveTipoDocumento)
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString
End If
'Else
' 'que no de crédito, solo contado
' RBLPago.SelectedValue = "2"
' RBLPago.Items(0).Enabled = False
'End If
End If
Else
If UsuarioActual.CveEmpresa = 119 AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "Ant", "PA") Then
Dim Vta As New ClsVentas
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
Vta.Dispose()
If Opcion > 0 Then
If Opcion = 1 Then
BtnEmitirImprimir.Visible = False
End If
If Alertas Then Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
Else
If Alertas Then Alert("El cliente tiene su límite de crédito agotado.", TipoMensaje.MsgAdvertencia)
End If
'RBLPago.SelectedValue = "2"
'RBLPago.Items(0).Enabled = False
RBLPago_SelectedIndexChanged(Nothing, Nothing)
UPCondicionesPago.Update()
DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
DdlTipoComprobante.SelectedValue = "PA"
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
'si llegó por la opción de cotización no debe de restringuir
If IfNull(Request("Op"), "").ToString = "Cot" Then DdlTipoComprobante.SelectedValue = "Cot"
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing"))
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant"))
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
BtnsFacturar.Visible = False BtnsFacturar.Visible = False
BtnGenerarRemision.Visible = False BtnGenerarRemision.Visible = False
LnkPedido2SinFacturar.Visible = False LnkPedido2SinFacturar.Visible = False
LnkCotizaciones.Visible = False LnkCotizaciones.Visible = False
LnkOCs.Visible = False LnkOCs.Visible = False
End If End If
Else
' el cliente tiene crédito disponible, no tiene bloqueo
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("PA"))
If UsuarioActual.TienePermisoProceso(60) Then DdlTipoComprobante.SelectedValueExistInsert("Ing", "Ingresos") 'puede facturar
If UsuarioActual.TienePermisoProceso(199) Then DdlTipoComprobante.SelectedValueExistInsert("Rem", "Remisión") ' puede remisionar
DdlTipoComprobante.SelectedValueExist(UsuarioActual.CveTipoDocumento)
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString
End If End If
UPPCreditoDisponible.Update()
ElseIf UsuarioActual.CveEmpresa.Contiene(119, 1) AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso CveVenta > 0 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Pd2", "Cot") Or (DdlTipoComprobante.SelectedValue = "Rem" And ModalidadEdicion And ViewState("CveClienteAnterior").ToString.ToEntero > 0 And LblRFC.Text.Trim <> "XAXX010101000")) Then 'Else
Dim CreditoDispo As Decimal = CargaCreditoDisponible(CveCliente, DdlSucursalCliente.SelectedValue.ToEntero) ' 'que no de crédito, solo contado
' RBLPago.SelectedValue = "2"
' RBLPago.Items(0).Enabled = False
'End If
End If
Else
If UsuarioActual.CveEmpresa = 119 AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "Ant", "PA") Then
Dim Vta As New ClsVentas
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
Vta.Dispose()
If Opcion > 0 Then
If Opcion = 1 Then
BtnEmitirImprimir.Visible = False
End If
If Alertas Then Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
Else
If Alertas Then Alert("El cliente tiene su límite de crédito agotado.", TipoMensaje.MsgAdvertencia)
End If
'RBLPago.SelectedValue = "2"
'RBLPago.Items(0).Enabled = False
RBLPago_SelectedIndexChanged(Nothing, Nothing)
UPCondicionesPago.Update()
DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
DdlTipoComprobante.SelectedValue = "PA"
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
'si llegó por la opción de cotización no debe de restringuir
If IfNull(Request("Op"), "").ToString = "Cot" Then DdlTipoComprobante.SelectedValue = "Cot"
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing"))
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant"))
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
BtnsFacturar.Visible = False
BtnGenerarRemision.Visible = False
LnkPedido2SinFacturar.Visible = False
LnkCotizaciones.Visible = False
LnkOCs.Visible = False
End If
End If
UPPCreditoDisponible.Update()
ElseIf UsuarioActual.CveEmpresa.Contiene(119, 1) AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso CveVenta > 0 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Pd2", "Cot") Or (DdlTipoComprobante.SelectedValue = "Rem" And ModalidadEdicion And ViewState("CveClienteAnterior").ToString.ToEntero > 0 And LblRFC.Text.Trim <> "XAXX010101000")) Then
Dim CreditoDispo As Decimal = CargaCreditoDisponible(CveCliente, DdlSucursalCliente.SelectedValue.ToEntero)
If CreditoDispo > 0 Then If CreditoDispo > 0 Then
Dim Vta As New ClsVentas Dim Vta As New ClsVentas
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa) Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
@@ -5331,8 +5343,8 @@ Partial Class Ventas
If Opcion > 0 Then If Opcion > 0 Then
If ModalidadEdicion AndAlso ViewState("CveCliente").ToString.ToEntero <> ViewState("CveClienteAnterior").ToString.ToEntero And DdlTipoComprobante.SelectedValue = "Rem" And ViewState("CveClienteAnterior").ToString.ToEntero > 0 And LblRFC.Text.Trim <> "XAXX010101000" Then If ModalidadEdicion AndAlso ViewState("CveCliente").ToString.ToEntero <> ViewState("CveClienteAnterior").ToString.ToEntero And DdlTipoComprobante.SelectedValue = "Rem" And ViewState("CveClienteAnterior").ToString.ToEntero > 0 And LblRFC.Text.Trim <> "XAXX010101000" Then
ViewState("CveCliente") = ViewState("CveClienteAnterior").ToString.ToEntero ViewState("CveCliente") = ViewState("CveClienteAnterior").ToString.ToEntero
ObjCliente.Dispose()
CargaCliente(ViewState("CveCliente").ToString.ToEntero) CargaCliente(ViewState("CveCliente").ToString.ToEntero)
If Opcion > 0 Then If Opcion > 0 Then
If Alertas Then Alert(OpcionMsg, TipoMensaje.MsgAdvertencia) If Alertas Then Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
Else Else
@@ -5382,9 +5394,7 @@ Partial Class Ventas
End If End If
End If End If
End If End If
End If
End If
ObjCliente.Dispose()
End Sub End Sub
@@ -5516,14 +5526,17 @@ Partial Class Ventas
Return Retorno Return Retorno
End Function End Function
Private Sub CargaDdlSubProyectos() Private Sub CargaDdlSubProyectos()
DdlSubProyectoDatos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1).FiltraParametros("EsSucursal = True ") Dim dtt As New DataTable
dtt = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyectoDatos.DataSource = dtt.FiltraParametros("EsSucursal = True ")
DdlSubProyectoDatos.DataBind() DdlSubProyectoDatos.DataBind()
DdlSubProyectoCobranza.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1).FiltraParametros("EsSucursal = True ") DdlSubProyectoCobranza.DataSource = dtt.FiltraParametros("EsSucursal = True ")
DdlSubProyectoCobranza.DataBind() DdlSubProyectoCobranza.DataBind()
DdlSubProyectoEjecucion.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1).FiltraParametros("EsSucursal = True ") DdlSubProyectoEjecucion.DataSource = dtt.FiltraParametros("EsSucursal = True ")
DdlSubProyectoEjecucion.DataBind() DdlSubProyectoEjecucion.DataBind()
DdlSubProyectoPyME.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) DdlSubProyectoPyME.DataSource = dtt
DdlSubProyectoPyME.DataBind() DdlSubProyectoPyME.DataBind()
dtt.Dispose()
End Sub End Sub
Private Sub CargaClasificaciones() Private Sub CargaClasificaciones()
If UsuarioActual.Empresa.UsaAC Then If UsuarioActual.Empresa.UsaAC Then
@@ -5618,13 +5631,16 @@ Partial Class Ventas
Public Sub CargaDdlNCPS() Public Sub CargaDdlNCPS()
Dim CveSATNC = "84111506" Dim CveSATNC = "84111506"
DdlNCPS.DataSource = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:=CveSATNC, AplicaParaVenta:=1) ', SATClavePS:=CveSATNC Dim dtt As New DataTable
dtt = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:=CveSATNC, AplicaParaVenta:=1) ', SATClavePS:=CveSATNC
DdlNCPS.DataSource = dtt
DdlNCPS.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlNCPS.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlNCPS.DataBind() DdlNCPS.DataBind()
DdlNCPSAnt.DataSource = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:=CveSATNC, AplicaParaVenta:=1) ', SATClavePS:=CveSATNC DdlNCPSAnt.DataSource = dtt
DdlNCPSAnt.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlNCPSAnt.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlNCPSAnt.DataBind() DdlNCPSAnt.DataBind()
dtt.Dispose()
End Sub End Sub
#End Region #End Region
@@ -15780,7 +15796,7 @@ Partial Class Ventas
If ConSalida AndAlso Not OcurrioError Then If ConSalida AndAlso Not OcurrioError Then
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura) OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura, ObjConta:=ObjConta)
End If End If
If Not OcurrioError Then If Not OcurrioError Then
@@ -16136,7 +16152,7 @@ Partial Class Ventas
Return Not OcurrioError Return Not OcurrioError
End Function End Function
Private Function GenerarMovimientoAlmacenVirtual(CveRemision As Integer, ByRef ObjInventario As ClsInventarios, ObjFactura As Modelos.Factura) As Boolean Private Function GenerarMovimientoAlmacenVirtual(CveRemision As Integer, ByRef ObjInventario As ClsInventarios, ObjFactura As Modelos.Factura, Optional ByRef ObjConta As ClsContabilidad = Nothing) As Boolean
Dim OcurrioError As Boolean = False Dim OcurrioError As Boolean = False
Try Try
@@ -16190,6 +16206,57 @@ Partial Class Ventas
OcurrioError = True OcurrioError = True
End If End If
'Agregamos las PrePolizas
If Not OcurrioError Then
If CveMovimientoVirtual > 0 Then
'OcurrioError = Not GeneraPrePolizaMovimientoAlmacen(ObjInventario, ObjConta, ObjContPaq, ObjFactura, ObjFactura.CvePrePoliza, CveMovimientoInventario, CveAlmacen)
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
Dim DtCostos = ObjInventario.DtResultados.Copy
Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"})
Dim IdCtaContable As Integer = 0
Dim CveCuenta As Integer = 0
Dim ValorInventario As Decimal
Dim TotalCostoAcumulado As Decimal = 0D
Dim Cont As Integer = 1
Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL
For Each RowInv As DataRow In DtCostosDistinct.Rows
ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
TotalCostoAcumulado += ValorInventario
'cuando es el último movimiento y hay diferencias en los importes
If Cont = DtCostosDistinct.Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then
ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado)
End If
Try
'If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoVirtual, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
OcurrioError = True
Exit For
End If
'End If
Catch ex As Exception
OcurrioError = True
Alert("Error inesperado (15148). Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
End Try
Cont += 1
Next
If Not OcurrioError Then
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacenVirtual)).ToEntero
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, TotalCosto, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoVirtual, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
OcurrioError = True
End If
End If
Else
OcurrioError = True
End If
End If
End If
End If End If
Catch ex As Exception Catch ex As Exception
@@ -22034,7 +22101,7 @@ Partial Class Ventas
#End Region #End Region
#Region " APLICA DEVOLUCION " #Region " APLICA DEVOLUCION "
Private Sub InicializaAplicaDevolucion() Private Sub InicializaAplicaDevolucion(DtDetalle As DataTable)
'If Not UsuarioActual.CveUsuario = 100 Then 'If Not UsuarioActual.CveUsuario = 100 Then
' If Not UsuarioActual.CveEmpresa.Contiene(72, 80, 119, 140, 141, 146) Then ' If Not UsuarioActual.CveEmpresa.Contiene(72, 80, 119, 140, 141, 146) Then
' Exit Sub ' Exit Sub
@@ -22048,13 +22115,13 @@ Partial Class Ventas
LBAplicaDevolucion.Visible = True LBAplicaDevolucion.Visible = True
Dim SeEsconde As Boolean = False Dim SeEsconde As Boolean = False
Dim ObjVenta As New ClsVentas
If ObjVenta.GetVentaDetalle(CveVenta) Then If DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0 Then
If Not ObjVenta.DtResultados.SUM("CantSur").ToString.ToDecimal > 0 Then SeEsconde = True If Not DtDetalle.SUM("CantSur").ToString.ToDecimal > 0 Then SeEsconde = True
'NO MOSTRAR LOS PRODUCTOS CON LA CLASIFICACION DE USADOS 'NO MOSTRAR LOS PRODUCTOS CON LA CLASIFICACION DE USADOS
GvAplicaDevolucion.DataSource = ObjVenta.DtResultados.FiltraParametros("CantRes > 0 AND CveClasificacion <> 20519") GvAplicaDevolucion.DataSource = DtDetalle.FiltraParametros("CantRes > 0 AND CveClasificacion <> 20519")
End If End If
ObjVenta.Dispose()
'activo el permiso para registrar el importe diferente a la devolución 'activo el permiso para registrar el importe diferente a la devolución
GvAplicaDevolucion.Columns(9).Visible = UsuarioActual.TienePermisoProceso(253) GvAplicaDevolucion.Columns(9).Visible = UsuarioActual.TienePermisoProceso(253)
@@ -24984,4 +25051,25 @@ Partial Class Ventas
Protected Sub LnkGenerarOC_Click(sender As Object, e As EventArgs) Protected Sub LnkGenerarOC_Click(sender As Object, e As EventArgs)
Response.Redirect($"~/OC/OC.aspx?CveCotizacion={Me.CveVenta}&Tipo=OC") Response.Redirect($"~/OC/OC.aspx?CveCotizacion={Me.CveVenta}&Tipo=OC")
End Sub End Sub
'Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
' Dim ObjVentas As New ClsVentas
' ObjVentas.IniciaTransacSQL()
' Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL())
' Dim ObjBancos As New ClsBancos(ObjVentas.IniciaTransacSQL())
' Dim ObjCGame As New ClsCGame(ObjVentas.IniciaTransacSQL())
' Dim ObjAC As ClsContPAQi = Nothing
' If Not RegeneracionPolizas(ObjVentas, ObjAC, ObjConta, ObjBancos) Then
' ObjVentas.Commit()
' If ObjAC IsNot Nothing Then ObjAC.Commit()
' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion, JSBtnAceptar:="BtnRefrescarPagina();")
' End If
' ObjVentas.Dispose()
' ObjConta.Dispose()
' ObjBancos.Dispose()
' If ObjAC IsNot Nothing Then ObjAC.Dispose()
'End Sub
End Class End Class