diff --git a/AF/RepDepreciacion.aspx.vb b/AF/RepDepreciacion.aspx.vb
index 77c32ae7f..03b7aaf75 100644
--- a/AF/RepDepreciacion.aspx.vb
+++ b/AF/RepDepreciacion.aspx.vb
@@ -13,7 +13,7 @@ Partial Class AF_RepDepreciacion
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
- txtFechaI.Text = Now.ToString
+ txtFechaI.Text = New Date(Now.Year, Now.Month + 1, 1).AddDays(-1).ToString("dd/MM/yyyy")
End If
End Sub
@@ -35,6 +35,7 @@ Partial Class AF_RepDepreciacion
Dim CvePrePoliza = ObjConta.AddPrePolizas("Depreciacion", 74, 0, 0, 1, txtFechaI.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+
For Each RowsDt As GridViewRow In GvDatos.Rows
CveActivoFijo = RowsDt.DataKey("CveActivoFijo").ToEntero
If RowsDt.FCLiteral("LtlDepreciacionMensual").Text.ToDouble > 0 And CveActivoFijo <> 0 Then
diff --git a/App_Code/ClsOIEventos.vb b/App_Code/ClsOIEventos.vb
index 8d262bcc5..6d9a760da 100644
--- a/App_Code/ClsOIEventos.vb
+++ b/App_Code/ClsOIEventos.vb
@@ -221,9 +221,15 @@ Public Class ClsOIEventos
End Sub
#End Region
- Public Sub IniciaTransacSQL()
- SqlTransacc = SqlConexion.BeginTransaction()
- End Sub
+ 'Public Sub IniciaTransacSQL()
+ ' SqlTransacc = SqlConexion.BeginTransaction()
+
+ 'End Sub
+
+ Public Function IniciaTransacSQL() As SqlTransaction
+ If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
+ Return SqlTransacc
+ End Function
Public Sub RollBack()
SqlTransacc.Rollback()
End Sub
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index ed2a0f784..67d37fb3b 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -2151,7 +2151,7 @@ Public Class ClsVentas
End Function
Public Function AddPromociones(Promocion As String, FechaInicio As Date, FechaFin As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Boolean,
CveMoneda As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoAplicacion As String,
- Optional CveMarca As Integer = -1, Optional EsDistribuidor As Integer = -1) As Integer
+ Optional CveMarca As Integer = -1, Optional EsDistribuidor As Integer = -1, Optional CvePromocionPadre As Integer = -1) As Integer
Dim Retorno = -1
DataAdapter("PA_Vta_PromocionesAdd")
@@ -2169,6 +2169,7 @@ Public Class ClsVentas
.Add("@TipoAplicacion", SqlDbType.VarChar).Value = TipoAplicacion
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
+ .Add("@CvePromocionPadre", SqlDbType.Int).Value = CvePromocionPadre
.Add("@CvePromocion", SqlDbType.Int).Direction = ParameterDirection.Output
End With
@@ -2181,6 +2182,30 @@ Public Class ClsVentas
Return Retorno
End Function
+
+
+ Public Function AddPromociones(CvePromocion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Actualizar As Boolean) As Integer
+ Dim Retorno = -1
+ DataAdapter("PA_Vta_PromocionesAddClonar")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CvePromocion", SqlDbType.Int).Value = CvePromocion
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@Actualizar", SqlDbType.Bit).Value = Actualizar
+
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = SqlAdapter.SelectCommand.Parameters("@CvePromocion").Value.ToString.ToEntero
+ Catch ex As Exception
+ OnError("Ocurrió un error al agregar la Promoción.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
Public Function UpdatePromociones(Promocion As String, FechaInicio As Date, FechaFin As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Boolean,
CveMoneda As Integer, CveUsuario As Integer, CvePromocion As Integer, CveSubProyecto As Integer, TipoAplicacion As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional EsDistribuidor As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -2278,7 +2303,7 @@ Public Class ClsVentas
Public Function AddPromocionesDetalle(CvePromocion As Integer, CvePS As Integer, TipoPromocion As Integer, Promocion As Double, PUAnterior As Double, PUPromocion As Double,
AplicaRestriccion As Boolean, AplicaLunes As Boolean, AplicaMartes As Boolean, AplicaMiercoles As Boolean, AplicaJueves As Boolean,
AplicaViernes As Boolean, AplicaSabado As Boolean, AplicaDomingo As Boolean, HoraInicio As DateTime, HoraFin As DateTime, Optional CantidadMinima As Integer = 1,
- Optional CveClasificacion As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional IncluyeImpuestos As Boolean = False) As Boolean
+ Optional CveClasificacion As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional IncluyeImpuestos As Boolean = False, Optional Opcion As Integer = 1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PromocionesDetalleAdd")
@@ -2304,6 +2329,7 @@ Public Class ClsVentas
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CveRinTamaño", SqlDbType.Int).Value = CveRinTamaño
.Add("@IncluyeImpuestos", SqlDbType.Bit).Value = IncluyeImpuestos
+ .Add("@Opcion", SqlDbType.Int).Value = Opcion
End With
Try
@@ -2357,12 +2383,39 @@ Public Class ClsVentas
Return Retorno
End Function
- Public Function RemovePromocionesDetalle(CvePromocionDetalle As Integer) As Boolean
+ Public Function SincronizarPromocionesClonar(CvePromocion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Opcion As Integer) As Boolean
+ 'Opcion 1 replicar insert
+ 'Opcion 2 replicar actualización
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Vta_PromocionesClonar")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CvePromocion", SqlDbType.Int).Value = CvePromocion
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@Opcion", SqlDbType.Int).Value = Opcion
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError($"Ocurrió un error al actualizar las franquicias.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
+
+
+ Public Function RemovePromocionesDetalle(CvePromocionDetalle As Integer, Optional Opcion As Integer = 1, Optional CvePromocion As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PromocionesDetalleRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePromocionDetalle", SqlDbType.Int).Value = CvePromocionDetalle
+ .Add("@CvePromocion", SqlDbType.Int).Value = CvePromocion
+ .Add("@Opcion", SqlDbType.Int).Value = Opcion
End With
Try
@@ -2374,6 +2427,7 @@ Public Class ClsVentas
Return Retorno
End Function
+
#End Region
#Region "Pruebas"
diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx
index 2f5a0ee5d..79411b565 100644
--- a/Ashx/CargaEventos.ashx
+++ b/Ashx/CargaEventos.ashx
@@ -101,98 +101,138 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
Try
For Each dr As DataRow In ObjEventos.DtResultados.Rows
- Dim cevent As CalendarEvent = New CalendarEvent()
- cevent.id = dr("CveEvento").ToString.ToEntero
- cevent.title = dr("Asunto").ToString
- cevent.description = dr("Descripcion").ToString
- cevent.start = String.Format("{0:s}", dr("FechaInicio").ToString.ToDateTime)
- cevent.end = String.Format("{0:s}", dr("FechaFin").ToString.ToDateTime)
- cevent.allDay = False
- cevent.CveEventoEstatus = dr("CveEventoEstatus").ToString.ToEntero
- cevent.cveagendatipo = dr("CveAgendaTipo").ToString
- cevent.prioridad = dr("CvePrioridad").ToString.ToEntero
- cevent.backgroundColor = dr("BackGroundColor").ToString
- cevent.recurrenciatipo = dr("RecurrenciaTipo").ToString.ToEntero
- cevent.frecuencia = dr("Frecuencia").ToString.ToEntero
- cevent.diassemana = dr("DiasSemana").ToString
- cevent.dia = dr("Dia").ToString.ToEntero
- cevent.mes = dr("Mes").ToString.ToEntero
- cevent.recurrenciafin = dr("RecurrenciaFin").ToString
- cevent.CveProspecto = dr("CveProspecto").ToString.ToEntero
- cevent.Prospecto = dr("Prospecto").ToString
- cevent.CveTipoEvento = dr("Prospecto").ToString.ToEntero
- cevent.EmpresaCRM = dr("EmpresaCRM").ToString
- cevent.SubProyecto = dr("SubProyecto").ToString
- cevent.CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero
- cevent.Direccion = dr("Direccion").ToString
- '11/05/2018 - Evento Gasto Recurrente
- cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero
- If cevent.CveTipoEvento = 10 Then
- cevent.Importe = dr("Importe").ToString.ToDouble
- End If
+ If dr("CveEventoEstatus").ToString.ToEntero <> 5 Then
- If cevent.CveEventoEstatus.ToString.ToEntero = 3 Then
- cevent.backgroundColor = "#1BBC9B"
- End If
+ Dim cevent As CalendarEvent = New CalendarEvent()
+ cevent.id = dr("CveEvento").ToString.ToEntero
+ cevent.title = dr("Asunto").ToString
+ cevent.description = dr("Descripcion").ToString
+ cevent.start = String.Format("{0:s}", dr("FechaInicio").ToString.ToDateTime)
+ cevent.end = String.Format("{0:s}", dr("FechaFin").ToString.ToDateTime)
+ cevent.allDay = False
+ cevent.CveEventoEstatus = dr("CveEventoEstatus").ToString.ToEntero
+ cevent.cveagendatipo = dr("CveAgendaTipo").ToString
+ cevent.prioridad = dr("CvePrioridad").ToString.ToEntero
+ cevent.backgroundColor = dr("BackGroundColor").ToString
+ cevent.recurrenciatipo = dr("RecurrenciaTipo").ToString.ToEntero
+ cevent.frecuencia = dr("Frecuencia").ToString.ToEntero
+ cevent.diassemana = dr("DiasSemana").ToString
+ cevent.dia = dr("Dia").ToString.ToEntero
+ cevent.mes = dr("Mes").ToString.ToEntero
+ cevent.recurrenciafin = dr("RecurrenciaFin").ToString
+ cevent.CveProspecto = dr("CveProspecto").ToString.ToEntero
+ cevent.Prospecto = dr("Prospecto").ToString
+ cevent.CveTipoEvento = dr("Prospecto").ToString.ToEntero
+ cevent.EmpresaCRM = dr("EmpresaCRM").ToString
+ cevent.SubProyecto = dr("SubProyecto").ToString
+ cevent.CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero
+ cevent.Direccion = dr("Direccion").ToString
- 'VERIFICAMOS SI TIENE O NO RECURRENCIA
- If Not cevent.recurrenciatipo > 0 Then
-
- 'AGREGAMOS CUANDO NO ES RECURRENTE
- Dim tFecha As DateTime = DateAdd(DateInterval.Month, -6, Date.Now)
- 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA
- If dr("FechaFin").ToString.ToDateTime > tFecha Or dr("FechaInicio").ToString.ToDateTime > tFecha Then
- events.Add(cevent)
+ '11/05/2018 - Evento Gasto Recurrente
+ cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero
+ If cevent.CveTipoEvento = 10 Then
+ cevent.Importe = dr("Importe").ToString.ToDouble
End If
- Else
- 'EMPIEZA METODO PARA AGREGAR CUANDO SI ES RECURRENTE
+ If cevent.CveEventoEstatus.ToString.ToEntero = 3 Then
+ cevent.backgroundColor = "#1BBC9B"
+ End If
- Dim FinRecurrencia = cevent.recurrenciafin.ToEntero
- Dim FI As DateTime, FF As DateTime, FT As DateTime
- Dim DiasSemana = cevent.diassemana.Split(","c)
- FI = cevent.start.ToDateTime
- FF = cevent.end.ToDateTime
+ 'VERIFICAMOS SI TIENE O NO RECURRENCIA
+ If Not cevent.recurrenciatipo > 0 Then
- 'OBTENEMOS LA FECHA TERMINO (FT) DE LA RECURRENCIA
- Select Case FinRecurrencia
- Case -1
- FT = DateAdd(DateInterval.Year, 2, dr("FechaInicio").ToString.ToDateTime)
- Case 0
- FT = dr("RecurrenciaFin").ToString.ToDate
- Case Is > 0
- FinRecurrencia -= 1
- Select Case cevent.recurrenciatipo
- Case 1
- FT = DateAdd(DateInterval.Hour, FinRecurrencia * cevent.frecuencia, dr("FechaInicio").ToString.ToDateTime)
- Case 2
- FT = DateAdd(DateInterval.Day, FinRecurrencia * cevent.frecuencia, dr("FechaInicio").ToString.ToDateTime)
- Case 3
- FT = DateAdd(DateInterval.WeekOfYear, FinRecurrencia * cevent.frecuencia, dr("FechaInicio").ToString.ToDateTime)
- FT = DateAdd(DateInterval.Day, (7 - Weekday(FT)).ToString.ToDouble, FT)
- Case 4
- FT = DateAdd(DateInterval.Month, FinRecurrencia * cevent.frecuencia, dr("FechaInicio").ToString.ToDateTime)
- Case 5
- FT = DateAdd(DateInterval.Year, FinRecurrencia * cevent.frecuencia, dr("FechaInicio").ToString.ToDateTime)
- End Select
- End Select
+ 'AGREGAMOS CUANDO NO ES RECURRENTE
+ Dim tFecha As DateTime = DateAdd(DateInterval.Month, -6, Date.Now)
+ 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA
+ If dr("FechaFin").ToString.ToDateTime > tFecha Or dr("FechaInicio").ToString.ToDateTime > tFecha Then
+ events.Add(cevent)
+ End If
+ Else
- 'SI ES TIPO SEMANAL Y DIASSEMANA TIENE VALORES CHECKEA ESTOS VALORES
- Do
- If DiasSemana.Length > 0 AndAlso DiasSemana(0) <> "" Then
- For Each drDias As String In DiasSemana
- Dim FIT = FI, FFT = FF
+ 'EMPIEZA METODO PARA AGREGAR CUANDO SI ES RECURRENTE
- FIT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FI)).ToString.ToDouble, FI)
- FFT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FF)).ToString.ToDouble, FF)
+ Dim FinRecurrencia = cevent.recurrenciafin.ToEntero
+ Dim FI As DateTime, FF As DateTime, FT As DateTime
+ Dim DiasSemana = cevent.diassemana.Split(","c)
+ FI = cevent.start.ToDateTime
+ FF = cevent.end.ToDateTime
+ 'OBTENEMOS LA FECHA TERMINO (FT) DE LA RECURRENCIA
+ Select Case FinRecurrencia
+ Case -1
+ FT = DateAdd(DateInterval.Year, 2, dr("FechaInicio").ToString.ToDateTime)
+ Case 0
+ FT = dr("RecurrenciaFin").ToString.ToDate
+ Case Is > 0
+ FinRecurrencia -= 1
+ Select Case cevent.recurrenciatipo
+ Case 1
+ FT = DateAdd(DateInterval.Hour, FinRecurrencia * cevent.frecuencia, dr("FechaInicio").ToString.ToDateTime)
+ Case 2
+ FT = DateAdd(DateInterval.Day, FinRecurrencia * cevent.frecuencia, dr("FechaInicio").ToString.ToDateTime)
+ Case 3
+ FT = DateAdd(DateInterval.WeekOfYear, FinRecurrencia * cevent.frecuencia, dr("FechaInicio").ToString.ToDateTime)
+ FT = DateAdd(DateInterval.Day, (7 - Weekday(FT)).ToString.ToDouble, FT)
+ Case 4
+ FT = DateAdd(DateInterval.Month, FinRecurrencia * cevent.frecuencia, dr("FechaInicio").ToString.ToDateTime)
+ Case 5
+ FT = DateAdd(DateInterval.Year, FinRecurrencia * cevent.frecuencia, dr("FechaInicio").ToString.ToDateTime)
+ End Select
+ End Select
+
+ 'SI ES TIPO SEMANAL Y DIASSEMANA TIENE VALORES CHECKEA ESTOS VALORES
+ Do
+ If DiasSemana.Length > 0 AndAlso DiasSemana(0) <> "" Then
+ For Each drDias As String In DiasSemana
+ Dim FIT = FI, FFT = FF
+
+ FIT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FI)).ToString.ToDouble, FI)
+ FFT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FF)).ToString.ToDouble, FF)
+
+ cevent = New CalendarEvent()
+ cevent.id = dr("CveEvento").ToString.ToEntero
+ cevent.title = dr("Asunto").ToString
+ cevent.description = dr("Descripcion").ToString
+ cevent.start = String.Format("{0:s}", FIT)
+ cevent.end = String.Format("{0:s}", FFT)
+ cevent.allDay = False
+ cevent.CveEventoEstatus = dr("CveEventoEstatus").ToString.ToEntero
+ cevent.cveagendatipo = dr("CveAgendaTipo").ToString
+ cevent.prioridad = dr("CvePrioridad").ToString.ToEntero
+ cevent.backgroundColor = dr("BackGroundColor").ToString
+
+ cevent.recurrenciatipo = dr("RecurrenciaTipo").ToString.ToEntero
+ cevent.frecuencia = dr("Frecuencia").ToString.ToEntero
+ cevent.diassemana = dr("DiasSemana").ToString
+ cevent.dia = dr("Dia").ToString.ToEntero
+ cevent.mes = dr("Mes").ToString.ToEntero
+ cevent.recurrenciafin = dr("RecurrenciaFin").ToString
+ cevent.CveProspecto = dr("CveProspecto").ToString.ToEntero
+ cevent.Prospecto = dr("Prospecto").ToString
+
+ '11/05/2018 - Evento Gasto Recurrente
+ cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero
+ If cevent.CveTipoEvento = 10 Then
+ cevent.Importe = dr("Importe").ToString.ToDouble
+ End If
+
+ If cevent.CveEventoEstatus.ToString.ToEntero = 3 Then
+ cevent.backgroundColor = "#1BBC9B"
+ End If
+
+ 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL Y/0 SI LA FECHA INICIAL DE LA RECURRENCIA ES MENOR A LA FECHA QUE SE CREO EL EVENTO NO LO AGREGA
+ If FIT > DateAdd(DateInterval.Month, -6, Date.Now) And FIT >= dr("FechaInicio").ToString.ToDateTime Then
+ events.Add(cevent)
+ End If
+ Next
+ Else
cevent = New CalendarEvent()
cevent.id = dr("CveEvento").ToString.ToEntero
cevent.title = dr("Asunto").ToString
cevent.description = dr("Descripcion").ToString
- cevent.start = String.Format("{0:s}", FIT)
- cevent.end = String.Format("{0:s}", FFT)
+ cevent.start = String.Format("{0:s}", FI)
+ cevent.end = String.Format("{0:s}", FF)
cevent.allDay = False
cevent.CveEventoEstatus = dr("CveEventoEstatus").ToString.ToEntero
cevent.cveagendatipo = dr("CveAgendaTipo").ToString
@@ -218,69 +258,37 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
cevent.backgroundColor = "#1BBC9B"
End If
- 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL Y/0 SI LA FECHA INICIAL DE LA RECURRENCIA ES MENOR A LA FECHA QUE SE CREO EL EVENTO NO LO AGREGA
- If FIT > DateAdd(DateInterval.Month, -6, Date.Now) And FIT >= dr("FechaInicio").ToString.ToDateTime Then
+ 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA
+ If FI > DateAdd(DateInterval.Month, -6, Date.Now) Then
events.Add(cevent)
End If
- Next
- Else
- cevent = New CalendarEvent()
- cevent.id = dr("CveEvento").ToString.ToEntero
- cevent.title = dr("Asunto").ToString
- cevent.description = dr("Descripcion").ToString
- cevent.start = String.Format("{0:s}", FI)
- cevent.end = String.Format("{0:s}", FF)
- cevent.allDay = False
- cevent.CveEventoEstatus = dr("CveEventoEstatus").ToString.ToEntero
- cevent.cveagendatipo = dr("CveAgendaTipo").ToString
- cevent.prioridad = dr("CvePrioridad").ToString.ToEntero
- cevent.backgroundColor = dr("BackGroundColor").ToString
-
- cevent.recurrenciatipo = dr("RecurrenciaTipo").ToString.ToEntero
- cevent.frecuencia = dr("Frecuencia").ToString.ToEntero
- cevent.diassemana = dr("DiasSemana").ToString
- cevent.dia = dr("Dia").ToString.ToEntero
- cevent.mes = dr("Mes").ToString.ToEntero
- cevent.recurrenciafin = dr("RecurrenciaFin").ToString
- cevent.CveProspecto = dr("CveProspecto").ToString.ToEntero
- cevent.Prospecto = dr("Prospecto").ToString
-
- '11/05/2018 - Evento Gasto Recurrente
- cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero
- If cevent.CveTipoEvento = 10 Then
- cevent.Importe = dr("Importe").ToString.ToDouble
End If
- If cevent.CveEventoEstatus.ToString.ToEntero = 3 Then
- cevent.backgroundColor = "#1BBC9B"
- End If
+ Select Case cevent.recurrenciatipo
+ Case 1
+ FI = DateAdd(DateInterval.Hour, cevent.frecuencia, FI)
+ FF = DateAdd(DateInterval.Hour, cevent.frecuencia, FF)
+ Case 2
+ FI = DateAdd(DateInterval.Day, cevent.frecuencia, FI)
+ FF = DateAdd(DateInterval.Day, cevent.frecuencia, FF)
+ Case 3
+ FI = DateAdd(DateInterval.WeekOfYear, cevent.frecuencia, FI)
+ FF = DateAdd(DateInterval.WeekOfYear, cevent.frecuencia, FF)
+ Case 4
+ FI = DateAdd(DateInterval.Month, cevent.frecuencia, FI)
+ FF = DateAdd(DateInterval.Month, cevent.frecuencia, FF)
+ Case 5
+ FI = DateAdd(DateInterval.Year, cevent.frecuencia, FI)
+ FF = DateAdd(DateInterval.Year, cevent.frecuencia, FF)
+ End Select
- 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA
- If FI > DateAdd(DateInterval.Month, -6, Date.Now) Then
- events.Add(cevent)
- End If
- End If
+ Loop Until FI > FT
+ End If
- Select Case cevent.recurrenciatipo
- Case 1
- FI = DateAdd(DateInterval.Hour, cevent.frecuencia, FI)
- FF = DateAdd(DateInterval.Hour, cevent.frecuencia, FF)
- Case 2
- FI = DateAdd(DateInterval.Day, cevent.frecuencia, FI)
- FF = DateAdd(DateInterval.Day, cevent.frecuencia, FF)
- Case 3
- FI = DateAdd(DateInterval.WeekOfYear, cevent.frecuencia, FI)
- FF = DateAdd(DateInterval.WeekOfYear, cevent.frecuencia, FF)
- Case 4
- FI = DateAdd(DateInterval.Month, cevent.frecuencia, FI)
- FF = DateAdd(DateInterval.Month, cevent.frecuencia, FF)
- Case 5
- FI = DateAdd(DateInterval.Year, cevent.frecuencia, FI)
- FF = DateAdd(DateInterval.Year, cevent.frecuencia, FF)
- End Select
- Loop Until FI > FT
End If
+
+
Next
Catch ex As Exception
GuardaLog(ex.ToString())
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index 4eed8c7d4..690d09452 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -3094,13 +3094,13 @@ Partial Class PopUpVerFactura
CartaPorte.Parametros.Add(New ReportParameter($"TieneCartaPorte", "False"))
End If
Else
- If UsuarioActual.CveEmpresa = 13 AndAlso Vta.TipoDocto = "Egs" Then
+ If UsuarioActual.CveEmpresa = 13 AndAlso Vta.TipoDocto.Contiene("Egs", "Ant") Then
CartaPorte = New Modelos.MSubReportData()
CartaPorte.Parametros.Add(New ReportParameter($"TieneCartaPorte", "False"))
End If
End If
Else
- If UsuarioActual.CveEmpresa = 13 AndAlso Vta.TipoDocto = "Egs" Then
+ If UsuarioActual.CveEmpresa = 13 AndAlso Vta.TipoDocto.Contiene("Egs", "Ant") Then
CartaPorte = New Modelos.MSubReportData()
CartaPorte.Parametros.Add(New ReportParameter($"TieneCartaPorte", "False"))
End If
diff --git a/Empresas/13/Formatos/72459.xlsm b/Empresas/13/Formatos/72459.xlsm
deleted file mode 100644
index 1ab70ca10..000000000
Binary files a/Empresas/13/Formatos/72459.xlsm and /dev/null differ
diff --git a/Empresas/13/Formatos/72470.xlsm b/Empresas/13/Formatos/72470.xlsm
deleted file mode 100644
index 327c1010c..000000000
Binary files a/Empresas/13/Formatos/72470.xlsm and /dev/null differ
diff --git a/Empresas/13/Formatos/72536.xlsm b/Empresas/13/Formatos/72536.xlsm
deleted file mode 100644
index 327c1010c..000000000
Binary files a/Empresas/13/Formatos/72536.xlsm and /dev/null differ
diff --git a/Empresas/13/Formatos/72537.xlsm b/Empresas/13/Formatos/72537.xlsm
deleted file mode 100644
index 327c1010c..000000000
Binary files a/Empresas/13/Formatos/72537.xlsm and /dev/null differ
diff --git a/Empresas/13/Formatos/72539.xlsm b/Empresas/13/Formatos/72539.xlsm
deleted file mode 100644
index 327c1010c..000000000
Binary files a/Empresas/13/Formatos/72539.xlsm and /dev/null differ
diff --git a/Empresas/13/Formatos/72541.xlsm b/Empresas/13/Formatos/72541.xlsm
deleted file mode 100644
index 327c1010c..000000000
Binary files a/Empresas/13/Formatos/72541.xlsm and /dev/null differ
diff --git a/Empresas/13/Formatos/72603.xlsm b/Empresas/13/Formatos/72603.xlsm
deleted file mode 100644
index 1192e1a70..000000000
Binary files a/Empresas/13/Formatos/72603.xlsm and /dev/null differ
diff --git a/Empresas/13/Formatos/72717.xlsm b/Empresas/13/Formatos/72717.xlsm
deleted file mode 100644
index 1192e1a70..000000000
Binary files a/Empresas/13/Formatos/72717.xlsm and /dev/null differ
diff --git a/Empresas/13/Formatos/Cheque.xlsm b/Empresas/13/Formatos/Cheque.xlsm
deleted file mode 100644
index 671623b9f..000000000
Binary files a/Empresas/13/Formatos/Cheque.xlsm and /dev/null differ
diff --git a/Empresas/13/Formatos/Copia de 71671.xlsm b/Empresas/13/Formatos/Copia de 71671.xlsm
deleted file mode 100644
index 5ec2606ac..000000000
Binary files a/Empresas/13/Formatos/Copia de 71671.xlsm and /dev/null differ
diff --git a/Empresas/13/Formatos/Copia de 72360.xlsm b/Empresas/13/Formatos/Copia de 72360.xlsm
deleted file mode 100644
index dac6807b9..000000000
Binary files a/Empresas/13/Formatos/Copia de 72360.xlsm and /dev/null differ
diff --git a/Empresas/13/Formatos/Copia de Transferencia-72272.xlsm b/Empresas/13/Formatos/Copia de Transferencia-72272.xlsm
deleted file mode 100644
index c353ccb3b..000000000
Binary files a/Empresas/13/Formatos/Copia de Transferencia-72272.xlsm and /dev/null differ
diff --git a/Empresas/13/Formatos/Copia de Transferencia-72274.xlsm b/Empresas/13/Formatos/Copia de Transferencia-72274.xlsm
deleted file mode 100644
index 89c0b62a1..000000000
Binary files a/Empresas/13/Formatos/Copia de Transferencia-72274.xlsm and /dev/null differ
diff --git a/Empresas/13/Formatos/Copia de Transferencia-72277.xlsm b/Empresas/13/Formatos/Copia de Transferencia-72277.xlsm
deleted file mode 100644
index 8714574b7..000000000
Binary files a/Empresas/13/Formatos/Copia de Transferencia-72277.xlsm and /dev/null differ
diff --git a/OC/RepSolicitudesAnticipo.aspx b/OC/RepSolicitudesAnticipo.aspx
index ccd5adc92..911133519 100644
--- a/OC/RepSolicitudesAnticipo.aspx
+++ b/OC/RepSolicitudesAnticipo.aspx
@@ -86,6 +86,7 @@