Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -259,12 +259,17 @@ Public Class ClsAF
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetRepActivosFijosDepreciacion(CveEmpresa As Integer, Fecha As Date) As Boolean
|
||||
Public Function GetRepActivosFijosDepreciacion(CveEmpresa As Integer, Fecha As Date, Optional Depreciados As Integer = 1, Optional CveTipoAF As Integer = -1, Optional CveSubTipoAF As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveEstadoActivoFijo As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_AF_DepreciacionesGetRep")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Fecha", SqlDbType.Date).Value = Fecha
|
||||
.Add("@Depreciados", SqlDbType.Int).Value = Depreciados
|
||||
.Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF
|
||||
.Add("@CveSubTipoAF", SqlDbType.Int).Value = CveSubTipoAF
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveEstadoActivoFijo", SqlDbType.Int).Value = CveEstadoActivoFijo
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -276,6 +281,23 @@ Public Class ClsAF
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetActivosFijosVenta(CveVenta As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_AF_ActivosFijosVentaGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el los activos fijos de la venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetActivosFijos(CveActivoFijo As Integer, CveEmpresa As Integer, Codigo As String, Descripcion As String, CveTipoActivoFijo As Integer, CveSubTipoActivoFijo As Integer, NoSerie As String, Año As Integer, CvePersonaResponsable As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEstadoActivoFijo As Integer, CaracteristicaValor As String, CveCliente As Integer, Optional BuscaGrupoEmpresa As Integer = -1, Optional BuscaPorAFPadre As Integer = -1, Optional CveGrupo As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_AF_ActivosFijosGet")
|
||||
|
||||
@@ -1196,13 +1196,14 @@ Public Class ClsContabilidad
|
||||
Return Concepto
|
||||
End Function
|
||||
|
||||
Public Function GetPrePolizasDetalle(CvePrePoliza As Integer, CveEmpresa As Integer, Optional CveIE As Integer = -1) As Boolean
|
||||
Public Function GetPrePolizasDetalle(CvePrePoliza As Integer, CveEmpresa As Integer, Optional CveIE As Integer = -1, Optional CveVenta As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Conta_PrePolizasDetalleGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -5036,466 +5036,7 @@ Public Class ClsPaginas
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "IMPRIMIR FACTURA"
|
||||
'Public Sub PdfFacturaPyME(ByRef Vta As Modelos.Factura, DT As DataTable, Optional Guardar As Boolean = True)
|
||||
' Dim retorno As Byte() = Nothing
|
||||
' 'DATOS GENERALES
|
||||
' Dim Ruta As String = UsuarioActual.Empresa.Ruta
|
||||
' Dim PathXML As String = $"{Ruta}XML\{Vta.TipoDocto}\{Vta.SerieFolio}.xml"
|
||||
' Dim NombreArchivo As String = ""
|
||||
' Dim NombreArchivoDescarga As String = ""
|
||||
' Dim TipoDocumento As String = ""
|
||||
' Dim TipoDocumentoRef As String = ""
|
||||
' Dim AplicaPagare As String = "1"
|
||||
' Dim RFCReceptor As String = ""
|
||||
' If String.IsNullOrEmpty(Vta.RFCReceptor) Then
|
||||
' RFCReceptor = Vta.Cliente.RFC
|
||||
' If Vta.FacturarSucursal Then
|
||||
' If Vta.ClienteSucursal IsNot Nothing Then
|
||||
' RFCReceptor = Vta.ClienteSucursal.RFC
|
||||
' End If
|
||||
' End If
|
||||
' Else
|
||||
' RFCReceptor = Vta.RFCReceptor
|
||||
' End If
|
||||
' Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio)
|
||||
' Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
|
||||
' Dim ImgCBB As String '= String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
|
||||
' Dim ImagenPath = String.Format("{0}Formatos\Suc{1}\logo.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal)
|
||||
' Dim Logo As New System.IO.FileInfo(ImagenPath)
|
||||
' Dim ImgLogo = New Uri(String.Format("{0}Empresas/{1}/Formatos/Suc{2}.png", UrlSitio, UsuarioActual.CveEmpresa, Vta.CveSucursal)).AbsoluteUri
|
||||
' Dim SBDomicilioSucursal As New StringBuilder()
|
||||
' Dim CiudadSucursal As String = String.Format("{0},{1}", Vta.SubProyecto.Municipio, Vta.SubProyecto.Estado)
|
||||
' Dim DomicilioSucursal As String = ""
|
||||
' SBDomicilioSucursal.AppendFormat("{0}", Vta.SubProyecto.Calle)
|
||||
' If Vta.SubProyecto.NoExt.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", Vta.SubProyecto.NoExt)
|
||||
' If Vta.SubProyecto.NoInt.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", Vta.SubProyecto.NoInt)
|
||||
' If Vta.SubProyecto.Colonia.Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", Vta.SubProyecto.Colonia)
|
||||
' If Vta.SubProyecto.CP.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", Vta.SubProyecto.CP)
|
||||
' If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
|
||||
' If Vta.SubProyecto.Pais.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", Vta.SubProyecto.Pais)
|
||||
' DomicilioSucursal = SBDomicilioSucursal.ToString
|
||||
' Dim Fecha As String = Vta.Fecha.ToShortDateString
|
||||
' Dim SBDireccion As New StringBuilder()
|
||||
' Dim SBLugar As New StringBuilder()
|
||||
' Dim ClienteDireccion As String
|
||||
' Dim ClienteLugar As String
|
||||
' 'SI ESTA TIMBRADA - CON XML
|
||||
' If File.Exists(PathXML) AndAlso Vta.Serie <> "VistaPrevia" Then 'Cuando es vista previe y coincide la serie y folio se ponen los datos fiscales
|
||||
' Dim XmlDoc As New System.Xml.XmlDocument
|
||||
' XmlDoc.Load(PathXML)
|
||||
' Dim TC As Decimal = 1
|
||||
' Try
|
||||
' TC = XmlDoc.DocumentElement.Attributes("TipoCambio").InnerText.ToDecimal
|
||||
' Catch ex As Exception
|
||||
' TC = 1
|
||||
' End Try
|
||||
' Vta.FechaEmision = XmlDoc.DocumentElement.Attributes("fecha").InnerText.ToDate
|
||||
' Vta.NoSerieCertificadoContribuyente = XmlDoc.DocumentElement.Attributes("noCertificado").InnerText
|
||||
' Dim validaElemento = XmlDoc.DocumentElement("cfdi:Complemento")
|
||||
' If Not IsNothing(validaElemento) Then
|
||||
' For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1
|
||||
' If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then
|
||||
' Vta.FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
|
||||
' Vta.NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("noCertificadoSAT").InnerText
|
||||
' Vta.FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
|
||||
' Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloCFD").InnerText
|
||||
' Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloSAT").InnerText
|
||||
' End If
|
||||
' Next
|
||||
' Else
|
||||
' Vta.FolioFiscal = "Sin Timbrar"
|
||||
' Vta.NoSerieCertificado = "Sin Timbrar"
|
||||
' Vta.SelloCFDi = "Sin Timbrar"
|
||||
' Vta.SelloSAT = "Sin Timbrar"
|
||||
' End If
|
||||
' 'SIN TIMBRAR - SIN XML
|
||||
' Else
|
||||
' Vta.FolioFiscal = "Sin Timbrar"
|
||||
' Vta.NoSerieCertificado = "Sin Timbrar"
|
||||
' Vta.SelloCFDi = "Sin Timbrar"
|
||||
' Vta.SelloSAT = "Sin Timbrar"
|
||||
' End If
|
||||
' 'DIRECCION CLIENTE
|
||||
' If Vta.CveClienteSucursal.ToEntero > 0 Then
|
||||
' 'Si cliente tiene Noint, NoExt, CP
|
||||
' SBDireccion.AppendFormat("{0}", Vta.ClienteSucursal.Direccion)
|
||||
' If Vta.ClienteSucursal.NoExt.Length > 0 Then SBDireccion.AppendFormat(", No.Ext: {0}", Vta.ClienteSucursal.NoExt)
|
||||
' If Vta.ClienteSucursal.NoInt.Length > 0 Then SBDireccion.AppendFormat(", No.Int: {0}", Vta.ClienteSucursal.NoInt)
|
||||
' If UsuarioActual.CveEmpresa <> 66 Then SBDireccion.AppendFormat(", Col: {0}", Vta.ClienteSucursal.Colonia)
|
||||
' If Not (UsuarioActual.CveEmpresa.Contiene(66, 81, 109) AndAlso Vta.TipoDocto = "Cot") Then
|
||||
' If Vta.ClienteSucursal.CP.Length > 0 Then SBDireccion.AppendFormat(", CP: {0} ", Vta.ClienteSucursal.CP.Trim)
|
||||
' End If
|
||||
' 'Si cliente tiene Local, CD, Edo, Pais
|
||||
' If Vta.ClienteSucursal.Localidad IsNot Nothing AndAlso Vta.ClienteSucursal.Localidad.Length > 0 Then SBLugar.AppendFormat("Loc: {0}, ", Vta.ClienteSucursal.Localidad)
|
||||
' If Vta.ClienteSucursal.Municipio IsNot Nothing AndAlso Vta.ClienteSucursal.Municipio.Length > 0 Then SBLugar.AppendFormat("Cd: {0}, ", Vta.ClienteSucursal.Municipio)
|
||||
' If Vta.ClienteSucursal.Estado IsNot Nothing AndAlso Vta.ClienteSucursal.Estado.Length > 0 Then SBLugar.AppendFormat(" Edo: {0}, ", Vta.ClienteSucursal.Estado)
|
||||
' If Vta.ClienteSucursal.Pais IsNot Nothing AndAlso Vta.ClienteSucursal.Pais.Length > 0 Then SBLugar.AppendFormat(" País: {0} ", Vta.ClienteSucursal.Pais)
|
||||
' Else
|
||||
' SBDireccion.AppendFormat("{0}", Vta.Cliente.Direccion)
|
||||
' If Vta.Cliente.NoExt.Length > 0 Then SBDireccion.AppendFormat(", No.Ext: {0}", Vta.Cliente.NoExt)
|
||||
' If Vta.Cliente.NoInt.Length > 0 Then SBDireccion.AppendFormat(", No.Int: {0}", Vta.Cliente.NoInt)
|
||||
' If UsuarioActual.CveEmpresa <> 66 Then SBDireccion.AppendFormat(", Col: {0}", Vta.Cliente.Colonia)
|
||||
' If Not (UsuarioActual.CveEmpresa.Contiene(66, 81, 109) AndAlso Vta.TipoDocto = "Cot") Then
|
||||
' If Vta.Cliente.CP.Length > 0 Then SBDireccion.AppendFormat(", CP: {0} ", Vta.Cliente.CP.Trim)
|
||||
' End If
|
||||
' 'Si cliente tiene Local, CD, Edo, Pais
|
||||
' If Vta.Cliente.Localidad IsNot Nothing AndAlso Vta.Cliente.Localidad.Length > 0 Then SBLugar.AppendFormat("Loc: {0}, ", Vta.Cliente.Localidad)
|
||||
' If Vta.Cliente.Ciudad IsNot Nothing AndAlso Vta.Cliente.Ciudad.Length > 0 Then SBLugar.AppendFormat("Cd: {0}, ", Vta.Cliente.Ciudad)
|
||||
' If Vta.Cliente.Estado IsNot Nothing AndAlso Vta.Cliente.Estado.Length > 0 Then SBLugar.AppendFormat(" Edo: {0}, ", Vta.Cliente.Estado)
|
||||
' If Vta.Cliente.Pais IsNot Nothing AndAlso Vta.Cliente.Pais.Length > 0 Then SBLugar.AppendFormat(" País: {0} ", Vta.Cliente.Pais)
|
||||
' End If
|
||||
' ClienteDireccion = SBDireccion.ToString
|
||||
' ClienteLugar = SBLugar.ToString
|
||||
' SBDireccion.Clear()
|
||||
' SBLugar.Clear()
|
||||
' 'LOGO
|
||||
' Dim LogoRuta As String = ""
|
||||
' 'POR SUCURSAL
|
||||
' LogoRuta = String.Format("{0}Formatos\Suc{1}.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal)
|
||||
' If File.Exists(LogoRuta) Then
|
||||
' LogoRuta = String.Format("file://{0}Formatos\Suc{1}.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal)
|
||||
' 'POR EMPRESA
|
||||
' Else
|
||||
' LogoRuta = String.Format("{0}Formatos\Logo.png", UsuarioActual.Empresa.Ruta)
|
||||
' If File.Exists(LogoRuta) Then
|
||||
' 'LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
' LogoRuta = String.Format("{0}", LogoRuta)
|
||||
' End If
|
||||
' End If
|
||||
' 'LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
' LogoRuta = String.Format("{0}", LogoRuta)
|
||||
' 'Si no tiene CBB, SE GENERA
|
||||
' If Not ImagenCBB.Exists Then
|
||||
' Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||
' CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFCReceptor, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
|
||||
' End If
|
||||
' ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
|
||||
' Dim CadenaOriginals As String = "||1.0|" + Vta.FolioFiscal + "|" + Vta.FechaCertificacion.ToString("yyyy-MM-dd") + "T" + Vta.FechaCertificacion.ToString("HH:mm:ss") + "|" + Vta.SelloCFDi + "|" + Vta.NoSerieCertificado + "||"
|
||||
' If Not ImagenCBB.Exists Then ImgCBB = ""
|
||||
' Dim RutaFormato As String = ""
|
||||
|
||||
' 'AQUI EMPIEZA LOS PARAMETROS
|
||||
' Try
|
||||
' Dim params = New List(Of CrystalParametro)
|
||||
' 'CLIENTE
|
||||
' params.Add(New CrystalParametro("ClienteCodigo", Vta.Cliente.Codigo))
|
||||
' params.Add(New CrystalParametro("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso RFCReceptor = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
|
||||
' params.Add(New CrystalParametro("ClienteDireccion", ClienteDireccion))
|
||||
' params.Add(New CrystalParametro("ClienteLugar", ClienteLugar))
|
||||
|
||||
' 'TOTALES
|
||||
' params.Add(New CrystalParametro("SubTotal", Vta.SubTotal.ToString.FormatoNumero(2)))
|
||||
' params.Add(New CrystalParametro("Descuento", Vta.Descuento.ToString.FormatoNumero(2)))
|
||||
' params.Add(New CrystalParametro("Amortizacion", Vta.Amortizacion.ToString.FormatoNumero(2)))
|
||||
' params.Add(New CrystalParametro("SubTotal2", (Vta.SubTotal - Vta.Descuento - Vta.Amortizacion).ToString.FormatoNumero(2)))
|
||||
' params.Add(New CrystalParametro("IVA", Vta.IVA.ToString.FormatoNumero(2)))
|
||||
' params.Add(New CrystalParametro("RetIVA", Vta.RetIVA.ToString.FormatoNumero(2)))
|
||||
' params.Add(New CrystalParametro("RetISR", Vta.RetISR.ToString.FormatoNumero(2)))
|
||||
' params.Add(New CrystalParametro("Total", Vta.Total.ToString.FormatoNumero(2)))
|
||||
' params.Add(New CrystalParametro("ImporteLetra", Vta.Total.ToString.ToDouble.Texto2Letras(Vta.CveMoneda)))
|
||||
' 'DATOS GENERALES
|
||||
' params.Add(New CrystalParametro("Observaciones", Vta.Observaciones))
|
||||
' params.Add(New CrystalParametro("CveVendedor", Vta.CveVendedor.ToString))
|
||||
' 'params.Add(New CrystalParametro("Status", Vta.EstatusFactura))
|
||||
' params.Add(New CrystalParametro("FechaSolicitud", Vta.Fecha.ToString("dd/MMMM/yyyy"))) ' se puede omitir
|
||||
' params.Add(New CrystalParametro("Serie", Vta.Serie))
|
||||
' params.Add(New CrystalParametro("Folio", Vta.Folio.ToString))
|
||||
' params.Add(New CrystalParametro("DomicilioSucursal", DomicilioSucursal))
|
||||
' params.Add(New CrystalParametro("Vencimiento", Vta.FechaVencimiento.ToString("dd/MM/yyyy")))
|
||||
' params.Add(New CrystalParametro("FolioFiscal", Vta.FolioFiscal))
|
||||
' params.Add(New CrystalParametro("FechaCertificacion", String.Format("{0}T{1}", Vta.FechaCertificacion.ToString("yyyy-MM-dd"), Vta.FechaCertificacion.ToString("HH:mm:ss"))))
|
||||
' params.Add(New CrystalParametro("SelloCFDI", Vta.SelloCFDi))
|
||||
' params.Add(New CrystalParametro("CadenaSAT", CadenaOriginals))
|
||||
' params.Add(New CrystalParametro("SelloSAT", Vta.SelloSAT))
|
||||
' params.Add(New CrystalParametro("QR", ImgCBB))
|
||||
' params.Add(New CrystalParametro("ClienteRFC", RFCReceptor))
|
||||
' params.Add(New CrystalParametro("FormaPago", Vta.FormaPagoText))
|
||||
' params.Add(New CrystalParametro("Moneda", Vta.Moneda))
|
||||
' params.Add(New CrystalParametro("TipoCambio", Vta.TipoCambio.ToString))
|
||||
' params.Add(New CrystalParametro("CondicionPago", Vta.CondicionesPagoText))
|
||||
' params.Add(New CrystalParametro("CadenaOriginal", CadenaOriginals))
|
||||
' params.Add(New CrystalParametro("SerieCertificadoSAT", Vta.NoSerieCertificado))
|
||||
' params.Add(New CrystalParametro("CertificadoContribuyente", Vta.NoSerieCertificadoContribuyente))
|
||||
' params.Add(New CrystalParametro("NumCta", Vta.NumeroCuenta))
|
||||
' params.Add(New CrystalParametro("LogoPath", LogoRuta))
|
||||
' 'VENDEDOR
|
||||
' Dim RowVendedor As DataRow = GlobalDTVendedores(-1).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
|
||||
' If Not IsNothing(RowVendedor) Then
|
||||
' params.Add(New CrystalParametro("VendedorNombre", RowVendedor("Vendedor").ToString))
|
||||
' params.Add(New CrystalParametro("VendedorMail", RowVendedor("Correo").ToString))
|
||||
' params.Add(New CrystalParametro("VendedorTelefono", RowVendedor("Telefono").ToString))
|
||||
' params.Add(New CrystalParametro("VendedorCelular", RowVendedor("Celular").ToString))
|
||||
' End If
|
||||
' params.Add(New CrystalParametro("CiudadSucursal", CiudadSucursal))
|
||||
' params.Add(New CrystalParametro("OC", Vta.Det_OrdenCompra.ToString))
|
||||
' If UsuarioActual.Empresa.Funcionalidad(508) = "1" Then
|
||||
' params.Add(New CrystalParametro("IEPS", Vta.IEPS.ToString.FormatoNumero(2)))
|
||||
' End If
|
||||
' If Vta.CveClienteSucursal > 0 Then
|
||||
' params.Add(New CrystalParametro("ClienteContactoMail", Vta.ClienteSucursal.CorreoSucursal))
|
||||
' params.Add(New CrystalParametro("ClienteTelefono", Vta.ClienteSucursal.TelefonoSucursal))
|
||||
' Else
|
||||
' params.Add(New CrystalParametro("ClienteContactoMail", Vta.Cliente.MailCotizacion))
|
||||
' params.Add(New CrystalParametro("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.Telefono.Length > 6, Vta.Cliente.Telefono, Vta.TelefonoGenerico)))
|
||||
' End If
|
||||
' If UsuarioActual.CveEmpresa.Contiene(17) Then
|
||||
' params.Add(New CrystalParametro("MetodoPago", Vta.ClaveMetodoPagoSAT.ToString))
|
||||
' Else
|
||||
' params.Add(New CrystalParametro("MetodoPago", Vta.MetodoPago.ToString))
|
||||
' End If
|
||||
|
||||
' Select Case Vta.TipoDocto
|
||||
' Case "Ing"
|
||||
' NombreArchivo = "Factura"
|
||||
' NombreArchivoDescarga = "Factura"
|
||||
' TipoDocumento = "INGRESO"
|
||||
' 'GENERAL
|
||||
' params.Add(New CrystalParametro("TipoDocumento", NombreArchivoDescarga))
|
||||
' params.Add(New CrystalParametro("Tipo", TipoDocumento))
|
||||
' params.Add(New CrystalParametro("Ref", TipoDocumentoRef))
|
||||
' params.Add(New CrystalParametro("AplicaPagare", AplicaPagare))
|
||||
' 'VSH
|
||||
' If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122, 145) Then
|
||||
' 'DATOS CLIENTES
|
||||
' Dim ClienteRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", Vta.CveCliente.ToString))
|
||||
' Dim DatosCliente = ""
|
||||
' If ClienteRow IsNot Nothing Then
|
||||
' DatosCliente = String.Format("{0} | {1} | {2}", Vta.SubProyecto.Municipio, ClienteRow("CuentaContable"), ClienteRow("Codigo"))
|
||||
' End If
|
||||
' params.Add(New CrystalParametro("DatosClientes", DatosCliente))
|
||||
' params.Add(New CrystalParametro("Sucursal", Vta.SubProyecto.SubProyecto))
|
||||
' End If
|
||||
' 'COMPU, DN DIFUSA
|
||||
' If UsuarioActual.CveEmpresa.Contiene(72, 80, 119) Then
|
||||
' params.Add(New CrystalParametro("EstatusFactura", If(Vta.TipoEstatus = 5, Vta.EstatusFactura, "")))
|
||||
' params.Add(New CrystalParametro("EstatusEntrega", If(Vta.Inv_CveEstatusEntrega = 1, Vta.Inv_EstatusEntrega, "")))
|
||||
' params.Add(New CrystalParametro("PedidoContrato", Vta.PedidoContrato))
|
||||
' params.Add(New CrystalParametro("DescripcionContrato", Vta.NumeroDescripcionContrato))
|
||||
' params.Add(New CrystalParametro("MonedaAbreviatura", If(Vta.MonedaAbreviatura.ToString IsNot Nothing, Vta.MonedaAbreviatura.ToString, "")))
|
||||
' params.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
' params.Add(New CrystalParametro("FechaImpresion", Now.ToDateTime.ToString))
|
||||
' params.Add(New CrystalParametro("Sucursal", Vta.SubProyecto.SubProyecto))
|
||||
' 'INE COMPLEMENTOS
|
||||
' If UsuarioActual.CveEmpresa.Contiene(72) Then
|
||||
' Dim INETipoProceso As String = ""
|
||||
' Dim INETipoComite As String = ""
|
||||
' Dim INEIdContabilidad As Integer = 0
|
||||
' If Vta.ComplementoINE IsNot Nothing Then
|
||||
' INETipoProceso = Vta.ComplementoINE.INETipoProceso
|
||||
' INETipoComite = Vta.ComplementoINE.INETipoComite
|
||||
' INEIdContabilidad = Vta.ComplementoINE.INEIdContabilidad
|
||||
' End If
|
||||
' params.Add(New CrystalParametro("INETipoProceso", INETipoProceso))
|
||||
' params.Add(New CrystalParametro("INETipoComite", INETipoComite))
|
||||
' params.Add(New CrystalParametro("INEIdContabilidad", INEIdContabilidad))
|
||||
' params.Add(New CrystalParametro("Referencia", Vta.Cliente.ReferenciaFiscal))
|
||||
' params.Add(New CrystalParametro("ClienteContacto", Vta.AtencionA))
|
||||
' End If
|
||||
' 'DIRECCION ENVIO
|
||||
' If Vta.EnviarA.CveDireccionEnvio > 0 Then
|
||||
' Dim StrEnvioDi As New StringBuilder
|
||||
' StrEnvioDi.AppendFormat("{0}", Vta.EnviarA.EnvioDireccion)
|
||||
' If Vta.EnviarA.EnvioNoExt IsNot Nothing AndAlso Vta.EnviarA.EnvioNoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", Vta.EnviarA.EnvioNoExt)
|
||||
' If Vta.EnviarA.EnvioNoInt IsNot Nothing AndAlso Vta.EnviarA.EnvioNoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", Vta.EnviarA.EnvioNoInt)
|
||||
' params.Add(New CrystalParametro("EnvioDireccion", StrEnvioDi.ToString))
|
||||
' params.Add(New CrystalParametro("EnvioNoExt", Vta.EnviarA.EnvioNoExt))
|
||||
' params.Add(New CrystalParametro("EnvioNoInt", Vta.EnviarA.EnvioNoInt))
|
||||
' params.Add(New CrystalParametro("EnvioColonia", Vta.EnviarA.EnvioColonia))
|
||||
' params.Add(New CrystalParametro("EnvioCiudad", Vta.EnviarA.EnvioCiudad))
|
||||
' params.Add(New CrystalParametro("EnvioEstado", Vta.EnviarA.EnvioEstado))
|
||||
' params.Add(New CrystalParametro("EnvioContacto", Vta.EnviarA.EnvioContacto))
|
||||
' params.Add(New CrystalParametro("EnvioDepartamento", Vta.EnviarA.EnvioDepartamento))
|
||||
' params.Add(New CrystalParametro("EnvioCP", Vta.EnviarA.EnvioCP))
|
||||
' Else
|
||||
' If Vta.CveClienteSucursal.ToEntero > 0 Then
|
||||
' Dim StrEnvioDi As New StringBuilder
|
||||
' StrEnvioDi.AppendFormat("{0}", Vta.ClienteSucursal.Direccion)
|
||||
' If Vta.ClienteSucursal.NoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", Vta.ClienteSucursal.NoExt)
|
||||
' If Vta.ClienteSucursal.NoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", Vta.ClienteSucursal.NoInt)
|
||||
' params.Add(New CrystalParametro("EnvioDireccion", StrEnvioDi.ToString))
|
||||
' params.Add(New CrystalParametro("EnvioColonia", If(Vta.ClienteSucursal.Colonia.Length > 0, Vta.ClienteSucursal.Colonia, "")))
|
||||
' params.Add(New CrystalParametro("EnvioCiudad", If(Vta.ClienteSucursal.Municipio.Length > 0, Vta.ClienteSucursal.Municipio, "")))
|
||||
' params.Add(New CrystalParametro("EnvioEstado", If(Vta.ClienteSucursal.Estado.Length > 0, Vta.ClienteSucursal.Estado, "")))
|
||||
' params.Add(New CrystalParametro("EnvioCP", If(Vta.ClienteSucursal.CP.Length > 0, Vta.ClienteSucursal.CP, "")))
|
||||
' Else
|
||||
' Dim StrEnvioDi As New StringBuilder
|
||||
' StrEnvioDi.AppendFormat("{0}", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, ""))
|
||||
' If Vta.Cliente.NoExt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Ext: {0}", Vta.Cliente.NoExt)
|
||||
' If Vta.Cliente.NoInt.Length > 0 Then StrEnvioDi.AppendFormat(", No.Int: {0}", Vta.Cliente.NoInt)
|
||||
' params.Add(New CrystalParametro("EnvioDireccion", StrEnvioDi.ToString))
|
||||
' params.Add(New CrystalParametro("EnvioColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, "")))
|
||||
' params.Add(New CrystalParametro("EnvioCiudad", If(Vta.Cliente.Localidad IsNot Nothing And Vta.Cliente.Localidad.Length > 0, Vta.Cliente.Localidad, "")))
|
||||
' params.Add(New CrystalParametro("EnvioEstado", If(Vta.Cliente.Estado.Length > 0, Vta.Cliente.Estado, "")))
|
||||
' params.Add(New CrystalParametro("EnvioCP", If(Vta.Cliente.CP.Length > 0, Vta.Cliente.CP, "")))
|
||||
' End If
|
||||
' End If
|
||||
' 'CLIENTE SUCURSAL
|
||||
' If Vta.CveClienteSucursal.ToEntero > 0 Then
|
||||
' params.Add(New CrystalParametro("ClienteCalle", If(Vta.ClienteSucursal.Direccion.Length > 0, Vta.ClienteSucursal.Direccion, "")))
|
||||
' params.Add(New CrystalParametro("ClienteColonia", If(Vta.ClienteSucursal.Colonia.Length > 0, Vta.ClienteSucursal.Colonia, "")))
|
||||
' params.Add(New CrystalParametro("ClienteCiudad", If(Vta.ClienteSucursal.Localidad IsNot Nothing And Vta.ClienteSucursal.Localidad.Length > 0, Vta.ClienteSucursal.Localidad, "")))
|
||||
' params.Add(New CrystalParametro("ClienteMunicipio", If(Vta.ClienteSucursal.Municipio.Length > 0, Vta.ClienteSucursal.Municipio, "")))
|
||||
' params.Add(New CrystalParametro("ClienteEstado", If(Vta.ClienteSucursal.Estado.Length > 0, Vta.ClienteSucursal.Estado, "")))
|
||||
' params.Add(New CrystalParametro("ClienteCP", If(Vta.ClienteSucursal.CP.Length > 0, Vta.ClienteSucursal.CP, "")))
|
||||
' params.Add(New CrystalParametro("ClienteNoInt", If(Vta.ClienteSucursal.NoInt.Length > 0, Vta.ClienteSucursal.NoInt, "")))
|
||||
' params.Add(New CrystalParametro("ClienteNoExt", If(Vta.ClienteSucursal.NoExt.Length > 0, Vta.ClienteSucursal.NoExt, "")))
|
||||
' params.Add(New CrystalParametro("ClientePais", If(Vta.ClienteSucursal.Pais.Length > 0, Vta.ClienteSucursal.Pais, "")))
|
||||
' Else
|
||||
' params.Add(New CrystalParametro("ClienteCalle", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, "")))
|
||||
' params.Add(New CrystalParametro("ClienteColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, "")))
|
||||
' params.Add(New CrystalParametro("ClienteCiudad", If(Vta.Cliente.Localidad IsNot Nothing And Vta.Cliente.Localidad.Length > 0, Vta.Cliente.Localidad, "")))
|
||||
' params.Add(New CrystalParametro("ClienteMunicipio", If(Vta.Cliente.Ciudad.Length > 0, Vta.Cliente.Ciudad, "")))
|
||||
' params.Add(New CrystalParametro("ClienteEstado", If(Vta.Cliente.Estado.Length > 0, Vta.Cliente.Estado, "")))
|
||||
' params.Add(New CrystalParametro("ClienteCP", If(Vta.Cliente.CP.Length > 0, Vta.Cliente.CP, "")))
|
||||
' params.Add(New CrystalParametro("ClienteNoInt", If(Vta.Cliente.NoInt.Length > 0, Vta.Cliente.NoInt, "")))
|
||||
' params.Add(New CrystalParametro("ClienteNoExt", If(Vta.Cliente.NoExt.Length > 0, Vta.Cliente.NoExt, "")))
|
||||
' params.Add(New CrystalParametro("ClientePais", If(Vta.Cliente.Pais.Length > 0, Vta.Cliente.Pais, "")))
|
||||
' End If
|
||||
' End If
|
||||
' RutaFormato = String.Format("{0}Formatos\{1}.mrt", UsuarioActual.Empresa.Ruta, NombreArchivo)
|
||||
' Case "Egs"
|
||||
' If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
||||
' NombreArchivo = "NotaCredito"
|
||||
' Else
|
||||
' NombreArchivo = "Factura"
|
||||
' End If
|
||||
' NombreArchivoDescarga = "Nota de Crédito"
|
||||
' TipoDocumento = "EGRESO"
|
||||
' TipoDocumentoRef = String.Format(": Ref.:{0}", Vta.RefDocto)
|
||||
' AplicaPagare = "0"
|
||||
' 'GENERAL
|
||||
' params.Add(New CrystalParametro("TipoDocumento", NombreArchivoDescarga))
|
||||
' params.Add(New CrystalParametro("Tipo", TipoDocumento))
|
||||
' params.Add(New CrystalParametro("Ref", TipoDocumentoRef))
|
||||
' params.Add(New CrystalParametro("AplicaPagare", AplicaPagare))
|
||||
' params.Add(New CrystalParametro("Fecha", String.Format("{0}T{1}", Vta.Fecha.ToString("yyyy-MM-dd"), Vta.Fecha.ToString("HH:mm:ss"))))
|
||||
' 'ALAN YEPIZ
|
||||
' If UsuarioActual.CveEmpresa.Contiene(123) Then
|
||||
' params.Add(New CrystalParametro("DiaExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Day)))
|
||||
' params.Add(New CrystalParametro("MesExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Month)))
|
||||
' params.Add(New CrystalParametro("AñoExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Year)))
|
||||
' End If
|
||||
' 'COMPU, DN DIFUSA
|
||||
' If UsuarioActual.CveEmpresa.Contiene(72, 80, 119) Then
|
||||
' params.Add(New CrystalParametro("EstatusFactura", If(Vta.TipoEstatus = 5, Vta.EstatusFactura, "")))
|
||||
' params.Add(New CrystalParametro("EstatusEntrega", If(Vta.Inv_CveEstatusEntrega = 1, Vta.Inv_EstatusEntrega, "")))
|
||||
' params.Add(New CrystalParametro("PedidoContrato", Vta.PedidoContrato))
|
||||
' params.Add(New CrystalParametro("MonedaAbreviatura", If(Vta.MonedaAbreviatura.ToString IsNot Nothing, Vta.MonedaAbreviatura.ToString, "")))
|
||||
' params.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
' params.Add(New CrystalParametro("FechaImpresion", Now.ToDateTime.ToString))
|
||||
' params.Add(New CrystalParametro("Sucursal", Vta.SubProyecto.SubProyecto))
|
||||
' 'CLIENTE SUCURSAL
|
||||
' If Vta.CveClienteSucursal.ToEntero > 0 Then
|
||||
' params.Add(New CrystalParametro("ClienteCalle", If(Vta.ClienteSucursal.Direccion.Length > 0, Vta.ClienteSucursal.Direccion, "")))
|
||||
' params.Add(New CrystalParametro("ClienteColonia", If(Vta.ClienteSucursal.Colonia.Length > 0, Vta.ClienteSucursal.Colonia, "")))
|
||||
' params.Add(New CrystalParametro("ClienteCiudad", If(Vta.ClienteSucursal.Localidad IsNot Nothing And Vta.ClienteSucursal.Localidad.Length > 0, Vta.ClienteSucursal.Localidad, "")))
|
||||
' params.Add(New CrystalParametro("ClienteMunicipio", If(Vta.ClienteSucursal.Municipio.Length > 0, Vta.ClienteSucursal.Municipio, "")))
|
||||
' params.Add(New CrystalParametro("ClienteEstado", If(Vta.ClienteSucursal.Estado.Length > 0, Vta.ClienteSucursal.Estado, "")))
|
||||
' params.Add(New CrystalParametro("ClienteCP", If(Vta.ClienteSucursal.CP.Length > 0, Vta.ClienteSucursal.CP, "")))
|
||||
' params.Add(New CrystalParametro("ClienteNoInt", If(Vta.ClienteSucursal.NoInt.Length > 0, Vta.ClienteSucursal.NoInt, "")))
|
||||
' params.Add(New CrystalParametro("ClienteNoExt", If(Vta.ClienteSucursal.NoExt.Length > 0, Vta.ClienteSucursal.NoExt, "")))
|
||||
' params.Add(New CrystalParametro("ClientePais", If(Vta.ClienteSucursal.Pais.Length > 0, Vta.ClienteSucursal.Pais, "")))
|
||||
' Else
|
||||
' params.Add(New CrystalParametro("ClienteCalle", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, "")))
|
||||
' params.Add(New CrystalParametro("ClienteColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, "")))
|
||||
' params.Add(New CrystalParametro("ClienteCiudad", If(Vta.Cliente.Localidad IsNot Nothing And Vta.Cliente.Localidad.Length > 0, Vta.Cliente.Localidad, "")))
|
||||
' params.Add(New CrystalParametro("ClienteMunicipio", If(Vta.Cliente.Ciudad.Length > 0, Vta.Cliente.Ciudad, "")))
|
||||
' params.Add(New CrystalParametro("ClienteEstado", If(Vta.Cliente.Estado.Length > 0, Vta.Cliente.Estado, "")))
|
||||
' params.Add(New CrystalParametro("ClienteCP", If(Vta.Cliente.CP.Length > 0, Vta.Cliente.CP, "")))
|
||||
' params.Add(New CrystalParametro("ClienteNoInt", If(Vta.Cliente.NoInt.Length > 0, Vta.Cliente.NoInt, "")))
|
||||
' params.Add(New CrystalParametro("ClienteNoExt", If(Vta.Cliente.NoExt.Length > 0, Vta.Cliente.NoExt, "")))
|
||||
' params.Add(New CrystalParametro("ClientePais", If(Vta.Cliente.Pais.Length > 0, Vta.Cliente.Pais, "")))
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' RutaFormato = String.Format("{0}Formatos\{1}.mrt", UsuarioActual.Empresa.Ruta, "Factura")
|
||||
' Case Else
|
||||
' NombreArchivo = ""
|
||||
' TipoDocumento = ""
|
||||
' End Select
|
||||
' If NombreArchivo = "" Then
|
||||
' GuardaLog("No se especifico el tipo de Impresion de venta (Venta, Remision, Cotización, Nota de Crédito).")
|
||||
' Exit Sub
|
||||
' End If
|
||||
' 'TERMINA REGION PARAMETROS
|
||||
' Dim lrds As New List(Of ReportDataSource)
|
||||
' 'Si es ECLIPSE CREAR COLUMAS PARA FIRMAS EN DtDetalle.
|
||||
' If UsuarioActual.CveEmpresa.Contiene(1, 15, 17, 71, 76, 125) Then
|
||||
' Dim DtDetalleFirmas As New DataTable
|
||||
' DtDetalleFirmas.TableName = "DetalleFirma"
|
||||
' DtDetalleFirmas = Vta.DtDetalle.Copy()
|
||||
' 'SI NO TIENE LAS COLUMNAS DE FIRMAS LAS CREA.
|
||||
' If Not DtDetalleFirmas.Columns.Contains("Titulo") Then
|
||||
' DtDetalleFirmas.Columns.Add("Titulo", GetType(String))
|
||||
' DtDetalleFirmas.Columns.Add("Nombre", GetType(String))
|
||||
' DtDetalleFirmas.Columns.Add("Puesto", GetType(String))
|
||||
' DtDetalleFirmas.Columns.Add("Lado", GetType(Integer))
|
||||
' End If
|
||||
' 'Se llenan los Rows de las columnas con los datos del DtFirmas
|
||||
' For i As Integer = 0 To Vta.DtFirmas.Rows.Count - 1
|
||||
' 'Si DtDetalle es menor al DtFirmas, crea un nuevo Row en DtDetalle y le asigna valor, Si no solo asigna valor
|
||||
' If DtDetalleFirmas.Rows.Count < i + 1 Then
|
||||
' Dim Dr = DtDetalleFirmas.NewRow
|
||||
' Dr("Titulo") = Vta.DtFirmas(i)("Titulo").ToString
|
||||
' Dr("Nombre") = Vta.DtFirmas(i)("Nombre").ToString
|
||||
' Dr("Puesto") = Vta.DtFirmas(i)("Puesto").ToString
|
||||
' Dr("Lado") = Vta.DtFirmas(i)("Lado").ToString.ToEntero
|
||||
' DtDetalleFirmas.Rows.Add(Dr)
|
||||
' Else
|
||||
' DtDetalleFirmas(i)("Titulo") = Vta.DtFirmas(i)("Titulo").ToString
|
||||
' DtDetalleFirmas(i)("Nombre") = Vta.DtFirmas(i)("Nombre").ToString
|
||||
' DtDetalleFirmas(i)("Puesto") = Vta.DtFirmas(i)("Puesto").ToString
|
||||
' DtDetalleFirmas(i)("Lado") = Vta.DtFirmas(i)("Lado").ToString.ToEntero
|
||||
' End If
|
||||
' Next i
|
||||
' Dim rds As New ReportDataSource With {.Name = "DsOC", .Value = DtDetalleFirmas}
|
||||
' lrds.Add(rds)
|
||||
' Else
|
||||
' Dim rds As New ReportDataSource With {.Name = "DsOC", .Value = Vta.DtDetalle}
|
||||
' lrds.Add(rds)
|
||||
' End If
|
||||
' Dim rds1 As New ReportDataSource With {.Name = "DataSet1", .Value = If(Vta.DtDeduccion IsNot Nothing, Vta.DtDeduccion, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
|
||||
' lrds.Add(rds1)
|
||||
' 'DETALLE FIRMAS
|
||||
' Dim rds2 As New ReportDataSource With {.Name = "DataSet2", .Value = If(Vta.DtFirmas IsNot Nothing, Vta.DtFirmas, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
|
||||
' lrds.Add(rds2)
|
||||
' Dim Archivo As New System.IO.FileInfo(RutaFormato)
|
||||
' Dim DataSet As New DataSet
|
||||
' Vta.DtDetalle.TableName = "Datos"
|
||||
' Vta.DtDeduccion.TableName = "Deduccion"
|
||||
' DataSet.Tables.Add(Vta.DtDetalle.Copy)
|
||||
' DataSet.Tables.Add(Vta.DtDeduccion.Copy)
|
||||
' If Archivo.Exists Then
|
||||
' ImprimirbytesPDF(ImprimirPDFPyME(RutaFormato, DataSet, params, NombreArchivo, "PDF", MR:=Nothing), "Factura")
|
||||
' If Guardar Then
|
||||
' Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio))
|
||||
' If Not ArchivoPDF.Exists Then
|
||||
' Try
|
||||
' DirectoryExistsCreate(String.Format("{0}PDF", UsuarioActual.Empresa.Ruta))
|
||||
' DirectoryExistsCreate(String.Format("{0}PDF\{1}", UsuarioActual.Empresa.Ruta, Vta.TipoDocto))
|
||||
' File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
|
||||
' Catch ex As Exception
|
||||
' Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
|
||||
' End Try
|
||||
' Else
|
||||
' Try
|
||||
' ArchivoPDF.Delete()
|
||||
' File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
|
||||
' Catch ex As Exception
|
||||
' Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
|
||||
' End Try
|
||||
' End If
|
||||
' End If
|
||||
' Else
|
||||
' params.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
' params.Add(New CrystalParametro("RFC", UsuarioActual.Empresa.RFC))
|
||||
' ImprimirbytesPDF(ImprimirPDFPyME(RutaFormato, DataSet, params, NombreArchivo, "PDF", MR:=Nothing), "Factura")
|
||||
' End If
|
||||
|
||||
' Catch ex As Exception
|
||||
' GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
|
||||
' End Try
|
||||
'End Sub
|
||||
Public Function PdfFactura(ByRef Vta As Modelos.Factura, Optional AplicaPagare As String = "0", Optional Guardar As Boolean = True, Optional SubReportData As Modelos.MSubReportData = Nothing, Optional UsarStimulsoft As Boolean = False) As Byte()
|
||||
Dim retorno As Byte() = Nothing
|
||||
' Dim ObjVentas As New ClsVentas
|
||||
@@ -6646,6 +6187,20 @@ Public Class ClsPaginas
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Public Function RutaFormatoReporte(NombreReporte As String) As String
|
||||
Dim Retorno As String = String.Format("{0}Formatos\{1}", UsuarioActual.Empresa.Ruta, NombreReporte)
|
||||
If Not File.Exists(Retorno) Then
|
||||
Retorno = $"{DirectorioEmpresas}Grales\Formatos\{NombreReporte}"
|
||||
End If
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function RutaImagenLogo() As String
|
||||
Dim Retorno As String = "" 'si existe le agrega el texto ''file:// sino lo regresa vacío
|
||||
Dim Ruta As String = String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta)
|
||||
If File.Exists(Ruta) Then Retorno = $"file://{Ruta}"
|
||||
Return Retorno
|
||||
End Function
|
||||
#Region "PDF OC NEW 3.0"
|
||||
Public Function NewGeneraBytesOC(tCveOrdenCompra As Integer, Optional MR As ReportViewer = Nothing, Optional ConBitacora As Boolean = False) As Byte()
|
||||
Dim bytes As Byte() = Nothing
|
||||
|
||||
@@ -1325,7 +1325,7 @@ Public Class ClsVentas
|
||||
CvePresupuestoIngreso As Integer, Optional TiempoEntrega As String = "", Optional CveVentaDetallePadre As Integer = -1,
|
||||
Optional CveContratoDetalle As Integer = -1, Optional PorcentajeIVA As Decimal = 0, Optional IEPS As Double = -1, Optional PorcentajeIEPS As Double = 0, Optional CvePromocionDetalle As Integer = -1,
|
||||
Optional CveMovimientoDetallePedido As Integer = -1, Optional ImporteRetIVA As Double = 0, Optional PorcentajeRetIVA As Double = 0,
|
||||
Optional ImporteRetISR As Double = 0, Optional PorcentajeRetISR As Double = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1) As Boolean
|
||||
Optional ImporteRetISR As Double = 0, Optional PorcentajeRetISR As Double = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1, Optional CveActivoFijo As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_VentasDetalleAdd")
|
||||
|
||||
@@ -1356,6 +1356,7 @@ Public Class ClsVentas
|
||||
.Add("@CveMovimientoDetallePedido", SqlDbType.Int).Value = CveMovimientoDetallePedido
|
||||
.Add("@CuentaPredial", SqlDbType.VarChar).Value = CuentaPredial
|
||||
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
|
||||
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -5783,6 +5784,26 @@ Public Class ClsVentas
|
||||
|
||||
End Function
|
||||
|
||||
Public Function UpdateEstatusAFVendido(CveActivoFijo As Integer, CveEmpresa As Integer, Optional CveEstadoActivoFijo As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_AF_EstatusAFUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
||||
.Add("@CveEstadoActivoFijo", SqlDbType.Int).Value = CveEstadoActivoFijo
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar los cambios del estatus de AF.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
#Region "IDisposable Support"
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ Public Class Empresa
|
||||
If Not String.IsNullOrEmpty(_RutaArchivos) AndAlso ClsPaginas.EsProduccion Then
|
||||
Return _RutaArchivos
|
||||
Else
|
||||
Return String.Format("{0}\{1}\", Extensiones.ModExtensiones.DirectorioEmpresas, Me.CveEmpresa)
|
||||
Return String.Format("{0}{1}\", Extensiones.ModExtensiones.DirectorioEmpresas, Me.CveEmpresa)
|
||||
End If
|
||||
End Get
|
||||
'Set(ByVal value As String)
|
||||
|
||||
@@ -2421,6 +2421,13 @@ Namespace Modelos
|
||||
Dim IdCtaIVAXTrasladar As Integer = 0
|
||||
Dim IdCtaIVATrasladado As Integer = 0
|
||||
Dim SeContabiliza As Boolean = True
|
||||
Dim DtPrePolizasAFCancelar As DataTable = Nothing
|
||||
|
||||
If ValorMultiplicador = -1 AndAlso ObjFactura.DtDetalle IsNot Nothing AndAlso ObjFactura.DtDetalle.COUNT("CveActivoFijo", "CveActivoFijo > 0") > 0 Then
|
||||
If ObjConta.GetPrePolizasDetalle(-1, UsuarioActual.CveEmpresa, CveVenta:=ObjFactura.CveVenta) Then
|
||||
DtPrePolizasAFCancelar = ObjConta.DtResultados.FiltraParametros("CveConceptoContable IN (271,49,4)")
|
||||
End If
|
||||
End If
|
||||
|
||||
If (UsuarioActual.Empresa.Funcionalidad(343) = "1" AndAlso ObjFactura.TipoDocto = "Ant") Then
|
||||
SeContabiliza = False
|
||||
@@ -2527,6 +2534,16 @@ Namespace Modelos
|
||||
|
||||
importeMovimiento = 0
|
||||
End If
|
||||
|
||||
If ValorMultiplicador = -1 AndAlso DtPrePolizasAFCancelar IsNot Nothing Then
|
||||
For Each RowAF As DataRow In DtPrePolizasAFCancelar.FiltraParametros("CveConceptoContable = 271").Rows
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, CBool(RowAF("TipoMovto")), RowAF("Importe").ToString().ToDecimal() * -1, RowAF("Referencia").ToString(), 271, RowAF("Concepto").ToString(), FechaMovimiento, -1, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=-1, ImporteMX:=RowAF("ImporteMN").ToString().ToDecimal() * -1, ImporteME:=RowAF("ImporteME").ToString().ToDecimal() * -1, TipoCambio:=RowAF("TC").ToString().ToDecimal(), CveSubProyecto:=RowAF("CveSubProyecto").ToString().ToEntero(), Contabilizable:=CBool(RowAF("Contabilizable"))) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Case 3 'Cliente
|
||||
@@ -3317,53 +3334,71 @@ Namespace Modelos
|
||||
importeMovimiento = 0
|
||||
|
||||
Case 4 'Venta Clasificacion
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "Ant", "Egs", "Dev", "RNC") Then
|
||||
|
||||
Dim ConceptoContableAplicar = 4
|
||||
Dim CveVentaAplicar = ObjFactura.CveVenta
|
||||
Dim CveVentaAmortizacionAplicar = -1
|
||||
If ValorMultiplicador = -1 AndAlso DtPrePolizasAFCancelar IsNot Nothing Then
|
||||
|
||||
If ObjFactura.TipoDocto.Contiene("Egs") And ObjFactura.TipoDocto = "Ant" And CveDevolucion > 0 And NuevaFactura = 1 Then
|
||||
ConceptoContableAplicar = 11
|
||||
CveVentaAplicar = CveDevolucion
|
||||
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
||||
End If
|
||||
|
||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||
|
||||
If DT.Rows.Count > 0 Then
|
||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||
For Each Row2 As DataRow In DT.Rows
|
||||
importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} AND CveSubProyecto = {1} AND PorcentajeIVA = {2}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"))).ToString.ToDecimal) * ValorMultiplicador)
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, ClsPaginas.GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
|
||||
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas
|
||||
If ObjFactura.TipoDocto.Contiene("Egs") Then
|
||||
IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
|
||||
Else
|
||||
IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
|
||||
For Each RowAF As DataRow In DtPrePolizasAFCancelar.FiltraParametros("CveConceptoContable IN(4,49)").Rows
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, CBool(RowAF("TipoMovto")), RowAF("Importe").ToString().ToDecimal() * -1, RowAF("Referencia").ToString(), RowAF("CveConceptoContable").ToString().ToEntero(), RowAF("Concepto").ToString(), FechaMovimiento, -1, -1, CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=RowAF("CveVentaAmortizacion").ToString().ToEntero(), CveClasificacion:=RowAF("CveClasificacion").ToString().ToEntero(), PorcentajeImpuesto:=RowAF("PorcentajeImpuesto").ToString().ToDecimal(), CveCliente:=ObjFactura.CveCliente, CveIE:=RowAF("CveIE").ToString().ToEntero(), ImporteMX:=RowAF("ImporteMN").ToString().ToDecimal() * -1, ImporteME:=RowAF("ImporteME").ToString().ToDecimal() * -1, TipoCambio:=RowAF("TC").ToString().ToDecimal(), CveSubProyecto:=RowAF("CveSubProyecto").ToString().ToEntero(), CveActivoFijo:=RowAF("CveActivoFijo").ToString().ToEntero(), Contabilizable:=CBool(RowAF("Contabilizable"))) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
'REGRESAR EL ACTIVO FIJO A ACTIVO
|
||||
If RowAF("CveActivoFijo").ToString().ToEntero() > 0 Then
|
||||
If Not ObjVentas.UpdateEstatusAFVendido(RowAF("CveActivoFijo").ToString().ToEntero(), UsuarioActual.CveEmpresa, 1) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
Else
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "Ant", "Egs", "Dev", "RNC") Then
|
||||
|
||||
If IdCtaContable <= 0 Then
|
||||
CuentasContablesInvalidas.Append("<br>" & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
Dim ConceptoContableAplicar = 4
|
||||
Dim CveVentaAplicar = ObjFactura.CveVenta
|
||||
Dim CveVentaAmortizacionAplicar = -1
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then
|
||||
ErrorPrepoliza = True
|
||||
If ObjFactura.TipoDocto.Contiene("Egs") And ObjFactura.TipoDocto = "Ant" And CveDevolucion > 0 And NuevaFactura = 1 Then
|
||||
ConceptoContableAplicar = 11
|
||||
CveVentaAplicar = CveDevolucion
|
||||
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
||||
End If
|
||||
|
||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||
|
||||
If DT.Rows.Count > 0 Then
|
||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||
For Each Row2 As DataRow In DT.Rows
|
||||
importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} AND CveSubProyecto = {1} AND PorcentajeIVA = {2}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"))).ToString.ToDecimal) * ValorMultiplicador)
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, ClsPaginas.GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
|
||||
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas
|
||||
If ObjFactura.TipoDocto.Contiene("Egs") Then
|
||||
IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
|
||||
Else
|
||||
ObjFactura.SeGuardoPrePoliza = True
|
||||
IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
|
||||
If IdCtaContable <= 0 Then
|
||||
CuentasContablesInvalidas.Append("<br>" & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then
|
||||
ErrorPrepoliza = True
|
||||
Else
|
||||
ObjFactura.SeGuardoPrePoliza = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
importeMovimiento = 0
|
||||
Case 150 'Descuento sobre ventas
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") AndAlso Not EsNCAmortizacion Then
|
||||
|
||||
@@ -3818,7 +3818,7 @@ Public Class Timbrado
|
||||
'SI NO ES FACTURA EN 0 AGREGA LOS IMPUESTOS
|
||||
If Not ObjCFDITimbre.Comprobante.TipoComprobante.Contiene("P", "N") AndAlso (Ventas.Total <> 0 OrElse (ObjCFDITimbre.TotalImpuestosRetenidos > 0 OrElse ObjCFDITimbre.TotalImpuestosTrasladados > 0)) Then
|
||||
|
||||
If concep.Impuestos.Count > 0 Then
|
||||
If concep.Impuestos.Count > 0 AndAlso concep.ObjetoImpuesto.Contiene("02", "03", "04") Then
|
||||
|
||||
comprobante.Conceptos(i).Impuestos = New Profact.TimbraCFDI40.ComprobanteConceptoImpuestos()
|
||||
comprobante.Conceptos(i).Impuestos.Traslados = New Profact.TimbraCFDI40.ComprobanteConceptoImpuestosTraslado(concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion = "T").Count - 1) {}
|
||||
@@ -4859,13 +4859,15 @@ Public Class Timbrado
|
||||
If ObjCFDITimbre.Conceptos IsNot Nothing AndAlso ObjCFDITimbre.Conceptos.Count > 0 Then
|
||||
For Each concep As CFDIConceptos In ObjCFDITimbre.Conceptos
|
||||
cfdi.Concepto(concep.ClaveProdServ, concep.Noidentificacion, concep.Cantidad.ToString("0.00####"), concep.ClaveUnidad, concep.Unidad, concep.Descripcion, concep.ValorUnitario.ToString("0.00####"), concep.Importe, concep.Descuento, concep.ObjetoImpuesto)
|
||||
For Each imp As CFDIConceptosImpuestos In concep.Impuestos
|
||||
If imp.TrasladooRetencion = "T" Then
|
||||
cfdi.ConceptoTraslado(imp.Base, imp.Impuesto, imp.TipoFactor, imp.TasaOCuota, imp.Importe)
|
||||
Else
|
||||
cfdi.ConceptoRetencion(imp.Base, imp.Impuesto, imp.TipoFactor, imp.TasaOCuota, imp.Importe)
|
||||
End If
|
||||
Next
|
||||
If concep.ObjetoImpuesto.Contiene("02", "03", "04") Then
|
||||
For Each imp As CFDIConceptosImpuestos In concep.Impuestos
|
||||
If imp.TrasladooRetencion = "T" Then
|
||||
cfdi.ConceptoTraslado(imp.Base, imp.Impuesto, imp.TipoFactor, imp.TasaOCuota, imp.Importe)
|
||||
Else
|
||||
cfdi.ConceptoRetencion(imp.Base, imp.Impuesto, imp.TipoFactor, imp.TasaOCuota, imp.Importe)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If concep.CuentaPredial <> "" Then cfdi.CuentaPredial(concep.CuentaPredial)
|
||||
If concep.NumeroPedimento <> "" Then cfdi.InformacionAduanera(concep.NumeroPedimento)
|
||||
|
||||
|
||||
@@ -794,7 +794,7 @@ Partial Class Bancos_PolizaCheque
|
||||
e.Row.FCDropDownList("DdlSubProyecto").SelectedValue = e.Row.DBCampo("CveSubProyecto")
|
||||
e.Row.FCDropDownList("DdlSubProyecto").Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "-1"))
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 7, 11, 12, 122, 145) Then
|
||||
e.Row.FCLiteral("LtlSP").Visible = False
|
||||
e.Row.FCDropDownList("DdlSubProyecto").Visible = True
|
||||
End If
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -891,35 +891,42 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
'Conta ContPAQ AUTOMATICA
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError.Trim = "" Then
|
||||
If CvePrePolizaIERegistrado > 0 Then
|
||||
If IdCtaPersonal > 0 Or DdlCajaChica.Visible Then
|
||||
If IdCtaProveedor > 0 Then
|
||||
|
||||
If ObjMov.ContabilizarPrePoliza(CvePrePolizaIERegistrado, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
If IdCtaPersonal > 0 Or DdlCajaChica.Visible Then
|
||||
If IdCtaProveedor > 0 Then
|
||||
If Not ObjMov.ContabilizarPrePoliza(CvePrePolizaIERegistrado, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
|
||||
End If
|
||||
Else
|
||||
MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
|
||||
MsgError = "No tiene cuenta contable de proveedor"
|
||||
End If
|
||||
Else
|
||||
MsgError = "No tiene cuenta contable de proveedor"
|
||||
MsgError = "No tiene cuenta contable de personal"
|
||||
End If
|
||||
Else
|
||||
MsgError = "No tiene cuenta contable de personal"
|
||||
If Not ObjMov.ContabilizarPrePoliza(CvePrePolizaIERegistrado, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If ChkChequeExcedente.Checked Then
|
||||
If IdCuentaBancaria > 0 Then
|
||||
If IdCtaProveedor > 0 Then
|
||||
|
||||
If ObjMov.ContabilizarPrePoliza(CvePrePolizaExcedente, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
If IdCuentaBancaria > 0 Then
|
||||
If IdCtaProveedor > 0 Then
|
||||
If Not ObjMov.ContabilizarPrePoliza(CvePrePolizaIERegistrado, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
|
||||
End If
|
||||
Else
|
||||
MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
|
||||
MsgError = "No tiene cuenta contable de proveedor"
|
||||
End If
|
||||
|
||||
Else
|
||||
MsgError = "No tiene cuenta contable de proveedor"
|
||||
MsgError = "No tiene cuenta contable de personal"
|
||||
End If
|
||||
Else
|
||||
MsgError = "No tiene Cuenta contable Bancaria"
|
||||
If Not ObjMov.ContabilizarPrePoliza(CvePrePolizaIERegistrado, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -77,12 +77,7 @@ Partial Class Contabilidad_PolizasImpresion
|
||||
folf = FolioFin.Text.ToEntero()
|
||||
End If
|
||||
|
||||
Dim ArchivoReporte As String = "Empresas/Grales/Formatos/Polizas.rdlc"
|
||||
|
||||
If IO.File.Exists(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta)) Then
|
||||
ArchivoReporte = String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta)
|
||||
End If
|
||||
|
||||
Dim ArchivoReporte As String = RutaFormatoReporte("Polizas.rdlc")
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetPrePolizasImpresion(UsuarioActual.CveEmpresa, TxtFechaInicio.Text.ToDate, TxtFechaFin.Text.ToDate, CveTipoPoliza:=ddlTipoPoliza.SelectedValue.ToEntero, FolioI:=foli,
|
||||
FolioF:=folf, CveUsuario:=DdlUsuarioRegistro.SelectedValue.ToEntero, CveSubProyecto:=DdlSegmentoNeg.SelectedValue.ToEntero,
|
||||
@@ -99,8 +94,6 @@ Partial Class Contabilidad_PolizasImpresion
|
||||
params.Add(New ReportParameter("Finicio", TxtFechaInicio.Text))
|
||||
params.Add(New ReportParameter("FFin", TxtFechaFin.Text))
|
||||
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
'params.Add(New ReportParameter("Nombre", dr("Cuenta").ToString))
|
||||
'params.Add(New ReportParameter("Cuenta", dr("Codigo").ToString))
|
||||
params.Add(New ReportParameter("Numero", dr("Folio").ToString))
|
||||
params.Add(New ReportParameter("Moneda", ""))
|
||||
params.Add(New ReportParameter("CodigoPostal", ""))
|
||||
|
||||
@@ -78,8 +78,8 @@
|
||||
<asp:LinkButton ID="LnkComplementoPago" runat="server" Visible="false" OnClick="LnkComplementoPago_Click" Style="color: #686868;"><i class="fa fa-money" style="color:#686868;"></i> Crear Complemento de Pago</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirPDF" runat="server" Visible="true" OnClick="LnkImprimirPDF_Click" Style="color: #686868;"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir Poliza</asp:LinkButton>
|
||||
</li>
|
||||
<asp:HyperLink ID="HplImprimirPDF" runat="server" Target="_blank" Visible="false" ><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir Poliza</asp:HyperLink>
|
||||
</li>
|
||||
|
||||
<%-- <li>
|
||||
<asp:LinkButton ID="LnkImprimePDFResumen" runat="server" Visible="true" OnClick="LnkImprimePDFResumen_Click" Style="color: #686868;"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir PDF Resumen</asp:LinkButton>
|
||||
|
||||
@@ -5,6 +5,7 @@ Imports ADSNetLibrary.SIGAPI.Models.OC.Response
|
||||
'Imports DocumentFormat.OpenXml
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.JScript
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class ContabilidadC_RegPrePolizaS
|
||||
@@ -310,7 +311,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Else
|
||||
BtnEliminar.Visible = False
|
||||
LnkExcel.Visible = True
|
||||
LnkImprimirPDF.Visible = False
|
||||
DvPlantilla.Visible = True
|
||||
|
||||
TxtFechaDocumento.Text = Now.ToString("dd/MM/yyyy")
|
||||
@@ -336,7 +336,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
CreaDT()
|
||||
BtnEliminar.Visible = False
|
||||
LnkExcel.Visible = True
|
||||
LnkImprimirPDF.Visible = False
|
||||
DvPlantilla.Visible = True
|
||||
|
||||
TxtFechaDocumento.Text = Now.ToString("dd/MM/yyyy")
|
||||
@@ -463,7 +462,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
TxtUsuarioElaboro.Text = dr("Usuario").ToString
|
||||
TxtFechaelaboracion.Text = dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString
|
||||
|
||||
HplImprimirPDF.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=PREPO&CvePrePoliza={CvePrePoliza}")}"
|
||||
HplImprimirPDF.Visible = True
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
TxtUsuarioElaboro.ToolTip = dr("Modulo").ToString
|
||||
End If
|
||||
@@ -542,7 +542,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
RegistraScript("comparar();")
|
||||
|
||||
LnkExcel.Visible = False
|
||||
LnkImprimirPDF.Visible = True
|
||||
Else
|
||||
Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
|
||||
BtnEliminar.Visible = False
|
||||
@@ -2164,23 +2163,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
RegistraScript("calculateCargo()", "abono")
|
||||
RegistraScript("comparar()", "compara")
|
||||
End Sub
|
||||
'Protected Sub DdlSubProyectoFiltroMov_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' For Each Gvr As GridViewRow In GvMov.Rows
|
||||
' If DdlSubProyectoFiltroMov.SelectedValue.ToEntero > 0 Then
|
||||
' If Gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero = DdlSubProyectoFiltroMov.SelectedValue.ToEntero Or Not Gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero > 0 Then
|
||||
' Gvr.Visible = True
|
||||
' Else
|
||||
' Gvr.Visible = False
|
||||
' End If
|
||||
' Else
|
||||
' Gvr.Visible = True
|
||||
' End If
|
||||
' Next
|
||||
' UpPrePoliza.Update()
|
||||
' RegistraScript("calculateAbono()", "cargo")
|
||||
' RegistraScript("calculateCargo()", "abono")
|
||||
' RegistraScript("comparar()", "compara")
|
||||
'End Sub
|
||||
|
||||
Private Sub GvMov_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvMov.RowEditing
|
||||
Actualizar = True
|
||||
@@ -2716,89 +2698,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "Paquete Egresos"
|
||||
Protected Sub LnkImprimirPDF_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(282).ToEntero = 1 Then
|
||||
|
||||
ImprimePrePolizasDetalleResumen("PDF")
|
||||
Else
|
||||
ImprimirPolizaPDF(IdPoliza)
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirPolizaPDF(IdPoliza As Integer)
|
||||
|
||||
'Dim ObjPoliza As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim Bytes As Byte() = Nothing
|
||||
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
|
||||
If ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
Dim dtVC As DataTable
|
||||
Dim dr As DataRow
|
||||
dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")
|
||||
dr = dtVC.Rows(0)
|
||||
Dim ruta As String = ""
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString))
|
||||
params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(141) Then
|
||||
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToString("dd/MM/yyyy hh:mm:ss")))
|
||||
Else
|
||||
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
params.Add(New ReportParameter("Numero", dr("FolioPoliza").ToString))
|
||||
params.Add(New ReportParameter("Moneda", ""))
|
||||
params.Add(New ReportParameter("CodigoPostal", ""))
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 141) Then
|
||||
params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa.Contiene(140, 141) Then
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
End If
|
||||
|
||||
If Archivo.Exists Then
|
||||
|
||||
ruta = UsuarioActual.Empresa.Ruta & "Formatos/Polizas.rdlc"
|
||||
|
||||
Else
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
ruta = "Empresas/Grales/Formatos/Polizas.rdlc"
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
ImprimirbytesPDF(StreamPDF(ruta, dtVC, params, "ppoliza"), String.Format("{0}-{1}", TipoPoliza, dr("FolioPoliza").ToString), "PDF", True)
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'Return String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, IdPoliza.ToString)
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Crear A Partier de"
|
||||
|
||||
@@ -2936,7 +2835,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
'Next
|
||||
End If
|
||||
LnkExcel.Visible = False
|
||||
LnkImprimirPDF.Visible = True
|
||||
HplImprimirPDF.Visible = True
|
||||
Else
|
||||
Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
|
||||
BtnEliminar.Visible = False
|
||||
@@ -3228,98 +3127,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ImprimePrePolizasDetalleResumen(Optional Tipo As String = "PDF")
|
||||
|
||||
Dim Archivo As System.IO.FileInfo
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim Bytes As Byte() = Nothing
|
||||
|
||||
Dim ImpresionPersonalizada As Integer = UsuarioActual.Empresa.Funcionalidad(282).ToEntero
|
||||
Dim ConceptoPoliza As String = TxtConcepto.Text
|
||||
|
||||
|
||||
Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/PolizasResumen.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim Logo As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
|
||||
If ObjConta.GetPrePolizasDetalleResumen(CvePrePoliza, UsuarioActual.CveEmpresa, ImpresionPersonalizada) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
Dim dtVC As DataTable
|
||||
Dim dr As DataRow
|
||||
|
||||
dtVC = ObjConta.DtResultados '.FiltraParametros("Contabilizable = 1", "Orden")
|
||||
dr = dtVC.Rows(0)
|
||||
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("TipoPoliza", DdlTipoPoliza.SelectedItem.Text))
|
||||
params.Add(New ReportParameter("Finicio", TxtFechaDocumento.Text))
|
||||
params.Add(New ReportParameter("FFin", TxtFechaDocumento.Text))
|
||||
|
||||
params.Add(New ReportParameter("Fecha", TxtFechaDocumento.Text))
|
||||
|
||||
params.Add(New ReportParameter("Numero", TxtFolio.Text))
|
||||
params.Add(New ReportParameter("Moneda", If(CveMoneda = 2, "Dolar", "Peso Mexicano")))
|
||||
params.Add(New ReportParameter("CodigoPostal", ""))
|
||||
|
||||
params.Add(New ReportParameter("UsuarioRegistro", TxtUsuarioElaboro.Text))
|
||||
params.Add(New ReportParameter("ConceptoPoliza", ConceptoPoliza))
|
||||
|
||||
params.Add(New ReportParameter("Folio", TxtFolio.Text))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If Logo.Exists Then
|
||||
params.Add(New ReportParameter("pImg", $"file://{Logo.FullName}"))
|
||||
Else
|
||||
params.Add(New ReportParameter("pImg", ""))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Dim RutaReprote As String
|
||||
If Archivo.Exists Then
|
||||
RutaReprote = Archivo.FullName
|
||||
Else
|
||||
RutaReprote = $"{DirectorioEmpresas}Grales\Formatos\PolizasResumen.rdlc"
|
||||
End If
|
||||
|
||||
Dim TipoPolizaString = ""
|
||||
|
||||
Select Case DdlTipoPoliza.SelectedValue.ToEntero
|
||||
Case 1
|
||||
TipoPolizaString = "I"
|
||||
Exit Select
|
||||
Case 2
|
||||
TipoPolizaString = "E"
|
||||
Exit Select
|
||||
|
||||
Case Else
|
||||
TipoPolizaString = "D"
|
||||
Exit Select
|
||||
|
||||
End Select
|
||||
|
||||
|
||||
ImprimirbytesPDF(StreamPDF(RutaReprote, dtVC, params, "PrePoliza", Formato:=Tipo), $"P{TipoPolizaString}{TxtFolio.Text}", Formato:=Tipo, Descarga:=True)
|
||||
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkImprimePDFResumen_Click(sender As Object, e As EventArgs)
|
||||
ImprimePrePolizasDetalleResumen("PDF")
|
||||
End Sub
|
||||
|
||||
'Protected Sub LnkImprimeExcelResumen_Click(sender As Object, e As EventArgs)
|
||||
' ImprimePrePolizasDetalleResumen("Excel")
|
||||
'End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoMensual.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoMensual" %>
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoMensual.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoMensual" EnableEventValidation="false" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -54,19 +54,41 @@
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnCargaAsignados" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
|
||||
<ul class="list-inline" style="font-size: 12px;">
|
||||
<li>Ejercicio:
|
||||
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 100px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label class="col-md-1" style="width: 80px;" runat="server" id="LiPeriodoLbl">Periodo: </label>
|
||||
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" CssClass="select2me">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Cuenta:
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="350px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Ejercicio:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 100px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
|
||||
<div runat="server" id="DivProyecto" class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" style="display:none;">
|
||||
Periodo:
|
||||
</div>
|
||||
<div class="col-md-1" style="display:none;">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" CssClass="select2me">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||
@@ -78,52 +100,38 @@
|
||||
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12" Selected="True"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<li>SubProyecto:
|
||||
|
||||
<asp:DropDownList ID="DdlSubProyecto" Width="180px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Divisor:
|
||||
|
||||
<asp:DropDownList ID="DdlDivisor" Width="100px" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Text="1" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000" Value="1000" Selected="True"></asp:ListItem>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Divisor:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlDivisor" Width="100px" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Text="1" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000" Value="1000"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
|
||||
<li>Trimestre Cuatrimestre:
|
||||
<asp:DropDownList ID="DdlTri" runat="server" CssClass="select2me" Width="100px" >
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Trimestre Cuatrimestre:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTri" runat="server" CssClass="select2me" Width="100px" >
|
||||
<asp:ListItem Value="0">NO</asp:ListItem>
|
||||
<asp:ListItem Value="1">Trimestre</asp:ListItem>
|
||||
<asp:ListItem Value="2">Cuatrimestre</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
|
||||
<li>Cuenta:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="350px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
@@ -213,7 +221,7 @@
|
||||
|
||||
<asp:BoundField HeaderText="T4" DataField="Tri1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="C4" DataField="Cua1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -88,10 +88,8 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
Private Sub InicializaValores()
|
||||
CargaCombos()
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
|
||||
|
||||
|
||||
Private Sub CargaCombos()
|
||||
|
||||
Dim Conta As New ClsContabilidad
|
||||
If Conta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = Conta.DtResultados
|
||||
@@ -115,13 +113,9 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
DdlEjercicio.DataBind()
|
||||
DdlEjercicio.SelectedValueExist(Now.Year.ToString)
|
||||
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSubProyecto.SelectedValue = "-1"
|
||||
|
||||
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto)
|
||||
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -182,11 +176,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
GvMensual2.Columns(27).Visible = True
|
||||
GvMensual2.Columns(42).Visible = True
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
UpMensual.Update()
|
||||
|
||||
If GvMensual2.Rows.Count > 0 Then
|
||||
@@ -194,10 +184,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
LnkExportar.Visible = True
|
||||
UpAcciones.Update()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'RegistraScript($"LimpiaCeros();")
|
||||
End If
|
||||
Conta.Dispose()
|
||||
End Sub
|
||||
|
||||
@@ -208,131 +195,105 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
Protected Sub GvMensual1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMensual2.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
End If
|
||||
'If e.Row.RowIndex = 0 Then
|
||||
' e.Row.Style.Add("font-weight", "bold")
|
||||
'End If
|
||||
setgrafica(e)
|
||||
|
||||
|
||||
If e.Row.DataKey("Level").ToEntero = 0 Then
|
||||
If e.Row.DataKey("Level") = "0" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("Level").ToEntero = 1 Then
|
||||
ElseIf e.Row.DataKey("Level") = "1" Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
'If e.Row.DBCampo("TipoCuenta").Contiene("3", "4") Then
|
||||
' e.Row.CssClass = "Totales"
|
||||
'ElseIf e.Row.DBCampo("TipoCuenta").Contiene("1") Then
|
||||
' e.Row.CssClass = "SubTotales"
|
||||
'End If
|
||||
|
||||
Dim Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre As Decimal
|
||||
|
||||
|
||||
Enero = e.Row.DBCampo("Enero").ToDecimal()
|
||||
Febrero = e.Row.DBCampo("Febrero").ToDecimal()
|
||||
Marzo = e.Row.DBCampo("Marzo").ToDecimal()
|
||||
Abril = e.Row.DBCampo("Abril").ToDecimal()
|
||||
Mayo = e.Row.DBCampo("Mayo").ToDecimal()
|
||||
Junio = e.Row.DBCampo("Junio").ToDecimal()
|
||||
Julio = e.Row.DBCampo("Julio").ToDecimal()
|
||||
Agosto = e.Row.DBCampo("Agosto").ToDecimal()
|
||||
Septiembre = e.Row.DBCampo("Septiembre").ToDecimal()
|
||||
Octubre = e.Row.DBCampo("Octubre").ToDecimal()
|
||||
Noviembre = e.Row.DBCampo("Noviembre").ToDecimal()
|
||||
Diciembre = e.Row.DBCampo("Diciembre").ToDecimal()
|
||||
Enero = e.Row.DBCampo("Enero").ToDecimal()
|
||||
Febrero = e.Row.DBCampo("Febrero").ToDecimal()
|
||||
Marzo = e.Row.DBCampo("Marzo").ToDecimal()
|
||||
Abril = e.Row.DBCampo("Abril").ToDecimal()
|
||||
Mayo = e.Row.DBCampo("Mayo").ToDecimal()
|
||||
Junio = e.Row.DBCampo("Junio").ToDecimal()
|
||||
Julio = e.Row.DBCampo("Julio").ToDecimal()
|
||||
Agosto = e.Row.DBCampo("Agosto").ToDecimal()
|
||||
Septiembre = e.Row.DBCampo("Septiembre").ToDecimal()
|
||||
Octubre = e.Row.DBCampo("Octubre").ToDecimal()
|
||||
Noviembre = e.Row.DBCampo("Noviembre").ToDecimal()
|
||||
Diciembre = e.Row.DBCampo("Diciembre").ToDecimal()
|
||||
|
||||
|
||||
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
|
||||
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
|
||||
|
||||
|
||||
For x = 2 To GvMensual2.Columns.Count - 1
|
||||
|
||||
|
||||
For x = 2 To GvMensual2.Columns.Count - 1
|
||||
|
||||
If e.Row.Cells(x).Text.Replace("%", "").ToDecimal = 0 Then
|
||||
e.Row.Cells(x).Text = "-"
|
||||
ElseIf e.Row.Cells(x).Text.Replace("%", "").ToDecimal < 0 Then
|
||||
e.Row.Cells(x).ForeColor = Drawing.Color.Red
|
||||
If e.Row.Cells(x).Text.Replace("%", "").ToDecimal = 0 Then
|
||||
e.Row.Cells(x).Text = "-"
|
||||
ElseIf e.Row.Cells(x).Text.Replace("%", "").ToDecimal < 0 Then
|
||||
e.Row.Cells(x).ForeColor = Drawing.Color.OrangeRed
|
||||
End If
|
||||
|
||||
|
||||
If x = 2 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/01/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
|
||||
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/01/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 3 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Febrero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/02/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Febrero.ToString("###,###,##0"), Febrero.ToString("###,###,###.00")) }</a>"
|
||||
e.Row.Cells(x).Text = $"<a { If(Febrero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/02/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Febrero.ToString("###,###,##0"), Febrero.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 6 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Marzo < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/03/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Marzo.ToString("###,###,##0"), Marzo.ToString("###,###,###.00")) }</a>"
|
||||
e.Row.Cells(x).Text = $"<a { If(Marzo < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/03/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Marzo.ToString("###,###,##0"), Marzo.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 10 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Abril < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/04/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Abril.ToString("###,###,##0"), Abril.ToString("###,###,###.00")) }</a>"
|
||||
e.Row.Cells(x).Text = $"<a { If(Abril < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/04/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Abril.ToString("###,###,##0"), Abril.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 14 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Marzo < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/05/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Marzo.ToString("###,###,##0"), Marzo.ToString("###,###,###.00")) }</a>"
|
||||
e.Row.Cells(x).Text = $"<a { If(Mayo < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/05/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Mayo.ToString("###,###,##0"), Mayo.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
|
||||
If x = 17 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/06/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
|
||||
e.Row.Cells(x).Text = $"<a { If(Junio < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/06/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Junio.ToString("###,###,##0"), Junio.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
|
||||
If x = 21 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/07/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
|
||||
e.Row.Cells(x).Text = $"<a { If(Julio < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/07/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Julio.ToString("###,###,##0"), Julio.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 24 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/08/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
|
||||
e.Row.Cells(x).Text = $"<a { If(Agosto < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/08/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Agosto.ToString("###,###,##0"), Agosto.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If x = 28 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/09/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
|
||||
e.Row.Cells(x).Text = $"<a { If(Septiembre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/09/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Septiembre.ToString("###,###,##0"), Septiembre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
|
||||
If x = 32 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/10/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
|
||||
e.Row.Cells(x).Text = $"<a { If(Octubre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/10/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Octubre.ToString("###,###,##0"), Octubre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 35 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/11/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
|
||||
If x = 35 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Noviembre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/11/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Noviembre.ToString("###,###,##0"), Noviembre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 38 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/12/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
|
||||
If x = 38 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Diciembre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/12/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Diciembre.ToString("###,###,##0"), Diciembre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
Next
|
||||
If Enero = 0 Then
|
||||
e.Row.Cells(2).Text = "-"
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
|
||||
If Enero = 0 Then
|
||||
e.Row.Cells(2).Text = "-"
|
||||
Else
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
' e.Row.Cells(1).Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
|
||||
|
||||
|
||||
|
||||
' Level 0 Total 1 SubTotal 1
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub setgrafica(e As GridViewRowEventArgs)
|
||||
@@ -356,23 +317,19 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
|
||||
Dim SubProyecto As String = ""
|
||||
|
||||
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then
|
||||
SubProyecto = DdlSubProyecto.SelectedItem.Text
|
||||
End If
|
||||
|
||||
Dim SbFiltros As New StringBuilder()
|
||||
SbFiltros.AppendFormat("Fecha Inicio: {0} Fecha Fin: {1}|", $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}")
|
||||
SbFiltros.AppendFormat("Cuenta : {0}|", DdlCuentas.SelectedItem.Text)
|
||||
SbFiltros.AppendFormat("Centro Costo : {0}|", If(DdlSubproyecto.SelectedValue.ToEntero > 0, DdlSubproyecto.SelectedItem.Text, "Todos"))
|
||||
SbFiltros.AppendFormat("Divisor : {0}|", DdlDivisor.SelectedItem.Text)
|
||||
|
||||
GvMensual2.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, "Anexo del Catálogo - Mensual", DatoTituloExtra:=$"Periodo {DdlPeriodo.SelectedItem.Text}", DatosFiltros:=SbFiltros.ToString())
|
||||
'GvMensual2.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}", "Anexo del Catálogo - Mensual", SubProyecto, DdlDivisor.SelectedValue.ToEntero, DatoTituloExtra:=$"Periodo {DdlPeriodo.SelectedItem.Text}")
|
||||
|
||||
GvMensual2.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, "Anexo del Catálogo - Mensual", DatosFiltros:=SbFiltros.ToString())
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1214,7 +1214,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>ECONOLLANTAS SERVICIOS Y ACCESORIOS SA DE CV</Value>
|
||||
<Value>ECONOLLANTAS SERVICIOS Y ACCESORIOS</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
|
||||
@@ -1387,7 +1387,7 @@
|
||||
<Top>1.75278in</Top>
|
||||
<Left>0.13771in</Left>
|
||||
<Height>0.36206in</Height>
|
||||
<Width>8.13325in</Width>
|
||||
<Width>8.13321in</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1509,7 +1509,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>ECONOLLANTAS SERVICIOS Y ACCESORIOS SA DE CV</Value>
|
||||
<Value>ECONOLLANTAS SERVICIOS Y ACCESORIOS</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
|
||||
@@ -1214,7 +1214,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>DESARROLLOS Y COMERCIOS AD S.A DE C.V</Value>
|
||||
<Value>DESARROLLOS Y COMERCIOS AD</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
|
||||
@@ -545,7 +545,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>DESARROLLOS Y COMERCIOS AD S.A DE C.V</Value>
|
||||
<Value>DESARROLLOS Y COMERCIOS AD</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
|
||||
@@ -1214,7 +1214,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>GTP GRUPO TIRES DEL PACIFICO SA DE CV</Value>
|
||||
<Value>GTP GRUPO TIRES DEL PACIFICO</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
|
||||
@@ -545,7 +545,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>GTP GRUPO TIRES DEL PACIFICO SA DE CV</Value>
|
||||
<Value>GTP GRUPO TIRES DEL PACIFICO</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
|
||||
@@ -1214,7 +1214,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>MAGSON LLANTAS Y SERVICIOS, S.A DE C.V</Value>
|
||||
<Value>MAGSON LLANTAS Y SERVICIOS</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
|
||||
@@ -1010,7 +1010,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>MAGSON LLANTAS Y SERVICIOS, S.A DE C.V</Value>
|
||||
<Value>MAGSON LLANTAS Y SERVICIOS</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
|
||||
@@ -1213,7 +1213,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>IMPULSORA DE SERVICIOS AUTOMOTRICES Y LLANTEROS S</Value>
|
||||
<Value>IMPULSORA DE SERVICIOS AUTOMOTRICES Y LLANTEROS</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
|
||||
@@ -1320,7 +1320,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>IMPULSORA DE SERVICIOS AUTOMOTRICES Y LLANTEROS S</Value>
|
||||
<Value>IMPULSORA DE SERVICIOS AUTOMOTRICES Y LLANTEROS</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
|
||||
@@ -1214,7 +1214,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>SOHACO, S.A. DE C.V.</Value>
|
||||
<Value>SOHACO</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
|
||||
@@ -545,7 +545,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>SOHACO, S.A. DE C.V.</Value>
|
||||
<Value>SOHACO</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
.infomov .col-md-1, .infomov .col-md-2, .infomov .col-md-6 {
|
||||
float: left;
|
||||
padding-right: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.infomov .col-md-1 {
|
||||
@@ -116,47 +116,14 @@
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<%--FILTROS--%>
|
||||
<asp:UpdatePanel ID="UPEncabezado" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="Panel1" runat="server" DefaultButton="BtnConsultar">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 39px;">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" runat="server" Text="Consultar" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row" style="padding-top: 10px;">
|
||||
<%--<label class="col-md-1 truncate">Almacén:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCAlmacen" runat="server" CssClass="form-control input-sm" Style="max-width: 200px" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
|
||||
</div>--%>
|
||||
<label class="col-md-1 truncate">Concepto:</label>
|
||||
<div class="col-md-3 ">
|
||||
<asp:DropDownList ID="DdlCConcepto" DataTextField="Concepto" CssClass="form-control input-sm" DataValueField="CveConcepto" runat="server" Style="max-width: 200px"></asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Folio:</label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:TextBox ID="TxtCFolio" runat="server" Style="max-width: 120px" ></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<div class="row" style="margin-left: 0px; margin-right: 0px;">
|
||||
|
||||
<asp:UpdatePanel ID="UpGenerales" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="portlet smmallpadding light bordered infomov" style="width: 750px">
|
||||
<div class="portlet xspadding light bordered infomov" style="width: 750px">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
|
||||
@@ -625,11 +625,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DdlConcepto.DataSource = GlobalDTInvConceptos.FiltraParametros(IIf(UsuarioActual.CveEmpresa.Contiene(72, 80, 1), "CveConcepto NOT IN (4,5,10)", "CveConcepto NOT IN (1,2,4,5,8,9,10,12,26,27,29)").ToString)
|
||||
DdlConcepto.DataBind()
|
||||
|
||||
'FILTRO
|
||||
DdlCConcepto.DataSource = GlobalDTInvConceptos.FiltraParametros("CveConcepto NOT IN (4,5)")
|
||||
DdlCConcepto.DataBind()
|
||||
|
||||
|
||||
'Llenar el dropdownlist de almacén
|
||||
If Not IfNull(Request("CI"), -1).ToString.ToEntero > 0 AndAlso Not IfNull(Request("CveEntregaAlmacen"), -1).ToString.ToEntero > 0 Then
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (9,11)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
@@ -743,11 +738,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
GvM.EditIndex = -1
|
||||
LimpiarMovimiento()
|
||||
CargaDatos(-1, DdlCConcepto.SelectedValue.ToEntero(), TxtCFolio.Text.ToEntero)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos(tCveMovimiento As Integer, Optional pCveConcepto As Integer = -1, Optional pFolio As Integer = -1)
|
||||
Dim Mov As New ClsInventarios
|
||||
DtMovimientos.Clear()
|
||||
@@ -1163,7 +1154,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
UpGenerales.Update()
|
||||
UPDatos.Update()
|
||||
UppGrid.Update()
|
||||
UPEncabezado.Update()
|
||||
UpRegistroTipoCambio.Update()
|
||||
|
||||
End Sub
|
||||
@@ -1221,7 +1211,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCodigoBarras()
|
||||
If DdlCConcepto.SelectedValue.ToEntero = 1 Then
|
||||
If DdlConcepto.SelectedValue.ToEntero = 1 Then
|
||||
DivCodigoBarras.Visible = True
|
||||
End If
|
||||
End Sub
|
||||
@@ -1889,7 +1879,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim CveConceptoContable As Integer = 260
|
||||
Dim CveClasificacion As Integer = -1
|
||||
Select Case DdlConcepto.SelectedValue.ToEntero
|
||||
Case 2
|
||||
Case 2, 32
|
||||
CveConceptoContable = 78
|
||||
EsContabilizable = True
|
||||
Case 28, 31
|
||||
@@ -1921,10 +1911,10 @@ Partial Class Inventarios_EntradasSalidas
|
||||
CveClasificacion = drr("CveClasificacion").ToString.ToEntero
|
||||
IdCtaContableOtro = drr("IdCuentaCostos").ToString.ToEntero
|
||||
End If
|
||||
|
||||
Case Else
|
||||
CveConceptoContable = 95
|
||||
End Select
|
||||
|
||||
|
||||
'2-78
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAlmacen, tValorInventario, TxtObservaciones.Text.Trim, 68, TxtObservaciones.Text.Trim, TxtFecha.Text.ToDate, idCtaContable, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=tValorInventario, CveClasificacion:=CveClasificacion, Contabilizable:=EsContabilizable) Then
|
||||
@@ -2121,12 +2111,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
|
||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
||||
|
||||
'Limpia Valores cuando inserta de campos especiales
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
DdlSubProyecto.SelectedValueExist("-1")
|
||||
UPEncabezado.Update()
|
||||
End If
|
||||
UPDatos.Update()
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(139) Then
|
||||
@@ -2532,7 +2516,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
TxtFolio.Text = Folio.ToString
|
||||
FolioAsignado = Folio
|
||||
UPEncabezado.Update()
|
||||
End Sub
|
||||
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||
ChangeDdlProducto()
|
||||
@@ -3447,8 +3430,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
#Region " CONSUMO INTERNO "
|
||||
Private Sub ActivaConsumoInterno()
|
||||
EsConsumoInterno = True
|
||||
|
||||
Panel1.Visible = False
|
||||
DdlConcepto.Items.Insert(0, New ListItem("Salida por Consumo Interno", "30"))
|
||||
DdlConcepto.SelectedValue = "30"
|
||||
DdlAlmacen.AutoPostBack = False
|
||||
@@ -3928,7 +3909,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
If DdlConcepto.SelectedValue.Contiene("6", "22", "23", "7", "16", "21", "24") Then
|
||||
If DdlConcepto.SelectedValue.Contiene("6", "22", "23", "7", "16", "21", "24", "32") Then
|
||||
'genero las prepolizas manuales
|
||||
Dim tCveConcepto As Integer = 95
|
||||
Dim CveCuenta As Integer
|
||||
@@ -3936,9 +3917,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
IdCtaContable = 1
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total"), Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total"), CveSubProyecto:=-1, CveCuenta:=CveCuenta, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero}").ToEntero
|
||||
|
||||
@@ -4511,9 +4511,9 @@ Portlets
|
||||
.portlet > .portlet-title > .caption {
|
||||
float: left;
|
||||
display: inline-block;
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
padding: 10px 0;
|
||||
font-size: 14px;
|
||||
line-height: 14px;
|
||||
padding: 5px 0;
|
||||
}
|
||||
.portlet > .portlet-title > .caption.bold {
|
||||
font-weight: 400;
|
||||
|
||||
@@ -1857,6 +1857,8 @@ div.md-checkbox {
|
||||
|
||||
.portlet.light.xspadding > .portlet-title > .caption {
|
||||
padding: 2px 0;
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.portlet.light.xspadding > .portlet-title > .actions {
|
||||
|
||||
@@ -455,7 +455,8 @@
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabDetalleParteVariable" runat="server" HeaderText="Detalle parte variable">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVDetalleParteVariable" HeaderStyle-CssClass="ADtr" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVBuscaddor"></asp:GridView>
|
||||
<asp:GridView ID="GVDetalleParteVariable" HeaderStyle-CssClass="ADtr" runat="server" GridLines="None" OnRowDataBound="GVDetalleParteVariable_RowDataBound"
|
||||
CssClass="table table-hover table-striped ScrollAD Widthall GVBuscaddor"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
|
||||
@@ -920,6 +920,18 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
RegistraScript("$('#ModalDoctos').modal();");
|
||||
}
|
||||
|
||||
|
||||
protected void GVDetalleParteVariable_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if(e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
for (int i = 0; i < e.Row.Cells.Count; i++)
|
||||
{
|
||||
e.Row.Cells[i].Text = Server.HtmlDecode(e.Row.Cells[i].Text);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
public class archivosD
|
||||
{
|
||||
|
||||
@@ -7486,25 +7486,20 @@ Partial Class RH_Personal
|
||||
|
||||
End If
|
||||
End If
|
||||
If continuar Then
|
||||
|
||||
Using onom As ClsNominas = New ClsNominas()
|
||||
onom.ValidaFechaFinPersonal(CvePersonal, UsuarioActual.CveEmpresa, fecha.ToString("yyyy/MM/dd"))
|
||||
|
||||
If onom.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
continuar = False
|
||||
Dim strbuild As StringBuilder = New StringBuilder()
|
||||
strbuild.Append("No es posible desactivar con esta fecha ya que existen asistencias posteriores a la fecha fin con nominas autorizadas, es necesario desautorizar la siguientes nominas para reintentar el proceso.")
|
||||
|
||||
For Each drow As DataRow In onom.DtResultados.Rows
|
||||
strbuild.AppendFormat("<br/> {0}", drow("PeriodoTexto"))
|
||||
Next
|
||||
Alert(strbuild.ToString(), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Using
|
||||
End If
|
||||
'If continuar Then
|
||||
' Using onom As ClsNominas = New ClsNominas()
|
||||
' onom.ValidaFechaFinPersonal(CvePersonal, UsuarioActual.CveEmpresa, fecha.ToString("yyyy/MM/dd"))
|
||||
' If onom.DtResultados.Rows.Count > 0 Then
|
||||
' continuar = False
|
||||
' Dim strbuild As StringBuilder = New StringBuilder()
|
||||
' strbuild.Append("No es posible desactivar con esta fecha ya que existen asistencias posteriores a la fecha fin con nominas autorizadas, es necesario desautorizar la siguientes nominas para reintentar el proceso.")
|
||||
' For Each drow As DataRow In onom.DtResultados.Rows
|
||||
' strbuild.AppendFormat("<br/> {0}", drow("PeriodoTexto"))
|
||||
' Next
|
||||
' Alert(strbuild.ToString(), TipoMensaje.MsgAdvertencia)
|
||||
' End If
|
||||
' End Using
|
||||
'End If
|
||||
If continuar Then
|
||||
Using objrh As New ClsRH
|
||||
continuar = objrh.estatusPersonalUp(fecha, CvePersonal, estatus, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, DdlMotivoBaja.SelectedValue.ToEntero(), Txobservacionesbaja.Text)
|
||||
|
||||
@@ -591,11 +591,11 @@ table.rompe td select{
|
||||
|
||||
}
|
||||
.portlet > .portlet-title > .caption {
|
||||
float: left;
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
line-height: 14px;
|
||||
padding: 5px 0;
|
||||
float: left;
|
||||
display: inline-block;
|
||||
font-size: 14px !important;
|
||||
line-height: 14px;
|
||||
padding: 5px 0;
|
||||
}
|
||||
ul.list-inline {
|
||||
margin:0px;
|
||||
|
||||
@@ -122,7 +122,14 @@ Partial Class ProductosyServicios
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property GeneraServicioAF As Integer
|
||||
Get
|
||||
Return IfNull(ViewState("GeneraServicioAF"), "-1", ViewState("GeneraServicioAF")).ToString().ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("GeneraServicioAF") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Private ReadOnly Property PermiteClasificacion2 As Boolean
|
||||
@@ -308,6 +315,22 @@ Partial Class ProductosyServicios
|
||||
LtlScripts.Text = $"<script>function setPoscicion(){{{posiciontipo}}}</script>"
|
||||
If Not CvePS > 0 Then MuestraPanel(True)
|
||||
|
||||
|
||||
If Request("GeneraServicioAF") IsNot Nothing AndAlso IsNumeric(Request("GeneraServicioAF")) AndAlso Request("GeneraServicioAF").ToEntero() = 1 Then
|
||||
GeneraServicioAF = 1
|
||||
TxtPS.Text = "Servicio de facturación de activos fijos"
|
||||
|
||||
DdlTipoPS.SelectedValueExist("1")
|
||||
DdlTipoPS.Enabled = False
|
||||
|
||||
ChkAplicaParaVenta.Checked = True
|
||||
|
||||
Dim DrSAT = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:="84111506", AplicaParaVenta:=1).FiltroPrimero("") ', SATClavePS:=CveSATNC
|
||||
|
||||
DdlSATPS.SelectedValue = DrSAT("CveSATPS").ToString()
|
||||
DdlSATPS.SelectedText = DrSAT("SATClaveProductoServicio").ToString()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1403,6 +1426,7 @@ Partial Class ProductosyServicios
|
||||
|
||||
Dim ObjProductosServicios As New ClsProductosServicios()
|
||||
Dim ObjInv As New ClsInventarios(ObjProductosServicios.IniciaTransacSQL())
|
||||
Dim ObjEmpresas As New ClsSisEmpresas(ObjProductosServicios.IniciaTransacSQL())
|
||||
|
||||
Dim TieneError = False
|
||||
Dim AccionJS = ""
|
||||
@@ -1435,6 +1459,7 @@ Partial Class ProductosyServicios
|
||||
TxtFechaVigenciaRSCO.Text = "01/01/1900"
|
||||
End If
|
||||
|
||||
|
||||
If CvePS = -1 Then
|
||||
Dim PSS As String = TxtPS.Text.Trim.Replace("|", "")
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper
|
||||
@@ -1478,6 +1503,24 @@ Partial Class ProductosyServicios
|
||||
TieneError = GuardarProductoEnFranquicia(ObjProductosServicios, PSS, CveMetodoInv, EsPaquete, True)
|
||||
End If
|
||||
|
||||
If GeneraServicioAF = 1 Then
|
||||
|
||||
Dim RowFuncionalidad380 As DataRow = Nothing
|
||||
|
||||
If ObjEmpresas.GetEmpresasFuncionalidades(UsuarioActual.CveEmpresa) Then
|
||||
RowFuncionalidad380 = ObjEmpresas.DtResultados.FiltroPrimero("CveFuncionalidad = 380")
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
'SI NO TIENE LA FUNCIONALIDAD 380 GUARDAR LA FUNCIONALIDAD
|
||||
If Not TieneError AndAlso RowFuncionalidad380 Is Nothing Then
|
||||
If Not ObjEmpresas.AddUpdateEmpresaFuncionalidades(UsuarioActual.CveEmpresa, 380, $"{Me.CvePS}") Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
Alert("Ocurrió un Error al agregar el Producto o Servicio. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
@@ -1595,7 +1638,7 @@ Partial Class ProductosyServicios
|
||||
|
||||
If Not TieneError Then
|
||||
ObjProductosServicios.Commit()
|
||||
Alert("El Producto/Servicio se guardo correctamente.", TipoMensaje.MsgInformacion, AccionJS)
|
||||
Alert("El Producto/Servicio se guardo correctamente." + If(GeneraServicioAF = 1, " Recargue la pagina de ventas para poder utilizar el servicio", ""), TipoMensaje.MsgInformacion, AccionJS)
|
||||
Else
|
||||
ObjProductosServicios.RollBack()
|
||||
End If
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvRefacturaciones" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron solicitudes de cancelación"
|
||||
DataKeyNames="CveVenta,CveCliente,SerieFolio,Folio,TipoDocto,Nombre,FolioFiscal,Total,SubTotal,CveEstatusFactura,RFCReceptor,CveEstatusRefacturacion,CveVentaSustitucion,TotalSustitucion,RFCReceptorSustitucion,CveClienteSustitucion,FolioFiscalSustitucion,SerieFolioSustitucion"
|
||||
DataKeyNames="CveVenta,CveCliente,SerieFolio,Folio,TipoDocto,Nombre,FolioFiscal,Total,SubTotal,CveEstatusFactura,RFCReceptor,CveEstatusRefacturacion,CveVentaSustitucion,TotalSustitucion,RFCReceptorSustitucion,CveClienteSustitucion,FolioFiscalSustitucion,SerieFolioSustitucion,CveEstatusFacturaSustitucion"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%" OnRowDataBound="GvRefacturaciones_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Cliente" DataField="Nombre" ItemStyle-Width="25%" />
|
||||
|
||||
@@ -187,12 +187,13 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
|
||||
int CveMotivoCancelacion = -1;
|
||||
int CveEstatusRefacturacion = GvRow.DataKey("CveEstatusRefacturacion").ToEntero();
|
||||
int CveEstatusFacturaSustitucion = GvRow.DataKey("CveEstatusFacturaSustitucion").ToEntero();
|
||||
|
||||
//SI NO SE PUDO CANCELAR, CANCELAR CON EL 02
|
||||
if (CveEstatusRefacturacion == 4)
|
||||
//SI NO SE PUDO CANCELAR O LA FACTURA NUEVA FUE CANCELADA, CANCELAR CON EL 02
|
||||
if (CveEstatusRefacturacion == 4 || CveEstatusFacturaSustitucion == 5)
|
||||
{
|
||||
FolioSustitucion = "";
|
||||
//CUANDO LAS REFACTURACIONES NO SE PUEDEN CANCELAR, DEBE SER CANCELADO CON EL MOTIVO 02
|
||||
FolioSustitucion = "";
|
||||
CveMotivoCancelacion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 2).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1065,7 +1065,7 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</th>
|
||||
<th style="width:120px;">
|
||||
<th style="width: 120px;">
|
||||
<div class="row" id="DivPrecioLista" runat="server" visible="false">
|
||||
<div class="col-md-12">
|
||||
<asp:DropDownList ID="DdlPrecioLista" runat="server" Width="100%" CssClass="select2me" DataValueField="CvePrecioLista" DataTextField="PrecioLista" OnSelectedIndexChanged="DdlPrecioLista_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
|
||||
@@ -3114,26 +3114,129 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabVentaAF" runat="server" HeaderText="Venta de Activos Fijos" Enabled="False">
|
||||
<ajax:TabPanel ID="TabVentaAF" runat="server" HeaderText="Activos Fijos">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||
<asp:UpdatePanel ID="UpActivosFijos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="TextTab">
|
||||
<tr valign="top">
|
||||
<td>
|
||||
<div>
|
||||
<fieldset>
|
||||
<legend><b>Venta de Activos Fijos</b></legend>
|
||||
<table border="0">
|
||||
<tr align="left">
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<div class="row" id="DivAgregarAF" runat="server" visible="false">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light xspadding bordered whitoutcol" style="width: 100%">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Venta de Activos Fijos</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="portlet-body ">
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT portletfiltrostitlee">
|
||||
<div class="tools">
|
||||
<asp:UpdatePanel runat="server" style="display: inline-block;">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnFiltrarAF" runat="server" Text="Filtrar" class="btn btn-primary" OnClick="BtnFiltrarAF_Click" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">Tipo Activo Fijo:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoActivoFiltro" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="TipoActivoFijo" DataValueField="CveTipoActivoFijo" OnSelectedIndexChanged="DdlTipoActivo_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">SubTipo Activo Fijo:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubTipoActivoFiltro" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="SubTipoActivoFijo" DataValueField="CveSubTipoActivoFijo"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">Sub Proyecto:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyectoFiltroAF" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col-md-1">
|
||||
Concepto:
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlPSAF" runat="server" DataTextField="PSCodigo" DataValueField="CvePS" Width="100%" CssClass="select2me"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVPSAF" runat="server" InitialValue="-1" ControlToValidate="DdlPSAF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpValidarAF"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPSAF" runat="server" HighlightCssClass="vco" TargetControlID="RFVPSAF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-3 text-center">
|
||||
<asp:HyperLink ID="LnkGenerarPSAF" runat="server" Visible="false" Target="_blank" Text="Crear servicio de facturación de activos fijos" CssClass="btn btn-sm btn-circle btn-primary" NavigateUrl="/Ventas/ProductosServicios.aspx?GeneraServicioAF=1"></asp:HyperLink>
|
||||
</div>
|
||||
<div class="col-md-4"></div>
|
||||
<div class="col-md-1 text-center">
|
||||
<asp:Button ID="BtnGuardarAF" runat="server" CssClass="btn btn-success" Text="Aceptar" OnClick="BtnGuardarAF_Click" ValidationGroup="GrpValidarAF" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="rowpadding">
|
||||
<asp:GridView ID="GvVentaAF" runat="server" GridLines="None" DataKeyNames="CveActivoFijo,Descripcion,DepreciacionAcumulada,MOI,Observaciones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" data-heighterror="600" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="5%" ItemStyle-CssClass="NoClick">
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkSelectAllAF" CssClass="ChkAllClickAF" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkAF" CssClass="ChkAllEvtAF" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:HyperLinkField DataTextField="NoSerie" DataNavigateUrlFormatString="/AF/AF.aspx?CveActivoFijo={0}" DataNavigateUrlFields="CveActivoFijo" Target="_blank" ItemStyle-Width="20%" HeaderText="No. Serie" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:HyperLinkField DataTextField="Descripcion" DataNavigateUrlFormatString="/AF/AF.aspx?CveActivoFijo={0}" DataNavigateUrlFields="CveActivoFijo" Target="_blank" ItemStyle-Width="25%" HeaderText="Activo fijo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="MOI" ItemStyle-Width="15%" HeaderText="Valor de compra" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="DepreciacionAcumulada" ItemStyle-Width="15%" HeaderText="Depreciación" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="20%" HeaderText="Importe de venta">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecioAF" runat="server" CausesValidation="true" lang="nb" Text="0.00" MaxLength="12" Width="100%" Height="24px" CssClass="form-control input-sm"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBEPrecioAF" runat="server" TargetControlID="TxtPrecioAF" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="DivVentasAF" runat="server" visible="false">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light xspadding bordered whitoutcol" style="width: 100%">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Venta de Activos Fijos</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 ">
|
||||
<div class="rowpadding">
|
||||
<asp:GridView ID="GvAF" runat="server" GridLines="None" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" data-heighterror="600" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:HyperLinkField DataTextField="NoSerie" DataNavigateUrlFormatString="/AF/AF.aspx?CveActivoFijo={0}" DataNavigateUrlFields="CveActivoFijo" ItemStyle-Width="20%" Target="_blank" HeaderText="No. Serie" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:HyperLinkField DataTextField="Descripcion" DataNavigateUrlFormatString="/AF/AF.aspx?CveActivoFijo={0}" DataNavigateUrlFields="CveActivoFijo" ItemStyle-Width="25%" Target="_blank" HeaderText="Activo fijo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Total" ItemStyle-Width="15%" HeaderText="Valor de venta" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
@@ -9515,6 +9618,8 @@
|
||||
step: 30
|
||||
});
|
||||
|
||||
$('body').on('click', '.ChkAllClickAF input', function () { $(".ChkAllEvtAF input").not(this).prop('checked', $('.ChkAllClickAF input').is(':checked')); });
|
||||
|
||||
if(HdnCargarInventario.value == 'True'){
|
||||
$("#TabAlmacen_tab .ajax__tab_inner").click(function () {
|
||||
CargaMovimientosInventario();
|
||||
|
||||
@@ -2736,6 +2736,9 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
||||
TmpDT.Columns.Add("CvePrecioLista", GetType(Integer))
|
||||
TmpDT.Columns.Add("PrecioLista", GetType(String))
|
||||
TmpDT.Columns.Add("CveActivoFijo", GetType(Integer))
|
||||
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
|
||||
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
|
||||
|
||||
GvPS.DataSource = ObjVentas.DtResultados
|
||||
GvPS.DataBind()
|
||||
@@ -2763,6 +2766,9 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
||||
TmpDT.Columns.Add("CvePrecioLista", GetType(Integer))
|
||||
TmpDT.Columns.Add("PrecioLista", GetType(String))
|
||||
TmpDT.Columns.Add("CveActivoFijo", GetType(Integer))
|
||||
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
|
||||
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
|
||||
|
||||
GvPS.DataSource = ObjVentas.DtResultados
|
||||
GvPS.DataBind()
|
||||
@@ -3291,7 +3297,12 @@ Partial Class Ventas
|
||||
DivAddUMPyME.Visible = False
|
||||
End If
|
||||
|
||||
TabVentaAF.Visible = False
|
||||
TabVentaAF.Visible = (UsuarioActual.CveRol = 1)
|
||||
DivAgregarAF.Visible = (CveVenta <= 0 AndAlso UsuarioActual.CveRol = 1)
|
||||
|
||||
If DivAgregarAF.Visible Then
|
||||
CargaDatosAF()
|
||||
End If
|
||||
|
||||
'CARGA VALORES INICIALES PARA AGREGAR PS DESDE MODAL
|
||||
CargaMetodosPSModal()
|
||||
@@ -4635,8 +4646,12 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer))
|
||||
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
||||
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
||||
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
|
||||
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
|
||||
End If
|
||||
|
||||
CargaAFVenta()
|
||||
|
||||
'CargaFirmas
|
||||
If ObjVentas.GetVentasFirmas(CveVenta) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
@@ -7658,12 +7673,20 @@ Partial Class Ventas
|
||||
dtt = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyectoDatos.DataSource = dtt.FiltraParametros("EsSucursal = True ")
|
||||
DdlSubProyectoDatos.DataBind()
|
||||
|
||||
DdlSubProyectoCobranza.DataSource = dtt.FiltraParametros("EsSucursal = True ")
|
||||
DdlSubProyectoCobranza.DataBind()
|
||||
|
||||
DdlSubProyectoEjecucion.DataSource = dtt.FiltraParametros("EsSucursal = True ")
|
||||
DdlSubProyectoEjecucion.DataBind()
|
||||
|
||||
DdlSubProyectoPyME.DataSource = dtt
|
||||
DdlSubProyectoPyME.DataBind()
|
||||
|
||||
DdlSubProyectoFiltroAF.DataSource = dtt
|
||||
DdlSubProyectoFiltroAF.DataBind()
|
||||
DdlSubProyectoFiltroAF.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
dtt.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaClasificaciones()
|
||||
@@ -13336,7 +13359,7 @@ Partial Class Ventas
|
||||
Row("PU").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString().ToDouble, Math.Round((Row("Total").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6),
|
||||
Row("Obs").ToString(), Row("Descuento").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(), TiempoEntrega:=Row("TiempoEntrega").ToString(), CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(),
|
||||
CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=Row("CvePromocionDetalle").ToString().ToEntero(), IEPS:=Row("ImporteIEPS").ToString().ToDouble, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString().ToEntero(), ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble,
|
||||
PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero()) Then
|
||||
PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero()) Then
|
||||
ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la Factura.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
Exit For
|
||||
Else
|
||||
@@ -13913,6 +13936,25 @@ Partial Class Ventas
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
|
||||
End If
|
||||
IdCtaContableCliente = IdCtaContable
|
||||
|
||||
Dim DtAF As DataTable = TmpDT.FiltraParametros("CveActivoFijo > 0")
|
||||
|
||||
If DtAF.Rows.Count > 0 Then
|
||||
For Each RowAF As DataRow In DtAF.FiltraParametros("", "", {"CveActivoFijo", "Obs"}).Rows
|
||||
Dim ImporteDepreciado As Decimal = DtAF.SUMD("AFDepreciacion", $"CveActivoFijo = {RowAF("CveActivoFijo")}").RoundSQL(2)
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, ImporteDepreciado, Referencia, 271, $"Depreciación {RowAF("Obs")}", FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=(ImporteDepreciado).RoundSQL, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
'MARCAR EL ACTIVO FIJO COMO VENDEDIDO
|
||||
If Not ErrorPrepoliza AndAlso RowAF("CveActivoFijo").ToString().ToEntero() > 0 Then
|
||||
If Not ObjVentas.UpdateEstatusAFVendido(RowAF("CveActivoFijo").ToString().ToEntero(), UsuarioActual.CveEmpresa, 5) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
'Case 7 'descuentos
|
||||
@@ -14774,12 +14816,12 @@ Partial Class Ventas
|
||||
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
||||
End If
|
||||
|
||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA", "CveActivoFijo"})
|
||||
|
||||
If DT.Rows.Count > 0 Then
|
||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||
For Each Row2 As DataRow In DT.Rows
|
||||
importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1} AND PorcentajeIVA = {2}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"))).ToString().ToDecimal()) * ValorMultiplicador
|
||||
importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1} AND PorcentajeIVA = {2} AND ISNULL(CveActivoFijo,-1) = {3}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"), If(Row2("CveActivoFijo").ToString().ToEntero() > 0, Row2("CveActivoFijo").ToString().ToEntero(), -1))).ToString().ToDecimal()) * ValorMultiplicador
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}"
|
||||
@@ -14795,6 +14837,26 @@ Partial Class Ventas
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
|
||||
If Row2("CveActivoFijo").ToString().ToEntero() > 0 Then
|
||||
Dim DtAF As DataTable = TmpDT.FiltraParametros($"CveActivoFijo = {Row2("CveActivoFijo")}")
|
||||
|
||||
If DtAF.Rows.Count > 0 Then
|
||||
For Each RowAF As DataRow In DtAF.FiltraParametros("", "", {"CveActivoFijo", "Obs"}).Rows
|
||||
Dim ImporteCosto As Decimal = DtAF.SUMD("AFValorInicial", $"CveActivoFijo = {RowAF("CveActivoFijo")}").RoundSQL(2)
|
||||
Dim ImporteDepreciacion As Decimal = DtAF.SUMD("AFDepreciacion", $"CveActivoFijo = {RowAF("CveActivoFijo")}").RoundSQL(2)
|
||||
Dim ImporteC4 As Decimal = importeMovimiento
|
||||
Dim ImporteC4MX As Decimal = importeMX
|
||||
|
||||
importeMovimiento = ImporteC4 - ImporteCosto + ImporteDepreciacion
|
||||
importeMX = ImporteC4MX - ImporteCosto + ImporteDepreciacion
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, ImporteCosto, Referencia, 49, $"COSTO {RowAF("Obs")}", FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=(ImporteCosto).RoundSQL, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveActivoFijo:=Row2("CveActivoFijo").ToString().ToEntero(), Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
If IdCtaContable <= 0 Then
|
||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
|
||||
idCuentaContabilizacion = 0
|
||||
@@ -19031,7 +19093,8 @@ Partial Class Ventas
|
||||
Optional EntregaDirecta As Integer = 0, Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
|
||||
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "",
|
||||
Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False,
|
||||
Optional ImporteProntoPago As Decimal = 0, Optional ByRef ObjDescuento As Modelos.VentaDescuentos = Nothing, Optional CvePrecioLista As Integer = -1, Optional PrecioLista As String = "") As Boolean
|
||||
Optional ImporteProntoPago As Decimal = 0, Optional ByRef ObjDescuento As Modelos.VentaDescuentos = Nothing, Optional CvePrecioLista As Integer = -1, Optional PrecioLista As String = "",
|
||||
Optional CveActivoFijo As Integer = -1, Optional AFDepreciacion As Decimal = 0D, Optional AFValorInicial As Decimal = 0D) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
Try
|
||||
@@ -19127,6 +19190,10 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If CveUM <= 0 Then
|
||||
CveUM = DrPS("CveUnidadMedida").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
Row("Cantidad") = Cantidad
|
||||
Row("CveUM") = CveUM
|
||||
Row("UM") = DrPS("UnidadMedida")
|
||||
@@ -19290,6 +19357,11 @@ Partial Class Ventas
|
||||
Row("CvePrecioLista") = CvePrecioLista
|
||||
Row("PrecioLista") = PrecioLista
|
||||
|
||||
Row("CveActivoFijo") = CveActivoFijo
|
||||
Row("AFDepreciacion") = AFDepreciacion
|
||||
Row("AFValorInicial") = AFValorInicial
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 13, 83) Then
|
||||
If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA
|
||||
|
||||
@@ -19527,6 +19599,10 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("CvePrecioLista", GetType(Integer))
|
||||
TmpDT.Columns.Add("PrecioLista", GetType(String))
|
||||
|
||||
TmpDT.Columns.Add("CveActivoFijo", GetType(Integer))
|
||||
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
|
||||
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
|
||||
|
||||
TmpDT.Columns("EsOutSourcing").DefaultValue = False
|
||||
TmpDT.Columns("EsCargo").DefaultValue = False
|
||||
|
||||
@@ -22253,7 +22329,7 @@ Partial Class Ventas
|
||||
Row("PU").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("ImporteIVA").ToString().ToDouble, Math.Round((Row("Total").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)))), 6),
|
||||
Row("Obs").ToString(), Row("Descuento").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(), PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, IEPS:=Row("ImporteIEPS").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, TiempoEntrega:=Row("TiempoEntrega").ToString(),
|
||||
CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=If(DtPromociones IsNot Nothing, DtPromociones.FiltroPrimeroValor("CvePromocionDetalle", $"CvePS={Row("CvePS").ToString()}").ToEntero(), -1),
|
||||
ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero()) Then
|
||||
ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero()) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
Else
|
||||
@@ -29985,6 +30061,9 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer))
|
||||
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
||||
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
||||
'TmpDT.Columns.Add("CveActivoFijo", GetType(Integer))
|
||||
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
|
||||
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
|
||||
End If
|
||||
Dim FechaFactura As DateTime = Now
|
||||
|
||||
@@ -35148,6 +35227,8 @@ Partial Class Ventas
|
||||
TmpDT = ObjVentas.DtResultados
|
||||
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
|
||||
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
|
||||
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
|
||||
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
|
||||
End If
|
||||
|
||||
If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
@@ -35308,6 +35389,10 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
||||
TmpDT.Columns.Add("CvePrecioLista", GetType(Integer))
|
||||
TmpDT.Columns.Add("PrecioLista", GetType(String))
|
||||
TmpDT.Columns.Add("CveActivoFijo", GetType(Integer))
|
||||
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
|
||||
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
|
||||
|
||||
Return TmpDT
|
||||
End Function
|
||||
Private Function InicializaDTVentasNCProntoPago() As DataTable
|
||||
@@ -36772,5 +36857,160 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " A C T I V O S - F I J O S"
|
||||
|
||||
Protected Sub CargaDatosAF()
|
||||
CargarTipoActivoFijo()
|
||||
CargaDdlAF()
|
||||
|
||||
DdlTipoActivo_SelectedIndexChanged(DdlTipoActivoFiltro, EventArgs.Empty)
|
||||
End Sub
|
||||
|
||||
Protected Sub CargarTipoActivoFijo()
|
||||
DdlTipoActivoFiltro.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("", "TipoActivoFijo")
|
||||
DdlTipoActivoFiltro.DataBind()
|
||||
DdlTipoActivoFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlTipoActivo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlSubTipoActivoFiltro.Items.Clear()
|
||||
DdlSubTipoActivoFiltro.DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveTipoActivoFijo = {0}", DdlTipoActivoFiltro.SelectedValue), "SubTipoActivoFijo")
|
||||
DdlSubTipoActivoFiltro.DataBind()
|
||||
DdlSubTipoActivoFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
Protected Sub BtnFiltrarAF_Click(sender As Object, e As EventArgs)
|
||||
Using ObjAF As New ClsAF
|
||||
If ObjAF.GetRepActivosFijosDepreciacion(UsuarioActual.CveEmpresa, Now, Depreciados:=1, CveTipoAF:=DdlTipoActivoFiltro.SelectedValue.ToEntero(), CveSubTipoAF:=DdlSubTipoActivoFiltro.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectoFiltroAF.SelectedValue.ToEntero()) Then
|
||||
GvVentaAF.DataSource = ObjAF.DtResultados.FiltraParametros("CveActivoFijo > 0 AND CveEstadoActivoFijo <> 5")
|
||||
End If
|
||||
End Using
|
||||
|
||||
GvVentaAF.DataBind()
|
||||
UpActivosFijos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaAFVenta()
|
||||
If CveVenta > 0 AndAlso TmpDT IsNot Nothing AndAlso TmpDT.COUNT("CveActivoFijo", "CveActivoFijo > 0") > 0 Then
|
||||
DivVentasAF.Visible = True
|
||||
Using ObjAF As New ClsAF
|
||||
If ObjAF.GetActivosFijosVenta(Me.CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
GvAF.DataSource = ObjAF.DtResultados
|
||||
End If
|
||||
End Using
|
||||
GvAF.DataBind()
|
||||
UpActivosFijos.Update()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDdlAF()
|
||||
Dim strAF = UsuarioActual.Empresa.Funcionalidad(380)
|
||||
Dim CvePSAF As Integer = -1
|
||||
|
||||
If String.IsNullOrEmpty(strAF) Then
|
||||
Dim RowFuncionalidad380 As DataRow = Nothing
|
||||
|
||||
Using ObjEmpresas As New ClsSisEmpresas
|
||||
If ObjEmpresas.GetEmpresasFuncionalidades(UsuarioActual.CveEmpresa) Then
|
||||
RowFuncionalidad380 = ObjEmpresas.DtResultados.FiltroPrimero("CveFuncionalidad = 380")
|
||||
End If
|
||||
End Using
|
||||
|
||||
If RowFuncionalidad380 IsNot Nothing Then
|
||||
CvePSAF = RowFuncionalidad380("Valor").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
Else
|
||||
CvePSAF = strAF.ToEntero()
|
||||
End If
|
||||
|
||||
If CvePSAF > 0 Then
|
||||
Dim dtt = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSAF, AplicaParaVenta:=1) ', SATClavePS:=CveSATNC
|
||||
|
||||
If dtt IsNot Nothing Then
|
||||
DdlPSAF.DataSource = dtt
|
||||
DdlPSAF.DataBind()
|
||||
End If
|
||||
Else
|
||||
LnkGenerarPSAF.Visible = True
|
||||
DdlPSAF.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnGuardarAF_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim Cantidad As Decimal = 1
|
||||
Dim CvePS = DdlPSAF.SelectedValue.ToEntero()
|
||||
Dim CveUnidadMedida As Integer = -1
|
||||
Dim UnidadMedida As String = ""
|
||||
Dim CveClasificacion As Integer = -1
|
||||
Dim Clasificacion As String = ""
|
||||
Dim Obs As String = ""
|
||||
|
||||
Dim PrecioVenta As Decimal = 0.0D
|
||||
|
||||
Dim CveProyecto As Integer = -1
|
||||
Dim Proyecto As String = ""
|
||||
|
||||
Dim CveSubProyecto As Integer = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||
Dim SubProyecto As String = DdlSubProyectoDatos.SelectedItem.Text
|
||||
|
||||
If CveSubProyecto > 0 Then
|
||||
Dim RowSP = GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
|
||||
If RowSP IsNot Nothing Then
|
||||
CveProyecto = RowSP("CveProyecto").ToString().ToEntero()
|
||||
Proyecto = RowSP("Proyecto").ToString()
|
||||
End If
|
||||
End If
|
||||
|
||||
TmpDT.Rows.Clear()
|
||||
|
||||
Dim CveAF As Integer = -1
|
||||
Dim AFDepreciacion As Decimal = 0
|
||||
Dim AFValorInicial As Decimal = 0
|
||||
|
||||
For Each GvRow As GridViewRow In GvVentaAF.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
'LIMPIA VARIABLES
|
||||
Obs = ""
|
||||
CveAF = -1
|
||||
AFDepreciacion = 0
|
||||
AFValorInicial = 0
|
||||
|
||||
PrecioVenta = 0D
|
||||
|
||||
If GvRow.FCCheckBox("chkAF").Checked Then
|
||||
Obs = GvRow.DataKey("Observaciones")
|
||||
CveAF = GvRow.DataKey("CveActivoFijo").ToEntero()
|
||||
AFDepreciacion = GvRow.DataKey("DepreciacionAcumulada").ToDecimal()
|
||||
AFValorInicial = GvRow.DataKey("MOI").ToDecimal()
|
||||
|
||||
PrecioVenta = GvRow.FCTextBox("TxtPrecioAF").Text.ToDecimal()
|
||||
|
||||
If PrecioVenta < 1D Then
|
||||
Alert($"El activo fijo '{GvRow.DataKey("Descripcion")}' debe tener un importe para venta.", TipoMensaje.MsgAdvertencia)
|
||||
TmpDT.Rows.Clear()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
AgregarProductoServicio(Cantidad, CveUnidadMedida, UnidadMedida, CveClasificacion, Clasificacion, CvePS, "", Obs, PrecioVenta, 0,
|
||||
CveProyecto, Proyecto, CveSubProyecto, SubProyecto, CveActivoFijo:=CveAF, AFDepreciacion:=AFDepreciacion, AFValorInicial:=AFValorInicial)
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
DdlMoneda.SelectedValue = "1"
|
||||
DdlMoneda.Enabled = False
|
||||
|
||||
CalculaTotalesVenta()
|
||||
|
||||
Tab.ActiveTabIndex = 0
|
||||
Updatetabs.Update()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user