diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index 393e72e95..e574d4783 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 CveMarca As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_KardexAlmacenHorizontalGet")
@@ -1490,6 +1490,7 @@ Public Class ClsInventarios
.Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedor
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
.Add("@ExistenciasCondicion", SqlDbType.Int).Value = CondicionExistencias
+ .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
End With
Try
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 89892002b..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)
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index cfddc9043..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
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/General/CatDocumentacionTipo.aspx b/General/CatDocumentacionTipo.aspx
index dba6be481..e2bcf3270 100644
--- a/General/CatDocumentacionTipo.aspx
+++ b/General/CatDocumentacionTipo.aspx
@@ -101,7 +101,7 @@ Catalogo Documentacion Tipo
Seleccione unoRecursos HumanosClientes
- Proveedor
+ Proveedor <%-- Nota: EL tipo Tres es tipo Auditoria de documentos de proveedor usadon el portal prveedor y --%>
diff --git a/Inventarios/KardexAlmacenHorizontal.aspx b/Inventarios/KardexAlmacenHorizontal.aspx
index 397af66ab..fa4013eb6 100644
--- a/Inventarios/KardexAlmacenHorizontal.aspx
+++ b/Inventarios/KardexAlmacenHorizontal.aspx
@@ -1,213 +1,241 @@
-<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="KardexAlmacenHorizontal.aspx.vb" Inherits="Inventarios_KardexAlmacen" %>
-
-
-
-
-
-
-
-
-
- Kardex Almacén Horizontal
-
-
-
-
-
-
-
+
+
+
+
diff --git a/Inventarios/KardexAlmacenHorizontal.aspx.vb b/Inventarios/KardexAlmacenHorizontal.aspx.vb
index b8c30dfb3..978bba1e9 100644
--- a/Inventarios/KardexAlmacenHorizontal.aspx.vb
+++ b/Inventarios/KardexAlmacenHorizontal.aspx.vb
@@ -28,7 +28,14 @@ Partial Class Inventarios_KardexAlmacen
ddlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1)
ddlAlmacen.DataBind()
-
+ Using ObjPS As New ClsProductosServicios
+ If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then
+ DdlMarca.DataSource = ObjPS.DtResultados.Copy()
+ End If
+ End Using
+ DdlMarca.DataBind()
+ DdlMarca.Items.Insert(0, New ListItem("Todos", "-1"))
+
Dim ObjInv As New ClsInventarios()
If ObjInv.GetTiposAlmacenes() Then
DdlTipoAlmacen.DataSource = ObjInv.DtResultados
@@ -112,12 +119,6 @@ Partial Class Inventarios_KardexAlmacen
Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
Dim CveProducto As Integer = ddlProducto2.SelectedValue.ToEntero
CargarKardex(CveProducto)
- 'If CveProducto > 0 Then
-
- 'Else
- ' Alert("Seleccione un producto.", TipoMensaje.MsgAdvertencia)
- 'End If
-
End Sub
Private Sub CargarKardex(CvePS As Integer)
Dim dt As DataTable = Nothing
@@ -128,7 +129,8 @@ Partial Class Inventarios_KardexAlmacen
Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero
Dim CveProveedorCompra As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1)
- If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, CveAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), DdlIncluyeTransitorios.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue) Then
+ If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, CveAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), DdlIncluyeTransitorios.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero,
+ UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue, CveMarca:=DdlMarca.SelectedValue.ToEntero()) Then
If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then
dt = ObjMovimientos.DtResultados
Dim ListaBorrar As New List(Of DataColumn)
@@ -231,7 +233,6 @@ Partial Class Inventarios_KardexAlmacen
End Sub
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
-
Imprimir("Excel")
End Sub
Private Sub Imprimir(Optional reporte As String = "PDF")
diff --git a/Ventas/RepPS.aspx b/Ventas/RepPS.aspx
new file mode 100644
index 000000000..85d50862d
--- /dev/null
+++ b/Ventas/RepPS.aspx
@@ -0,0 +1,164 @@
+<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepPS.aspx.vb" Inherits="Ventas_RepPS" %>
+
+
+
+
+
+
+
+ Reporte de Ventas por Producto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fecha Inicio:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fecha Fin:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Ventas/RepPS.aspx.vb b/Ventas/RepPS.aspx.vb
new file mode 100644
index 000000000..e62b9120d
--- /dev/null
+++ b/Ventas/RepPS.aspx.vb
@@ -0,0 +1,102 @@
+Option Explicit On
+Option Strict On
+
+Imports Extensiones
+Imports System.Data
+Partial Class Ventas_RepPS
+ Inherits ClsPaginas
+
+ Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
+ If Not IsPostBack Then
+ CargaDatosIniciales()
+ CargaCombos()
+ CargaDatos()
+ End If
+ End Sub
+ Private Sub CargaDatosIniciales()
+ txtFechaI.Text = $"01/{Now.Month}/{Now.Year}"
+ txtFechaF.Text = Now.ToString("dd/MM/yyyy")
+ End Sub
+ Private Sub CargaCombos()
+ CargaTipoCentroCosto()
+ End Sub
+
+ Private Sub CargaTipoCentroCosto()
+
+ If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
+ DdlSubProyecto.Items.Clear()
+ LblSubProyecto.InnerText = "Sucursal:"
+ DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
+ DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
+ DdlSubProyecto.DataBind()
+
+ ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
+ DdlSubProyecto.Items.Clear()
+
+ LblSubProyecto.InnerText = "Proyecto:"
+ DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
+ DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
+ DdlSubProyecto.DataBind()
+
+ ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 3 Then
+ DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "1"))
+ DdlGrupo.Items.Insert(1, New ListItem("SubProyecto", "2"))
+ DdlGrupo.Items.Insert(17, New ListItem("SubProyecto Ejec.", "19"))
+ DdlGrupo.DataBind()
+ ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then
+ LblSubProyecto.InnerText = "Proyecto:"
+ DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "1"))
+ DdlGrupo.Items.Insert(1, New ListItem("SubProyecto", "2"))
+ DdlGrupo.Items.Insert(17, New ListItem("SubProyecto Ejec.", "19"))
+ DdlGrupo.DataBind()
+ ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
+ LblSubProyecto.InnerText = "Sucursal:"
+ End If
+ End Sub
+
+ Private Sub CargaDatos()
+
+ Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero()
+ Dim Grupo As Integer = DdlGrupo.SelectedValue.ToEntero()
+ Dim CvePS As Integer = -1
+ Dim CveMoneda As Integer = -1
+ Dim TC As Integer = 1
+ Dim TCEspecifico As Decimal = -1
+ Dim FechaI, FechaF As DateTime
+ FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha)
+ FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
+
+ Dim ObjVentas As New ClsVentas()
+ If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico) Then
+ GvDatos.DataSource = ObjVentas.DtResultados
+ Else
+ GvDatos.DataSource = Nothing
+ End If
+
+ ObjVentas.Dispose()
+ GvDatos.DataBind()
+
+ UPDatos.Update()
+ End Sub
+
+
+ Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
+ If e.Row.RowType = DataControlRowType.DataRow Then
+ Select Case e.Row.DBCampo("Orden").ToString.ToEntero()
+ Case 4
+ e.Row.CssClass = "Totales"
+ Case 3
+ e.Row.CssClass = "SubTotales2"
+ Case 2
+ e.Row.CssClass = "SubTotales"
+ Case 1
+ e.Row.CssClass = "SubTotalesB"
+ Case 0
+ e.Row.CssClass = "Texto"
+ End Select
+ End If
+ End Sub
+ Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
+ CargaDatos()
+ End Sub
+End Class
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 3c79eea5e..e9235b586 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -9320,7 +9320,7 @@ Partial Class Ventas
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion) Then
ErrorList.Add("Ocurrió un error al Generar la Venta. Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
Else
- If factura.TipoDocto.Contiene("Dev") Or DtVentasNC IsNot Nothing Then
+ If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Then
If DtVentasNC IsNot Nothing Then
For Each row As DataRow In DtVentasNC.Rows
If Not ObjVentas.AddVentasRelacionadas(ObjVentas.CveVenta, row("CveVenta").ToString.ToEntero) Then
@@ -23905,6 +23905,20 @@ Partial Class Ventas
#End Region
#Region " EMITIR DOCUMENTO NUEVO "
+
+ Private Function ValidaFacturarCotizacion() As Boolean
+ Dim Retorno As Boolean = True
+
+ If UsuarioActual.CveEmpresa = 141 Then
+ If Not PermiteCredito AndAlso (DtPagos Is Nothing OrElse DtPagos.Rows.Count = 0) Then
+ Alert("Es necesario especificar un pago.", TipoMensaje.MsgAdvertencia)
+ Retorno = False
+ Return Retorno
+ End If
+ End If
+
+ Return Retorno
+ End Function
Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String)
If GvPagos.Rows.Count = 0 And UsuarioActual.Empresa.Funcionalidad(558).ToEntero = 1 And RBLPago.SelectedValue.ToEntero = 2 Then
Alert("No se puede facturar hasta que se haya especificado detalladamente la forma de pago", TipoMensaje.MsgAdvertencia)
@@ -23913,11 +23927,17 @@ Partial Class Ventas
'CARGA LO PENDIENTE POR FACTURAR DE COTIZACION
If EraCotizacion = 1 Then
+
+ If Not ValidaFacturarCotizacion() Then
+ Exit Sub
+ End If
+
If Not PreparaFacturarCotizacion() Then
EraCotizacion = 0
DdlTipoComprobante.SelectedValue = "Cot"
Exit Sub
End If
+
End If
'CARGA LO PENDIENTE POR FACTURAR DE REMISION