diff --git a/Acumuladores/CatFoliosGarantia.aspx.vb b/Acumuladores/CatFoliosGarantia.aspx.vb
index 9172d5c1e..3acab2744 100644
--- a/Acumuladores/CatFoliosGarantia.aspx.vb
+++ b/Acumuladores/CatFoliosGarantia.aspx.vb
@@ -255,4 +255,54 @@ Partial Class Acumuladores_CatFoliosGarantia
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
End Sub
+ Protected Sub BtnGenerarTxt_Click(sender As Object, e As EventArgs)
+ Dim SbTxt As New StringBuilder
+
+ For Each GvRow As GridViewRow In GvGarantiasDetalle.Rows
+ If GvRow.RowType = DataControlRowType.DataRow Then
+ '1.- Consecutivo Partida-->1
+ SbTxt.AppendFormat("{0}@", GvRow.DataKey("Consecutivo"))
+ '2.- Cliente-->100407
+ SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoCliente"))
+ '3. Codigo De Articulo --> 171402
+ SbTxt.AppendFormat("{0}@", GvRow.DataKey("Codigo"))
+ '4. Tipo De Uso --> A
+ SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoTipoUso"))
+ '5. Defecto --> P
+ SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoTipoDefecto"))
+ '6. Codigo De Ensamble --> 1X
+ SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoEnsamble"))
+ '7. Codigo De Linea/Termico --> 9000
+ SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoLinea"))
+ '8. Codigo De Inspeccion --> J8K
+ SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoInspeccion"))
+ '9. Fecha De Venta --> 05/09/2009
+ SbTxt.AppendFormat("{0}@", GvRow.DataKey("FechaVenta").ToDateTime().ToString("dd/MM/yyyy"))
+ '10. Fecha De Reclamacion --> 05/07/2010
+ SbTxt.AppendFormat("{0}@", GvRow.DataKey("FechaReclamacion").ToDateTime().ToString("dd/MM/yyyy"))
+ '11. TipoComprobante --> 1
+ SbTxt.AppendFormat("{0}@", GvRow.DataKey("TipoComprobante"))
+ '12. Comprobante --> N/A
+ SbTxt.AppendFormat("{0}@", GvRow.DataKey("Comprobante"))
+ '13. Autorizo --> STAN7490
+ SbTxt.AppendFormat("{0}@", GvRow.DataKey("Autorizo"))
+ '14. Comentarios --> Cliente 100407
+ SbTxt.AppendFormat("{0}@", GvRow.DataKey("Comentarios"))
+ '15. Clave De Autorizacion / Codigo Error --> P05TRBGX
+ SbTxt.AppendFormat("{0}", GvRow.DataKey("ClaveAutorizacion"))
+
+ SbTxt.Append(vbCrLf)
+ End If
+ Next
+
+ Dim text As String = SbTxt.ToString
+ Response.Clear()
+ Response.ClearHeaders()
+ Response.AddHeader("Content-Length", text.Length.ToString)
+ Response.ContentType = "text/plain"
+ Response.AppendHeader("content-disposition", $"attachment;filename=""{LblFolio.Text}.txt""")
+ Response.Write(text)
+ Response.End()
+
+ End Sub
End Class
diff --git a/Acumuladores/EntradasUsadosResumenRep.aspx b/Acumuladores/EntradasUsadosResumenRep.aspx
index eb86ecdc5..9fe1ff8df 100644
--- a/Acumuladores/EntradasUsadosResumenRep.aspx
+++ b/Acumuladores/EntradasUsadosResumenRep.aspx
@@ -11,7 +11,10 @@
-
+
+
+
+
@@ -97,6 +100,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Acumuladores/EntradasUsadosResumenRep.aspx.vb b/Acumuladores/EntradasUsadosResumenRep.aspx.vb
index ced8542ab..4043c344f 100644
--- a/Acumuladores/EntradasUsadosResumenRep.aspx.vb
+++ b/Acumuladores/EntradasUsadosResumenRep.aspx.vb
@@ -1,6 +1,8 @@
Imports System.Data
Imports Extensiones
Imports Microsoft.Reporting.WebForms
+Imports GemBox.Spreadsheet
+Imports System.IO
Partial Class Acumuladores_RepEntradasUsados
Inherits ClsPaginas
@@ -22,6 +24,9 @@ Partial Class Acumuladores_RepEntradasUsados
txtFechaI.Text = Today.AddDays((-1) * (Today.Day - 1))
txtFechaF.Text = Today
CargarDatos()
+ CargarCombos()
+
+
End If
End Sub
@@ -30,6 +35,18 @@ Partial Class Acumuladores_RepEntradasUsados
DdlAlmacenes.DataBind()
End Sub
+ Protected Sub CargarCombos()
+ Dim ObjAcum As New ClsAcumuladores
+ Dim fecha As Date = Date.Now.AddMonths(-1)
+ ObjAcum.GetAñosVentas(UsuarioActual.CveEmpresa)
+ DdlAño.DataSource = ObjAcum.DtResultados
+ DdlAño.DataBind()
+ DdlAño.SelectedValue = fecha.Year.ToEntero
+ ObjAcum.Dispose()
+
+ DdlMes.SelectedValue = fecha.Month.ToEntero
+ End Sub
+
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
Dim ObjAcum As New ClsAcumuladores
@@ -63,5 +80,77 @@ Partial Class Acumuladores_RepEntradasUsados
ImprimirPDF(String.Format("Empresas/{0}/Formatos/RepEntradasUsados.rdlc", UsuarioActual.CveEmpresa), DatosEntradasUsados, params, "Reporte entrada usados", "PDF")
+ End Sub
+
+ Protected Sub BtnDescargaSabana_Click(sender As Object, e As EventArgs) Handles BtnDescargaSabana.Click
+ RegistraScript(String.Format("$('#{0}').modal('show');", "DivModalSabana"))
+
+ 'RegistraScript("$('#DModalEditarFecha').modal('hide')")
+
+ End Sub
+
+ Protected Sub BtnDescargarSabana_Click(sender As Object, e As EventArgs) Handles BtnDescargarSabana.Click
+ Dim Retorno As New IO.MemoryStream()
+ Dim ObjAcum As New ClsAcumuladores
+ Dim Mes As String = DdlMes.SelectedValue.ToString
+ Dim Año As String = DdlAño.SelectedValue.ToString
+ Dim Fecha As Date = (String.Format("01/{0}/{1}", Mes, Año)).ToDate
+ Dim dt As DataTable
+ Dim NombreArchivo As String
+ Try
+ If DdlOpcion.SelectedValue = 1 Then
+ ObjAcum.GetSabanaVenta(Fecha, 1, UsuarioActual.CveEmpresa)
+
+ ElseIf DdlOpcion.SelectedValue = 2 Then
+ ObjAcum.GetSabanaVenta(Fecha, 2, UsuarioActual.CveEmpresa)
+
+ End If
+ dt = ObjAcum.DtResultados
+
+ If dt IsNot Nothing And dt.Rows.Count > 0 Then
+ SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
+ Dim workbook As New ExcelFile()
+
+ Dim worksheet = workbook.Worksheets.Add("Sabana de ventas")
+ worksheet.InsertDataTable(dt, New InsertDataTableOptions() With
+ {
+ .ColumnHeaders = True,
+ .StartRow = 0,
+ .StartColumn = 0
+ })
+ worksheet.Rows(0).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(75, 119, 190), SpreadsheetColor.FromArgb(255, 255, 255))
+ worksheet.Rows(0).Style.Font.Color = SpreadsheetColor.FromArgb(255, 255, 255)
+
+ Dim columnCount = worksheet.CalculateMaxUsedColumns()
+ For i = 0 To columnCount
+ worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
+ Next
+
+ Año = Strings.Right(Año, 2)
+ If Mes.ToEntero < 10 Then
+ Mes = String.Format("0{0}", Mes)
+ End If
+ If DdlOpcion.SelectedValue = 1 Then
+ NombreArchivo = String.Format("700415-{0}{1}-GE", Mes, Año)
+ workbook.Save(Response, $"{NombreArchivo}.xlsx", SaveOptions.XlsxDefault)
+
+
+ ElseIf DdlOpcion.SelectedValue = 2 Then
+ NombreArchivo = String.Format("700415-{0}{1}-CS", Mes, Año)
+ workbook.Save(Response, $"{NombreArchivo}.xlsx", SaveOptions.XlsxDefault)
+
+ End If
+ End If
+ Catch ex As Exception
+ GuardaLog(String.Format("Ocurrio un error al generar el excel {0}", ex.Message))
+
+ End Try
+
+ ObjAcum.Dispose()
+ RegistraScript("$('#DModalEditarFecha').modal('hide')")
+
+
+
+
End Sub
End Class
diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb
index c37e75652..b14e03dfe 100644
--- a/App_Code/ClsAcumuladores.vb
+++ b/App_Code/ClsAcumuladores.vb
@@ -1173,6 +1173,42 @@ Public Class ClsAcumuladores
End Function
+ Public Function GetSabanaVenta(Fecha As Date, CveOpcion As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+
+ SqlDataAdapter("PA_Acum_SabanaVentaGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@Fecha", SqlDbType.Date).Value = Fecha
+ .Add("@Opcion", SqlDbType.Int).Value = CveOpcion
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As SqlException
+ OnError("Ocurrió un error al consultar los movimientos. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
+ Public Function GetAñosVentas(CveEmprea As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ SqlDataAdapter(String.Format("select year(Fecha) as Año from Ventas where CveEmpresa = {0} group by year(Fecha) Order by year(Fecha)", CveEmprea.ToString), CommandType.Text)
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError(String.Format("Ocurrió un error al consultar los año de venta"), ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return Retorno
+
+ End Function
+
#Region " IDisposable Support "
' IDisposable
diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb
index 9ab441dc1..fff9651c8 100644
--- a/App_Code/ClsBancos.vb
+++ b/App_Code/ClsBancos.vb
@@ -954,7 +954,7 @@ Public Class ClsBancos
Dim dttpagos As DataTable = Nothing
Dim dr As Data.DataRow = Nothing
- If GetComplementoPagosRep(-1, Now.AddYears(-2), Now, If(CvePrePoliza > 0, -1, CveIE), CveVenta, If(EsRegeneracion, 2, 1), UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza) Then
+ If GetComplementoPagosRep(-1, Now.AddYears(-5), Now, If(CvePrePoliza > 0, -1, CveIE), CveVenta, If(EsRegeneracion, 2, 1), UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza) Then
dr = DtResultados.FiltroPrimero("CveVenta IS NULL")
dttpagos = DtResultados.FiltraParametros("CveVenta > 0")
End If
diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index d82eed1e6..4956aa129 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -1410,6 +1410,8 @@ Public Class ClsContabilidad
_ContaIdPoliza = tIdPoliza
_ContaFolio = ObjConta.Folio
End If
+ Else
+ StrLog.AppendFormat(" Error 0.2 - ")
End If
Else
diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index 0fd71e90d..c4c0b3881 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -2918,11 +2918,12 @@ Public Class ClsInventarios
#End Region
#Region " INVENTARIOS - VENTAS "
- Public Function EntregaAlmacenGet(CveVenta As Integer) As Boolean
+ Public Function EntregaAlmacenGet(CveVenta As Integer, Optional CveAlmacen As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_EntregaAlmacenGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
+ .Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
End With
Try
SqlAdapter.Fill(Data)
diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb
index 9ea0c4866..3672bca91 100644
--- a/App_Code/ClsMovimientos.vb
+++ b/App_Code/ClsMovimientos.vb
@@ -1517,7 +1517,7 @@ Public Class ClsMovimientos
Optional CveCuenta As Integer = -1, Optional Grupo As String = "-1",
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0,
Optional CveMoneda As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional Tipo As Integer = -1,
- Optional EsDistribuidor As Integer = -1) As Boolean
+ Optional EsDistribuidor As Integer = -1, Optional FechaAplicadoI As Date = Nothing, Optional FechaAplicadoF As Date = Nothing) As Boolean
Dim Retorno As Boolean = False
@@ -1546,7 +1546,12 @@ Public Class ClsMovimientos
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
.Add("@Tipo", SqlDbType.Int).Value = Tipo
- .Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
+ .Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
+
+
+ .Add("@FechaAplicadoI", SqlDbType.Date).Value = FechaAplicadoI.ToShortDateString
+ .Add("@FechaAplicadoF", SqlDbType.Date).Value = FechaAplicadoF.ToShortDateString
+
End With
Try
diff --git a/App_Code/ClsOC.vb b/App_Code/ClsOC.vb
index 829a5b2f1..913c6ddf7 100644
--- a/App_Code/ClsOC.vb
+++ b/App_Code/ClsOC.vb
@@ -1580,7 +1580,7 @@ Public Class ClsOC
Return Retorno
End Function
- Public Function RemoveEstatusUsuarios(CveEstatusUsuarios As Integer, Optional CveUsuarioModifico As Integer = -1) As Boolean
+ Public Function RemoveEstatusUsuarios(CveEstatusUsuarios As Integer, CveUsuarioModifico As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OC_EstatusUsuariosRemove")
@@ -1596,7 +1596,8 @@ Public Class ClsOC
Retorno = True
Catch Ex1 As SqlException
If Ex1.Message.Contains("Número: 547;") Then
- Alert("El Estatus no se pudo eliminar porque está siendo usado por un registro.", TipoMensaje.MsgAdvertencia)
+ 'Alert("El Estatus no se pudo eliminar porque está siendo usado por un registro.", TipoMensaje.MsgAdvertencia)
+ Me.OnError("Ocurrió un error al eliminar el Estatus de Usuario para Ordenes de Compra.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Else
Me.OnError("Ocurrió un error al eliminar el Estatus de Usuario para Ordenes de Compra.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If
diff --git a/App_Code/ClsOIEventos.vb b/App_Code/ClsOIEventos.vb
index fe7fee68d..457ba77d3 100644
--- a/App_Code/ClsOIEventos.vb
+++ b/App_Code/ClsOIEventos.vb
@@ -888,7 +888,30 @@ Public Class ClsOIEventos
OnError("Ocurrió un error al obtener el Catálogo de Evento Usuario.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
+ End Function
+
+
+
+ Public Function RemoveEventosProyectos(CveEvento As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_OI_EventosProyectosRemove")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEvento", SqlDbType.Int).Value = CveEvento
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al eliminar el proyecto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
End Function
+
+
+
Public Function GetEventos2(cveEvento As Int32, CveEmpresa As Integer, Optional CveEventoPadre As Integer = -1) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_OI_Eventos2Get", CommandType.StoredProcedure)
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 85eb32967..ba63ef5c8 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -36,6 +36,8 @@ Public Class ClsPaginas
Public Shared Property EmpresaNotificaciones() As Empresa
+ Public Shared Property EmpresaNotificacionesGPS() As Empresa
+
Public ReadOnly Property EsProduccion As Boolean
@@ -5275,14 +5277,14 @@ Public Class ClsPaginas
Usuario.CerrarSession()
End Sub
- Public Sub Alert(Mensaje As String, Optional pOpcion As TipoMensaje = TipoMensaje.MsgInformacion, Optional JSBtnAceptar As String = "", Optional timeout As Integer = 5)
+ Public Sub Alert(Mensaje As String, Optional pOpcion As TipoMensaje = TipoMensaje.MsgInformacion, Optional JSBtnAceptar As String = "", Optional timeout As Integer = 5, Optional ShowCloseButton As Boolean = True)
If DirectCast(pOpcion, Integer) >= 5 Then
Mensaje = Mensaje.Replace("'"c, "\'").Replace(vbCrLf, "").Replace("""", "\'").Replace(vbLf, " ")
JSBtnAceptar = JSBtnAceptar.Replace("'"c, "\'")
Dim toastscript As String = String.Format("alertatoast({3},'{0}',function(){{{1}}},{2});", Mensaje, JSBtnAceptar, timeout, DirectCast(pOpcion, Integer))
ViewState("strToastMsglargonoreplace") = String.Format("{0}{1}", If(Not IsNothing(ViewState("strToastMsglargonoreplace")) AndAlso ViewState("strToastMsglargonoreplace").ToString().Length > 0, ViewState("strToastMsglargonoreplace").ToString(), ""), toastscript)
Else
- Mensaje.Alert(Mensaje, pOpcion, JSBtnAceptar, TimeoutToast:=timeout)
+ Mensaje.Alert(Mensaje, pOpcion, JSBtnAceptar, TimeoutToast:=timeout, ShowCloseButton:=ShowCloseButton)
End If
End Sub
Protected Overridable Sub Page_PreRender(sender As Object, e As EventArgs) Handles Me.PreRender
diff --git a/App_Code/ClsSisNotificaciones.vb b/App_Code/ClsSisNotificaciones.vb
index b63c12e88..be0a9a61e 100644
--- a/App_Code/ClsSisNotificaciones.vb
+++ b/App_Code/ClsSisNotificaciones.vb
@@ -221,7 +221,7 @@ Public Class ClsSisNotificaciones
Try
Dim ResultadoMail As Integer = 0
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
- If ObjMail.SendMail(ClsPaginas.EmpresaNotificaciones, Mail, Asunto, Cuerpo, MailCC, LSRutasMail) Then
+ If ObjMail.SendMail(ClsPaginas.EmpresaNotificacionesGPS, Mail, Asunto, Cuerpo, MailCC, LSRutasMail) Then
ObjNotificacion.UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1)
End If
Catch ex As Exception
diff --git a/App_Code/ClsSubProyectos.vb b/App_Code/ClsSubProyectos.vb
index 508c6f3de..f14b98c57 100644
--- a/App_Code/ClsSubProyectos.vb
+++ b/App_Code/ClsSubProyectos.vb
@@ -333,7 +333,7 @@ Public Class ClsSubProyectos
Public Function AddCentroCosto(SubProyecto As String, IdSegNeg As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveProyecto As Integer, Optional Serie As String = "", Optional IVA As Double = 0.0, Optional Calle As String = "", Optional NoExt As String = "",
Optional NoInt As String = "", Optional Colonia As String = "", Optional Localidad As String = "", Optional Municipio As String = "", Optional Estado As String = "", Optional Pais As String = "", Optional CP As String = "", Optional TipoSucursal As Integer = 0, Optional EsSucursal As Integer = 0,
Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional Correo As String = "", Optional CvePrecioLista As Integer = -1,
- Optional Telefono As String = "") As Boolean
+ Optional Telefono As String = "", Optional NoVerificaAlmacen As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_CentroCostoAdd")
@@ -365,6 +365,7 @@ Public Class ClsSubProyectos
.Add("@Correo", SqlDbType.VarChar).Value = Correo
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
+ .Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen
.Add("@CveSubProyecto", SqlDbType.Int).Direction = ParameterDirection.Output
End With
@@ -387,7 +388,7 @@ Public Class ClsSubProyectos
Public Function UpdateCentroCosto(CveSubProyecto As Integer, SubProyecto As String, IdSegNeg As Integer, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveProyecto As Integer, Optional Serie As String = "", Optional IVA As Double = 0.0, Optional Calle As String = "", Optional NoExt As String = "",
Optional NoInt As String = "", Optional Colonia As String = "", Optional Localidad As String = "", Optional Municipio As String = "", Optional Estado As String = "", Optional Pais As String = "", Optional CP As String = "", Optional TipoSucursal As Integer = 0, Optional EsSucursal As Integer = 0,
Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional Correo As String = "", Optional CvePrecioLista As Integer = -1,
- Optional Telefono As String = "", Optional HorarioVerano As Integer = Nothing, Optional HorarioInvierno As Integer = Nothing) As Boolean
+ Optional Telefono As String = "", Optional HorarioVerano As Integer = Nothing, Optional HorarioInvierno As Integer = Nothing, Optional NoVerificaAlmacen As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_CentroCostoUpdate")
@@ -423,6 +424,7 @@ Public Class ClsSubProyectos
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
.Add("@HorarioVerano", SqlDbType.Int).Value = HorarioVerano
.Add("@HorarioInvierno", SqlDbType.Int).Value = HorarioInvierno
+ .Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen
End With
Try
diff --git a/App_Code/ClsValidaCFDi.vb b/App_Code/ClsValidaCFDi.vb
index 4707619ca..66d701fa5 100644
--- a/App_Code/ClsValidaCFDi.vb
+++ b/App_Code/ClsValidaCFDi.vb
@@ -83,18 +83,18 @@ Public Class ClsValidaCFDi
Return Me.EsValida
End Function
- Private Sub VerificaCFDI()
-
+ Private Sub VerificaCFDI()
+ Dim Importe As String = LImporte.ToString("F6").PadLeft(17, "0")
+ Dim MsgError As String = ""
+ Dim MsgError2 As String = ""
Try
Dim wsConsultaCFDI As New wsValidaCFDi2.ConsultaCFDIServiceClient
- Dim oAcuse As New wsValidaCFDi2.Acuse
-
- 'oAcuse = wsConsultaCFDI.Consulta("?re=BEN9501023I0&rr=SARM8209281F1&tt=440.000000&id=EC609EC1-5F63-4333-A2B8-2EDC10B68075")
- '?re=BEN9501023I0&rr=SARM8209281F1&tt=440.000000&id=EC609EC1-5F63-4333-A2B8-2EDC10B68075
-
- Dim Importe As String = LImporte.ToString("F6").PadLeft(17, "0")
-
+ Dim oAcuse As New wsValidaCFDi2.Acuse
+
+ 'oAcuse = wsConsultaCFDI.Consulta("?re=BEN9501023I0&rr=SARM8209281F1&tt=440.000000&id=EC609EC1-5F63-4333-A2B8-2EDC10B68075")
+ '?re=BEN9501023I0&rr=SARM8209281F1&tt=440.000000&id=EC609EC1-5F63-4333-A2B8-2EDC10B68075
+
oAcuse = wsConsultaCFDI.Consulta(String.Format("?re={0}&rr={1}&tt={2}&id={3}", LRFCEmisor, LRFCReceptor, Importe, LFolioFiscal.ToUpper))
'oAcuse = wsConsultaCFDI.Consulta("?re=LESA6211234B2&rr=GCO890418M56&tt=0000001360.000000&id=0C8BAD9C-A8C6-4A48-8FF5-0687AC6F1581")
'Alert(oAcuse.Estado)
@@ -106,18 +106,25 @@ Public Class ClsValidaCFDi
End If
If oAcuse.ValidacionEFOS = "100" Then
- EnListaEFOS = True
+ EnListaEFOS = True
Else
EnListaEFOS = False
- End If
-
- 'SI NO PUEDE ENCONTRAR EL ESTATUS UTILIZA EL SERVICIO PARA ESTATUS DE CANCELACION
+ End If
+ Catch ex As Exception
+ MsgError = "Op1. No se pudo validar la vigencia ante el SAT "
+ GuardaLog(String.Format("Op1. {0}", ex.Message))
+ End Try
+
+ Try
+
+
+ 'SI NO PUEDE ENCONTRAR EL ESTATUS UTILIZA EL SERVICIO PARA ESTATUS DE CANCELACION
If EsValida = 0 Then
Dim Vigencia = Timbrado.VerificarVigenciaSAT(LFolioFiscal.ToUpper, LRFCEmisor, LRFCReceptor, Importe, True)
If Vigencia IsNot Nothing Then
- If Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then
+ If Not Vigencia.Estado.ToUpper().Contains("NO ENCONTRADO") AndAlso Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then
EsValida = 1
End If
If Vigencia.Estado.ToUpper().Contains("CANCELADO") Then
@@ -132,18 +139,24 @@ Public Class ClsValidaCFDi
End If
Else
EsValida = 0
+
End If
Else
EsValida = 0
End If
- End If
-
- Catch ex As Exception
- OnError("Ocurrió un error al consultar la vigencia ante el SAT", ex)
- End Try
+ End If
+ Catch ex As Exception
+ MsgError2 = "Op2. No se pudo validar la vigencia ante el SAT "
+ GuardaLog(String.Format("Op2. {0}", ex.Message))
+ End Try
+ 'sino se pudo validar, que muestre el mensaje de error, pero solo un mensaje
+ If EsValida = 0 AndAlso (MsgError <> "" OrElse MsgError2 <> "") Then
+ If MsgError <> "" Then Alert(MsgError, TipoMensaje.MsgError) Else If MsgError2 <> "" Then Alert(MsgError2, TipoMensaje.MsgError)
+ End If
+
End Sub
- Private Sub Verificar()
+ Private Sub VerificaWeb()
Try
Dim URL As String = "https://verificacfdi.facturaelectronica.sat.gob.mx/"
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index a4b949dfd..e864519ea 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -4202,13 +4202,14 @@ Public Class ClsVentas
Return retorno
End Function
- Public Function TraspasaVentasAplicadasAnt(CveVentaNueva As Integer, CveVentaAnterior As Integer, CveEmpresa As Integer) As Boolean
+ Public Function TraspasaVentasAplicadasAnt(CveVentaNueva As Integer, CveVentaAnterior As Integer, CveEmpresa As Integer, CvePrePoliza As Integer) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_Vta_TraspasaVentasAplicadasAnt", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVentaNueva", SqlDbType.Int).Value = CveVentaNueva
.Add("@CveVentaAnterior", SqlDbType.Int).Value = CveVentaAnterior
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
End With
Try
SqlAdapter.Fill(Data)
@@ -4506,11 +4507,16 @@ Public Class ClsVentas
End Try
Return retorno
End Function
- Public Function GetMetasVendedores(CveEmpresa As Integer) As Boolean
+ Public Function GetMetasVendedores(CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveVendedor As Integer = -1, Optional CveMarca As Integer = -1, Optional Mes As Integer = -1, Optional Anio As Integer = -1) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_Vta_MetasVendedoresGet", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
+ .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
+ .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
+ .Add("@Mes", SqlDbType.Int).Value = Mes
+ .Add("@Anio", SqlDbType.Int).Value = Anio
End With
Try
SqlAdapter.Fill(Data)
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index 807954b16..8ebf065ce 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -2652,7 +2652,7 @@ Namespace Modelos
Case 11 'Anticipo
'[IPP] SI ES REFACTURACION LOS ANTICIPOS NO LOS DEBE APLICAR EN EL INGRESO REFACTURADO (VIEJO)
- If NuevaFactura = 1 And ObjFactura.CveVenta = CveDevolucion Then
+ If CveEstatusRefacturacion > 0 Then
Exit Select
End If
@@ -4458,6 +4458,10 @@ Namespace Modelos
Dim CveEstatusRefacturacion As Integer = If(ObjFactura.CveEstatusRefacturacion <= 0, 0, ObjFactura.CveEstatusRefacturacion)
+ If Not EsRefacturacion Then
+ CveEstatusRefacturacion = 0
+ End If
+
Dim CancelacionFecha As Date
Dim FolioFiscal As String = ObjFactura.FolioFiscal
Dim CancelacionAcuse As String = ""
@@ -4485,7 +4489,7 @@ Namespace Modelos
If CveEstatusFacturaAsignado <= 0 Then
Try
- If ObjFactura.FolioFiscal <> "" Then
+ If ObjFactura.FolioFiscal <> "" AndAlso UsuarioActual.Empresa.FacturaProduccion Then
If ObjFactura.TipoDocto.Contiene("Ing", "Ant", "Dev", "Egs") Then
'VERIFICA SI DEBE VALIDAR ANTE EL SAT
diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb
index da8ccef26..ee3b331f1 100644
--- a/App_Code/modExtensiones.vb
+++ b/App_Code/modExtensiones.vb
@@ -311,7 +311,7 @@ Namespace Extensiones
ToastAdventencia = 8 'Warning
End Enum
- Public Sub Alert(Obj As Object, Mensaje As String, pOpcion As TipoMensaje, Optional JSBtnAceptar As String = "", Optional TextoConfirmacion As String = "Aceptar", Optional TextoCancelacion As String = "Cancelar", Optional TimeoutToast As Integer = 5)
+ Public Sub Alert(Obj As Object, Mensaje As String, pOpcion As TipoMensaje, Optional JSBtnAceptar As String = "", Optional TextoConfirmacion As String = "Aceptar", Optional TextoCancelacion As String = "Cancelar", Optional TimeoutToast As Integer = 5, Optional ShowCloseButton As Boolean = True)
If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler.GetType().IsSubclassOf(GetType(Page)) Then
Dim Titulo As String = ""
@@ -331,6 +331,7 @@ Namespace Extensiones
Dim b3title As String = ""
Dim b3clas As String = "hide"
Dim b3js As String = ""
+ Dim closeButtonOption As String = ""
Select Case pOpcion
Case TipoMensaje.MsgInformacion
Titulo = " Información"
@@ -371,15 +372,18 @@ Namespace Extensiones
End Select
Try
-
+ 'No cerrar el alert obliga a hacer click en los botones de opcion
+ If Not ShowCloseButton Then
+ closeButtonOption = "backdrop : ""static"", keyboard : false, closeButton: false,"
+ End If
Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page)
Dim script As String = ""
If showalert Then
- script = String.Format("bootbox.dialog({{message: ""{0} "",className: ""{11}"",onEscape: function() {{ {12} }},title: ""{1}"",buttons: {{ success: {{ label: ""{2}"", className: "" {3}""," &
+ script = String.Format("bootbox.dialog({{message: ""{0} "", className: ""{11}"", {12} onEscape: function() {{ {12} }},title: ""{1}"",buttons: {{ success: {{ label: ""{2}"", className: "" {3}""," &
"callback: function() {{ {4} }} }}, danger: {{ label: ""{5}"", className: "" {6}"",callback: function() {{ {7} }} }}," &
"main: {{ label: ""{8}"", className: "" {9}"", callback: function() {{ {10} }} }} }} }});",
- Mensaje, Titulo, b3title, b3clas, b3js, b2title, b2clas, b2js, b1title, b1clas, b1js, headerclas, onEscape)
+ Mensaje, Titulo, b3title, b3clas, b3js, b2title, b2clas, b2js, b1title, b1clas, b1js, headerclas, onEscape, closeButtonOption)
Else
script = String.Format("alertatoast({3},'{0}',function(){{{1}}},{2});", Mensaje, JSBtnAceptar, TimeoutToast, DirectCast(pOpcion, Integer))
@@ -3592,9 +3596,9 @@ Namespace Extensiones
- End Class
+ End Class
#End Region
-
+
#Region "A T R I B U T O S"
Public Class BasicAuthenticationAttribute
Inherits AuthorizationFilterAttribute
@@ -3660,7 +3664,7 @@ Namespace Extensiones
actionContext.Response = actionContext.Request.CreateResponse(HttpStatusCode.Unauthorized)
actionContext.Response.Headers.Add("WWW-Authenticate", "Basic Scheme='Data' location = 'http://localhost:")
End Sub
- End Class
+ End Class
#End Region
-
+
End Namespace
diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb
index 56901e562..bbc74193e 100644
--- a/Bancos/FluctuacionCambiaria.aspx.vb
+++ b/Bancos/FluctuacionCambiaria.aspx.vb
@@ -303,10 +303,8 @@ Partial Class Bancos_FluctuacionCambiaria
Protected Sub BtnGeneraVentas_Click(sender As Object, e As EventArgs)
- Dim Total As Decimal = 0
- Dim Conta As New ClsContabilidad
- Conta.IniciaTransacSQL()
- Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaV", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoVentas.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+ Dim Total As Decimal = 0
+
Dim idCta As Integer = 0
Dim CveCuenta As Integer = 0
Dim CveCuentaPerdida, CveCuentaGanancia As Integer
@@ -336,6 +334,15 @@ Partial Class Bancos_FluctuacionCambiaria
TipoMovto = False
End If
+ If Total = 0 Then
+ Alert("El Importe tiene que ser diferente a cero", TipoMensaje.MsgError)
+ Exit Sub
+ End If
+
+ Dim Conta As New ClsContabilidad
+ Conta.IniciaTransacSQL()
+ Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaV", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoVentas.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Ventas", CveConceptoContable, "Fluctuación Ventas", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlsubProyectoVentas.SelectedValue.ToEntero) Then
ErrorRegistrar = True
End If
diff --git a/Bancos/PopIEVentas.aspx b/Bancos/PopIEVentas.aspx
index cdaa66505..81291fcc3 100644
--- a/Bancos/PopIEVentas.aspx
+++ b/Bancos/PopIEVentas.aspx
@@ -38,7 +38,7 @@
-
+
diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb
index 11f56d18e..4df830f18 100644
--- a/Bancos/PopIEVentas.aspx.vb
+++ b/Bancos/PopIEVentas.aspx.vb
@@ -690,18 +690,12 @@ Partial Class Bancos_PopIEVentas
If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
- Dim Valida As New ClsValidaCFDi(dr("FolioFiscal").ToString(), dr("ClienteRFC").ToString, UsuarioActual.Empresa.RFC)
+ Dim Valida As New ClsValidaCFDi(dr("FolioFiscal").ToString(), UsuarioActual.Empresa.RFC, dr("ClienteRFC").ToString, dr("Total").ToString.ToDecimal)
If Valida.EsValida > 0 Then
If Valida.EsValida = 2 Then
- Validada = False
- 'Dim ObjDatos As New ClsCompras
-
- 'If ObjDatos.UpdateEstatus(Valida.EsValida, gvr.DataKey("CveFactura").ToEntero) Then
-
- 'End If
- 'ObjDatos.Dispose()
-
+ Validada = False
+
BtnGuardar.Enabled = False
If UsuarioActual.Empresa.UsaAC Then
@@ -713,9 +707,11 @@ Partial Class Bancos_PopIEVentas
Else
Validada = True
End If
- Else
- 'no se pudo validar, pero ya tuvo la primera vuelta de validacion
- Validada = True
+ Else
+ 'no se pudo validar, pero ya tuvo la primera vuelta de validacion
+ Alert("La factura no se pudo validar.")
+ Validada = False
+ BtnGuardar.Visible = False
End If
Valida.Dispose()
Else
diff --git a/Bancos/RepCortes.aspx b/Bancos/RepCortes.aspx
index e76a349bd..2f90c1b90 100644
--- a/Bancos/RepCortes.aspx
+++ b/Bancos/RepCortes.aspx
@@ -231,6 +231,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/CRM/CatEmpresasCRM.aspx.cs b/CRM/CatEmpresasCRM.aspx.cs
index 7a539f16b..61451a357 100644
--- a/CRM/CatEmpresasCRM.aspx.cs
+++ b/CRM/CatEmpresasCRM.aspx.cs
@@ -221,7 +221,7 @@ public partial class CRM_CatEmpresasCRM : ClsPaginas
}
else
{
- Alert(String.Format("El Giro de Empresa '{0}'", Giro), ModExtensiones.TipoMensaje.MsgAdvertencia);
+ Alert(String.Format("El Giro de Empresa '{0}', No está especificado", Giro), ModExtensiones.TipoMensaje.MsgAdvertencia);
TieneError = true;
break;
}
diff --git a/CRM/EmpresaCRM.aspx b/CRM/EmpresaCRM.aspx
index 24e763256..1f64d8e96 100644
--- a/CRM/EmpresaCRM.aspx
+++ b/CRM/EmpresaCRM.aspx
@@ -72,8 +72,8 @@