diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index 393e72e95..2a6016ebd 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -1472,7 +1472,7 @@ Public Class ClsInventarios
Return Retorno
End Function
- Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer, IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0) As Boolean
+ Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer, IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0, Optional Orden As Integer = -1, Optional CveMarca As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_KardexAlmacenHorizontalGet")
@@ -1490,6 +1490,8 @@ Public Class ClsInventarios
.Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedor
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
.Add("@ExistenciasCondicion", SqlDbType.Int).Value = CondicionExistencias
+ .Add("@Orden", SqlDbType.Int).Value = Orden
+ .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
End With
Try
@@ -4878,27 +4880,6 @@ Public Class ClsInventarios
End Try
Return Retorno
End Function
-
- Public Function GetExistenciasMedRin(CvePS As Integer, CveEmpresa As Integer, CveRinTamaño As Integer, CveMedida As Integer) As Boolean
- Dim Retorno As Boolean = False
- DataAdapter("PA_Inv_ExistenciaMedRinGet")
-
- With SqlAdapter.SelectCommand.Parameters
- .Add("@CvePS", SqlDbType.Int).Value = CvePS
- .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
- .Add("@CveRinTamaño", SqlDbType.Int).Value = CveRinTamaño
- .Add("@CveMedida", SqlDbType.Int).Value = CveMedida
- End With
- Try
- SqlAdapter.Fill(Data)
- Retorno = True
- Catch ex As Exception
- OnError("Ocurrió un error al obtener las Existencias.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
- End Try
-
- Return Retorno
- End Function
-
Public Function UpdateCamiones(CveCamion As Integer, Placa As String, Especificacion As String) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_CamionesUpdate")
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 24f10f87e..368d96e14 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -4595,6 +4595,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Ventas/CatPreciosLista.aspx".ToUpper(), 378)
PaginaDict.Add("/Ventas/RepProductosServicios.aspx".ToUpper(), 352)
PaginaDict.Add("/Ventas/RepProductosServiciosDetalle.aspx".ToUpper(), 352)
+ PaginaDict.Add("/Ventas/RepPS.aspx".ToUpper(), 701)
PaginaDict.Add("/Ventas/RepABT.aspx".ToUpper(), 353)
PaginaDict.Add("/Ventas/CatPromociones.aspx".ToUpper(), 123)
PaginaDict.Add("/Ventas/Promociones.aspx".ToUpper(), 124)
@@ -4665,6 +4666,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Ventas/CatCobranzaEstatusTurno.aspx".ToUpper(), 7004)
PaginaDict.Add("/Ventas/RepVentasMensuales.aspx".ToUpper(), 720)
PaginaDict.Add("/Ventas/RepVentasMensualesDetalle.aspx".ToUpper(), 721)
+ PaginaDict.Add("/Ventas/MetasVendedores.aspx".ToUpper(), 722)
#End Region
@@ -5926,7 +5928,8 @@ Public Class ClsPaginas
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)
+ If Vta.SubProyecto.Pais.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", Vta.SubProyecto.Pais)
+ If Not String.IsNullOrEmpty(Vta.SubProyecto.Telefono) AndAlso UsuarioActual.CveEmpresa = 141 Then SBDomicilioSucursal.AppendFormat(", Tel: {0}", Vta.SubProyecto.Telefono)
DomicilioSucursal = SBDomicilioSucursal.ToString
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index 11ddf58d4..4519bd0b3 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -1536,6 +1536,34 @@ Public Class ClsVentas
Return Retorno
End Function
+ Public Function GetRepPSEcono(CveSubProyecto As Integer, CvePS As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional GPO As Integer = -1,
+ Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Vta_RepPSEconoGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
+ .Add("@CvePS", SqlDbType.Int).Value = CvePS
+ .Add("@FechaI", SqlDbType.Date).Value = FechaI
+ .Add("@FechaF", SqlDbType.Date).Value = FechaF
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
+ .Add("@GPO", SqlDbType.Int).Value = GPO
+ .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
+ .Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio
+ .Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener el Reporte de Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
Public Function GetRepNCxAplicar(CveClienteSucursal As Integer, CveSubProyecto As Integer, CveCliente As Integer, FechaInicio As DateTime, FechaFin As DateTime, ConSaldo As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
@@ -4259,6 +4287,24 @@ Public Class ClsVentas
End Try
Return retorno
End Function
+ Public Function AddMetasVendedores(CveVendedor As Integer, MesAño As Date, CveMarca As Integer, MetaCantidad As Integer, MetaImporte As Decimal) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_Vta_MetasVendedoresAdd", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
+ .Add("@MesAño", SqlDbType.DateTime).Value = MesAño
+ .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
+ .Add("@MetaCantidad", SqlDbType.Int).Value = MetaCantidad
+ .Add("@MetaImporte", SqlDbType.Decimal).Value = MetaImporte
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener el reporte de ventas mensuales", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return retorno
+ End Function
#Region "Conciliación emitidas SAT"
Public Function ConciliacionemitidasSATGet(cveEmpresa As Int32) As Boolean
diff --git a/App_Code/EntityModel.vb b/App_Code/EntityModel.vb
index 1476e9da8..193688795 100644
--- a/App_Code/EntityModel.vb
+++ b/App_Code/EntityModel.vb
@@ -49,7 +49,11 @@ Namespace Modelos
Case "Single"
prop.SetValue(Me, CSng(row(prop.Name)))
Case "String"
- prop.SetValue(Me, CStr(row(prop.Name)))
+ If String.IsNullOrEmpty(row(prop.Name)) Then
+ prop.SetValue(Me, "")
+ Else
+ prop.SetValue(Me, CStr(row(prop.Name)))
+ End If
Case "UInt32"
prop.SetValue(Me, CUInt(row(prop.Name)))
Case "UInt64"
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index 08036f1b9..c23e6aa8a 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -8729,6 +8729,7 @@ Namespace Modelos
FormatoFactura = ""
SubProyecto = ""
Correo = ""
+ Telefono = ""
UTCOffsetVerano = -7
UTCOffsetInvierno = -7
End Sub
@@ -8738,20 +8739,8 @@ Namespace Modelos
Public Sub New(Row As System.Data.DataRow)
SetDefaultValues()
If Row IsNot Nothing Then
- Calle = Row("Calle").ToString
- NoExt = Row("NoExt").ToString
- NoInt = Row("NoInt").ToString
- Colonia = Row("Colonia").ToString
- Localidad = Row("Localidad").ToString
- Municipio = Row("Municipio").ToString
- Estado = Row("Estado").ToString
- Pais = Row("Pais").ToString
- CP = Row("CP").ToString
- SubProyecto = Row("SubProyecto").ToString
- UTCOffsetVerano = Row("UTCOffsetVerano").ToString.ToEntero()
- UTCOffsetInvierno = Row("UTCOffsetInvierno").ToString.ToEntero()
+ Me.setValues(Row)
End If
-
End Sub
Public ReadOnly Property LugarExp As String
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 134e806e2..055ef4dc0 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -6235,7 +6235,7 @@ Partial Class Compras_Compras
End If
Case 6 'Compra
- Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
+ Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 141) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
If RBLPago.SelectedValue.ToEntero = 4 Then
diff --git a/Compras/Proveedores.aspx b/Compras/Proveedores.aspx
index ae72b0047..234b68236 100644
--- a/Compras/Proveedores.aspx
+++ b/Compras/Proveedores.aspx
@@ -2286,7 +2286,12 @@
-
+
+
+
+
+
@@ -2300,7 +2305,7 @@
-
+
@@ -2308,7 +2313,7 @@
-
+
@@ -2322,7 +2327,7 @@
-
@@ -2331,15 +2336,22 @@
-
+
-
+
+
+
+
+
+
+
@@ -3997,6 +4009,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb
index b32464910..b419978cb 100644
--- a/Compras/Proveedores.aspx.vb
+++ b/Compras/Proveedores.aspx.vb
@@ -323,6 +323,159 @@ Partial Class Compras_Proveedores
End Property
#End Region
+
+#Region " D O C U M E N T A C I O N"
+
+
+
+ Property CveDocumentacionElectronica As Integer
+ Get
+ If ViewState("CvePersonalClienteDocumentacion") Is Nothing Then
+ Return -1
+ Else
+ Return DirectCast(ViewState("CvePersonalClienteDocumentacion"), Integer)
+ End If
+ End Get
+ Set(value As Integer)
+ ViewState("CvePersonalClienteDocumentacion") = value
+ End Set
+ End Property
+
+ Property CveDocumentacion As Integer
+ Get
+ If ViewState("CveDocumentacion") Is Nothing Then
+ Return -1
+ Else
+ Return DirectCast(ViewState("CveDocumentacion"), Integer)
+ End If
+ End Get
+ Set(value As Integer)
+ ViewState("CveDocumentacion") = value
+ End Set
+ End Property
+
+ Property Documentacion As String
+ Get
+ If ViewState("Documentacion") Is Nothing Then
+ Return "-1"
+ Else
+ Return ViewState("Documentacion").ToString
+ End If
+ End Get
+ Set(value As String)
+ ViewState("Documentacion") = value
+ End Set
+ End Property
+
+ Property AdjuntoDocumentacion As String
+ Get
+ If ViewState("AdjuntoDocumentacion") Is Nothing Then
+ Return ""
+ Else
+ Return ViewState("AdjuntoDocumentacion").ToString
+ End If
+ End Get
+ Set(value As String)
+ ViewState("AdjuntoDocumentacion") = value
+ End Set
+ End Property
+
+
+
+ Property DiasVigencia As Integer
+ Get
+ If ViewState("DiasVigencia") Is Nothing Then
+ Return 0
+ Else
+ Return DirectCast(ViewState("DiasVigencia"), Integer)
+ End If
+ End Get
+ Set(value As Integer)
+ ViewState("DiasVigencia") = value
+ End Set
+ End Property
+
+ Property AplicaFechaVencimiento As Boolean
+ Get
+ If ViewState("AplicaFechaVencimiento") Is Nothing Then
+ Return True
+ Else
+ Return DirectCast(ViewState("AplicaFechaVencimiento"), Boolean)
+ End If
+ End Get
+ Set(value As Boolean)
+ ViewState("AplicaFechaVencimiento") = value
+ End Set
+ End Property
+
+ Private Property FechaVigencia As Date
+ Get
+ If ViewState("FechaVigencia") Is Nothing Then
+ Return Nothing
+ Else
+ Return ViewState("FechaVigencia").ToString.ToDate
+ End If
+ End Get
+ Set(value As Date)
+ ViewState("FechaVigencia") = value
+ End Set
+ End Property
+
+ Property Estatus As Integer
+ Get
+ If ViewState("Estatus") Is Nothing Then
+ Return 0
+ Else
+ Return DirectCast(ViewState("Estatus"), Integer)
+ End If
+ End Get
+ Set(value As Integer)
+ ViewState("Estatus") = value
+ End Set
+ End Property
+
+ Property ObservacionDocumentacion As String
+ Get
+ If ViewState("ObservacionDocumentacion") Is Nothing Then
+ Return ""
+ Else
+ Return ViewState("ObservacionDocumentacion").ToString
+ End If
+ End Get
+ Set(value As String)
+ ViewState("ObservacionDocumentacion") = value
+ End Set
+ End Property
+
+ Private Property FechaLimite As Date
+ Get
+ If ViewState("FechaLimite") Is Nothing Then
+ Return Date.Now.AddDays(15)
+ Else
+ Return ViewState("FechaLimite").ToString.ToDate
+ End If
+ End Get
+ Set(value As Date)
+ ViewState("FechaLimite") = value
+ End Set
+ End Property
+
+ Property DTDocumentacion As DataTable
+ Get
+ If ViewState("DTDocumentacion") Is Nothing Then
+ Return New DataTable
+ Else
+ Return DirectCast(ViewState("DTDocumentacion"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+
+ End Set
+
+ End Property
+
+#End Region
+
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CountCuentasxPagar = 0
@@ -2541,9 +2694,10 @@ Partial Class Compras_Proveedores
#End Region
#Region "D O C U M E N T A C I O N"
+
Private Sub CargaDocs()
Dim Edoc As New ClsEdocumentacion
- If Edoc.DocumentacionElectronicaGet(-1, -1, CveProveedor, UsuarioActual.CveEmpresa, -1) Then
+ If Edoc.DocumentacionElectronicaGet(-1, -1, CveProveedor, UsuarioActual.CveEmpresa, -1, -1, 4) Then
GvDocs.DataSource = Edoc.DtResultados
Edoc.DocumentacionGet(-1, -1, 1, UsuarioActual.CveEmpresa)
' GVEDoc.DataSource = Edoc.DtResultados
@@ -2561,38 +2715,253 @@ Partial Class Compras_Proveedores
GvDocs.HeaderRow.TableSection = TableRowSection.TableHeader
'RegistraScript("OrdenarGV();")
End If
+
+ UpDocumentos.Update()
+
End Sub
- Public Sub Update_ClickDocumentacion(sender As Object, e As EventArgs)
+ Public Sub UploadModal_ClickDocumentacion(sender As Object, e As EventArgs)
+
+ Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
+
+ ' Dim chkEstatus As CheckBox
+ CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString.ToEntero
+ CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString.ToEntero
+ Documentacion = GvRow.DataKey("Documentacion")
+ AdjuntoDocumentacion = GvRow.DataKey("Adjunto")
+
+
+ 'DiasVigencia = GvRow.DataKey("DiasVigencia").ToString.ToEntero
+ Dim x As String = GvRow.DataKey("AplicaFechaVencimiento")
+ If GvRow.DataKey("AplicaFechaVencimiento") = "1" Then AplicaFechaVencimiento = True Else AplicaFechaVencimiento = False
+
+ If GvRow.DataKey("Adjunto").ToString.Length > 0 Then
+ FechaVigencia = GvRow.DataKey("Adjunto").ToString.ToDate
+ Else
+ FechaVigencia = Nothing
+ End If
+
+
+ Estatus = GvRow.DataKey("Estatus").ToEntero
+
+ 'If chkEstatus.Checked Then
+ ' Estatus = 1
+ 'Else
+ ' Estatus = 0
+ 'End If
+
+ ObservacionDocumentacion = GvRow.FCTextBox("TxtObservaciones").Text.Trim.ToUpper
+ FechaLimite = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate
+
+ AdjuntoDocumentacion = GvRow.DataKey("Adjunto")
+
+ LtlModalUploadTitulo.Text = "Subir " & Documentacion
+
+ UpModalTitleUploadDocumento.Update()
+
+ RegistraScript("$('#ModalUploadDoc').modal({ backdrop: 'static', keyboard: false});")
+
+ End Sub
+
+ Protected Sub GvDocs_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocs.RowDataBound
+
+
+ If e.Row.RowType = DataControlRowType.DataRow Then
+
+ Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString
+
+ Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
+ Dim ImgUpload As LinkButton = e.Row.FCLinkButton("ImgUpload")
+ Dim ImgRequired As Literal = e.Row.FCLiteral("ImgRequired")
+ Dim txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite")
+ Dim ChkEstatus As CheckBox = e.Row.FCCheckBox("chkEstatus")
+ ' Dim txtFechaVigencia As TextBox = e.Row.FCTextBox("TxtFechaVigencia")
+ Dim CveDocumentacionElectronica As String = e.Row.DataKey("CveDocumentacionElectronica")
+
+ Dim requerido As Boolean = Boolean.Parse(e.Row.DBCampo("Requerido"))
+
+ 'Dim chkEstatus As CheckBox = e.Row.FCCheckBox("chkEstatus")
+ Dim separado As Char() = ".".ToCharArray
+ Dim array() As String = Adjunto.Split(separado)
+ Dim extencion As String = ""
+
+ Dim DiasLimite As Integer = e.Row.DataKey("DiasLimite").ToString.ToEntero
+ Dim AplicaDiasLimite As Boolean = If(e.Row.DataKey("AplicaDiasLimite").ToString = "1", True, False)
+ Dim AplicaFechaVencimiento As Boolean = If(e.Row.DataKey("AplicaFechaVencimiento").ToString = "1", True, False)
+
+ txtFechaLimite.Visible = If(AplicaDiasLimite, True, False)
+ ' txtFechaVigencia.Visible = If(AplicaFechaVencimiento, True, False)
+
+ If e.Row.DataKey("Estatus").ToEntero = 1 Then
+ ChkEstatus.Checked = True
+ Else
+ ChkEstatus.Checked = False
+ End If
+
+ 'If e.Row.DBCampo("FechaVigencia").ToString.Length > 0 Then
+ ' txtFechaVigencia.Text = e.Row.DBCampo("FechaVigencia").ToString.ToDate.ToString("dd/MM/yyyy")
+ ' If DateTime.Today > e.Row.DBCampo("FechaVigencia").ToString.ToDateTime Then
+ ' txtFechaVigencia.ForeColor = Drawing.Color.Red
+ ' End If
+ 'End If
+
+
+ If array.Length > 0 Then
+ extencion = array(array.Length - 1)
+ End If
+
+ If e.Row.DBCampo("Estatus").ToString.ToEntero.Contiene(3) Then
+ ' chkEstatus.Checked = True
+ ImgUpload.Visible = False
+ Else
+ 'chkEstatus.Checked = False
+ End If
+
+ txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString.ToDate.ToString("dd/MM/yyyy")
+
+ 'If e.Row.DBCampo("FechaVigencia").ToString.Length > 0 Then
+ ' txtFechaVigencia.Text = e.Row.DBCampo("FechaVigencia").ToString.ToDate.ToString("dd/MM/yyyy")
+ 'End If
+
+ 'Dim scripMascara = "$('#" & txtFechaLimite.ClientID & "').mask('00/00/0000');$('#" & txtFechaVigencia.ClientID & "').mask('00/00/0000');"
+ 'RegistraScript(scripMascara, "scriptMascara")
+
+ If Adjunto.Trim.Length > 0 Then
+
+ Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Edoc/Proveedor/" & CveProveedor & "/" & Adjunto
+ Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "Edoc/Proveedor/" & CveProveedor & "/" & Adjunto
+
+ If File.Exists(linkDescargaArchivo) Then
+ ImgDownLoad.Visible = True
+
+ If extencion.Length > 0 Then
+ ImgDownLoad.Text = String.Format(" ", linkDescarga, CveDocumentacionElectronica & "." & extencion)
+ Else
+ ImgDownLoad.Text = String.Format(" ", linkDescarga, CveDocumentacionElectronica)
+ End If
+ Else
+ ImgDownLoad.Visible = False
+ End If
+
+ Else
+ ImgDownLoad.Visible = False
+ End If
+
+ If requerido Then
+ ImgRequired.Text = " "
+ End If
+
+ 'chkEstatus.Checked = ImgDownLoad.Visible
+
+ End If
+ End Sub
+
+ Protected Sub BtnUploadFileDoc_Click(sender As Object, e As EventArgs) Handles btnUploadFileDoc.Click
+
+ Dim FileExtension As String = "-1"
+ Dim Filesgral As List(Of Archivo) = TxtFileDocumentacion.getfiles().Archivos
+ Dim Filename As String = ""
+ Dim ErrorProceso As Boolean = False
+
+ If AplicaFechaVencimiento And DiasVigencia > 0 Then
+ FechaVigencia = DateTime.Today.AddDays(DiasVigencia)
+ End If
+
+ For Each fileItem As Archivo In Filesgral
+
+ Try
+
+ FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
+ Dim tempArray() As String
+ tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
+
+
+
+
+ Dim objEdoc As New ClsEdocumentacion
+ objEdoc.IniciaTransacSQL()
+
+ If CveDocumentacionElectronica = -1 Then
+
+ CveDocumentacionElectronica = objEdoc.DocumentacionElectronicaAdd(CveDocumentacion, -1, -1, CveProveedor, 1, ObservacionDocumentacion, "-1", UsuarioActual.CveUsuario, FechaLimite, FechaVigencia)
+
+ If CveDocumentacionElectronica > 0 Then
+
+
+ If Not objEdoc.DocumentacionElectronicaUpdate(CveDocumentacionElectronica, CveDocumentacion, -1, -1, CveProveedor, 1, ObservacionDocumentacion, CveDocumentacionElectronica & "." & FileExtension, UsuarioActual.CveUsuario, FechaLimite, FechaVigencia) Then
+ ErrorProceso = True
+ End If
+ End If
+
+
+ Else
+ If Not objEdoc.DocumentacionElectronicaUpdate(CveDocumentacionElectronica, CveDocumentacion, -1, -1, CveProveedor, 1, ObservacionDocumentacion, CveDocumentacionElectronica & "." & FileExtension, UsuarioActual.CveUsuario, FechaLimite, FechaVigencia) Then
+ ErrorProceso = True
+ End If
+ End If
+
+
+
+ If Not ErrorProceso = True Then
+
+ Dim rutaDestino As String = UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\" & CveDocumentacionElectronica & "." & FileExtension
+ Dim rutaAdjuntoAnterior As String = UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\" & AdjuntoDocumentacion
+
+
+
+ Try
+ If Not System.IO.Directory.Exists(UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\") Then
+ System.IO.Directory.CreateDirectory(UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\")
+ End If
+
+ If File.Exists(rutaAdjuntoAnterior) And AdjuntoDocumentacion.Trim.Length > 0 Then
+ File.Delete(rutaAdjuntoAnterior)
+ End If
+
+ If System.IO.File.Exists(rutaDestino) Then
+ System.IO.File.Delete(rutaDestino)
+ End If
+
+ System.IO.File.Move(fileItem.FileUrl, rutaDestino)
+ Catch ex As Exception
+ GuardaLog($"Error al gaurdar documento (moviendo archivo digital) --> Error{ ex.StackTrace}")
+ ErrorProceso = True
+ End Try
+ End If
+
+
+ If Not ErrorProceso Then
+ objEdoc.Commit()
+ Alert("Documento cargado correctamente")
+ Else
+ objEdoc.RollBack()
+ Alert("Error al cargar archivo", TipoMensaje.MsgError)
+ End If
+ objEdoc.Dispose()
+
+ CargaDocs()
+
+
+ TxtFileDocumentacion.Text = ""
+ UPModalUploadDoc.Update()
+
+ Catch ex As Exception
+ OnError("Error al cargar archivo", ex)
+ End Try
+
+ Next
+
+ RegistraScript("$('#ModalUploadDoc').modal('hide')", "hidemodal3")
+
+
+
+
+ End Sub
+
+
+ Protected Sub LnkGVEliminar_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
- Dim activo As Boolean = False
-
- Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToEntero
- Dim _Adjunto As String = GvRow.DataKey("Adjunto").ToString
- Dim _fechaLimite As Date = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate
-
- Dim observaciones As String = GvRow.FCTextBox("TxtObservaciones").Text ' DirectCast(GvRow.FindControl("TxtObservaciones"), TextBox).Text
- 'Dim DDLEstatus As DropDownList = DirectCast(GvRow.FindControl("DDLEstatus"), DropDownList)
- Dim chkCompleto As CheckBox = DirectCast(GvRow.FindControl("chkEstatus"), CheckBox)
- Dim _Estatus As Integer
-
- If chkCompleto.Checked Then _Estatus = 1 Else _Estatus = 0
-
-
- Dim objRH As New ClsEdocumentacion
-
- If Not GvRow.DataKey("CveDocumentacionElectronica").ToEntero = -1 Then
- If objRH.DocumentacionElectronicaUpdate(GvRow.DataKey("CveDocumentacionElectronica").ToEntero, _CveDocumentacion, -1, -1, CveProveedor, _Estatus, observaciones, _Adjunto, UsuarioActual.CveUsuario, GvRow.FCTextBox("TxtFechaLimite").Text.ToDate) Then
- Alert("Documento actualizado correctamente.", TipoMensaje.MsgInformacion)
- End If
- Else
- If objRH.DocumentacionElectronicaAdd(_CveDocumentacion, -1, -1, CveProveedor, _Estatus, observaciones, _Adjunto, UsuarioActual.CveUsuario, GvRow.FCTextBox("TxtFechaLimite").Text.ToDate) > 0 Then
- Alert("Documento actualizado correctamente.", TipoMensaje.MsgInformacion)
- End If
- End If
-
- objRH.Dispose()
End Sub
@@ -5778,6 +6147,8 @@ Partial Class Compras_Proveedores
End If
End Sub
#End Region
+
+
End Class
diff --git a/Empresas/141/Formatos/Factura.rdlc b/Empresas/141/Formatos/Factura.rdlc
index ee1a0f96c..8061393f9 100644
--- a/Empresas/141/Formatos/Factura.rdlc
+++ b/Empresas/141/Formatos/Factura.rdlc
@@ -333,10 +333,10 @@
External=Parameters!QR.ValueFitProportional
- 0.1632in
+ 0.02778in0.02254in
- 1.2939in
- 1.53682in
+ 0.88765in
+ 0.97432in
@@ -345,6 +345,7 @@
true
+ truetrue
@@ -372,19 +373,6 @@
-
-
-
-
-
-
-
-
-
@@ -411,19 +399,6 @@
-
-
-
-
-
-
-
-
-
@@ -450,19 +425,6 @@
-
-
-
-
-
-
-
-
-
@@ -491,9 +453,9 @@
Textbox88
- 0.41453cm
+ 0.07057cm4.18558cm
- 3.5806cm
+ 2.25463cm16.69544cm1
-
-
-
-
-
-
-
- BENITO HERMOSILLO HERMOSILLO
-
-
-
-
-
-
-
-
- Tel:662-210-0041 662-210-3600
-
-
-
-
-
-
-
-
- Correo:veracruz@econollantas.com
-
-
-
-
-
-
-
-
- MAT Juan Martin Contreras Castellanos
-
@@ -1566,7 +1475,7 @@
@@ -1588,9 +1497,8 @@
Textbox4
- 0.31432cm12.68838cm
- 2.88925cm
+ 2.70968cm5.11312cm6
-
+
@@ -1769,7 +1679,9 @@
-
+
@@ -1790,7 +1702,9 @@
-
+
@@ -1803,7 +1717,9 @@
-
+
@@ -1819,7 +1735,7 @@
Textbox4
- 3.20357cm
+ 2.88607cm0.28014cm1.09007cm9.71199cm
@@ -1836,6 +1752,7 @@
true
+ truetrue
@@ -1923,7 +1840,7 @@
Textbox4
- 3.50094cm
+ 2.86594cm10.06268cm0.7927cm9.71199cm
@@ -2097,7 +2014,7 @@
Textbox4
- 4.29364cm
+ 3.97614cm0.25136cm0.74611cm13.82025cm
@@ -2130,7 +2047,7 @@
Textbox32
- 4.46621cm
+ 3.98996cm14.07729cm0.57354cm2.90753cm
@@ -2165,7 +2082,7 @@
Textbox35
- 5.09559cm
+ 4.77809cm0.26772cm0.52062cm9.72441cm
@@ -2227,7 +2144,7 @@
Textbox4
- 6.7641cm
+ 6.3831cm3.33321cm1.05328cm17.71415cm
@@ -2247,6 +2164,7 @@
true
+ truetrue
@@ -2265,6 +2183,7 @@
@@ -2283,6 +2202,7 @@
@@ -2301,6 +2221,7 @@
@@ -2319,6 +2240,7 @@
@@ -2337,6 +2259,7 @@
@@ -2355,11 +2278,12 @@
Textbox4
- 9.21745cm
+ 8.32845cm0.22108cm2.03224cm20.79751cm
@@ -2389,8 +2313,8 @@
Textbox5
- 12.95331cm
- 0.19009cm
+ 12.03609cm
+ 0.21585cm0.05496cm20.88652cm17
@@ -2409,7 +2333,7 @@
EmbeddedID5FitProportional
- 11.49964cm
+ 10.51539cm0.17151cm0.96488cm3.75909cm
@@ -2467,7 +2391,7 @@
Textbox4
- 12.51148cm
+ 11.55898cm0.19008cm0.40655cm12.88812cm
@@ -2486,7 +2410,7 @@
EmbeddedID4FitProportional
- 11.49964cm
+ 10.51539cm4.34941cm0.91769cm3.03541cm
@@ -2501,7 +2425,7 @@
EmbeddedID1FitProportional
- 11.49964cm
+ 10.51539cm7.56121cm0.97656cm4.16281cm
@@ -2516,9 +2440,9 @@
EmbeddedID6FitProportional
- 11.49964cm
+ 10.51539cm11.90634cm
- 1.01184cm
+ 0.97656cm3.76809cm22
- 20.50931cm
+ 17.16179cm