This commit is contained in:
2024-11-05 11:34:45 -07:00
33 changed files with 834 additions and 216 deletions

View File

@@ -265,6 +265,7 @@
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" Enabled="True" TargetControlID="TxtFolioGarantia" FilterType="Numbers" FilterMode="ValidChars"></ajax:FilteredTextBoxExtender> <ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" Enabled="True" TargetControlID="TxtFolioGarantia" FilterType="Numbers" FilterMode="ValidChars"></ajax:FilteredTextBoxExtender>
<label for="<%= TxtFolioGarantia.ClientID.ToString()%>">Folio:</label> <label for="<%= TxtFolioGarantia.ClientID.ToString()%>">Folio:</label>
<i></i> <i></i>
<asp:HiddenField ID="HdnCveMovimientoSalida" runat="server" />
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">

View File

@@ -100,7 +100,7 @@ Partial Class Acumuladores_CatFoliosGarantia
Protected Sub BtnAgregarFolioGarantiaModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarFolioGarantiaModal.Click Protected Sub BtnAgregarFolioGarantiaModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarFolioGarantiaModal.Click
Dim ObjAcum As New ClsAcumuladores
'Dim Cargo, Bonificacion, Compra, Puntos As Decimal 'Dim Cargo, Bonificacion, Compra, Puntos As Decimal
@@ -111,6 +111,7 @@ Partial Class Acumuladores_CatFoliosGarantia
If Not Actualizar Then If Not Actualizar Then
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, DdlEstatusEditar.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, DdlTipoFolioModal.SelectedValue, TxtLimite.Text.ToEntero, DdlArea.SelectedValue.ToEntero) Then If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, DdlEstatusEditar.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, DdlTipoFolioModal.SelectedValue, TxtLimite.Text.ToEntero, DdlArea.SelectedValue.ToEntero) Then
TxtFolioGarantia.Text = "" TxtFolioGarantia.Text = ""
@@ -129,7 +130,15 @@ Partial Class Acumuladores_CatFoliosGarantia
Else Else
Alert("Ocurrió un error al guardar el Folio de Garantía", TipoMensaje.MsgError) Alert("Ocurrió un error al guardar el Folio de Garantía", TipoMensaje.MsgError)
End If End If
ObjAcum.Dispose()
Else Else
'si se marca como enviado, debe de revisar que tenga el movto de traslado
If HdnCveMovimientoSalida.Value = "" AndAlso DdlEstatusEditar.SelectedValue = "2" Then
Alert("No se ha realizado la salida del almacen de garantía, al de 'devolución al proveedor'.</br> Favor de aplicar la salida y luego cambiar el estatus a enviado. ", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.FoliosGarantiaUpdate(CveFolioGarantia, TxtFolioGarantia.Text, DdlEstatusEditar.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlSubProyectos.SelectedValue.ToEntero, If ObjAcum.FoliosGarantiaUpdate(CveFolioGarantia, TxtFolioGarantia.Text, DdlEstatusEditar.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlSubProyectos.SelectedValue.ToEntero,
DdlTipoFolioModal.SelectedValue, TxtLimite.Text.ToEntero, DdlArea.SelectedValue.ToEntero) Then DdlTipoFolioModal.SelectedValue, TxtLimite.Text.ToEntero, DdlArea.SelectedValue.ToEntero) Then
@@ -150,12 +159,13 @@ Partial Class Acumuladores_CatFoliosGarantia
Else Else
Alert("Ocurrió un error al Actualizar el Folio de Garantía", TipoMensaje.MsgError) Alert("Ocurrió un error al Actualizar el Folio de Garantía", TipoMensaje.MsgError)
End If End If
ObjAcum.Dispose()
End If End If
CveFolioGarantia = -1 CveFolioGarantia = -1
Actualizar = False Actualizar = False
ObjAcum.Dispose()
End Sub End Sub
@@ -188,6 +198,7 @@ Partial Class Acumuladores_CatFoliosGarantia
TxtLimite.Text = GvRow.DataKey("Limite") TxtLimite.Text = GvRow.DataKey("Limite")
DdlTipoFolioModal.SelectedValue = GvRow.DataKey("tipoFolio") DdlTipoFolioModal.SelectedValue = GvRow.DataKey("tipoFolio")
DdlArea.SelectedValue = GvRow.DataKey("Area") DdlArea.SelectedValue = GvRow.DataKey("Area")
HdnCveMovimientoSalida.Value = GvRow.DataKey("CveMovimiento")
'TxtCargo.Text = GvRow.DataKey("Cargo").ToDecimal.ToString("###,###,###.00") 'TxtCargo.Text = GvRow.DataKey("Cargo").ToDecimal.ToString("###,###,###.00")
'TxtBonificacion.Text = GvRow.DataKey("Bonificacion").ToDecimal.ToString("###,###,###.00") 'TxtBonificacion.Text = GvRow.DataKey("Bonificacion").ToDecimal.ToString("###,###,###.00")
'TxtCompra.Text = GvRow.DataKey("Compra").ToDecimal.ToString("###,###,###.00") 'TxtCompra.Text = GvRow.DataKey("Compra").ToDecimal.ToString("###,###,###.00")

View File

@@ -6320,6 +6320,27 @@ Public Class ClsInventarios
#End Region #End Region
Public Function GetValidaFechaAlmacen(CveEmpresa As Integer, CveAlmacen As Integer, CvePS As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_ValidaFechaAlmacenGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
.Add("@CvePS", SqlDbType.Int).Value = CvePS
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al consultar los productos por fechas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#Region " IDisposable Support " #Region " IDisposable Support "
' IDisposable ' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean) Protected Overridable Sub Dispose(ByVal disposing As Boolean)
@@ -6352,6 +6373,8 @@ Public Class ClsInventarios
#End Region #End Region
End Class End Class

View File

@@ -1745,6 +1745,39 @@ Public Class ClsOC
Return Retorno Return Retorno
End Function End Function
Public Function GetOrdenesCompraVinculacion(Tipo As String, CveProyecto As Integer, CveSubProyecto As Integer, CveEstatus As Integer, FechaInicio As Date,
FechaFin As Date, CveOrdenCompra As Integer, CveProveedor As Integer, Folio As Integer, CveUsuario As Integer,
CveEmpresa As Integer, Optional Serie As String = "-1") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OC_OrdenesCompraVinculacion")
With SqlAdapter.SelectCommand.Parameters
.Add("@Tipo", SqlDbType.VarChar).Value = Tipo
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@CveOrdenCompra", SqlDbType.Int).Value = CveOrdenCompra
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Folio", SqlDbType.Int).Value = Folio
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Serie", SqlDbType.VarChar).Value = Serie
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener Ordenes de Compras.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetOrdenesCompraCorreo(CveCompra As Integer, Optional CveMovimiento As Integer = -1) As Boolean Public Function GetOrdenesCompraCorreo(CveCompra As Integer, Optional CveMovimiento As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False

View File

@@ -2493,13 +2493,14 @@ Public Class ClsOIEventos
Optional RecurrenciaTipo As Integer = -1, Optional Frecuencia As Integer = -1, Optional DiasSemana As String = "-1", Optional Dia As Integer = -1, Optional Mes As Integer = -1, Optional RecurrenciaTipo As Integer = -1, Optional Frecuencia As Integer = -1, Optional DiasSemana As String = "-1", Optional Dia As Integer = -1, Optional Mes As Integer = -1,
Optional RecurrenciaFin As String = "-1", Optional CveTipoEvento As Integer = 2, Optional Importe As Double = -1, Optional RecurrenciaFin As String = "-1", Optional CveTipoEvento As Integer = 2, Optional Importe As Double = -1,
Optional CveEmpresaCRM As Integer = -1, Optional CveContactoCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional CveTipoProcesoCRM As Integer = -1, Optional CveEtapaProcesoCRM As Integer = -1, Optional CveEmpresaCRM As Integer = -1, Optional CveContactoCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional CveTipoProcesoCRM As Integer = -1, Optional CveEtapaProcesoCRM As Integer = -1,
Optional CveSubProyecto As Integer = -1, Optional CveUsuarioPara As Integer = -1, Optional CveCompra As Integer = -1, Optional CveVenta As Integer = -1, Optional CveMovimiento As Integer = -1) As Boolean Optional CveSubProyecto As Integer = -1, Optional CveUsuarioPara As Integer = -1, Optional CveCompra As Integer = -1, Optional CveVenta As Integer = -1, Optional CveMovimiento As Integer = -1,
Optional CveContrato As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
Retorno = AddEvento(CveTipoEvento, CveAgendaTipo, Asunto, Descripcion, Prioridad, CveUsuarioPara, CveUsuarioIng, FechaInicio, FechaFin, -1, -1, "-1", CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, Retorno = AddEvento(CveTipoEvento, CveAgendaTipo, Asunto, Descripcion, Prioridad, CveUsuarioPara, CveUsuarioIng, FechaInicio, FechaFin, -1, -1, "-1", CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC,
CvePersonal, CveProveedor, CveEventoPadre:=CveEventoPadre, RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dia, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, Importe:=Importe, CvePersonal, CveProveedor, CveEventoPadre:=CveEventoPadre, RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dia, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, Importe:=Importe,
CveEmpresaCRM:=CveEmpresaCRM, CveContactoCRM:=CveContactoCRM, CveAcercamientoCRM:=CveAcercamientoCRM, CveTipoProcesoCRM:=CveTipoProcesoCRM, CveEtapaProcesoCRM:=CveEtapaProcesoCRM, CveSubProyecto:=CveSubProyecto, CveCompra:=CveCompra, CveEmpresaCRM:=CveEmpresaCRM, CveContactoCRM:=CveContactoCRM, CveAcercamientoCRM:=CveAcercamientoCRM, CveTipoProcesoCRM:=CveTipoProcesoCRM, CveEtapaProcesoCRM:=CveEtapaProcesoCRM, CveSubProyecto:=CveSubProyecto, CveCompra:=CveCompra,
CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento) CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento, CveContrato:=CveContrato)
Return Retorno Return Retorno

View File

@@ -2248,15 +2248,25 @@ Public Class ClsPaginas
'Fin Bancos 'Fin Bancos
'Fin EstadoCIvil 'Fin EstadoCIvil
'TipoPerioso 'TipoPerioso
Property GlobalDTTipoPeriodo() As DataTable Property GlobalDTTipoPeriodo(Optional Estatus As Integer = 1) As DataTable
Get Get
Dim AppNombre As String = "GlobalDTTipoPeriodo" Dim AppNombre As String = "GlobalDTTipoPeriodo"
If HttpContext.Current.Application(AppNombre) Is Nothing Then If HttpContext.Current.Application(AppNombre) Is Nothing Then
Using ObjNom As New ClsNominas() Using ObjNom As New ClsNominas()
If ObjNom.GetTiposPeriodos() Then Application(AppNombre) = ObjNom.DtResultados If ObjNom.GetTiposPeriodos(-1) Then Application(AppNombre) = ObjNom.DtResultados
End Using End Using
End If End If
GlobalDTTipoPeriodo = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Dim filtros As New List(Of String)
If Estatus <> -1 Then filtros.Add($"CveEstatus = {Estatus}")
If filtros.Count > 0 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTTipoPeriodo = Dv.ToTable
Dv.Dispose()
Else
GlobalDTTipoPeriodo = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get End Get
Set(value As DataTable) Set(value As DataTable)
@@ -9272,7 +9282,7 @@ Public Class ClsPaginas
Select Case CveMoneda Select Case CveMoneda
Case 1 'pesos Case 1 'pesos
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 17, 308) Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 17, 308)
If TipoAplicacionPago.Contiene("NC", "DEV", "RNC") Then Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 22, 363) 'pago nota de crédito If TipoAplicacionPago.Contiene("NC", "DEV", "RNC") Then Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 272, 363) 'pago nota de crédito
Case 2 'dólares Case 2 'dólares
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 312, 309) Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 312, 309)
If TipoAplicacionPago.Contiene("NC", "DEV", "RNC") Then Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 304, 364) 'pago nota de crédito ME If TipoAplicacionPago.Contiene("NC", "DEV", "RNC") Then Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 304, 364) 'pago nota de crédito ME

View File

@@ -783,6 +783,24 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function UpdateVentaRemisionEspecial(CveVenta As Integer, Num2 As Integer, Fecha As Date, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasRemisionEspecialUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
.Add("@Num2", SqlDbType.Int).Value = Num2
.Add("@Fecha", SqlDbType.Date).Value = Fecha
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar la venta como remision especial.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function UpdateVentaAnticipoAutorizado(CveVenta As Integer, Autorizado As Boolean) As Boolean Public Function UpdateVentaAnticipoAutorizado(CveVenta As Integer, Autorizado As Boolean) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentaAnticipoAutorizadoUpdate") DataAdapter("PA_Vta_VentaAnticipoAutorizadoUpdate")

View File

@@ -4481,6 +4481,10 @@ Partial Class Compras_Compras
End If End If
End If End If
End If End If
If Not ValidaFechaDeAlamacen() Then
Exit Sub
End If
End If End If
If UsuarioActual.Empresa.Funcionalidad(538) = "1" Then If UsuarioActual.Empresa.Funcionalidad(538) = "1" Then
@@ -7803,6 +7807,54 @@ Partial Class Compras_Compras
End If End If
End Sub End Sub
Private Function ValidaFechaDeAlamacen() As Boolean
Dim respuesta As Boolean = False
Dim objInventario As New ClsInventarios
Dim MovimientosError As Boolean = False
'Dim SB As New StringBuilder
'Dim FechaCompra As DateTime = TxtFecha.Text.ToDate
'FechaCompra
Dim FechaMinima As DateTime = TxtFecha.Text.ToDate
If DtInv IsNot Nothing Then
For Each Dr As DataRow In TmpDT.Rows
Dim CveTipoPS As Integer = Dr("CveTipoPS").ToString.ToEntero
If CveTipoPS = 2 Then
If objInventario.GetValidaFechaAlmacen(CveEmpresa:=UsuarioActual.CveEmpresa, CveAlmacen:=ddlAlmacenAdd.SelectedValue.ToEntero, CvePS:=Dr("CvePS").ToString.ToEntero) Then
If objInventario.DtResultados IsNot Nothing AndAlso objInventario.DtResultados.Rows.Count > 0 Then
Dim FechamoMovimiento As DateTime = objInventario.DtResultados(0)("FechaMovto").ToString.ToDate
If FechamoMovimiento > FechaMinima Then
FechaMinima = FechamoMovimiento
End If
End If
End If
End If
Next
End If
objInventario.Dispose()
If FechaMinima > TxtFecha.Text.ToDate Then
Alert($"Los productos tienen movientos, la fecha minima que se puede aplicar es {FechaMinima.ToString("dd/MM/yyyy HH:mm")}", TipoMensaje.MsgAdvertencia)
respuesta = False
Else
respuesta = True
End If
Return respuesta
End Function
Private Function GeneraStrinDoctosRelacionados() As String Private Function GeneraStrinDoctosRelacionados() As String
Dim DoctosRelacionados As String = "-1" Dim DoctosRelacionados As String = "-1"
@@ -14424,7 +14476,9 @@ Partial Class Compras_Compras
If PopUpOC Then If PopUpOC Then
Dim ArrayCveOC As String() = CvesOC.Split(New Char() {","c}) Dim ArrayCveOC As String() = CvesOC.Split(New Char() {","c})
For i As Integer = 0 To ArrayCveOC.Count - 1 For i As Integer = 0 To ArrayCveOC.Count - 1
If OC.GetOrdenesCompraRep("OC", -1, -1, -1, -1, MinFecha, MaxFecha, ArrayCveOC(i).ToEntero, tCveProveedor, -1, -1, -1, UsuarioActual.CveEmpresa, -1) Then 'GetOrdenesCompraVinculacion
'If OC.GetOrdenesCompraRep("OC", -1, -1, -1, -1, MinFecha, MaxFecha, ArrayCveOC(i).ToEntero, tCveProveedor, -1, -1, -1, UsuarioActual.CveEmpresa, -1) Then
If OC.GetOrdenesCompraVinculacion("OC", -1, -1, -1, MinFecha, MaxFecha, ArrayCveOC(i).ToEntero, tCveProveedor, -1, -1, UsuarioActual.CveEmpresa) Then
If OC.DtResultados.FiltraParametros("TipoTermino = 3").Rows.Count = 1 Or DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then If OC.DtResultados.FiltraParametros("TipoTermino = 3").Rows.Count = 1 Or DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
HdnVCveOC.Value += String.Format("{0}{1}", If(HdnVCveOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveOrdenCompra").ToString) HdnVCveOC.Value += String.Format("{0}{1}", If(HdnVCveOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveOrdenCompra").ToString)
HdnCveEstatusOC.Value += String.Format("{0}{1}", If(HdnCveEstatusOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveEstatusSiguiente").ToString) HdnCveEstatusOC.Value += String.Format("{0}{1}", If(HdnCveEstatusOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveEstatusSiguiente").ToString)
@@ -14438,7 +14492,8 @@ Partial Class Compras_Compras
Dim TextoErrorOC As String = "" Dim TextoErrorOC As String = ""
Dim ArrayCveOC As String() = TxtOC.Text.Split(New Char() {","c}) Dim ArrayCveOC As String() = TxtOC.Text.Split(New Char() {","c})
For i As Integer = 0 To ArrayCveOC.Count - 1 For i As Integer = 0 To ArrayCveOC.Count - 1
If OC.GetOrdenesCompraRep("OC", -1, -1, -1, -1, MinFecha, MaxFecha, -1, CveProveedor, ArrayCveOC(i).ToEntero, -1, -1, UsuarioActual.CveEmpresa, -1) Then 'If OC.GetOrdenesCompraRep("OC", -1, -1, -1, -1, MinFecha, MaxFecha, -1, CveProveedor, ArrayCveOC(i).ToEntero, -1, -1, UsuarioActual.CveEmpresa, -1) Then
If OC.GetOrdenesCompraVinculacion("OC", -1, -1, -1, MinFecha, MaxFecha, -1, tCveProveedor, ArrayCveOC(i).ToEntero, -1, UsuarioActual.CveEmpresa) Then
If OC.DtResultados.Rows.Count > 1 Then If OC.DtResultados.Rows.Count > 1 Then
TextoErrorOC += $"<br/>El folio <b>{ArrayCveOC(i).ToEntero}</b> no se pudo identificar." TextoErrorOC += $"<br/>El folio <b>{ArrayCveOC(i).ToEntero}</b> no se pudo identificar."
End If End If

View File

@@ -107,6 +107,32 @@ Partial Class PopUpVerFactura
ImprimeFormatoCartaPorteTimbrado(Request("CVETIMBRE").ToString.ToEntero) ImprimeFormatoCartaPorteTimbrado(Request("CVETIMBRE").ToString.ToEntero)
End If End If
If Request("ArchivoContrato") IsNot Nothing AndAlso Request("ArchivoContrato") IsNot Nothing Then
Dim ArchivoContrato As String = Decripta(Request("ArchivoContrato"))
Dim File As New FileInfo(ArchivoContrato)
If File.Exists Then 'set appropriate headers
Response.Clear()
Response.ClearHeaders()
Response.ClearContent()
Response.AddHeader("Content-Disposition", "inline; filename=" & $"{File.Name}")
Response.AddHeader("Content-Length", File.Length.ToString())
'Response.ContentType = "text/plain"
Response.ContentType = "application/octet-stream"
Response.Flush()
' Response.TransmitFile(File.FullName)
Response.WriteFile(File.FullName)
Response.End()
Else
Alert("Ocurrio un error al descargar el archivo", TipoMensaje.MsgAdvertencia, "window.close()")
End If
End If
If Request("RFC") IsNot Nothing AndAlso Request("File") IsNot Nothing Then If Request("RFC") IsNot Nothing AndAlso Request("File") IsNot Nothing Then
Dim Path As String = String.Format("{0}Compras\{1}\{2}", UsuarioActual.Empresa.Ruta, Request("RFC"), Request("File")) Dim Path As String = String.Format("{0}Compras\{1}\{2}", UsuarioActual.Empresa.Ruta, Request("RFC"), Request("File"))
Dim Archivo As New System.IO.FileInfo(Path) Dim Archivo As New System.IO.FileInfo(Path)

View File

@@ -9036,16 +9036,23 @@ Namespace ADS.eFacturas
Try Try
Dim listaDS As New List(Of ReportDataSource) Dim listaDS As New List(Of ReportDataSource)
Dim rdsTotales As New ReportDataSource() Dim rdsTotales As New ReportDataSource()
Dim ltotales As New List(Of utilValores)() 'Dim ltotales As New List(Of utilValores)()
Dim DTTotales As New DataTable Dim DTTotales As New DataTable
DTTotales.TableName = "DTTotales" DTTotales.TableName = "DTTotales"
DTTotales.Columns.Add("Nombre") DTTotales.Columns.Add("Nombre")
DTTotales.Columns.Add("Valor") DTTotales.Columns.Add("Valor")
ltotales.Add(New utilValores("Subtotal", objxml.comprobante.SubTotal.ToString("N2"))) Dim nRowSubtotales As DataRow = DTTotales.NewRow
nRowSubtotales("Nombre") = "Subtotal"
nRowSubtotales("Valor") = objxml.comprobante.SubTotal.ToString("N2")
DTTotales.Rows.Add(nRowSubtotales)
If objxml.comprobante.Descuento > 0 Then If objxml.comprobante.Descuento > 0 Then
ltotales.Add(New utilValores("Descuento", objxml.comprobante.Descuento.ToString("N2"))) Dim nRowDescuento As DataRow = DTTotales.NewRow
nRowDescuento("Nombre") = "Descuento"
nRowDescuento("Valor") = objxml.comprobante.Descuento.ToString("N2")
DTTotales.Rows.Add(nRowDescuento)
End If End If
For Each item As CFDIImpuesto In objxml.Impuestos For Each item As CFDIImpuesto In objxml.Impuestos
@@ -9053,8 +9060,6 @@ Namespace ADS.eFacturas
If item.Importe > 0 Then If item.Importe > 0 Then
Dim TasaOCuota As Decimal = 0 Dim TasaOCuota As Decimal = 0
Decimal.TryParse(item.TasaOCuota, TasaOCuota) Decimal.TryParse(item.TasaOCuota, TasaOCuota)
ltotales.Add(New utilValores($"Impuestos {item.Tipo} {item.ImpuestoTexto} {(If(item.TipoFactor = "Tasa", (TasaOCuota * 100).ToString("N4"), item.TasaOCuota))} {(If(item.TipoFactor = "Tasa", "%", ""))}", item.Importe.ToString("N2")))
nRow("Nombre") = $"Impuestos {item.Tipo} {item.ImpuestoTexto} {(If(item.TipoFactor = "Tasa", (TasaOCuota * 100).ToString("N4"), item.TasaOCuota))} {(If(item.TipoFactor = "Tasa", "%", ""))}" nRow("Nombre") = $"Impuestos {item.Tipo} {item.ImpuestoTexto} {(If(item.TipoFactor = "Tasa", (TasaOCuota * 100).ToString("N4"), item.TasaOCuota))} {(If(item.TipoFactor = "Tasa", "%", ""))}"
nRow("Valor") = item.Importe.ToString("N2") nRow("Valor") = item.Importe.ToString("N2")
DTTotales.Rows.Add(nRow) DTTotales.Rows.Add(nRow)
@@ -9062,7 +9067,11 @@ Namespace ADS.eFacturas
End If End If
Next Next
ltotales.Add(New utilValores("Total", objxml.comprobante.Total.ToString("N2"))) Dim nRowTotal As DataRow = DTTotales.NewRow
nRowTotal("Nombre") = "Subtotal"
nRowTotal("Valor") = objxml.comprobante.Total.ToString("N2")
DTTotales.Rows.Add(nRowTotal)
rdsTotales.Name = "dsTotales" rdsTotales.Name = "dsTotales"
rdsTotales.Value = DTTotales 'ltotales.ToDataTable rdsTotales.Value = DTTotales 'ltotales.ToDataTable
listaDS.Add(rdsTotales) listaDS.Add(rdsTotales)

View File

@@ -3061,15 +3061,14 @@ Partial Class General_SaldosIniciales
If AgrupadoresSAT.Rows.Count > 0 Then If AgrupadoresSAT.Rows.Count > 0 Then
For Each Row As DataRow In dt.Rows For Each Row As DataRow In dt.Rows
Dim Cuenta As String = Row("Cuenta").ToString().Trim.Replace("-", "") Dim Cuenta As String = Row("Cuenta").ToString().Trim.Replace("-", "")
If Cuenta <> "" Then If Cuenta <> "" Then
NombreCuenta = Row("NombreCuenta").ToString().Trim NombreCuenta = Row("NombreCuenta").ToString().Trim
CuentaPadre = Row("CuentaPadre").ToString().Trim.Replace("-", "") CuentaPadre = Row("CuentaPadre").ToString().Trim.Replace("-", "")
CodigoVinculacion = Row("CodigoVinculacion").ToString().Trim CodigoVinculacion = If(dt.Columns.Contains("CodigoVinculacion"), Row("CodigoVinculacion").ToString().Trim, "")
Dim TipoCuenta As String = Row("TipoCuenta").ToString().Trim Dim TipoCuenta As String = Row("TipoCuenta").ToString().Trim.ToUpper
Dim AgrupadorSAT As String = Row("AgrupadorSAT").ToString().Trim Dim AgrupadorSAT As String = Row("AgrupadorSAT").ToString().Trim
Dim CveCuentaPadre As Integer = -1 Dim CveCuentaPadre As Integer = -1
Dim CveAgrupadorSAT As Integer = If(AgrupadorSAT = "0", -1, AgrupadoresSAT.FiltroPrimeroValor("CveAgrupadorSAT", String.Format("CodigoNombre LIKE '%{0}%'", AgrupadorSAT)).ToEntero()) Dim CveAgrupadorSAT As Integer = If(AgrupadorSAT = "0", -1, AgrupadoresSAT.FiltroPrimeroValor("CveAgrupadorSAT", String.Format("CodigoNombre LIKE '%{0}%'", AgrupadorSAT)).ToEntero())

View File

@@ -144,7 +144,7 @@
<td> <td>
<asp:LinkButton ID="BtnArchivoAdjunto" runat="server" Visible="false" Text="" Font-Size="14px" /> <asp:LinkButton ID="BtnArchivoAdjunto" runat="server" Visible="false" Text="" Font-Size="14px" />
<div class="row" id="divUsuarioRegistra" runat="server" visible="false"> <div class="row" id="divUsuarioRegistra" runat="server" visible="false">
<div class="col-md-2">Registró:</div> <div class="col-md-2" > <asp:Literal ID="LtlRegistro" runat="server" Text="Registró:"></asp:Literal></div>
<div class="col-md-6"> <div class="col-md-6">
<asp:Literal ID="LtlRegistra" runat="server"></asp:Literal></div> <asp:Literal ID="LtlRegistra" runat="server"></asp:Literal></div>
</div> </div>

View File

@@ -689,6 +689,15 @@ Partial Class Inventarios_EntregaAlmacen
HLFolio.NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={CveVenta}" HLFolio.NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={CveVenta}"
End If End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then '' pendiente de mejorar
LtlRegistro.Text = "Vendedor:"
Dim objV As New ClsVentas
If objV.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
LtlRegistra.Text = objV.DtResultados.FiltroPrimeroValor("VendedorNombre")
End If
objV.Dispose()
End If
'filtra los Almacenes de domicilio 'filtra los Almacenes de domicilio
If DtDatos.Rows(0)("ServicioDomicilio").ToString() = "True" Then If DtDatos.Rows(0)("ServicioDomicilio").ToString() = "True" Then
StrAlmacenes = "CveTipoAlmacen = 29" StrAlmacenes = "CveTipoAlmacen = 29"

View File

@@ -158,10 +158,15 @@ Partial Class Inventarios_KardexAlmacenHorizontal
If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, -1, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), IncluyeTransitorios, If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, -1, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), IncluyeTransitorios,
DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue.ToEntero,
Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes, GPO:=GPO, CodigoPS:=TxtPS.Text) Then Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes, GPO:=GPO, CodigoPS:=TxtPS.Text) Then
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201) '.limitar los importes
If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then
dt = ObjMovimientos.DtResultados dt = ObjMovimientos.DtResultados
Dim ListaBorrar As New List(Of DataColumn) Dim ListaBorrar As New List(Of DataColumn)
If Not TienePermisoImportes Then
dt.Columns.RemoveAt(dt.Columns.Count - 1) 'CP-quito columna de importe total
dt.Columns.RemoveAt(dt.Columns.Count - 1) 'Valor-quito columna de importe total
End If
For index As Integer = 3 To dt.Columns.Count - 1 For index As Integer = 3 To dt.Columns.Count - 1
Dim TotColumna As Double = 0 Dim TotColumna As Double = 0
For Each Dr As DataRow In dt.Rows For Each Dr As DataRow In dt.Rows
@@ -170,6 +175,7 @@ Partial Class Inventarios_KardexAlmacenHorizontal
If Not TotColumna > 0 Then If Not TotColumna > 0 Then
ListaBorrar.Add(dt.Columns(index)) ListaBorrar.Add(dt.Columns(index))
End If End If
Next Next
For Each item As DataColumn In ListaBorrar For Each item As DataColumn In ListaBorrar
dt.Columns().Remove(item) dt.Columns().Remove(item)
@@ -187,13 +193,12 @@ Partial Class Inventarios_KardexAlmacenHorizontal
Alert("Ocurrió un error al consultar el Kardex.", TipoMensaje.MsgError) Alert("Ocurrió un error al consultar el Kardex.", TipoMensaje.MsgError)
Exit Sub Exit Sub
End If End If
GvDatos.DataBind() GvDatos.DataBind()
For index = 4 To GvDatos.Rows(0).Cells.Count - 1 For index = 4 To GvDatos.Rows(0).Cells.Count - 1
GvDatos.HeaderRow.Cells(index).Text = GvDatos.HeaderRow.Cells(index).Text.Split("|"c)(0) GvDatos.HeaderRow.Cells(index).Text = GvDatos.HeaderRow.Cells(index).Text.Split("|"c)(0)
Next Next
End Sub End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound

View File

@@ -545,7 +545,7 @@
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" /> <asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:HyperLinkField HeaderText="Productos" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" Target="_blank" ItemStyle-HorizontalAlign="Left" /> <asp:HyperLinkField HeaderText="Productos" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" Target="_blank" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="P.U." DataField="PU" DataFormatString="{0:#,###.####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" /> <asp:BoundField HeaderText="P.U." DataField="PU" DataFormatString="{0:#,###.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
<asp:BoundField HeaderText="C.I." DataField="CostoIndirecto" DataFormatString="{0:###.####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" /> <asp:BoundField HeaderText="C.I." DataField="CostoIndirecto" DataFormatString="{0:###.####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%"> <asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%">
<ItemTemplate> <ItemTemplate>

View File

@@ -55,7 +55,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
} }
catch (Exception) { } catch (Exception) { }
DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo.FiltraParametros("Estatus = 'Activo' AND CveTipoPeriodo <>-1"); DdlTipoPeriodo.DataSource = get_GlobalDTTipoPeriodo().FiltraParametros(" CveTipoPeriodo <> -1");
DdlTipoPeriodo.DataBind(); DdlTipoPeriodo.DataBind();
DdlTipoPeriodo.Items.Insert(0, new ListItem("Seleccione", "-1")); DdlTipoPeriodo.Items.Insert(0, new ListItem("Seleccione", "-1"));
if (DdlTipoPeriodo.Items.Count > 0) if (DdlTipoPeriodo.Items.Count > 0)
@@ -125,7 +125,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
{ {
DdlTipoPeriodoB.ClearSelection(); DdlTipoPeriodoB.ClearSelection();
DdlTipoPeriodoB.Items.Clear(); DdlTipoPeriodoB.Items.Clear();
DdlTipoPeriodoB.DataSource = GlobalDTTipoPeriodo.FiltraParametros(string.Format("CveTipoPeriodo=6 OR CveTipoPeriodo={0}", DdlTipoPeriodo.SelectedValue)); DdlTipoPeriodoB.DataSource = get_GlobalDTTipoPeriodo().FiltraParametros(string.Format("CveTipoPeriodo=6 OR CveTipoPeriodo={0}", DdlTipoPeriodo.SelectedValue));
DdlTipoPeriodoB.DataBind(); DdlTipoPeriodoB.DataBind();
CargaPeriodos(); CargaPeriodos();

View File

@@ -40,8 +40,7 @@ Partial Class Nomina_CatPeriodos
Public Sub CargaDatos() Public Sub CargaDatos()
Dim ObjNom_Periodos As New ClsNominas Dim ObjNom_Periodos As New ClsNominas
If ObjNom_Periodos.GetPeriodos(DdlTipoPeriodo.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, DdlEjercicio.SelectedValue.ToEntero(), -1, -1, DdlEstatus.SelectedValue.ToEntero()) Then If ObjNom_Periodos.GetPeriodos(DdlTipoPeriodo.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, DdlEjercicio.SelectedValue.ToEntero(), -1, -1, DdlEstatus.SelectedValue.ToEntero()) Then
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados
Else Else
Me.GvDatos.DataSource = Nothing Me.GvDatos.DataSource = Nothing
End If End If
@@ -58,15 +57,13 @@ Partial Class Nomina_CatPeriodos
#Region " C O M B O S" #Region " C O M B O S"
Private Sub CargaTipoPeriodo() Private Sub CargaTipoPeriodo()
DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo(-1)
DdlTipoPeriodoAdd.DataSource = GlobalDTTipoPeriodo DdlTipoPeriodoAdd.DataSource = GlobalDTTipoPeriodo(-1)
DdlTipoPeriodoCM.DataSource = GlobalDTTipoPeriodo DdlTipoPeriodoCM.DataSource = GlobalDTTipoPeriodo(-1)
DdlTipoPeriodo.DataBind() DdlTipoPeriodo.DataBind()
DdlTipoPeriodoAdd.DataBind() DdlTipoPeriodoAdd.DataBind()
DdlTipoPeriodoCM.DataBind() DdlTipoPeriodoCM.DataBind()
End Sub End Sub
Private Sub cargaEjercicios() Private Sub cargaEjercicios()

View File

@@ -60,7 +60,7 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
} }
private void CargaTiposPeriodo() private void CargaTiposPeriodo()
{ {
DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo.FiltraParametros("Estatus = 'Activo'"); DdlTipoPeriodo.DataSource = get_GlobalDTTipoPeriodo();
DdlTipoPeriodo.DataBind(); DdlTipoPeriodo.DataBind();
DdlTipoPeriodo.Items.Insert(0, new ListItem("Todos", "-1")); DdlTipoPeriodo.Items.Insert(0, new ListItem("Todos", "-1"));
if (DdlTipoPeriodo.Items.Count > 0) if (DdlTipoPeriodo.Items.Count > 0)

View File

@@ -56,7 +56,7 @@ public partial class Nomina_MovimientosSUA : ClsPaginas
private void CargaTiposPeriodo() private void CargaTiposPeriodo()
{ {
DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo.FiltraParametros("Estatus = 'Activo'"); DdlTipoPeriodo.DataSource = get_GlobalDTTipoPeriodo();
DdlTipoPeriodo.DataBind(); DdlTipoPeriodo.DataBind();
DdlTipoPeriodo.Items.Insert(0, new ListItem("Seleccione", "-1")); DdlTipoPeriodo.Items.Insert(0, new ListItem("Seleccione", "-1"));
if (DdlTipoPeriodo.Items.Count > 0) if (DdlTipoPeriodo.Items.Count > 0)

View File

@@ -157,7 +157,7 @@ public partial class Nomina_ReportedeAcumulados : ClsPaginas
} }
private void CargaTiposPeriodo() private void CargaTiposPeriodo()
{ {
DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo.FiltraParametros("Estatus = 'Activo'"); DdlTipoPeriodo.DataSource = get_GlobalDTTipoPeriodo();
DdlTipoPeriodo.DataBind(); DdlTipoPeriodo.DataBind();
DdlTipoPeriodo.Items.Insert(0, new ListItem("Todos", "-1")); DdlTipoPeriodo.Items.Insert(0, new ListItem("Todos", "-1"));
if (DdlTipoPeriodo.Items.Count > 0) if (DdlTipoPeriodo.Items.Count > 0)
@@ -167,7 +167,6 @@ public partial class Nomina_ReportedeAcumulados : ClsPaginas
} }
public void cargaDatos() public void cargaDatos()
{ {
int CveEmpresa = UsuarioActual.CveEmpresa; int CveEmpresa = UsuarioActual.CveEmpresa;

View File

@@ -139,7 +139,7 @@
<div runat="server" id="DivDatos"> <div runat="server" id="DivDatos">
<asp:GridView ID="GV" runat="server" ClientIDMode="Static" DataKeyNames="CveOrdenCompra,Folio,CveEstatusSiguiente,FolioREQ" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Ordenes de Compra Encontrados." OnRowDataBound="GV_RowDataBound" CssClass="table GVD table-striped table-hover " GridLines="None" HorizontalAlign="Left"> <asp:GridView ID="GV" runat="server" ClientIDMode="Static" DataKeyNames="CveOrdenCompra,Folio,CveEstatusSiguiente,FolioREQ" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Ordenes de Compra Encontrados." OnRowDataBound="GV_RowDataBound" CssClass="table GVD table-striped table-hover " GridLines="None" HorizontalAlign="Left">
<Columns> <Columns>
<asp:TemplateField HeaderText="Folio" ItemStyle-Width="5%"> <asp:TemplateField HeaderText="Folio" ItemStyle-Width="7.5%">
<ItemTemplate> <ItemTemplate>
<asp:Label Text='<%# Eval("SerieFolio") %>' ID="LbFolio" runat="server" Style="width: 70px!important" /> <asp:Label Text='<%# Eval("SerieFolio") %>' ID="LbFolio" runat="server" Style="width: 70px!important" />
<asp:HyperLink Text='<%# Eval("SerieFolio") %>' ID="HLFolio" Visible="false" CssClass="Texto" Style="text-align: center" runat="server" Width="70px" /> <asp:HyperLink Text='<%# Eval("SerieFolio") %>' ID="HLFolio" Visible="false" CssClass="Texto" Style="text-align: center" runat="server" Width="70px" />

View File

@@ -145,8 +145,8 @@ Partial Class OC_PopUpBuscarReq
End If End If
'Cargar Datos 'Cargar Datos
Dim ObjOC As New ClsOC Dim ObjOC As New ClsOC
ObjOC.GetOrdenesCompraRep("OC", -1, -1, -1, -1, MinFecha, MaxFecha, -1, tCveProveedor, -1, -1, -1, UsuarioActual.CveEmpresa, -1) ObjOC.GetOrdenesCompraVinculacion("OC", -1, -1, -1, MinFecha, MaxFecha, -1, tCveProveedor, -1, -1, UsuarioActual.CveEmpresa)
Dim DtOC As Data.DataTable = ObjOC.DtResultados.FiltraParametros("TipoTermino = 3") ' tipotermino, esattus inicial Dim DtOC As Data.DataTable = ObjOC.DtResultados
ObjOC.Dispose() ObjOC.Dispose()
If DtOC.Rows.Count > 0 Then ' tipotermino, esattus inicial If DtOC.Rows.Count > 0 Then ' tipotermino, esattus inicial
@@ -154,7 +154,7 @@ Partial Class OC_PopUpBuscarReq
End If End If
'SOLO CARGAMOS OC'S QUE ESTEN PENDIENTES POR SURTIR 'SOLO CARGAMOS OC'S QUE ESTEN PENDIENTES POR SURTIR
GV.DataSource = DtOC.FiltraParametros("CveOrdenCompraDisponible > 0") GV.DataSource = DtOC
GV.DataBind() GV.DataBind()
LblTotalRegistros.Text = "Número de registros: " & GV.Rows.Count.ToString LblTotalRegistros.Text = "Número de registros: " & GV.Rows.Count.ToString

View File

@@ -716,6 +716,12 @@ Partial Class OI_PopUpAgenda
CveMovimiento = Request("CveMovimiento").ToEntero CveMovimiento = Request("CveMovimiento").ToEntero
End If End If
Dim CveContrato As Integer = -1
If Request("CveContrato") IsNot Nothing AndAlso IsNumeric(Request("CveContrato")) AndAlso Request("CveContrato").ToEntero > 0 Then
CveContrato = Request("CveContrato").ToEntero
End If
'------------------------------------------ '------------------------------------------
'Recorrro Grid para obtener el usuario PARA 'Recorrro Grid para obtener el usuario PARA
For Each RowPara As GridViewRow In GVUsuarios.Rows For Each RowPara As GridViewRow In GVUsuarios.Rows
@@ -741,7 +747,7 @@ Partial Class OI_PopUpAgenda
Alert("La Nueva Tarea se guardó correctamente.", TipoMensaje.MsgInformacion) Alert("La Nueva Tarea se guardó correctamente.", TipoMensaje.MsgInformacion)
End If End If
ElseIf CveTipoEvento = 2 Then ElseIf CveTipoEvento = 2 Then
If ObjEventos.AddEventoAgenda(CveAgendaTipo, Asunto, Descripcion, Prioridad, FechaInicio.ToDateTime, FechaFin.ToDateTime, CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, CvePersonal, CveProveedor, CveCompra:=CveCompra, CveVenta:=CveVenta, CveMovimiento:=CveMovimiento) Then If ObjEventos.AddEventoAgenda(CveAgendaTipo, Asunto, Descripcion, Prioridad, FechaInicio.ToDateTime, FechaFin.ToDateTime, CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, CvePersonal, CveProveedor, CveCompra:=CveCompra, CveVenta:=CveVenta, CveMovimiento:=CveMovimiento, CveContrato:=CveContrato) Then
Alert("La Nueva Agenda se guardó correctamente.", TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();") Alert("La Nueva Agenda se guardó correctamente.", TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();")
End If End If
ElseIf CveTipoEvento = 3 Then ElseIf CveTipoEvento = 3 Then

View File

@@ -1539,8 +1539,18 @@ Partial Class RH_Personal
Private Sub CargaOutSourcing() Private Sub CargaOutSourcing()
Dim DtModulosEmpresa As New DataTable
Dim ObjEmpresas As New ClsSisEmpresas
If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1") Then
DtModulosEmpresa = ObjEmpresas.DtResultados
Else
DtModulosEmpresa = Nothing
End If
ObjEmpresas.Dispose()
If UsuarioActual.CveEmpresa = 7 Then If UsuarioActual.CveEmpresa = 7 Then
DdlEmpresaAsignada.DataSource = GlobalDTEmpresas.FiltraParametros("CveEmpresa in (7,11,12,122,145,113)") DdlEmpresaAsignada.DataSource = DtModulosEmpresa.FiltraParametros("CveEmpresa in (7,11,12,122,145,113)")
DdlEmpresaAsignada.DataBind() DdlEmpresaAsignada.DataBind()
DvOutsourcing.Visible = True DvOutsourcing.Visible = True
End If End If

View File

@@ -20,7 +20,10 @@
<div class="titlefiltros caption "> <div class="titlefiltros caption ">
<ul class="list-inline"> <ul class="list-inline">
<li>Empresa: <li>Empresa:
<asp:DropDownList ID="DdlEmpresa" AutoPostBack="true" runat="server" AppendDataBoundItems="true" DataTextField="Empresa" DataValueField="CveEmpresa" CssClass=" select2me table-group-action-input form-control input-inline input-small input-sm" Style="width: 400px !important;" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlEmpresa" AutoPostBack="true" runat="server" AppendDataBoundItems="true" DataTextField="Empresa" DataValueField="CveEmpresa"
CssClass=" select2me table-group-action-input form-control input-inline input-small input-sm" Style="width: 400px !important;" ValidationGroup="GrpGuardar"
OnSelectedIndexChanged="DdlEmpresa_SelectedIndexChanged"
>
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</li> </li>

View File

@@ -47,14 +47,23 @@ Partial Class Sistemas_EmpresasModulos
UpDatos.Update() UpDatos.Update()
End Sub End Sub
Private Sub CargarEmpresa() Private Sub CargarEmpresa()
Dim DTEmpresas As New DataTable
Using ObjEmpresas As New ClsSisEmpresas()
If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1") Then
DTEmpresas = ObjEmpresas.DtResultados
End If
End Using
If UsuarioActual.CveRol <> 1 Then If UsuarioActual.CveRol <> 1 Then
DdlEmpresa.DataSource = GlobalDTEmpresas DdlEmpresa.DataSource = DTEmpresas
DdlEmpresa.Enabled = False DdlEmpresa.Enabled = False
Else Else
DdlEmpresa.DataSource = GlobalDTEmpresas DdlEmpresa.DataSource = DTEmpresas
End If End If
DdlEmpresa.SelectedValue = UsuarioActual.CveEmpresa.ToString DdlEmpresa.SelectedValueExist(UsuarioActual.CveEmpresa.ToString)
DdlEmpresa.DataBind() DdlEmpresa.DataBind()
End Sub End Sub
Private Sub CargaModulosEmpresa() Private Sub CargaModulosEmpresa()
@@ -71,7 +80,13 @@ Partial Class Sistemas_EmpresasModulos
End Sub End Sub
Private Sub CargaModulosDisponible() Private Sub CargaModulosDisponible()
Dim DtModulosDisponible As DataTable = GlobalDTModulos().FiltraParametros("Liga <> ''") Dim DtModulosDisponible As New DataTable '= GlobalDTModulos().FiltraParametros("Liga <> ''")
Using ObjModulos As New ClsModulos
If ObjModulos.GetModulos(-1, -1, "-1", "-1") Then
DtModulosDisponible = ObjModulos.DtResultados
End If
End Using
Dim rowsToDelete = From r1 In DtModulosDisponible.AsEnumerable() Dim rowsToDelete = From r1 In DtModulosDisponible.AsEnumerable()
Join r2 In DtModulosEmpresa.AsEnumerable() On r1.Field(Of Integer)("CveModulo") Equals r2.Field(Of Integer)("CveModulo") Join r2 In DtModulosEmpresa.AsEnumerable() On r1.Field(Of Integer)("CveModulo") Equals r2.Field(Of Integer)("CveModulo")
@@ -150,4 +165,8 @@ Partial Class Sistemas_EmpresasModulos
#End Region #End Region
Protected Sub DdlEmpresa_SelectedIndexChanged(sender As Object, e As EventArgs)
consultar_Click(Nothing, Nothing)
End Sub
End Class End Class

View File

@@ -1,61 +0,0 @@
<html lang="en-US">
<head>
<meta charset="utf-8" />
<title>Microsoft.SqlServer.Types</title>
<style>
body {
background: #fff;
color: #505050;
margin: 20px;
}
#main {
background: #efefef;
padding: 5px 30px;
}
</style>
</head>
<body>
<div id="main">
<h1>Action required to load native assemblies</h1>
<p>
To deploy an application that uses spatial data types to a machine that does not have 'System CLR Types for SQL Server' installed you also need to deploy the native assembly SqlServerSpatial140.dll. Both x86 (32 bit) and x64 (64 bit) versions of this assembly have been added to your project under the SqlServerTypes\x86 and SqlServerTypes\x64 subdirectories. The native assembly msvcr120.dll is also included in case the C++ runtime is not installed.
</p>
<p>
You need to add code to load the correct one of these assemblies at runtime (depending on the current architecture).
</p>
<h2>ASP.NET Web Sites</h2>
<p>
For ASP.NET Web Sites, add the following block of code to the code behind file of the Web Form where you have added Report Viewer Control:
<pre>
Default.aspx.cs:
public partial class _Default : System.Web.UI.Page
{
static bool _isSqlTypesLoaded = false;
public _Default()
{
if (!_isSqlTypesLoaded)
{
SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~"));
_isSqlTypesLoaded = true;
}
}
}
</pre>
</p>
<h2>ASP.NET Web Applications</h2>
<p>
For ASP.NET Web Applications, add the following line of code to the Application_Start method in Global.asax.cs:
<pre> SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~/bin"));</pre>
</p>
<h2>Desktop Applications</h2>
<p>
For desktop applications, add the following line of code to run before any spatial operations are performed:
<pre> SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);</pre>
</p>
</div>
</body>
</html>

View File

@@ -21,6 +21,10 @@
#C_Tab_ctl00_DdlClientes{ #C_Tab_ctl00_DdlClientes{
width:100%!important; width:100%!important;
}*/ }*/
.font-light {
color:#666666;
}
.mx-1 { .mx-1 {
margin: 0 5px 0 5px; margin: 0 5px 0 5px;
} }
@@ -127,12 +131,7 @@
<div class="row my-1"> <div class="row my-1">
<label class="col-md-4 bold text-primary">Folio</label> <label class="col-md-4 bold text-primary">Folio</label>
<asp:TextBox class="col-md-2" runat="server" ID="TxtFolio" Text="" MaxLength="50" style="margin-left:15px" Width="120px" Height="34px"></asp:TextBox> <asp:TextBox class="col-md-2" runat="server" ID="TxtFolio" Text="" MaxLength="50" style="margin-left:15px" Width="120px" Height="34px"></asp:TextBox>
<div class="col-md-2">
<asp:HyperLink runat="server" Text="" Target="_blank" id="HypRemision" CssClass="Texto"></asp:HyperLink>
</div>
<div class="col-md-4">
<asp:Label runat="server" ID="LblSaldo"></asp:Label>
</div>
</div> </div>
<div class="row " style="border:0px!important"> <div class="row " style="border:0px!important">
@@ -358,61 +357,211 @@
</div> </div>
<%-- Contrato Digitalizado --%> <%-- Contrato Digitalizado --%>
<div class="col-md-5"> <div class="col-md-5">
<div class="portlet light bordered xspadding">
<div class="portlet-title">
<div class="tools">
<a href="javascript;" data-idchekbox="C_chkexpand1" class=" collapse" data-original-title=""
title=""></a><span class="hidden">
<input id="C_chkexpand1" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
</div>
<div class="caption uppercase" style="position: relative;">
<i class="fa fa-file-pdf-o"></i>Contrato Digitalizado
</div>
</div>
<div class="portlet-body rowpadding"> <div class="row">
<div class="row"> <div class="col-md-12">
<div class="col-md-12" style="text-align: center;">
<asp:UpdatePanel ID="UPAFUL" runat="server" UpdateMode="Conditional">
<ContentTemplate> <div class="portlet light bordered xspadding">
<asp:LinkButton runat="server" ID="BtnDescargar" class="btn btn-warning" Visible="false"><i class='fa fa-download' aria-hidden='true'></i> Descargar</asp:LinkButton> <div class="portlet-title">
<asp:TextBox Style="display: none" ID="TxtArchivo" ClientIDMode="Static" runat="server" <div class="tools">
Width="200px"></asp:TextBox> <a href="javascript;" data-idchekbox="C_chkexpand1" class=" collapse" data-original-title=""
title=""></a><span class="hidden">
<input id="C_chkexpand3" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
</div>
<div class="caption uppercase" style="position: relative;">
<i class="fa fa-money"></i>Pagos
</div>
</div>
<button type="button" class="btn btn-primary" runat="server" clientidmode="Static" <div class="portlet-body rowpadding">
id="Button1" data-toggle="modal" data-target="#ModalUpload" visible="true"> <div class="row">
<i class="fa fa-upload" <div class="col-md-12" style="text-align: center;">
aria-hidden="true"></i>Subir Archivo</button> <asp:UpdatePanel ID="UpPagos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
</ContentTemplate> <div class="row" runat="server" visible="false" id="DVFactura">
<Triggers> <label class="col-md-2">Factura: </label>
<asp:PostBackTrigger ControlID="BtnDescargar" /> <div class="col-md-2">
</Triggers> <asp:HyperLink runat="server" Text="" Target="_blank" id="HypRemision" CssClass="Texto"></asp:HyperLink>
</asp:UpdatePanel> </div>
<div class="col-md-4">
<asp:Label runat="server" ID="LblSaldo"></asp:Label>
</div>
</div>
<br />
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GVAuxiliar" runat="server" AutoGenerateColumns="False" ShowFooter="true"
DataKeyNames="CvePrePoliza, Cargo, Abono, CveReferencia, IdPoliza,CvePrePolizaOriginal,TipoReferencia"
EmptyDataText="No se encontraron pagos" ToolTip="Listado de Auxiliar Contable" CssClass="table table-striped table-advance table-hover mysmallbtn Widthall" GridLines="None"
OnRowDataBound="GVAuxiliar_RowDataBound" >
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>Folio</HeaderTemplate>
<ItemTemplate>
&nbsp;<asp:HyperLink ID="HplReferencia" runat="server" Text='<%# Eval("Referencia", "{0}") %>' Target="_blank"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Fecha</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFechaMovto" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
<FooterTemplate>
<asp:Label ID="LbltotalText" runat="server" Text=""></asp:Label>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>Pago</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlCargo" runat="server" Text='<%# If(CDbl(Eval("Abono")) = 0, "", Eval("Abono", "{0:N2}")) %>'></asp:Literal>
</ItemTemplate>
<FooterTemplate>
<asp:Label ID="Lbltotal" runat="server" Text=""></asp:Label>
</FooterTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-12">
<div class="portlet light bordered xspadding">
<div class="portlet-title">
<div class="tools">
<a href="javascript;" data-idchekbox="C_chkexpand1" class=" collapse" data-original-title=""
title=""></a><span class="hidden">
<input id="C_chkexpand1" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
</div>
<div class="caption uppercase" style="position: relative;">
<i class="fa fa-file-pdf-o"></i>Contrato Digitalizado
</div>
</div>
<div class="portlet-body rowpadding">
<div class="row">
<div class="col-md-12" style="text-align: center;">
<asp:UpdatePanel ID="UPAFUL" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:HyperLink target="_blank" runat="server" ID="BtnDescargar" class="btn btn-warning" Visible="false"><i class='fa fa-download' aria-hidden='true'></i> Descargar</asp:HyperLink>
<asp:TextBox Style="display: none" ID="TxtArchivo" ClientIDMode="Static" runat="server"
Width="200px"></asp:TextBox>
<button type="button" class="btn btn-primary" runat="server" clientidmode="Static"
id="Button1" data-toggle="modal" data-target="#ModalUpload" visible="true">
<i class="fa fa-upload"
aria-hidden="true"></i>Subir Archivo</button>
</ContentTemplate>
<Triggers>
</Triggers>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
</div>
</div>
</div> </div>
<%-- Bitácora --%> <%-- Bitácora --%>
<div class="col-md-12"> <div class="col-md-12">
<div class="portlet light bordered xspadding"> <div class="portlet light bordered xspadding">
<div class="portlet-title"> <div class="portlet-title">
<div class="tools">
<a href="javascript;" data-idchekbox="C_chkexpand" class=" collapse" data-original-title="" <%--<div class="caption uppercase" style="position: relative;">
title=""></a><span class="hidden">
<input id="C_chkexpand2" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
</div>
<div class="caption uppercase" style="position: relative;">
<i class="fa fa-commenting"></i>Bitácora <i class="fa fa-commenting"></i>Bitácora
</div> </div>
<div class="btn-group">
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold font-green" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important;cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold font-green" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' ></i>Agendar" Visible="false" Style="font-weight: 700 !important;cursor: pointer;" ToolTip="Agendar"></asp:HyperLink><br />
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
<UserControl:TareaNueva runat="server" ID="TareaNueva" />
</div>--%>
<div class="caption font-default">
<%--<i class="fa fa-users font-green"></i>--%>
<span class="caption-subject bold uppercase">Bitacora</span>
</div>
<div class="actions">
<div class="btn-group">
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold font-light " data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-light ' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important; cursor: pointer" ToolTip="Observaciones"></asp:HyperLink><br />
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold font-light " runat="server" Text="" Visible="false" Style="font-weight: 700 !important; cursor: pointer" ToolTip="Agendar"><i class='fa fa-calendar-plus-o font-light ' ></i>Agendar</asp:HyperLink><br />
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
<UserControl:TareaNueva runat="server" ID="TareaNueva" />
<%--<script> function OnAddedTareaNueva() { $('.btnupEventoBitacora').click(); }</script>--%>
</div>
</div>
</div> </div>
<div class="portlet-body rowpadding"> <div class="portlet-body rowpadding">
<asp:UpdatePanel ID="UPEventoBitacora" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPEventoBitacora" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvEventosBitacora" runat="server" AutoGenerateColumns="True" <asp:GridView ID="GvEB" runat="server" AutoGenerateColumns="False" DataKeyNames="CveEvento" EmptyDataText="No se han capturado comentarios o bitácora" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
GridLines="None"> <Columns>
<asp:TemplateField>
<HeaderTemplate>Fecha</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Fecha Agenda</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFechaAgenda" runat="server" Text='<%# Eval("FechaInicio") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Usuario</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Descripción</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlEventoBitacora" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="10px" ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>Archivo</HeaderTemplate>
<ItemTemplate>
<asp:LinkButton ID="LinkArchivo" Visible="false" runat="server" CssClass="Texto" OnClick="DownloadFile">
<asp:Image ImageUrl="/Imagenes/Abajo.png" ID="ImgArchivo" runat="server" />
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="Titulos" />
<AlternatingRowStyle CssClass="TextoAlterno" />
<RowStyle CssClass="Texto" />
</asp:GridView> </asp:GridView>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -1036,4 +1185,48 @@
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<div id="ModalBitacora" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Bitácora</h4>
</div>
<div class="modal-body">
<asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-md-8">
<label>Bitácora/Observaciones</label>
<br />
<asp:TextBox CssClass="form-control" ID="TxtEventoDescripcion" class="Widthall" runat="server" TextMode="MultiLine" Columns="60" Rows="8"></asp:TextBox>
<br />
<%-- <asp:CheckBox ID="ChkEventoPrioridad" CssClass="md-checksd2" Text="Bitácora de Atención" runat="server" />--%>
</div>
<div class="col-md-4">
<asp:TextBox ID="AnexoBit" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
</div>
</div>
<%--<div>
</div>--%>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:Button ID="BtnGuardarEventoBitacora" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" />
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
</asp:Content> </asp:Content>

View File

@@ -201,6 +201,22 @@ Partial Class RepContratoDetalle
End Set End Set
End Property End Property
Private Property TotalPagos As Decimal
Get
If ViewState("TotalPagos") Is Nothing Then
ViewState("TotalPagos") = 0
End If
Return ViewState("TotalPagos").ToString.ToDecimal
End Get
Set(value As Decimal)
ViewState("TotalPagos") = value
End Set
End Property
@@ -209,20 +225,42 @@ Partial Class RepContratoDetalle
#Region "Carga Página" #Region "Carga Página"
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Request("CveContrato") Is Nothing Then If Request("CveContrato") Is Nothing Then
Response.Redirect($"~/Transportes/RepContratos.aspx") Response.Redirect($"~/Transportes/RepContratos.aspx")
End If End If
CveContrato = Request("CveContrato").ToEntero CveContrato = Request("CveContrato").ToEntero
If Not IsPostBack Then If Not IsPostBack Then
InicializaCombos() InicializaCombos()
CargaDatos() CargaDatos()
CargaAuxiliarClienteCxC(DdlClientes.SelectedValue.ToEntero, CveVentaRemision)
AsientoSeleccionado = "" AsientoSeleccionado = ""
CveViajePasajero = 0 CveViajePasajero = 0
Session("FileExtension") = "" Session("FileExtension") = ""
ArchivoUpdate = "" ArchivoUpdate = ""
CargaGvBitacora() CargaGvBitacora()
If CveContrato > 0 Then
HlEvento.Visible = True
HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveContrato=" & CveContrato & "&TB_iframe=true&height=370&width=600;"
ImgAddObs.Visible = True
LtlTareaNueva.Text = String.Format("<a class=""caption-subject bold font-light"" onclick=""OpenModalNewTareaUserControl(1,-1,{{CveContrato:{0}}});""> <i class=""fa fa-plus""'></i> Tarea</a>", CveContrato)
CargaEventoBitacora()
End If
If CveVentaRemision > 0 Then
DVFactura.Visible = True
End If
End If End If
End Sub End Sub
Private Sub InicializaCombos() Private Sub InicializaCombos()
'Lista Tipo AF 'Lista Tipo AF
@@ -297,6 +335,14 @@ Partial Class RepContratoDetalle
If Not IsDBNull(ObjContratos.Archivo) AndAlso ObjContratos.Archivo <> "" AndAlso ObjContratos.Archivo <> "-1" AndAlso ObjContratos.Archivo <> $"{ObjContratos.CveContrato}." Then If Not IsDBNull(ObjContratos.Archivo) AndAlso ObjContratos.Archivo <> "" AndAlso ObjContratos.Archivo <> "-1" AndAlso ObjContratos.Archivo <> $"{ObjContratos.CveContrato}." Then
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "CONTRATOS", ObjContratos.Archivo) ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "CONTRATOS", ObjContratos.Archivo)
BtnDescargar.Visible = True BtnDescargar.Visible = True
Dim File As New FileInfo(ViewState("FUrl").ToString)
BtnDescargar.NavigateUrl = $"~/Compras/PopUpVerFactura.aspx?ArchivoContrato={Encripta(File.FullName)}"
'If File.Exists Then
' RegistraScript($"window.open({Url}, ""_blank"");")
'End If
Else Else
BtnDescargar.Visible = False BtnDescargar.Visible = False
A1.Visible = True A1.Visible = True
@@ -313,13 +359,13 @@ Partial Class RepContratoDetalle
ObjTransportes.Dispose() ObjTransportes.Dispose()
GvViajesPasajeros.DataBind() GvViajesPasajeros.DataBind()
End If End If
'Bitácora ''Bitácora
Dim ObjEventoBitacora As New ClsOIEventos 'Dim ObjEventoBitacora As New ClsOIEventos
If ObjEventoBitacora.GetEventos(-1, -1, -1, "-1", "-1", -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then 'If ObjEventoBitacora.GetEventos(-1, -1, -1, "-1", "-1", -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then
GvEventosBitacora.DataSource = ObjEventoBitacora.DtResultados ' GvEB.DataSource = ObjEventoBitacora.DtResultados
GvEventosBitacora.DataBind() ' GvEB.DataBind()
End If 'End If
ObjEventoBitacora.Dispose() 'ObjEventoBitacora.Dispose()
End If End If
Else Else
@@ -332,8 +378,113 @@ Partial Class RepContratoDetalle
End Sub End Sub
#End Region #End Region
#Region "Bitacora"
Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(200)
e.Row.Cells(1).Width = Unit.Pixel(200)
e.Row.Cells(2).Width = Unit.Pixel(100)
e.Row.Cells(3).Width = Unit.Pixel(500)
End If
If e.Row.DBCampo("Archivo").ToString <> "" Then
e.Row.FCLinkButton("LinkArchivo").Visible = True
e.Row.FCLinkButton("LinkArchivo").CommandArgument = String.Format("OI\{0}", e.Row.DBCampo("Archivo").ToString)
ScriptManager.GetCurrent(Me).RegisterPostBackControl(e.Row.FCLinkButton("LinkArchivo")) 'Registro un evento Postbacktrigger, que recargue toda la pagina para que funcione
End If
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left
End If
End Sub
Protected Sub BtnGuardarEventoBitacora_Click(sender As Object, e As EventArgs) Handles BtnGuardarEventoBitacora.Click
Dim ObjEventoBitacora As New ClsOIEventos
Dim FileExtension As String = "-1"
Dim Filesgral As List(Of Archivo) = AnexoBit.getfiles().Archivos
Dim Filename As String = ""
For Each fileItem As Archivo In Filesgral
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
Filename = fileItem.filename
Next
If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then
If Filename <> "" Then
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
End If
GvEB.DataSource = ObjEventoBitacora.DtResultados
TxtEventoDescripcion.Text = ""
AnexoBit.Text = "[]"
Alert("La bitácora/observación se guardó correctamente", TipoMensaje.MsgInformacion)
RegistraScript("$('#ModalBitacora').modal('hide')", "hidemodal")
End If
ObjEventoBitacora.Dispose()
GvEB.DataBind()
UPEventoBitacora.Update()
CargaEventoBitacora()
UPAddEventoBitacora.Update()
End Sub
Private Sub CargaEventoBitacora()
If CveContrato > 0 Then
Dim ObjEventoBitacora As New ClsOIEventos()
If ObjEventoBitacora.GetAgendaBitacora(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then
GvEB.DataSource = ObjEventoBitacora.DtResultados.FiltraParametros("CveTipoEvento = 6 OR CveTipoEvento = 2")
Else
GvEB.DataSource = Nothing
End If
ObjEventoBitacora.Dispose()
GvEB.DataBind()
UPEventoBitacora.Update()
End If
End Sub
'Protected Sub CargarArchivo(ByVal sender As Object, ByVal e As AjaxControlToolkit.AsyncFileUploadEventArgs) Handles AFU.UploadedComplete
' If AFU.HasFile Then
' Dim UploadFolder As String = String.Format("{0}\Temp\", UsuarioActual.Empresa.Ruta)
' UploadFolder.DirectoryExistsCreate()
' Dim Extension As String = System.IO.Path.GetExtension(AFU.PostedFile.FileName)
' If File.Exists(String.Format("{0}{1}{2}", UploadFolder, UsuarioActual.CveUsuario.ToString, Extension)) Then File.Delete(String.Format("{0}{1}{2}", UploadFolder, UsuarioActual.CveUsuario.ToString, Extension))
' AFU.SaveAs(UploadFolder & UsuarioActual.CveUsuario.ToString & Extension)
' Session("FileUpload") = UploadFolder & UsuarioActual.CveUsuario.ToString & Extension
' Session("FileExtension") = Extension
' Session("FileFolder") = UploadFolder
' End If
'End Sub
Protected Sub DownloadFile(ByVal sender As Object, ByVal e As EventArgs)
Dim filePath As String = String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, CType(sender, LinkButton).CommandArgument)
Dim Archivo As New System.IO.FileInfo(filePath)
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType = "application/octet-stream"
HttpContext.Current.Response.AppendHeader("Content-disposition", "attachment; filename=" + Path.GetFileName(filePath))
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
HttpContext.Current.Response.TransmitFile(filePath)
HttpContext.Current.Response.Flush()
HttpContext.Current.Response.End()
Archivo = Nothing
End Sub
#End Region
#Region "Información General" #Region "Información General"
Protected Sub BtnGuardarArchivo_Click1(sender As Object, e As EventArgs) Handles BtnGuardarArchivo.Click Protected Sub BtnGuardarArchivo_Click1(sender As Object, e As EventArgs) Handles BtnGuardarArchivo.Click
Dim FileExtension As String = "-1" Dim FileExtension As String = "-1"
Dim Filesgral As List(Of Extensiones.Archivo) = Anexo.getfiles().Archivos Dim Filesgral As List(Of Extensiones.Archivo) = Anexo.getfiles().Archivos
Dim Filename As String = "" Dim Filename As String = ""
@@ -375,32 +526,61 @@ Partial Class RepContratoDetalle
BtnDescargar.Visible = True BtnDescargar.Visible = True
End If End If
End Sub End Sub
Private Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles BtnDescargar.Click 'Private Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles BtnDescargar.Click
DescargarArchivo() ' Dim File As New FileInfo(ViewState("FUrl").ToString)
End Sub ' Dim Url As String = $"{ObtenerUrlCompleta()}Compras/PopUpVerFactura.aspx?ArchivoContrato={Encripta(File.FullName)}"
Private Sub DescargarArchivo() ' If File.Exists Then
Dim File As New FileInfo(ViewState("FUrl").ToString) ' RegistraScript($"window.open({Url}, ""_blank"");")
' End If
If File.Exists Then 'set appropriate headers
Response.Clear()
Response.ClearHeaders()
Response.ClearContent()
Response.AddHeader("Content-Disposition", "attachment; filename=" & TxtFolio.Text & $"{File.Extension}")
Response.AddHeader("Content-Length", File.Length.ToString())
'Response.ContentType = "text/plain"
Response.ContentType = "application/octet-stream"
Response.Flush()
' Response.TransmitFile(File.FullName)
Response.WriteFile(File.FullName)
Response.End()
'if file does not exist
Alert("Descargado Correctamente.", TipoMensaje.MsgInformacion) 'End Sub
Else
Alert("Ocurrio un error al descargar el archivo", TipoMensaje.MsgAdvertencia, "window.close()") Public Function ObtenerUrlCompleta() As String
Dim Solicitud As HttpRequest = HttpContext.Current.Request
Dim url As String = Solicitud.Url.Scheme & "://" & Solicitud.Url.Host
If (Solicitud.Url.Port <> 80 AndAlso Solicitud.Url.Port <> 443) Then
url &= ":" & Solicitud.Url.Port
End If
url &= Solicitud.ApplicationPath
If Not url.EndsWith("/") Then
url &= "/"
End If
Return url
End Function
'Private Sub DescargaArchivo(urlArchivo As String)
' Dim File As New FileInfo(urlArchivo)
' If File.Exists Then 'set appropriate headers
' Response.Clear()
' Response.ClearHeaders()
' Response.ClearContent()
' Response.AddHeader("Content-Disposition", "inline; filename=" & TxtFolio.Text & $"{File.Extension}")
' Response.AddHeader("Content-Length", File.Length.ToString())
' 'Response.ContentType = "text/plain"
' Response.ContentType = "application/octet-stream"
' Response.Flush()
' ' Response.TransmitFile(File.FullName)
' Response.WriteFile(File.FullName)
' Response.End()
' Else
' Alert("Ocurrio un error al descargar el archivo", TipoMensaje.MsgAdvertencia, "window.close()")
' End If
'End Sub
End If 'nothing in the URL as HTTP GET
End Sub
Protected Sub UpdateContrato(sender As Object, e As EventArgs) Protected Sub UpdateContrato(sender As Object, e As EventArgs)
Dim ArchivoUpdate As String = "-1" Dim ArchivoUpdate As String = "-1"
Dim ErrorProceso As Boolean = False Dim ErrorProceso As Boolean = False
@@ -886,6 +1066,52 @@ Partial Class RepContratoDetalle
GvBitacora.DataBind() GvBitacora.DataBind()
End Sub End Sub
#End Region #End Region
#Region "PAGOS"
Private Sub CargaAuxiliarClienteCxC(CveCliente As Integer, CveRemision As Integer)
If CveRemision > 0 Then
Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetCxCClienteAuxiliar(CveCliente, CveRemision) Then
Dim dtTemp As New DataTable
dtTemp = ObjMovtos.DtResultados.FiltraParametros(" Conceptocontable = 'Pago del Cliente' ")
TotalPagos = dtTemp.SUM("Abono")
GVAuxiliar.DataSource = dtTemp
Else
GVAuxiliar.DataSource = Nothing
End If
ObjMovtos.Dispose()
GVAuxiliar.DataBind()
UpPagos.Update()
End If
End Sub
Protected Sub GVAuxiliar_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DataKey("TipoReferencia").ToEntero = 1 Then
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Bancos/IE.aspx?CveIE={e.Row.DataKey("CveReferencia").ToEntero}"
End If
End If
If e.Row.RowType = DataControlRowType.Footer Then
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(1).Text = "Total"
e.Row.FCLabel("Lbltotal").Text = TotalPagos.ToString("###,###,###.00")
End If
End Sub
#End Region
End Class End Class

View File

@@ -395,6 +395,7 @@
<asp:TextBox ID="TxtCantidadPasajeros" runat="server" CssClass="form-control" CausesValidation="True" <asp:TextBox ID="TxtCantidadPasajeros" runat="server" CssClass="form-control" CausesValidation="True"
Width="100%" Width="100%"
type="number" MaxLength="2" ></asp:TextBox> type="number" MaxLength="2" ></asp:TextBox>
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtCantidadPasajeros" FilterType="Custom" ValidChars="1234567890" />
<asp:RequiredFieldValidator ID="RFVCantidadPasajeros" runat="server" ControlToValidate="TxtCantidadPasajeros" <asp:RequiredFieldValidator ID="RFVCantidadPasajeros" runat="server" ControlToValidate="TxtCantidadPasajeros"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad de pasajeros''</b> es necesario, por favor ingréselo." Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad de pasajeros''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>

View File

@@ -102,6 +102,10 @@ Partial Class ListadoContratos
End Sub End Sub
Protected Sub AddContrato(sender As Object, e As EventArgs) Protected Sub AddContrato(sender As Object, e As EventArgs)
If Not VallidaCantidadPasajeros(DdlTipoAF.SelectedValue.ToEntero, TxtCantidadPasajeros.Text.ToEntero) Then
Exit Sub
End If
Dim ErrorProceso As Boolean = False Dim ErrorProceso As Boolean = False
Dim CveContrato As Integer = -1 Dim CveContrato As Integer = -1
@@ -221,6 +225,22 @@ Partial Class ListadoContratos
RegistraScript("$('#ModalAgregar').modal('hide')", "hidemodal1") RegistraScript("$('#ModalAgregar').modal('hide')", "hidemodal1")
End Sub End Sub
Private Function VallidaCantidadPasajeros(CveTipoAF As Integer, Cantidad As Integer) As Boolean
Dim Respuesta As Boolean = True
If CveTipoAF = 181 And Cantidad < 30 Then 'autobus
Respuesta = False
Alert("El tipo unidad autobus debe de tener un minimo de 30 pasajeros.", TipoMensaje.MsgAdvertencia)
ElseIf CveTipoAF = 184 And Cantidad > 21 Then 'sprinter
Respuesta = False
Alert("El tipo de unidad sprinter no puede tener más de 21 pasajeros.", TipoMensaje.MsgAdvertencia)
End If
Return Respuesta
End Function
Protected Sub ResetModal() Protected Sub ResetModal()
'Reiniciamos modal 'Reiniciamos modal
TxtDescripcion.Text = "" TxtDescripcion.Text = ""

View File

@@ -862,7 +862,7 @@
<td> <td>
<asp:UpdatePanel ID="UpRemEspecial" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpRemEspecial" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:CheckBox ID="ChkRemEspecial" runat="server" /> <asp:CheckBox ID="ChkRemEspecial" runat="server" AutoPostBack="true" OnCheckedChanged="ChkRemEspecial_CheckedChanged" />
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</td> </td>

View File

@@ -5247,24 +5247,17 @@ Partial Class Ventas
EsDiasCreditoFijo = CBool(DbRowVenta("EsDiasCreditoFijo").ToString()) EsDiasCreditoFijo = CBool(DbRowVenta("EsDiasCreditoFijo").ToString())
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
If DbRowVenta("Num2").ToString().ToEntero() = 2000 Then If DbRowVenta("Num2").ToString = "2000" Then
ChkRemEspecial.Checked = True ChkRemEspecial.Checked = True
ChkRemEspecial.Enabled = False ChkRemEspecial.Enabled = False
TxtFech2.Text = DbRowVenta("Fech2").ToString() TxtFech2.Text = DbRowVenta("Fech2").ToString()
TrRemEspecial.Visible = UsuarioActual.TienePermisoProceso(390) End If
If UsuarioActual.TienePermisoProceso(390) Then
TrRemEspecial.Visible = True
ChkRemEspecial.Enabled = True
End If End If
End If End If
'If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
' Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto")))
' If TienePermiso <> "" Then ' si tiene acceso en el subproyecto
' 'LkNotaCredito.Visible = UsuarioActual.TienePermisoProceso(175)
' If UsuarioActual.TienePermisoProceso(264) Then
' InicializaAplicaRNCDevolucion(TmpDT)
' End If
' End If
'End If
Case "RNC" Case "RNC"
Trsaldo.Visible = True Trsaldo.Visible = True
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta")) HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
@@ -10760,13 +10753,17 @@ Partial Class Ventas
CveVentaRelacionada = CveAnticipoPadre CveVentaRelacionada = CveAnticipoPadre
End If End If
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
If UsuarioActual.CveEmpresa = 119 Then AutoConta = False
If UsuarioActual.CveEmpresa = 140 Then AutoConta = True
If (TieneAnticipo AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "2") OrElse (ListaNCDesc IsNot Nothing AndAlso ListaNCDesc.Count > 0) Then If (TieneAnticipo AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "2") OrElse (ListaNCDesc IsNot Nothing AndAlso ListaNCDesc.Count > 0) Then
CreaObjetosVentaAmortizacion(ObjVentas, FolioFiscalRelacionado, CveVentaRelacionada, NCDescuento:=NCDescuento) CreaObjetosVentaAmortizacion(ObjVentas, FolioFiscalRelacionado, CveVentaRelacionada, NCDescuento:=NCDescuento)
If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjAcum, ObjContr, ObjFacturaDevolucion, ObjBancos, Nothing, If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjAcum, ObjContr, ObjFacturaDevolucion, ObjBancos, Nothing,
Nothing, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCDesc, IndexNC:=(If(DtVentasNC IsNot Nothing, DtVentasNC.Rows.Count - 1, 0))) Then Nothing, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCDesc, IndexNC:=(If(DtVentasNC IsNot Nothing, DtVentasNC.Rows.Count - 1, 0))) Then
ListaNotasCreditoGeneradas.Add(ObjFacturaDevolucion) ListaNotasCreditoGeneradas.Add(ObjFacturaDevolucion)
If ObjFacturaDevolucion.CvePrePoliza > 0 Then If ObjFacturaDevolucion.CvePrePoliza > 0 Then
If ObjConta.ValidacionesPrePoliza(ObjFacturaDevolucion.CvePrePoliza, UsuarioActual, Opcion:=5, AutoConta:=False) Then If ObjConta.ValidacionesPrePoliza(ObjFacturaDevolucion.CvePrePoliza, UsuarioActual, Opcion:=5, CveVenta:=ObjFacturaDevolucion.CveVenta, AutoConta:=AutoConta) Then
If ObjConta.ValorPolizaDescuadre > 0 Then If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Ventas/Ventas-NCGeneradas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") GuardaLogAD($"Ventas/Ventas-NCGeneradas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
End If End If
@@ -10786,9 +10783,9 @@ Partial Class Ventas
Nothing, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCBonificacion, IndexNC:=(DtVentasNC.Rows.Count - 1)) Then Nothing, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCBonificacion, IndexNC:=(DtVentasNC.Rows.Count - 1)) Then
ListaNotasCreditoGeneradas.Add(ObjFacturaBonificacion) ListaNotasCreditoGeneradas.Add(ObjFacturaBonificacion)
If ObjFacturaBonificacion.CvePrePoliza > 0 Then If ObjFacturaBonificacion.CvePrePoliza > 0 Then
If ObjConta.ValidacionesPrePoliza(ObjFacturaBonificacion.CvePrePoliza, UsuarioActual, Opcion:=5, AutoConta:=False) Then If ObjConta.ValidacionesPrePoliza(ObjFacturaBonificacion.CvePrePoliza, UsuarioActual, Opcion:=5, CveVenta:=ObjFacturaBonificacion.CveVenta, AutoConta:=AutoConta) Then
If ObjConta.ValorPolizaDescuadre > 0 Then If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Ventas/Ventas-NCGeneradas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") GuardaLogAD($"Ventas/Ventas-NCGeneradas2 | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
End If End If
End If End If
End If End If
@@ -39793,5 +39790,13 @@ Partial Class Ventas
' End Sub ' End Sub
'End Class 'End Class
Protected Sub ChkRemEspecial_CheckedChanged(sender As Object, e As EventArgs)
Dim objV As New ClsVentas
If objV.UpdateVentaRemisionEspecial(CveVenta, If(ChkRemEspecial.Checked, 2000, 0), Now.AddDays(7), UsuarioActual.CveEmpresa) Then
Alert("Se aplicó el cambio", TipoMensaje.ToastInformacion)
End If
objV.Dispose()
End Sub
End Class End Class