481 lines
20 KiB
VB.net
481 lines
20 KiB
VB.net
Option Explicit On
|
|
Option Strict On
|
|
Imports System.Data
|
|
Imports System.IO
|
|
Imports Extensiones
|
|
Imports Extensiones.ModExtensiones
|
|
Imports Microsoft.Reporting.WebForms
|
|
|
|
Partial Class ListadoContratos
|
|
Inherits ClsPaginas
|
|
|
|
#Region "Propiedad"
|
|
Private Property DtAvanceDocumento As DataTable
|
|
Get
|
|
Return CType(ViewState("DtAvanceDocumento"), DataTable)
|
|
End Get
|
|
Set(value As DataTable)
|
|
ViewState("DtAvanceDocumento") = value
|
|
End Set
|
|
End Property
|
|
#End Region
|
|
#Region "Carga Página"
|
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
|
|
|
If Not IsPostBack Then
|
|
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToShortDateString
|
|
txtFechaF.Text = DateTime.Now.AddDays(7).ToShortDateString
|
|
InicializaCombos()
|
|
CargaDatos()
|
|
End If
|
|
End Sub
|
|
Private Sub InicializaCombos()
|
|
'Lista Tipo AF
|
|
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("MedidaVehicularClave IN (2,3)")
|
|
DdlTipoAF.DataBind()
|
|
DdlTipoAF.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
DdlTipoAF.SelectedValue = "-1"
|
|
|
|
DdlTipoUnidad.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("MedidaVehicularClave IN (2,3)")
|
|
DdlTipoUnidad.DataBind()
|
|
DdlTipoUnidad.Items.Insert(0, New ListItem("-", ""))
|
|
'Lista Chofer'
|
|
DdlChofer.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
|
DdlChofer.DataBind()
|
|
DdlChofer.Items.Insert(0, New ListItem("-", ""))
|
|
'Lista de Monedas
|
|
DdlMoneda.DataSource = GlobalDTMonedas
|
|
DdlMoneda.DataBind()
|
|
|
|
DdlEstatus.DataSource = GlobalDTContratosEstatus(UsuarioActual.CveEmpresa)
|
|
DdlEstatus.DataBind()
|
|
DdlEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
|
|
|
|
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyectoModal)
|
|
|
|
DdlSubProyectoModal.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
|
|
DdlSubProyectoModal.DataBind()
|
|
DdlSubProyectoModal.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
|
End Sub
|
|
Private Sub CargaDatos()
|
|
Dim ObjContratos As New ClsContratos
|
|
|
|
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=34) Then
|
|
GvContratos.DataSource = ObjContratos.DtResultados
|
|
GvContratos.DataBind()
|
|
End If
|
|
ObjContratos.Dispose()
|
|
|
|
|
|
UpTitulos.Update()
|
|
End Sub
|
|
|
|
Private Sub CargaFolio()
|
|
'Dim CveSubProyecto As Integer = GlobalDTSubProyectos(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
|
|
|
|
Dim ObjFolio As New ClsGralFolios
|
|
If ObjFolio.GetFolios("Con", UsuarioActual.CveEmpresa, CveSubProyecto:=-1) Then
|
|
If ObjFolio.DtResultados.Rows.Count > 0 Then
|
|
Dim drr As DataRow = ObjFolio.DtResultados.FiltroPrimero("")
|
|
LbFolio.Text = $"{drr("Serie").ToString}-{drr("FActual").ToString}"
|
|
End If
|
|
End If
|
|
ObjFolio.Dispose()
|
|
|
|
UpModal.Update()
|
|
End Sub
|
|
#End Region
|
|
#Region "Contrato"
|
|
Protected Sub OnChangePasajeros(sender As Object, e As EventArgs)
|
|
If TxtCantidadPasajeros.Text.ToDecimal > 19 Then
|
|
Dim sprintersItem As ListItem = DdlTipoAF.Items.FindByText("Sprinter")
|
|
If sprintersItem IsNot Nothing Then
|
|
DdlTipoAF.Items.Remove(sprintersItem)
|
|
End If
|
|
Else
|
|
Dim sprintersItem As ListItem = DdlTipoAF.Items.FindByText("Sprinter")
|
|
If sprintersItem Is Nothing Then
|
|
DdlTipoAF.Items.Add(New ListItem("Sprinter", "183"))
|
|
End If
|
|
|
|
End If
|
|
End Sub
|
|
Protected Sub AddContrato(sender As Object, e As EventArgs)
|
|
|
|
Dim ErrorProceso As Boolean = False
|
|
Dim CveContrato As Integer = -1
|
|
|
|
Dim FileExtension As String = "-1"
|
|
Dim Filesgral As List(Of Extensiones.Archivo) = Anexo.getfiles().Archivos
|
|
Dim Filename As String = ""
|
|
Dim folderContratosPath As String = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos")
|
|
|
|
Dim CveVentaRemision As Integer = -1
|
|
Dim SerieFolioRemision As String = ""
|
|
|
|
If Not Directory.Exists(folderContratosPath) Then
|
|
Directory.CreateDirectory(folderContratosPath)
|
|
End If
|
|
|
|
|
|
If DdlClientes.SelectedValue = "" Then
|
|
Alert("Debe seleccionar al cliente", TipoMensaje.MsgAdvertencia)
|
|
Exit Sub
|
|
End If
|
|
'Dim CveSubProyecto As Integer = GlobalDTSubProyectos(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
|
|
|
|
'Agregamos Contrato
|
|
|
|
Dim ObjContratos As New ClsContratos
|
|
ObjContratos.IniciaTransacSQL()
|
|
|
|
CveContrato = ObjContratos.AddContratos(LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDateTime, TxtFechaRegreso.Text.ToDateTime, TxtUbicacion.Text, "",
|
|
DdlSubProyectoModal.SelectedValue.ToEntero, -1, -1, -1, -1, LbArchivo.Text, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, -1, TxtImporte.Text.ToDecimal,
|
|
DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=34, CveContratosEstatus:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text,
|
|
CveVendedor:=UsuarioActual.CveVendedor)
|
|
|
|
If CveContrato > 0 Then
|
|
|
|
If Filesgral.Count > 0 Then
|
|
|
|
For Each fileItem As Archivo In Filesgral
|
|
|
|
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
|
Dim tempArray() As String
|
|
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
|
|
Dim fDestino = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", $"{CveContrato.ToString}.{ FileExtension}")
|
|
|
|
Try
|
|
If File.Exists(fDestino) Then
|
|
File.Delete(fDestino)
|
|
End If
|
|
|
|
File.Move(fileItem.FileUrl, fDestino)
|
|
|
|
If Not File.Exists(fDestino) Then
|
|
ErrorProceso = True
|
|
End If
|
|
|
|
If ObjContratos.UpdateContratoArchivo(CveContrato, $"{CveContrato.ToString}.{ FileExtension}", UsuarioActual.CveEmpresa) Then
|
|
ErrorProceso = False
|
|
End If
|
|
|
|
Catch ex As Exception
|
|
ErrorProceso = True
|
|
End Try
|
|
|
|
|
|
Exit For
|
|
Next
|
|
|
|
Else
|
|
ErrorProceso = False
|
|
End If
|
|
Anexo.Text = ""
|
|
|
|
'If ErrorProceso = False Then
|
|
|
|
' Dim Respuesta As New RespuestaFacturacion()
|
|
' Dim CvePS As Integer = 907783
|
|
' Respuesta = GeneraRemision(CveContrato, LbFolio.Text, TxtImporte.Text.ToDecimal, CvePS, ObjContratos.IniciaTransacSQL)
|
|
|
|
' If Respuesta.CveVenta > 0 Then
|
|
' CveVentaRemision = Respuesta.CveVenta
|
|
' SerieFolioRemision = Respuesta.SerieFolio
|
|
' ErrorProceso = False
|
|
' Else
|
|
' ErrorProceso = True
|
|
' Alert("se presento un error al generar la remisión", TipoMensaje.MsgAdvertencia)
|
|
' End If
|
|
|
|
'End If
|
|
|
|
|
|
Else
|
|
ErrorProceso = True
|
|
End If
|
|
|
|
If Not ErrorProceso Then
|
|
'Aumentamos Folio
|
|
Dim ObjFolios As New ClsGralFolios(ObjContratos.IniciaTransacSQL())
|
|
If Not ObjFolios.UpdateFolioActual(-1, "Con", True, UsuarioActual.CveEmpresa) Then
|
|
ErrorProceso = True
|
|
End If
|
|
End If
|
|
|
|
|
|
If Not ErrorProceso Then
|
|
ObjContratos.Commit()
|
|
Alert($"Agregado Correctamente.<br> Remisión Generada <a target='_blank' class='Texto' href='/Ventas/Ventas.aspx?CveVenta={CveVentaRemision}' ><b>{SerieFolioRemision}</b></a>")
|
|
Else
|
|
ObjContratos.RollBack()
|
|
Alert("Se presento un error al guardar el contrato.", TipoMensaje.MsgAdvertencia)
|
|
End If
|
|
|
|
ObjContratos.Dispose()
|
|
|
|
ResetModal()
|
|
|
|
CargaDatos()
|
|
RegistraScript("$('#ModalAgregar').modal('hide')", "hidemodal1")
|
|
End Sub
|
|
|
|
Protected Sub ResetModal()
|
|
'Reiniciamos modal
|
|
TxtDescripcion.Text = ""
|
|
TxtFechaSalida.Text = ""
|
|
TxtFechaRegreso.Text = ""
|
|
TxtObservaciones.Text = ""
|
|
TxtUbicacion.Text = ""
|
|
DdlClientes.SelectedText = ""
|
|
DdlSubProyectoModal.SelectedValueExist(-1)
|
|
DdlTipoAF.SelectedValueExist(-1)
|
|
TxtImporte.Text = ""
|
|
TxtAnticipo.Text = ""
|
|
TxtCantidadPasajeros.Text = ""
|
|
LbArchivo.Text = ""
|
|
|
|
UpModal.Update()
|
|
End Sub
|
|
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
|
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
|
|
End Sub
|
|
Protected Sub LnkPDF_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
|
Dim ObjContratos As New ClsContratos
|
|
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=2) Then
|
|
Dim Imagen As New IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
|
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
|
Dim Cliente As String = If(DdlClientes.SelectedValue = "-1", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
|
Dim dt As DataTable = ObjContratos.DtResultados
|
|
Dim params As New List(Of ReportParameter) From {
|
|
New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa),
|
|
New ReportParameter("FechaInicio", "-1"),
|
|
New ReportParameter("FechaFin", "-1"),
|
|
New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa),
|
|
New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre),
|
|
New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString),
|
|
New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))
|
|
}
|
|
ImprimirPDF("Empresas/Grales/Formatos/RepContratos.rdlc", dt, params, NombreArchivo:="Reporte Contratos")
|
|
Else
|
|
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
|
End If
|
|
ObjContratos.Dispose()
|
|
End Sub
|
|
Protected Sub Consultar(sender As Object, e As EventArgs)
|
|
Dim ObjContratos As New ClsContratos
|
|
|
|
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, CveSubProyecto:=DdlCentroCostos.SelectedValue.ToEntero, CveTipoAF:=DdlTipoUnidad.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero) Then
|
|
GvContratos.DataSource = ObjContratos.DtResultados
|
|
|
|
End If
|
|
ObjContratos.Dispose()
|
|
GvContratos.DataBind()
|
|
|
|
UpTitulos.Update()
|
|
End Sub
|
|
Protected Sub Personalizar(sender As Object, e As EventArgs)
|
|
GvContratos.Columns(6).Visible = ChkChofer.Checked
|
|
GvContratos.Columns(7).Visible = ChkChofer2.Checked
|
|
GvContratos.Columns(8).Visible = ChkUnidad.Checked
|
|
UpTitulos.Update()
|
|
End Sub
|
|
Protected Sub GuardarArchivo(sender As Object, e As EventArgs)
|
|
Dim FileExtension As String = "-1"
|
|
Dim Filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
|
Dim Filename As String = ""
|
|
Dim folderContratosPath As String = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos")
|
|
|
|
If Not Directory.Exists(folderContratosPath) Then
|
|
Directory.CreateDirectory(folderContratosPath)
|
|
End If
|
|
|
|
If Not Directory.Exists(Path.Combine(folderContratosPath, "Temp")) Then
|
|
Directory.CreateDirectory(Path.Combine(folderContratosPath, "Temp"))
|
|
End If
|
|
|
|
For Each fileItem As Archivo In Filesgral
|
|
|
|
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
|
Session("FileExtension") = FileExtension
|
|
Dim tempArray() As String
|
|
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
|
|
|
|
|
|
ViewState("extencion") = FileExtension
|
|
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", "Temp", fileItem.filename)
|
|
|
|
File.Move(fileItem.FileUrl, ViewState("FUrl").ToString)
|
|
LbArchivo.Text = tempArray(1)
|
|
|
|
Next
|
|
|
|
UpModal.Update()
|
|
RegistraScript("$('#ModalUpload').modal('hide')", "hidemodal1")
|
|
|
|
End Sub
|
|
#End Region
|
|
|
|
|
|
#Region "G E N E R A R E M I S O N"
|
|
|
|
|
|
Private Function GeneraRemision(CveContrato As Integer, NumContrato As String, Importe As Decimal, CvePS As Integer, ByRef TransaccionSQL As SqlClient.SqlTransaction) As RespuestaFacturacion
|
|
|
|
Dim Respuesta As New RespuestaFacturacion()
|
|
Dim CveRemisionGenerada As Integer = -1
|
|
Dim ObjVentas As New ClsVentas(TransaccionSQL)
|
|
Dim ProcesoOK As Boolean = True
|
|
Dim CveSubProyecto As Integer = DdlSubProyectoModal.SelectedValue.ToEntero
|
|
Dim CveMoneda As Integer = DdlMoneda.SelectedValue.ToEntero
|
|
|
|
Dim ObjFactura As Modelos.Factura = Modelos.Factura.CrearVentaNueva(UsuarioActual, CveSubProyecto, DdlClientes.SelectedValue.ToEntero, CveMoneda, "Rem")
|
|
|
|
If ObjFactura IsNot Nothing AndAlso ProcesoOK Then
|
|
|
|
ObjFactura.CveContrato = CveContrato
|
|
ObjFactura.Observaciones = NumContrato
|
|
|
|
Dim TmpDTMat As New DataTable
|
|
TmpDTMat.Columns.Add("Consec", GetType(Integer))
|
|
TmpDTMat.Columns.Add("CvePS", GetType(Integer))
|
|
TmpDTMat.Columns.Add("CveUM", GetType(Integer))
|
|
TmpDTMat.Columns.Add("Cantidad", GetType(Integer))
|
|
TmpDTMat.Columns.Add("PU", GetType(Decimal))
|
|
TmpDTMat.Columns.Add("Lote", GetType(String))
|
|
TmpDTMat.Columns.Add("FechaCaducidad", GetType(Date))
|
|
TmpDTMat.Columns.Add("CveVentaDetalle", GetType(Integer))
|
|
|
|
|
|
Dim SubTotal As Decimal = (Importe / (1 + 0.16)).ToDecimal
|
|
|
|
'Dim CvePS As Integer = 907783
|
|
Dim CantidadRegistro As Decimal = 1
|
|
Dim PorcentajeIVA As Decimal = 0.16D
|
|
|
|
Dim PU As Decimal = SubTotal
|
|
Dim Descuento As Decimal = 0
|
|
Dim Obs As String = NumContrato
|
|
|
|
|
|
If CantidadRegistro > 0 Then
|
|
If ObjFactura.AgregarPS(CvePS, CantidadRegistro, PU, Descuento, Obs, CveSubProyecto:=CveSubProyecto, PorcentajeIVA:=PorcentajeIVA) Then
|
|
Dim drp As DataRow = TmpDTMat.NewRow
|
|
drp("CvePS") = CvePS
|
|
drp("Cantidad") = CantidadRegistro
|
|
drp("PU") = PU
|
|
TmpDTMat.Rows.Add(drp)
|
|
Else
|
|
Alert("Error al agregar producto", TipoMensaje.MsgAdvertencia)
|
|
ProcesoOK = False
|
|
End If
|
|
End If
|
|
|
|
|
|
If ProcesoOK Then
|
|
ObjFactura.CalculaTotales()
|
|
Dim Resp As New Modelos.Factura.MMensajeFactura
|
|
Resp = ObjFactura.EmitirFactura(False, Transac:=TransaccionSQL)
|
|
|
|
If Resp.CveVenta > 0 Then
|
|
Respuesta.CveVenta = Resp.CveVenta
|
|
Respuesta.SerieFolio = Resp.SerieFolio
|
|
Respuesta.dtdetalle = TmpDTMat
|
|
Else
|
|
ProcesoOK = False
|
|
End If
|
|
|
|
End If
|
|
|
|
Else
|
|
ProcesoOK = False
|
|
End If
|
|
Return Respuesta
|
|
|
|
End Function
|
|
|
|
Friend Class RespuestaFacturacion
|
|
Public Property CveVenta As Integer = -1
|
|
Public Property SerieFolio As String = "-1"
|
|
Public Property dtdetalle As DataTable = Nothing
|
|
Public Sub New()
|
|
|
|
End Sub
|
|
End Class
|
|
|
|
|
|
#End Region
|
|
|
|
Protected Sub LnkAgregarContrato_Click(sender As Object, e As EventArgs)
|
|
CargaFolio()
|
|
RegistraScript("$('#ModalAgregar').modal({ backdrop: 'static', keyboard: false });")
|
|
UpTitulos.Update()
|
|
End Sub
|
|
|
|
|
|
'Private Sub CargaFolios(Optional FacturarDocumentoNuevo As Boolean = False)
|
|
|
|
|
|
' Dim ObjFolios As New ClsGralFolios()
|
|
' Dim TipoDoctoConsulta As String = ""
|
|
|
|
' If ObjFolios.GetFolios(TipoDoctoConsulta, UsuarioActual.CveEmpresa) Then
|
|
' Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue))
|
|
' If DT.Rows.Count > 0 Then
|
|
' ViewState("CveFolio") = DT.Rows(0)("CveFolio").ToString().ToEntero()
|
|
' 'ViewState("NumAprobacion") = CLng(DT.Rows(0)("Aprobacion").ToString())
|
|
' 'ViewState("FechaAprobacion") = DT.Rows(0)("FechaAprobacion").ToString().ToDate
|
|
' ViewState("FolioActual") = DT.Rows(0)("FActual").ToString()
|
|
' If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveVenta > 0 AndAlso Not EsCreaApartirDe AndAlso Not String.IsNullOrEmpty(SerieVenta) Then
|
|
' LblSerie.Text = SerieVenta
|
|
' Else
|
|
' LblSerie.Text = DT.Rows(0)("Serie").ToString()
|
|
' End If
|
|
' TxtFolio.Text = DT.Rows(0)("FActual").ToString()
|
|
|
|
' If Not FacturarDocumentoNuevo Then
|
|
' If Not CveEmpresaCRM > 0 Then
|
|
' 'SI ES UNA REMISION EXISTENTE, NO MOSTRAR LOS BOTONES
|
|
' If Not (CveVenta > 0 AndAlso DdlTipoComprobante.SelectedValue = "Rem") Then
|
|
' BtnCrearApartirDe.Enabled = EstatusCliente AndAlso TieneBloqueoPorCreditoVencimiento = 0
|
|
' BtnEmitirImprimir.Visible = EstatusCliente AndAlso TieneBloqueoPorCreditoVencimiento = 0
|
|
' TrVistaPrevia.Visible = EstatusCliente
|
|
' End If
|
|
' Else
|
|
' If TipoDoctoConsulta.Contiene("Ing", "Egs", "Ant", "Dev") Then
|
|
' BtnCrearApartirDe.Enabled = EstatusCliente AndAlso TieneBloqueoPorCreditoVencimiento = 0
|
|
' BtnEmitirImprimir.Visible = EstatusCliente AndAlso TieneBloqueoPorCreditoVencimiento = 0
|
|
' TrVistaPrevia.Visible = EstatusCliente
|
|
' Else
|
|
' BtnCrearApartirDe.Enabled = True
|
|
' BtnEmitirImprimir.Visible = True
|
|
' TrVistaPrevia.Visible = True
|
|
' End If
|
|
' End If
|
|
|
|
' End If
|
|
|
|
' UpFacturar.Update()
|
|
' Else
|
|
|
|
' If DdlTipoComprobante.Items.Count > 0 Then
|
|
' Alert("No tiene registrados Folios para " & DdlTipoComprobante.SelectedItem.Text & " en esta sucursal.", TipoMensaje.MsgAdvertencia)
|
|
' Else
|
|
' Alert("No tiene permisos para generar ningun tipo de documento.", TipoMensaje.MsgAdvertencia)
|
|
' End If
|
|
|
|
' TrEmitir.Visible = False
|
|
' TrVistaPrevia.Visible = False
|
|
' BtnCrearApartirDe.Enabled = False
|
|
' BtnEmitirImprimir.Visible = False
|
|
' UpFacturar.Update()
|
|
' End If
|
|
' DT.Dispose()
|
|
' End If
|
|
' ObjFolios.Dispose()
|
|
' 'End If
|
|
|
|
'End Sub
|
|
|
|
End Class
|