diff --git a/Acarreos/CatChoferes.aspx.vb b/Acarreos/CatChoferes.aspx.vb
index b19289490..9cb694e84 100644
--- a/Acarreos/CatChoferes.aspx.vb
+++ b/Acarreos/CatChoferes.aspx.vb
@@ -14,7 +14,6 @@ Partial Class Acarreos_CatChoferes
CargaDatos()
CargaDdlTransportista()
- Dim DT As DataTable = GlobalDTColonia(-1)
CargaDdls()
@@ -23,14 +22,10 @@ Partial Class Acarreos_CatChoferes
Private Sub CargaDdls()
-
-
-
- DdlEstado.DataSource = GlobalDTEstado(-1).FiltraParametros("ClaveSATPais = 'MEX'")
+ DdlEstado.DataSource = GlobalDTGralEstados("MEX")
DdlEstado.DataBind()
DdlEstado.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
-
DdlMunicipio.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
DdlLocalidad.Items.Insert(0, New ListItem("Seleccione Una", "-1"))
DdlColonia.Items.Insert(0, New ListItem("Seleccione Una", "-1"))
@@ -82,11 +77,13 @@ Partial Class Acarreos_CatChoferes
If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then
CargaDatos()
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
+ GlobalDTChoferes(UsuarioActual.CveEmpresa) = Nothing
End If
ElseIf HdnModalidad.Value = "U" Then
If ObjAcar.UpdateChofer(HdnID.Value.ToEntero(), TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then
CargaDatos()
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
+ GlobalDTChoferes(UsuarioActual.CveEmpresa) = Nothing
End If
End If
@@ -136,8 +133,7 @@ Partial Class Acarreos_CatChoferes
DdlMunicipio.Items.Clear()
If DdlEstado.SelectedValue.ToEntero > 0 Then
- Dim ClaveSATEstado As String = GlobalDTEstado("MEX").FiltroPrimeroValor("ClaveSATEstado", $" CveEstado = {DdlEstado.SelectedValue} ")
- DdlMunicipio.DataSource = GlobalDTMunicipio(ClaveSATEstado)
+ DdlMunicipio.DataSource = GlobalDTGralMunicipios("-1", CveEstado:=DdlEstado.SelectedValue.ToEntero)
DdlMunicipio.DataBind()
End If
@@ -153,10 +149,9 @@ Partial Class Acarreos_CatChoferes
DdlLocalidad.DataSource = GlobalDTLocalidad(DdlEstado.SelectedValue.ToEntero, DdlMunicipio.SelectedValue.ToEntero)
DdlLocalidad.DataBind()
- DdlColonia.DataSource = GlobalDTColonia(GlobalDTMunicipio(GlobalDTEstado("MEX").FiltraParametros($"CveEstado = {DdlEstado.SelectedValue.ToEntero}")(0)("ClaveSATEstado").ToString).FiltraParametros($"CveMunicipio = {DdlMunicipio.SelectedValue.ToEntero}")(0)("ClaveSATMunicipio").ToString).FiltraParametros(If(TxtCP.Text.Trim.Length > 0, $"CP = {TxtCP.Text}", ""))
+ DdlColonia.DataSource = GlobalDTGralColonias("-1", "-1", "-1", DdlMunicipio.SelectedValue.ToEntero, CodigoPostal:=If(TxtCP.Text.Trim.Length > 0, TxtCP.Text.ToEntero, -1))
DdlColonia.DataBind()
-
End If
DdlLocalidad.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
@@ -253,11 +248,9 @@ Partial Class Acarreos_CatChoferes
If DdlEstado.SelectedValue > 0 Then
- Dim ClaveSATEstado As String = GlobalDTEstado("MEX").FiltroPrimeroValor("ClaveSATEstado", $" CveEstado = {DdlEstado.SelectedValue} ")
- DdlMunicipio.DataSource = GlobalDTMunicipio(ClaveSATEstado)
+ DdlMunicipio.DataSource = GlobalDTGralMunicipios("-1", CveEstado:=DdlEstado.SelectedValue)
DdlMunicipio.DataBind()
-
End If
DdlMunicipio.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
@@ -282,12 +275,9 @@ Partial Class Acarreos_CatChoferes
DdlLocalidad.DataSource = GlobalDTLocalidad(DdlEstado.SelectedValue.ToEntero, DdlMunicipio.SelectedValue.ToEntero)
DdlLocalidad.DataBind()
- DdlColonia.DataSource = GlobalDTColonia(GlobalDTMunicipio(GlobalDTEstado("MEX").FiltraParametros($"CveEstado = {DdlEstado.SelectedValue.ToEntero}")(0)("ClaveSATEstado").ToString).FiltraParametros($"CveMunicipio = {DdlMunicipio.SelectedValue.ToEntero}")(0)("ClaveSATMunicipio").ToString).FiltraParametros(If(TxtCP.Text.Trim.Length > 0, $"CP = {TxtCP.Text}", ""))
+ DdlColonia.DataSource = GlobalDTGralColonias("-1", "-1", "-1", DdlMunicipio.SelectedValue.ToEntero, CodigoPostal:=If(TxtCP.Text.Trim.Length > 0, TxtCP.Text.ToEntero, -1))
DdlColonia.DataBind()
-
-
-
End If
DdlLocalidad.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
@@ -320,12 +310,11 @@ Partial Class Acarreos_CatChoferes
Dim CveColonia As Integer = DdlColonia.SelectedValue.ToEntero
If CPTxt > 0 And CveColonia > 0 Then
- Dim CP As Integer = GlobalDTColonia(-1).FiltroPrimeroValor("CP", $"CveColonia = {CveColonia}")
+ Dim CP As Integer = GlobalDTGralColonias("-1", "-1", "-1", CveColonia:=CveColonia).FiltroPrimeroValor("CP", "").ToEntero
If CPTxt <> CP Then
- Alert("El codigo postal selecionado es diferente del codigo postal de la Colonia.", TipoMensaje.MsgAdvertencia)
+ Alert("El código postal selecionado es diferente del codigo postal de la Colonia.", TipoMensaje.MsgAdvertencia)
End If
End If
-
End Sub
Protected Sub DdlColonia_SelectedIndexChanged(sender As Object, e As EventArgs)
diff --git a/Acumuladores/RepIndicadorDiario.aspx.vb b/Acumuladores/RepIndicadorDiario.aspx.vb
index 31156c0e1..74b9e0cf3 100644
--- a/Acumuladores/RepIndicadorDiario.aspx.vb
+++ b/Acumuladores/RepIndicadorDiario.aspx.vb
@@ -178,27 +178,18 @@ Partial Class ACumuladores_RepIndicadorDiario
Dim FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text)
Dim FechaF = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", "-1", txtFechaF.Text)
-
-
Dim FechaIn As String = $" Fecha Inicio: {txtFechaI.Text}"
Dim FechaFn As String = $" Fecha Fin: {txtFechaF.Text}"
If txtFechaI.Text = "" Then FechaIn = ""
- If txtFechaF.Text = "" Then FechaFn = ""
-
-
+ If txtFechaF.Text = "" Then FechaFn = ""
Dim SubProyecto = If(DdlSubProyecto.SelectedItem.Text = "", "", $" SubProyecto: {DdlSubProyecto.SelectedItem.Text}")
-
Dim FechaIF, FechaFF As String
FechaIF = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
FechaFF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
-
-
If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
-
-
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
diff --git a/App_Code/CFDITimbre.vb b/App_Code/CFDITimbre.vb
index fd2700c84..68086bdba 100644
--- a/App_Code/CFDITimbre.vb
+++ b/App_Code/CFDITimbre.vb
@@ -218,16 +218,16 @@ Public Class CFDIComprobante
End Property
Public Property TipoDocto As String
Public Property FormadePago As String
- Public Property CondicionesdePago As String
+ Public Property CondicionesdePago As String = ""
Public Property Fecha As Date
- Public Property Subtotal As Decimal = 0
+ Public Property SubTotal As Decimal = 0
Public Property Descuentos As Decimal = 0
+ Public Property Total As Decimal = 0
Public Property MotivoDescuento As String = ""
Public Property TipoCambio As String = "1"
Public Property Moneda As String = ""
Public Property TipoComprobante As String = ""
Public Property MetodoPago As String = ""
- Public Property Total As Decimal = 0
Public Property LugarExpedicion As String = ""
Public Property NumCuentaPago As String = ""
Public Property Confirmacion As String = ""
@@ -590,7 +590,7 @@ End Class
Public Class CFDICartaPorteAutoTransporte
- Public Property PermSCT As String = ""
+ Public Property PermisoSCT As String = ""
Public Property NumPermisoSCT As String = ""
Public Property NombreSeguroResponsabilidadCivil As String = ""
Public Property PolizaSeguroResponsabilidadCivil As String = ""
@@ -616,9 +616,8 @@ Public Class CFDICartaPorteUbicacion
Public Property NumEstacion As String = ""
Public Property NombreEstacion As String = ""
Public Property NavegacionTrafico As String = ""
- Public Property FechaHoraSalida As String = ""
+ Public Property FechaHoraSalidaLlegada As String = ""
Public Property DistanciaRecorrida As Decimal = 0
- Public Property FechaHoraProgLlegada As String
Public Property Domicilio As New CFDICartaPorteDomicilio
End Class
@@ -652,7 +651,11 @@ End Class
Public Class CFDICartaPorteMercancias
- Public Property PesoBrutoTotal As Double = 0
+ Public ReadOnly Property PesoBrutoTotal As Double
+ Get
+ Return Mercancias.Sum(Function(item) item.PesoenKg)
+ End Get
+ End Property
Public Property UnidadPeso As String = ""
Public ReadOnly Property PesoNetoTotal As Double
Get
@@ -706,6 +709,7 @@ Public Class CFDICartaPorteMercanciaTransporta
Public Property Cantidad As Decimal = 0
Public Property IDOrigen As String = ""
Public Property IDDestino As String = ""
+ Public Property CvesTransportes As String = ""
End Class
@@ -744,10 +748,11 @@ End Class
Public Class CFDICartaPorteOperador
- Public Property RFCOperador As String = ""
+ Public Property TipoFigura As String = "01"
+ Public Property RFCFigura As String = ""
Public Property NumLicencia As String = ""
- Public Property NombreOperador As String = ""
- Public Property NumRegidTribOperador As String = ""
- Public Property ResidenciaFiscalOperador As String = ""
+ Public Property NombreFigura As String = ""
+ Public Property NumRegidTribFigura As String = ""
+ Public Property ResidenciaFiscalFigura As String = ""
Public Property Domicilio As New CFDICartaPorteDomicilio
End Class
diff --git a/App_Code/ClsClasificaciones.vb b/App_Code/ClsClasificaciones.vb
index 7c7e28372..7432b8d52 100644
--- a/App_Code/ClsClasificaciones.vb
+++ b/App_Code/ClsClasificaciones.vb
@@ -140,6 +140,24 @@ Public Class ClsClasificaciones
Return Retorno
End Function
+ Public Function GetClasificacion2ProductoServicio(CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_Clasificacion2ProductoServicioGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As SqlException
+ OnError("Ocurrió un error al consultar las Clasificaciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
Public Function GetClasificacionesComprobaciones(CveEmpresa As Integer, Optional Opcion As Integer = 1, Optional TipoComprobacion As Integer = -1) As Boolean
Dim Retorno As Boolean = False
diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb
index 67381324c..40bcd70e1 100644
--- a/App_Code/ClsCompras.vb
+++ b/App_Code/ClsCompras.vb
@@ -675,8 +675,9 @@ Public Class ClsCompras
End Function
Public Function GetRepComprasAF(FechaI As String, FechaF As String, CveProveedor As Integer, CveMoneda As Integer, CveEmpresa As Integer, Gpo As Integer, CveProyecto As Integer, CveSubProyecto As Integer,
- TipoCambio As Integer, TCEspecifico As Double, CveClasificacion As Integer, CveActivoFijo As Integer, CveTipoActivoFijo As Integer, CveSubTipoActivoFijo As Integer, CvePS As Integer, Optional CveUsuarioConsulta As Integer = -1
- ) As Boolean
+ TipoCambio As Integer, TCEspecifico As Double, CveClasificacion As Integer, CveActivoFijo As Integer, CveTipoActivoFijo As Integer, CveSubTipoActivoFijo As Integer, CvePS As Integer, Optional CveUsuarioConsulta As Integer = -1,
+ Optional CveClasificacion2 As Integer = -1
+ ) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_ComprasAFGetRep")
@@ -697,6 +698,7 @@ Public Class ClsCompras
.Add("@CveSubTipoActivoFijo", SqlDbType.Int).Value = CveSubTipoActivoFijo
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
+ .Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2
'CveClasificacion
@@ -714,7 +716,7 @@ Public Class ClsCompras
Public Function GetRepComprasAFDetalle(FechaI As String, FechaF As String, CveProveedor As Integer, CveMoneda As Integer, CveEmpresa As Integer, Gpo As Integer, CveProyecto As Integer, CveSubProyecto As Integer,
TipoCambio As Integer, TCEspecifico As Double, CveClasificacion As Integer, CveActivoFijo As Integer, CveTipoActivoFijo As Integer, CveSubTipoActivoFijo As Integer, CvePS As Integer,
- Anio As Integer, Mes As Integer, AnioMes As String, Optional CveUsuarioConsulta As Integer = -1) As Boolean
+ Anio As Integer, Mes As Integer, AnioMes As String, Optional CveUsuarioConsulta As Integer = -1, Optional CveClasificacion2 As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_ComprasAFDetalleGetRep")
@@ -739,6 +741,7 @@ Public Class ClsCompras
.Add("@CveSubTipoActivoFijo", SqlDbType.Int).Value = CveSubTipoActivoFijo
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
+ .Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2
'CveClasificacion
End With
diff --git a/App_Code/ClsEdocumentacion.vb b/App_Code/ClsEdocumentacion.vb
index dd22807c3..08b2a0361 100644
--- a/App_Code/ClsEdocumentacion.vb
+++ b/App_Code/ClsEdocumentacion.vb
@@ -71,6 +71,7 @@ Public Class ClsEdocumentacion
End With
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
Data = New DataTable
+ DSet = New DataSet()
End Sub
#Region "Conexiones"
@@ -515,6 +516,98 @@ Public Class ClsEdocumentacion
#End Region
+ Public Sub addParameters(varsql As String, sqltipe As SqlDbType, valor As Object)
+ SqlAdapter.SelectCommand.Parameters.Add(varsql, sqltipe).Value = valor
+ End Sub
+ Public Function RunQuery(errormsg As String) As Boolean
+ Dim retorno As Boolean = False
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+ retorno = False
+ OnError(errormsg, ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return retorno
+ End Function
+ Public Function RunQueryds(errormsg As String) As Boolean
+ Dim retorno As Boolean = False
+ Try
+ SqlAdapter.Fill(DSet)
+ retorno = True
+ Catch ex As Exception
+ retorno = False
+ OnError(errormsg, ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return retorno
+ End Function
+
+
+#Region "CRUD_Edoc_Materialidad"
+
+ Public Function TableroMaterialidadGET(cveEmpresa As Integer, anio As Integer, mes As Integer) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_Edoc_TableroMaterialidad", CommandType.StoredProcedure)
+ addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
+ addParameters("@Anio", SqlDbType.Int, anio)
+ addParameters("@Mes", SqlDbType.Int, mes)
+ retorno = RunQueryds("Ocurrió un error al obtener el PA_Edoc_TableroMaterialidad.")
+ Return retorno
+ End Function
+ Public Function TableroMaterialidadDetalleGET(cveEmpresa As Integer, anio As Integer, mes As Integer, cveCliente As Integer) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_Edoc_TableroMaterialidadDetalle", CommandType.StoredProcedure)
+ addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
+ addParameters("@Anio", SqlDbType.Int, anio)
+ addParameters("@Mes", SqlDbType.Int, mes)
+ addParameters("@CveCliente", SqlDbType.Int, cveCliente)
+ retorno = RunQueryds("Ocurrió un error al obtener el PA_Edoc_TableroMaterialidad.")
+ Return retorno
+ End Function
+ Public Function Edoc_MaterialidadGet(cveDocMaterialidad As Int32, cveDocumentacion As Integer) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_Edoc_MaterialidadGet", CommandType.StoredProcedure)
+ addParameters("@CveDocMaterialidad", SqlDbType.Int, cveDocMaterialidad)
+ addParameters("@CveDocumentacion", SqlDbType.Int, cveDocumentacion)
+ retorno = RunQuery("Ocurrió un error al obtener el Edoc_Materialidad.")
+ Return retorno
+ End Function
+ Public Function Edoc_MaterialidadAdd(cveDocumentacion As Int32, adjunto As String, cveCliente As Integer, anio As Int32, mes As Int32, cveUsuario As Int32, fechaingreso As DateTime) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_Edoc_MaterialidadAdd", CommandType.StoredProcedure)
+ addParameters("@CveDocumentacion", SqlDbType.Int, cveDocumentacion)
+ addParameters("@Adjunto", SqlDbType.VarChar, adjunto)
+ addParameters("@CveCliente", SqlDbType.Int, cveCliente)
+ addParameters("@Anio", SqlDbType.Int, anio)
+ addParameters("@Mes", SqlDbType.Int, mes)
+ addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
+ retorno = RunQuery("Ocurrió un error al agregar el Edoc_Materialidad.")
+ Return retorno
+ End Function
+ Public Function Edoc_MaterialidadUp(cveDocMaterialidad As Int32, cveDocumentacion As Int32, adjunto As String, cveCliente As Integer, anio As Int32, mes As Int32, cveUsuario As Int32, fechaingreso As DateTime) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_Edoc_MaterialidadUp", CommandType.StoredProcedure)
+ addParameters("@CveDocMaterialidad", SqlDbType.Int, cveDocMaterialidad)
+ addParameters("@Adjunto", SqlDbType.VarChar, adjunto)
+ addParameters("@CveCliente", SqlDbType.Int, cveCliente)
+ addParameters("@Anio", SqlDbType.Int, anio)
+ addParameters("@Mes", SqlDbType.Int, mes)
+ addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
+ retorno = RunQuery("Ocurrió un error al actualizar el Edoc_Materialidad.")
+ Return retorno
+ End Function
+ Public Function Edoc_MaterialidadRemove(cveDocMaterialidad As Int32, CveEmpresa As Integer) As Boolean
+
+ Dim retorno As Boolean = False
+ DataAdapter("PA_Edoc_MaterialidadRemove", CommandType.StoredProcedure)
+ addParameters("@CveDocMaterialidad", SqlDbType.Int, cveDocMaterialidad)
+ addParameters("@CveEmpresa", SqlDbType.Int, CveEmpresa)
+ retorno = RunQuery("Ocurrió un error al eliminar el Edoc_Materialidad.")
+ Return retorno
+ End Function
+#End Region
+
+
#Region " P A R A M E T R O S "
Public Function AddDocumentacionParametros(CveDocumentacion As Integer, Parametro As String, Descripcion As String, CveEmpresa As Integer, CveUsaurio As Integer) As Boolean
diff --git a/App_Code/ClsGPS.vb b/App_Code/ClsGPS.vb
index 21ddfea1e..4cdc9e7f2 100644
--- a/App_Code/ClsGPS.vb
+++ b/App_Code/ClsGPS.vb
@@ -781,7 +781,7 @@ Public Class ClsGPS
Velocidad = Row("SPD").ToString.ToDouble
Fecha = Row("FechaTrama").ToString
KMRecorridos = Row("KMRecorridos").ToString.ToDouble
- Info = InfoWindowReader($" Vehículo: {Vehiculo}", "-1", CveDispositivo, Row, TienePermisoComandos)
+ Info = InfoWindowReader($" Vehiculo: {Vehiculo}", "-1", CveDispositivo, Row, TienePermisoComandos)
If Velocidad > 1 Then
diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb
index 005780993..f1c04e6e0 100644
--- a/App_Code/ClsGenerales.vb
+++ b/App_Code/ClsGenerales.vb
@@ -592,50 +592,50 @@ Public Class ClsGenerales
#End Region
-#Region " E S T A D O S"
- Public Function GetGralEstados() As Boolean
- Dim Retorno As Boolean = False
- DataAdapter("PA_Gral_EstadoGet")
- Try
- SqlAdapter.Fill(Data)
- Retorno = True
- Catch ex As Exception
- OnError("Ocurrió un error al obtener el Catálogo de Estados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
- End Try
-
- Return Retorno
- End Function
-#End Region
+ '#Region " E S T A D O S"
+ ' Public Function GetGralEstados() As Boolean
+ ' Dim Retorno As Boolean = False
+ ' DataAdapter("PA_Gral_EstadoGet")
+ ' Try
+ ' SqlAdapter.Fill(Data)
+ ' Retorno = True
+ ' Catch ex As Exception
+ ' OnError("Ocurrió un error al obtener el Catálogo de Estados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ ' End Try
-#Region " M U N I C I P I O S"
- Public Function GetGralMunicipios() As Boolean
- Dim Retorno As Boolean = False
- DataAdapter("PA_Gral_MunicipioGet")
- Try
- SqlAdapter.Fill(Data)
- Retorno = True
- Catch ex As Exception
- OnError("Ocurrió un error al obtener el Catálogo de Municipios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
- End Try
-
- Return Retorno
- End Function
-#End Region
+ ' Return Retorno
+ ' End Function
+ '#End Region
-#Region " P A I S E S"
- Public Function GetGralPaises() As Boolean
- Dim Retorno As Boolean = False
- DataAdapter("PA_Gral_PaisGet")
- Try
- SqlAdapter.Fill(Data)
- Retorno = True
- Catch ex As Exception
- OnError("Ocurrió un error al obtener el Catálogo de Paises.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
- End Try
-
- Return Retorno
- End Function
-#End Region
+ '#Region " M U N I C I P I O S"
+ ' Public Function GetGralMunicipios() As Boolean
+ ' Dim Retorno As Boolean = False
+ ' DataAdapter("PA_Gral_MunicipioGet")
+ ' Try
+ ' SqlAdapter.Fill(Data)
+ ' Retorno = True
+ ' Catch ex As Exception
+ ' OnError("Ocurrió un error al obtener el Catálogo de Municipios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ ' End Try
+
+ ' Return Retorno
+ ' End Function
+ '#End Region
+
+ '#Region " P A I S E S"
+ ' Public Function GetGralPaises() As Boolean
+ ' Dim Retorno As Boolean = False
+ ' DataAdapter("PA_Gral_PaisGet")
+ ' Try
+ ' SqlAdapter.Fill(Data)
+ ' Retorno = True
+ ' Catch ex As Exception
+ ' OnError("Ocurrió un error al obtener el Catálogo de Paises.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ ' End Try
+
+ ' Return Retorno
+ ' End Function
+ '#End Region
#Region " P O B L A C I O N E S"
Public Function GetGralPoblaciones() As Boolean
@@ -2736,7 +2736,7 @@ Public Class ClsGenerales
Public Function GetSATFraccionArancelaria() As Boolean
Dim Retorno As Boolean = False
- DataAdapter("Gral_SAT_FraccionArancelariaGet")
+ DataAdapter("PA_Gral_SAT_FraccionArancelariaGet")
With SqlAdapter.SelectCommand.Parameters
End With
Try
@@ -2750,7 +2750,7 @@ Public Class ClsGenerales
Public Function GetSATIncoterm() As Boolean
Dim Retorno As Boolean = False
- DataAdapter("Gral_SAT_IncotermGet")
+ DataAdapter("PA_Gral_SAT_IncotermGet")
With SqlAdapter.SelectCommand.Parameters
End With
Try
@@ -2764,7 +2764,7 @@ Public Class ClsGenerales
Public Function GetSATMotivoTraslado() As Boolean
Dim Retorno As Boolean = False
- DataAdapter("Gral_SAT_MotivoTrasladoGet")
+ DataAdapter("PA_Gral_SAT_MotivoTrasladoGet")
With SqlAdapter.SelectCommand.Parameters
End With
Try
@@ -2778,7 +2778,7 @@ Public Class ClsGenerales
Public Function GetSATTipoOperacion() As Boolean
Dim Retorno As Boolean = False
- DataAdapter("Gral_SAT_TipoOperacionGet")
+ DataAdapter("PA_Gral_SAT_TipoOperacionGet")
With SqlAdapter.SelectCommand.Parameters
End With
Try
@@ -2791,7 +2791,7 @@ Public Class ClsGenerales
End Function
Public Function GetSATUnidadesAduana() As Boolean
Dim Retorno As Boolean = False
- DataAdapter("Gral_SAT_UnidadAduanaGet")
+ DataAdapter("PA_Gral_SAT_UnidadAduanaGet")
With SqlAdapter.SelectCommand.Parameters
End With
Try
@@ -2805,7 +2805,7 @@ Public Class ClsGenerales
Public Function GetSATPais() As Boolean
Dim Retorno As Boolean = False
- DataAdapter("Gral_SAT_PaisGet")
+ DataAdapter("PA_Gral_SAT_PaisGet")
With SqlAdapter.SelectCommand.Parameters
End With
Try
@@ -2819,7 +2819,7 @@ Public Class ClsGenerales
Public Function GetSATEstado(ClaveSATPais As String) As Boolean
Dim Retorno As Boolean = False
- DataAdapter("Gral_SAT_EstadoGet")
+ DataAdapter("PA_Gral_SAT_EstadoGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@ClaveSATPais", SqlDbType.VarChar).Value = ClaveSATPais
End With
@@ -2834,7 +2834,7 @@ Public Class ClsGenerales
Public Function GetSATMunicipio(ClaveSATEstado As String) As Boolean
Dim Retorno As Boolean = False
- DataAdapter("Gral_SAT_MunicipioGet")
+ DataAdapter("PA_Gral_SAT_MunicipioGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@ClaveSATEstado", SqlDbType.VarChar).Value = ClaveSATEstado
End With
@@ -2850,7 +2850,7 @@ Public Class ClsGenerales
Public Function GetSATLocalidad(Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1) As Boolean
Dim Retorno As Boolean = False
- DataAdapter("Gral_SAT_LocalidadGet")
+ DataAdapter("PA_Gral_SAT_LocalidadGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEstado", SqlDbType.VarChar).Value = CveEstado
.Add("@CveMunicipio", SqlDbType.VarChar).Value = CveMunicipio
@@ -2864,11 +2864,13 @@ Public Class ClsGenerales
Return Retorno
End Function
- Public Function GetSATColonia(ClaveSATMunicipio As String) As Boolean
+ Public Function GetSATColonia(ClaveSATEstado As String, ClaveSATMunicipio As String, ClaveSATColonia As String) As Boolean
Dim Retorno As Boolean = False
- DataAdapter("Gral_SAT_ColoniaGet")
+ DataAdapter("PA_Gral_SAT_ColoniaGet")
With SqlAdapter.SelectCommand.Parameters
+ .Add("@ClaveSATEstado", SqlDbType.VarChar).Value = ClaveSATEstado
.Add("@ClaveSATMunicipio", SqlDbType.VarChar).Value = ClaveSATMunicipio
+ .Add("@ClaveSATColonia", SqlDbType.VarChar).Value = ClaveSATColonia
End With
Try
SqlAdapter.Fill(Data)
@@ -3633,8 +3635,10 @@ Public Class ClsGenerales
#Region "GRAL TIMBRES"
- Public Function AddGralTimbre(TipoDocto As String, Serie As String, Folio As Integer, FolioFiscal As String, Fecha As Date, CveUsuario As Integer, CveEmpresa As Integer,
- Estatus As Integer, CvePAC As Integer, AplicaCP As Boolean, CveEntregaAlmacen As Integer, CveSubProyectoOrigen As Integer) As Integer
+ Public Function AddGralTimbre(TipoDocto As String, CveSubProyecto As Integer, Fecha As DateTime, CveUsuario As Integer, CveEmpresa As Integer,
+ Optional Serie As String = "-1", Optional Folio As Integer = -1, Optional Estatus As Integer = 0,
+ Optional CveEntregaAlmacen As Integer = -1,
+ Optional AplicaCP As Boolean = False) As Integer
Dim Retorno As Integer = -1
DataAdapter("PA_Gral_TimbreAdd")
@@ -3644,15 +3648,13 @@ Public Class ClsGenerales
.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
.Add("@Serie", SqlDbType.VarChar).Value = Serie
.Add("@Folio", SqlDbType.Int).Value = Folio
- .Add("@FolioFiscal", SqlDbType.VarChar).Value = FolioFiscal
- .Add("@Fecha", SqlDbType.Date).Value = Fecha
+ .Add("@Fecha", SqlDbType.DateTime).Value = Fecha
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Estatus", SqlDbType.Int).Value = Estatus
- .Add("@CvePAC", SqlDbType.Int).Value = CvePAC
.Add("@AplicaCP", SqlDbType.Bit).Value = AplicaCP
.Add("@CveEntregaAlmacen", SqlDbType.Int).Value = CveEntregaAlmacen
- .Add("@CveSubProyectoOrigen", SqlDbType.Int).Value = CveSubProyectoOrigen
+ .Add("@CveSubProyectoOrigen", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveTimbre", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@FolioInsertado", SqlDbType.Int).Direction = ParameterDirection.Output
@@ -3674,15 +3676,13 @@ Public Class ClsGenerales
Return Retorno
End Function
- Public Function GetGralTimbre(CveTimbre As Integer, TipoDocto As String, Serie As String, Folio As Integer, FechaI As Date, FechaF As Date, Estatus As Integer, CveEmpresa As Integer, CveMovimiento As Integer) As Boolean
+ Public Function GetGralTimbre(CveTimbre As Integer, TipoDocto As String, FechaI As Date, FechaF As Date, Estatus As Integer, CveEmpresa As Integer, CveMovimiento As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_TimbreGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveTimbre", SqlDbType.Int).Value = CveTimbre
.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
- .Add("@Serie", SqlDbType.VarChar).Value = Serie
- .Add("@Folio", SqlDbType.Int).Value = Folio
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@Estatus", SqlDbType.Int).Value = Estatus
@@ -3701,37 +3701,49 @@ Public Class ClsGenerales
Return Retorno
End Function
- Public Function UpdateGralTimbre(CveTimbre As Integer, TipoDocto As String, Serie As String, Folio As Integer, FolioFiscal As String, Fecha As Date, CveUsuario As Integer, CveEmpresa As Integer,
- Estatus As Integer, CvePAC As Integer, CvePACCancelacion As Integer, FechaCancelacion As Date, AplicaCP As Boolean, SelloCancelacion As String
- ) As Boolean
+ Public Function UpdateTimbreTimbrado(CveTimbre As Integer, FolioFiscal As String, Fecha As DateTime, CveUsuario As Integer, CveEmpresa As Integer,
+ CvePAC As Integer) As Boolean
Dim Retorno As Boolean = False
- DataAdapter("PA_Gral_TimbreUpdate")
+ DataAdapter("PA_Gral_TimbreTimbrado")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveTimbre", SqlDbType.Int).Value = CveTimbre
- .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
- .Add("@Serie", SqlDbType.VarChar).Value = Serie
- .Add("@Folio", SqlDbType.Int).Value = Folio
.Add("@FolioFiscal", SqlDbType.VarChar).Value = FolioFiscal
- .Add("@Fecha", SqlDbType.Date).Value = Fecha
- .Add("@Estatus", SqlDbType.Int).Value = Estatus
+ .Add("@Fecha", SqlDbType.DateTime).Value = Fecha
.Add("@CvePAC", SqlDbType.Int).Value = CvePAC
- .Add("@CvePACCancelacion", SqlDbType.Int).Value = CvePACCancelacion
- .Add("@FechaCancelacion", SqlDbType.DateTime).Value = FechaCancelacion
- .Add("@AplicaCP", SqlDbType.Bit).Value = AplicaCP
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
- .Add("@SelloCancelacion", SqlDbType.VarChar).Value = SelloCancelacion
-
-
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
- OnError("Ocurrió un error al actualizar el timbre", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al actualizar el timbrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return Retorno
+ End Function
+
+ Public Function CancelarTimbreTimbrado(CveTimbre As Integer, FechaCancelacion As DateTime, CvePACCancelacion As Integer, SelloCancelacion As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Gral_TimbreTimbradoCancelar")
+
+ With SqlAdapter.SelectCommand.Parameters
+
+ .Add("@CveTimbre", SqlDbType.Int).Value = CveTimbre
+ .Add("@FechaCancelacion", SqlDbType.DateTime).Value = FechaCancelacion
+ .Add("@CvePACCancelacion", SqlDbType.Int).Value = CvePACCancelacion
+ .Add("@SelloCancelacion", SqlDbType.VarChar).Value = SelloCancelacion
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al actualizar el timbrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
@@ -3778,22 +3790,28 @@ Public Class ClsGenerales
End Function
- Public Function AddInvEntregaAlmacenRuta(CveSubProyectoOrigen As Integer, CveMovimientoAlmacen As Integer, CveDireccionOrigen As Integer, CveDireccionDestino As Integer, CveChofer As Integer, CveCamion As Integer, FechaEntrega As Date, Tipo As String, Orden As Integer, Estatus As Integer) As Integer
+ Public Function AddInvEntregaAlmacenRuta(CveSubProyecto As Integer, CveDireccionOrigen As Integer, CveDireccionDestino As Integer, CveMovimientoAlmacen As Integer, CveChofer As Integer, CveCamion As Integer, FechaEntrega As Date, FechaLlegada As DateTime, Tipo As String,
+ FolioReferencia As String, Referencia As String, FechaLimite As Date, Orden As Integer, Estatus As Integer, Distancia As Integer) As Integer
Dim Retorno As Integer = -1
DataAdapter("PA_Inv_EntregaAlmacenRutaAdd")
With SqlAdapter.SelectCommand.Parameters
- .Add("@CveSubProyectoOrigen", SqlDbType.Int).Value = CveSubProyectoOrigen
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveMovimientoAlmacen", SqlDbType.Int).Value = CveMovimientoAlmacen
.Add("@CveDireccionOrigen", SqlDbType.Int).Value = CveDireccionOrigen
.Add("@CveDireccionDestino", SqlDbType.Int).Value = CveDireccionDestino
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
.Add("@CveCamion", SqlDbType.Int).Value = CveCamion
.Add("@FechaEntrega", SqlDbType.DateTime).Value = FechaEntrega
+ .Add("@FechaLlegada", SqlDbType.DateTime).Value = FechaLlegada
+ .Add("@FolioReferencia", SqlDbType.VarChar).Value = FolioReferencia
+ .Add("@Referencia", SqlDbType.VarChar).Value = Referencia
+ .Add("@FechaLimite", SqlDbType.DateTime).Value = FechaLimite
.Add("@Orden", SqlDbType.Int).Value = Orden
.Add("@Tipo", SqlDbType.VarChar).Value = Tipo
.Add("@Estatus", SqlDbType.VarChar).Value = Estatus
+ .Add("@Distancia", SqlDbType.Int).Value = Distancia
.Add("@CveEntregaAlmacen", SqlDbType.Int).Direction = ParameterDirection.Output
End With
@@ -3832,6 +3850,28 @@ Public Class ClsGenerales
Return Retorno
End Function
+ Public Function AsignaEntregaAlmacenRuta(CveCamion As Integer, CveChofer As Integer, FechaEntrega As Date, CveEntregaAlmacen As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Inv_EntregaAlmacenRutaAsignar")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveCamion", SqlDbType.Int).Value = CveCamion
+ .Add("@CveChofer", SqlDbType.Int).Value = CveChofer
+ .Add("@FechaEntrega", SqlDbType.DateTime).Value = FechaEntrega
+ .Add("@CveEntregaAlmacen", SqlDbType.Int).Value = CveEntregaAlmacen
+ .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 entrega almacen", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return Retorno
+ End Function
+
Public Function GetInvEntregaAlmacenRuta(CveSubProyecto As Integer, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Opcion As Integer, Optional Estatus As Integer = -1) As Boolean
Dim Retorno As Boolean = False
diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb
index 54d9be053..92cd449be 100644
--- a/App_Code/ClsNominas.vb
+++ b/App_Code/ClsNominas.vb
@@ -8,9 +8,9 @@ Public Class ClsNominas
#Region "Campos"
'SQL ClsNominas_Nominas
Private SqlConexion As SqlConnection
- Private SqlAdapter As SqlDataAdapter
+ Public SqlAdapter As SqlDataAdapter
Private SqlCommand As SqlCommand
- Private SqlTransacc As SqlTransaction
+ Public SqlTransacc As SqlTransaction
Private Data As DataTable
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
Protected DTSet As DataSet
@@ -86,9 +86,12 @@ Public Class ClsNominas
Public Property FechaPago As Date
#End Region
- 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 Commit()
SqlTransacc.Commit()
End Sub
@@ -206,7 +209,7 @@ Public Class ClsNominas
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
- OnError("Ocurrió un error al eliminar el finiquito.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ OnError("Ocurrió un error al NominasSinTimbrar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
@@ -223,7 +226,7 @@ Public Class ClsNominas
SqlAdapter.Fill(DTSet)
retorno = True
Catch ex As Exception
- OnError("Ocurrió un error al eliminar el finiquito.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ OnError("Ocurrió un error al Personal ISR Anual", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
@@ -1032,7 +1035,7 @@ Public Class ClsNominas
Return Retorno
End Function
- Public Function UpdateEstatusNomNominas(Estatus As Integer, CvePAC As Integer, FolioFiscal As String, SelloSAT As String, FechaCancelacion As DateTime, CveNomina As Integer, Optional SubTotal As Double = -1, Optional Descuento As Double = -1, Optional ISR As Double = -1, Optional Total As Double = -1, Optional DiasPagados As Double = -1, Optional isFiniquito As Boolean = False) As Boolean
+ Public Function UpdateEstatusNomNominas(Estatus As Integer, CvePAC As Integer, FolioFiscal As String, FechaTimbrado As DateTime, FechaCancelacion As DateTime, CveNomina As Integer, Optional SubTotal As Double = -1, Optional Descuento As Double = -1, Optional ISR As Double = -1, Optional Total As Double = -1, Optional DiasPagados As Double = -1, Optional isFiniquito As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Nom_NominasUpdateEstatus")
@@ -1042,7 +1045,7 @@ Public Class ClsNominas
.Add("@CveEstatusCFDi", SqlDbType.Int).Value = Estatus
.Add("@CvePAC", SqlDbType.Int).Value = CvePAC
.Add("@FolioFiscal", SqlDbType.VarChar).Value = FolioFiscal
- .Add("@SelloDigitalSAT", SqlDbType.VarChar).Value = SelloSAT
+ .Add("@FechaTimbrado", SqlDbType.DateTime).Value = FechaTimbrado
.Add("@FechaCancelacion", SqlDbType.DateTime).Value = FechaCancelacion
.Add("@SubTotal", SqlDbType.Money).Value = SubTotal
.Add("@Descuento", SqlDbType.Money).Value = Descuento
@@ -2258,10 +2261,32 @@ Public Class ClsNominas
retorno = True
Catch sqEx As SqlException
retorno = False
- OnError("Ocurrió un error al Realizar el calculo de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ OnError("Ocurrió un error al realizar el calculo de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Catch ex As Exception
retorno = False
- OnError("Ocurrió un error al Realizar el calculo de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ OnError("Ocurrió un error al realizar el calculo de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+ Public Function GetNominasSinTimbrar(CvePeriodo As Integer, CveEmpresa As Integer) As Boolean
+ Dim retorno As Boolean = False
+ Try
+ DTSet = New DataSet()
+ DataAdapter("PA_Nom_NominaSinTimbrar", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+
+
+ SqlAdapter.Fill(DTSet)
+ retorno = True
+ Catch sqEx As SqlException
+ retorno = False
+ OnError("Ocurrió un error al obtener la nomina sin timbrar.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ Catch ex As Exception
+ retorno = False
+ OnError("Ocurrió un error al obtener la nomina sin timbrar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
@@ -2953,6 +2978,53 @@ Public Class ClsNominas
End Function
#End Region
+
+
+ Public Sub addParameters(varsql As String, sqltipe As SqlDbType, valor As Object)
+ SqlAdapter.SelectCommand.Parameters.Add(varsql, sqltipe).Value = valor
+ End Sub
+ Public Function RunQuery(errormsg As String) As Boolean
+ Dim retorno As Boolean = False
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+ retorno = False
+ OnError(errormsg, ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return retorno
+ End Function
+
+ Public Function PA_AGRO_Embarque_ManifiestoGet(cveSubproyecto As Int32, cveUsuario As Int32, cveEmpresa As Int32, cveEmbarqueManifiesto As Int32) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_AGRO_Embarque_ManifiestoGet", CommandType.StoredProcedure)
+ addParameters("@CveSubproyecto", SqlDbType.Int, cveSubproyecto)
+ addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
+ addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
+ addParameters("@CveEmbarqueManifiesto", SqlDbType.Int, cveEmbarqueManifiesto)
+ retorno = RunQuery("Ocurrió un error al obtener el PA_AGRO_Embarque_ManifiestoGet.")
+ Return retorno
+ End Function
+
+ Public Function PA_Agro_Embarque_PalletGet(cvePallet As Int32, cveCultivo As Int32, cveCultivoVariedad As Int32, cveEnvase As Int32, cveEtiqueta As Int32, cveEtiquetasporTarima As Int32, cveFormatoImpresion As Int32, cveTamaño As Int32, cveTipoTarima As Int32, cveEmpresa As Int32, cveEmbarqueManifiesto As Int32, cveTemporada As Int32) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_Agro_Embarque_PalletGet", CommandType.StoredProcedure)
+ addParameters("@CvePallet", SqlDbType.Int, cvePallet)
+ addParameters("@CveCultivo", SqlDbType.Int, cveCultivo)
+ addParameters("@CveCultivoVariedad", SqlDbType.Int, cveCultivoVariedad)
+ addParameters("@CveEnvase", SqlDbType.Int, cveEnvase)
+ addParameters("@CveEtiqueta", SqlDbType.Int, cveEtiqueta)
+ addParameters("@CveEtiquetasporTarima", SqlDbType.Int, cveEtiquetasporTarima)
+ addParameters("@CveFormatoImpresion", SqlDbType.Int, cveFormatoImpresion)
+ addParameters("@CveTamaño", SqlDbType.Int, cveTamaño)
+ addParameters("@CveTipoTarima", SqlDbType.Int, cveTipoTarima)
+ addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
+ addParameters("@CveEmbarqueManifiesto", SqlDbType.Int, cveEmbarqueManifiesto)
+ addParameters("@CveTemporada", SqlDbType.Int, cveTemporada)
+ retorno = RunQuery("Ocurrió un error al obtener el PA_Agro_Embarque_PalletGet.")
+ Return retorno
+ End Function
+
#Region "IDisposable Support"
' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 48f1a2e9f..5dc4ae116 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -413,56 +413,68 @@ Public Class ClsPaginas
End Set
End Property
- Property GlobalDTPais() As DataTable
+
+ Property GlobalDTGralPaises() As DataTable
Get
- GlobalDTPais = DirectCast(Application("GlobalDTPais"), DataTable)
+ If Application("GlobalDTGralPaises") Is Nothing Then
+ Dim ObjGrales As New ClsGenerales
+ If ObjGrales.GetSATPais() Then Application("GlobalDTGralPaises") = ObjGrales.DtResultados Else Application("GlobalDTGralPaises") = Nothing
+ ObjGrales.Dispose()
+ End If
+ GlobalDTGralPaises = DirectCast(Application("GlobalDTGralPaises"), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTPais") = value
+ Application("GlobalDTGralPaises") = value
End Set
End Property
-
- Property GlobalDTEstado(ClaveSATPais As String) As DataTable
+ Property GlobalDTGralEstados(ClaveSATPais As String, Optional CvePais As Integer = -1) As DataTable
Get
- If Application("GlobalDTEstado") Is Nothing Then
+ Dim AppNombre As String = "GlobalDTGralEstados"
+ If Application(AppNombre) Is Nothing Then
Dim ObjGrales As New ClsGenerales
- If ObjGrales.GetSATEstado("-1") Then Application("GlobalDTEstado") = ObjGrales.DtResultados Else Application("GlobalDTEstado") = Nothing
+ If ObjGrales.GetSATEstado("-1") Then Application(AppNombre) = ObjGrales.DtResultados Else Application(AppNombre) = Nothing
ObjGrales.Dispose()
End If
- If ClaveSATPais <> "-1" Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTEstado"), DataTable), String.Format("ClaveSATPais = '{0}'", ClaveSATPais), "", DataViewRowState.CurrentRows)
- GlobalDTEstado = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTEstado = DirectCast(Application("GlobalDTEstado"), DataTable)
- End If
+ Dim Filtro As New StringBuilder
+ Filtro.Append(" 1 = 1 ")
+ If ClaveSATPais <> "-1" Then Filtro.AppendFormat(" AND ClaveSATPais = '{0}' ", ClaveSATPais)
+ If CvePais > 0 Then Filtro.AppendFormat(" AND CvePais = {0} ", CvePais)
+
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Filtro.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTGralEstados = Dv.ToTable
+ Dv.Dispose()
End Get
Set(value As DataTable)
- Application("GlobalDTEstado") = value
+ Dim AppNombre As String = "GlobalDTGralEstados"
+ Application(AppNombre) = value
End Set
End Property
- Property GlobalDTMunicipio(ClaveSATEstado As String) As DataTable
+ Property GlobalDTGralMunicipios(ClaveSATEstado As String, Optional CveEstado As Integer = -1) As DataTable
Get
- If Application("GlobalDTMunicipio") Is Nothing Then
+
+ Dim AppNombre As String = "GlobalDTGralMunicipios"
+ If Application(AppNombre) Is Nothing Then
Dim ObjGrales As New ClsGenerales
- If ObjGrales.GetSATMunicipio("-1") Then Application("GlobalDTMunicipio") = ObjGrales.DtResultados Else Application("GlobalDTMunicipio") = Nothing
+ If ObjGrales.GetSATMunicipio("-1") Then Application(AppNombre) = ObjGrales.DtResultados Else Application(AppNombre) = Nothing
ObjGrales.Dispose()
End If
- If ClaveSATEstado <> "-1" Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTMunicipio"), DataTable), String.Format("ClaveSATEstado = '{0}'", ClaveSATEstado), "", DataViewRowState.CurrentRows)
- GlobalDTMunicipio = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTMunicipio = DirectCast(Application("GlobalDTMunicipio"), DataTable)
- End If
+ Dim Filtro As New StringBuilder
+ Filtro.Append(" 1 = 1 ")
+ If ClaveSATEstado <> "-1" Then Filtro.AppendFormat(" AND ClaveSATEstado = '{0}' ", ClaveSATEstado)
+ If CveEstado > 0 Then Filtro.AppendFormat(" AND CveEstado = {0} ", CveEstado)
+
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Filtro.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTGralMunicipios = Dv.ToTable
+ Dv.Dispose()
End Get
Set(value As DataTable)
- Application("GlobalDTMunicipio") = value
+ Dim AppNombre As String = "GlobalDTGralMunicipios"
+ Application(AppNombre) = value
End Set
End Property
@@ -507,26 +519,34 @@ Public Class ClsPaginas
End Property
-
- Property GlobalDTColonia(ClaveSATMunicipio As String) As DataTable
+ Property GlobalDTGralColonias(ClaveSATEstado As String, ClaveSATMunicipio As String, ClaveSATColonia As String,
+ Optional CveMunicipio As Integer = -1, Optional CodigoPostal As Integer = -1, Optional CveColonia As Integer = -1) As DataTable
Get
- If Application("GlobalDTColonia") Is Nothing Then
+ Dim AppNombre As String = "GlobalDTGralColonias"
+ If Application(AppNombre) Is Nothing Then
Dim ObjGrales As New ClsGenerales
- If ObjGrales.GetSATColonia("-1") Then Application("GlobalDTColonia") = ObjGrales.DtResultados Else Application("GlobalDTColonia") = Nothing
+ If ObjGrales.GetSATColonia("-1", "-1", "-1") Then Application(AppNombre) = ObjGrales.DtResultados Else Application(AppNombre) = Nothing
ObjGrales.Dispose()
End If
- If ClaveSATMunicipio <> "-1" Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTColonia"), DataTable), String.Format("ClaveSATMunicipio = '{0}'", ClaveSATMunicipio), "", DataViewRowState.CurrentRows)
- GlobalDTColonia = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTColonia = DirectCast(Application("GlobalDTColonia"), DataTable)
- End If
+ Dim Filtro As New StringBuilder
+ Filtro.Append(" 1 = 1 ")
+ If ClaveSATEstado <> "-1" Then Filtro.AppendFormat(" AND ClaveSATEstado = '{0}' ", ClaveSATEstado)
+ If ClaveSATMunicipio <> "-1" Then Filtro.AppendFormat(" AND ClaveSATMunicipio = '{0}' ", ClaveSATMunicipio)
+ If ClaveSATColonia <> "-1" Then Filtro.AppendFormat(" AND ClaveSATColonia = '{0}' ", ClaveSATColonia)
+ If CveMunicipio > 0 Then Filtro.AppendFormat(" AND CveMunicipio = {0} ", CveMunicipio)
+ If CodigoPostal > 0 Then Filtro.AppendFormat(" AND CP = {0} ", CodigoPostal)
+ If CveColonia > 0 Then Filtro.AppendFormat(" AND CveColonia = {0} ", CveColonia)
+
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Filtro.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTGralColonias = Dv.ToTable
+ Dv.Dispose()
+
End Get
Set(value As DataTable)
- Application("GlobalDTColonia") = value
+ Dim AppNombre As String = "GlobalDTGralColonias"
+ Application(AppNombre) = value
End Set
End Property
@@ -968,6 +988,32 @@ Public Class ClsPaginas
Application("GlobalDTFamilias") = value
End Set
End Property
+
+ Property GlobalDTChoferes(CveEmpresa As Integer, Optional CveChofer As Integer = -1) As DataTable
+ Get
+ Dim AppNombre As String = String.Format("GlobalDTChoferes-{0}", CveEmpresa)
+ 'sino existe, recarga los datos
+ If Application(AppNombre) Is Nothing Then
+ Dim ObjAcar As New ClsAcarreos()
+ If ObjAcar.GetChofer(-1, CveEmpresa, 1, -1) Then
+ Application(AppNombre) = ObjAcar.DtResultados
+ End If
+ ObjAcar.Dispose()
+ End If
+
+ Dim Str As New StringBuilder
+ If CveChofer > 0 Then Str.AppendFormat("CveChofer = {0}", CveChofer)
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTChoferes = Dv.ToTable
+ Dv.Dispose()
+
+ End Get
+ Set(value As DataTable)
+ Dim AppNombre As String = String.Format("GlobalDTChoferes-{0}", CveEmpresa)
+ Application(AppNombre) = value
+ End Set
+ End Property
+
Property GlobalDTClasificacionesPresupuestos(Optional CveEmpresa As Integer = -1) As DataTable
Get
If CveEmpresa <> -1 Then
@@ -1604,6 +1650,31 @@ Public Class ClsPaginas
Application("GlobalDTInvMetodosInventario") = value
End Set
End Property
+
+ Property GlobalDTInvCamiones(CveEmpresa As Integer, Optional CveCamion As Integer = -1) As DataTable
+ Get
+ Dim AppNombre As String = String.Format("GlobalDTInvCamiones-{0}", CveEmpresa)
+ 'sino existe, recarga los datos
+ If Application(AppNombre) Is Nothing Then
+ Dim ObjInventarios As New ClsInventarios
+ If ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) Then
+ Application(AppNombre) = ObjInventarios.DtResultados
+ End If
+ ObjInventarios.Dispose()
+ End If
+
+ Dim Str As New StringBuilder
+ If CveCamion > 0 Then Str.AppendFormat("CveCamion = {0}", CveCamion)
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTInvCamiones = Dv.ToTable
+ Dv.Dispose()
+
+ End Get
+ Set(value As DataTable)
+ Dim AppNombre As String = String.Format("GlobalDTInvCamiones-{0}", CveEmpresa)
+ Application(AppNombre) = value
+ End Set
+ End Property
Property GlobalDTAFCaracteristicasOpciones() As DataTable
Get
GlobalDTAFCaracteristicasOpciones = DirectCast(Application("GlobalDTAFCaracteristicasOpciones"), DataTable)
@@ -1891,7 +1962,7 @@ Public Class ClsPaginas
Application("GlobalDTClientesCorporativo") = value
End Set
End Property
- Property GlobalDTCompProveedores(CveEmpresa As Integer, Optional CveProveedor As Integer = -1) As DataTable
+ Property GlobalDTCompProveedores(CveEmpresa As Integer, Optional CveProveedor As Integer = -1, Optional RFC As String = "-1") As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTCompProveedores-{0}", CveEmpresa)
'sino existe, recarga los datos
@@ -1905,6 +1976,7 @@ Public Class ClsPaginas
Dim StrSQL As New StringBuilder
StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If CveProveedor >= 0 Then StrSQL.AppendFormat(" AND CveProveedor = {0} ", CveProveedor)
+ If RFC <> "-1" Then StrSQL.AppendFormat(" AND RFC = '{0}' ", RFC)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
GlobalDTCompProveedores = Dv.ToTable
@@ -2409,39 +2481,6 @@ Public Class ClsPaginas
#End Region
#Region "***********************************************************************DT GENERALES**************************************************************************************"
- Property GlobalDTGralPaises() As DataTable
- Get
- GlobalDTGralPaises = DirectCast(Application("GlobalDTGralPaises"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTGralPaises") = value
- End Set
- End Property
- Property GlobalDTGralEstados(CvePais As Integer) As DataTable
- Get
- GlobalDTGralEstados = DirectCast(Application("GlobalDTGralEstados"), DataTable).FiltraParametros(String.Format("CvePais ={0}", CvePais))
- End Get
- Set(value As DataTable)
- Application("GlobalDTGralEstados") = value
- End Set
- End Property
- Property GlobalDTGralMunicipios(CveEstado As Integer) As DataTable
- Get
- GlobalDTGralMunicipios = DirectCast(Application("GlobalDTGralMunicipios"), DataTable).FiltraParametros(String.Format("CveEstado ={0}", CveEstado))
- End Get
- Set(value As DataTable)
- Application("GlobalDTGralMunicipios") = value
- End Set
- End Property
-
- Property GlobalDTGralPoblaciones() As DataTable
- Get
- GlobalDTGralPoblaciones = DirectCast(Application("GlobalDTGralPoblaciones"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTGralPoblaciones") = value
- End Set
- End Property
Property GlobalDTGralCategorias(CveEmpresa As Integer) As DataTable
Get
@@ -4944,14 +4983,8 @@ Public Class ClsPaginas
PaginaDict.Add("/Inventarios/RepExistenciaLote.aspx".ToUpper(), 109)
PaginaDict.Add("/Inventarios/CatUnidades.aspx".ToUpper(), 2056)
-
-
-
- 'PaginaDict.Add("/Inventarios/EntregasPorRealizarRuta.aspx".ToUpper(), -1)
- 'PaginaDict.Add("/General/RepPaqueteriasGuiasRuta.aspx".ToUpper(), -1)
-
PaginaDict.Add("/Inventarios/EntregaAlmacenRuta.aspx".ToUpper(), 1320)
- PaginaDict.Add("/General/RepEntregaAlmacenRuta.aspx".ToUpper(), 1319)
+ PaginaDict.Add("/Inventarios/RepEntregaAlmacenRuta.aspx".ToUpper(), 1319)
@@ -5189,6 +5222,9 @@ Public Class ClsPaginas
PaginaDict.Add("/RH/RepVacaciones.aspx".ToUpper(), 422)
PaginaDict.Add("/RH/CatChecadorTipo.aspx".ToUpper(), 427)
PaginaDict.Add("/RH/CatChecadorHorarios.aspx".ToUpper(), 428)
+ PaginaDict.Add("/Documentacion/TableroMaterialidad.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Documentacion/TableroMaterialidadDetalle.aspx".ToUpper(), -1)
+
PaginaDict.Add("/RH/RepChecadorPreAsistencia.aspx".ToUpper(), 628)
PaginaDict.Add("/RH/CatCaptaciones.aspx".ToUpper(), 629)
@@ -6509,7 +6545,7 @@ Public Class ClsPaginas
params.Add(New CrystalParametro("INETipoComite", INETipoComite))
params.Add(New CrystalParametro("INEIdContabilidad", INEIdContabilidad))
params.Add(New CrystalParametro("Referencia", Vta.Cliente.ReferenciaFiscal))
- params.Add(New CrystalParametro("ClienteContacto", Vta.AtnA))
+ params.Add(New CrystalParametro("ClienteContacto", Vta.AtencionA))
End If
'DIRECCION ENVIO
@@ -6740,7 +6776,7 @@ Public Class ClsPaginas
GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
End Try
End Sub
- Protected Function PdfFactura(ByRef Vta As Modelos.Factura, Optional AplicaPagare As String = "0", Optional Guardar As Boolean = True) As Byte()
+ Public Function PdfFactura(ByRef Vta As Modelos.Factura, Optional AplicaPagare As String = "0", Optional Guardar As Boolean = True) As Byte()
Dim retorno As Byte() = Nothing
' Dim ObjVentas As New ClsVentas
@@ -6812,12 +6848,9 @@ Public Class ClsPaginas
End Try
If EsXMLValido Then
- Dim TC As Decimal = 1
- Try
- TC = XmlDoc.DocumentElement.Attributes("TipoCambio").InnerText.ToDecimal
- Catch ex As Exception
- TC = 1
- End Try
+ Dim TC As Decimal = ValorNodoXML(XmlDoc.DocumentElement, "TC").ToDecimal
+ If TC <= 0 Then TC = 1
+
If ValorNodoXML(XmlDoc.DocumentElement, "version") = "3.3" Then
Vta.FechaEmision = ValorNodoXML(XmlDoc.DocumentElement, "fecha").ToDate
Vta.NoSerieCertificadoContribuyente = ValorNodoXML(XmlDoc.DocumentElement, "NoCertificado")
@@ -7117,7 +7150,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("ClienteNoInt", If(Vta.ClienteSucursal.NoInt.Length > 0, Vta.ClienteSucursal.NoInt, "")))
params.Add(New ReportParameter("ClienteNoExt", If(Vta.ClienteSucursal.NoExt.Length > 0, Vta.ClienteSucursal.NoExt, "")))
params.Add(New ReportParameter("ClientePais", If(Vta.ClienteSucursal.Pais.Length > 0, Vta.ClienteSucursal.Pais, "")))
- params.Add(New ReportParameter("ClienteContacto", Vta.AtnA))
+ params.Add(New ReportParameter("ClienteContacto", Vta.AtencionA))
ElseIf Vta.CveCliente.ToEntero > 0 Then
params.Add(New ReportParameter("ClienteCalle", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, "")))
params.Add(New ReportParameter("ClienteColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, "")))
@@ -7128,7 +7161,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("ClienteNoInt", If(Vta.Cliente.NoInt.Length > 0, Vta.Cliente.NoInt, "")))
params.Add(New ReportParameter("ClienteNoExt", If(Vta.Cliente.NoExt.Length > 0, Vta.Cliente.NoExt, "")))
params.Add(New ReportParameter("ClientePais", If(Vta.Cliente.Pais.Length > 0, Vta.Cliente.Pais, "")))
- params.Add(New ReportParameter("ClienteContacto", Vta.AtnA))
+ params.Add(New ReportParameter("ClienteContacto", Vta.AtencionA))
End If
'PARAMETROS SEGUN TIPO DOCUMENTO
@@ -7289,7 +7322,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("INETipoComite", INETipoComite))
params.Add(New ReportParameter("INEIdContabilidad", INEIdContabilidad.ToString))
params.Add(New ReportParameter("Referencia", Vta.Cliente.ReferenciaFiscal))
- params.Add(New ReportParameter("ClienteContacto", Vta.AtnA))
+ params.Add(New ReportParameter("ClienteContacto", Vta.AtencionA))
End If
RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
@@ -7413,8 +7446,8 @@ Public Class ClsPaginas
RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
- Case "RNC"
+ Case "RNC"
NombreArchivo = "RemisionNC"
NombreArchivoDescarga = "RemisionNC"
diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb
index cce1984f6..5c1b1d796 100644
--- a/App_Code/ClsRH.vb
+++ b/App_Code/ClsRH.vb
@@ -1966,15 +1966,18 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
_CvePersonal = SqlAdapter.SelectCommand.Parameters("@RETURN_VALUE").Value.ToString.ToEntero
Retorno = True
Catch Ex1 As SqlException
+ 'dbo.Vw_Val_Nom_Curps
If Ex1.Message.Contains("Número: 2627;") Then
- Alert("El Nuevo Personal no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia)
+ Alert("El nuevo personal no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia)
ElseIf Ex1.Message.Contains("Chk_RH_PersonalSalarioIMSS") Then
- Alert("El Nuevo Personal no se guardo debido a que se presento un problema al calcular el salario", TipoMensaje.MsgAdvertencia)
+ Alert("El nuevo personal no se guardo debido a que se presento un problema al calcular el salario", TipoMensaje.MsgAdvertencia)
+ ElseIf Ex1.Message.Contains("dbo.Vw_Val_Nom_Curps") Then
+ Alert(String.Format("El nuevo personal no se guardo, ya existe un personal con esta curp '{0}'", CURP), TipoMensaje.MsgAdvertencia)
Else
- Me.OnError("Ocurrió un error al guardar el nuevo Personal.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ Me.OnError("Ocurrió un error al guardar el nuevo personal.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If
Catch ex As Exception
- OnError("Ocurrió un error al guardar el nuevo Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al guardar el nuevo personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index 44bd17ea6..ad1c04887 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -552,6 +552,24 @@ Public Class ClsVentas
End Try
Return Retorno
End Function
+
+
+ Public Function UpdateDireccionEnvioVenta(CveVenta As Integer, CveDireccionEnvio As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Vta_VentasDireccionEnvioUpdate")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveVenta", SqlDbType.Int).Value = CveVenta
+ .Add("@CveDireccionEnvio", SqlDbType.Int).Value = CveDireccionEnvio
+ .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 dirección de envío de la venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return Retorno
+ End Function
Public Function AddVta_VentaPago(CveVenta As Integer, CveMetodoPago As Integer, Importe As Double) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasPagoAdd")
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index 436328d6c..1f4db56e7 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -6210,6 +6210,7 @@ Namespace Modelos
Public Property DtMovimientosUsados As DataTable
Public Property CveAlmacenDevolucion As Integer
Public Property CveVenta As Integer
+ Public Property CveTimbre As Integer
Public Property CveEmpresa As Integer
Public Property CveSucursal As Integer 'sucursal de la empresa que factura
Public Property CveSubProyecto As Integer
@@ -6279,7 +6280,7 @@ Namespace Modelos
End Property
Public Property Inv_CveMovimiento As Integer
- Public Property Inv_CveEstatusEntrega As Integer
+ Public Property Inv_CveEstatusEntrega As Integer = 0
Public Property Inv_EstatusEntrega As String
Public Property Inv_ValorInventario As Decimal
Public Property Fecha As DateTime
@@ -6301,7 +6302,8 @@ Namespace Modelos
Public Property EstatusFactura As String
Public Property SeTimbro As String
Public Property TipoDocto As String
- Public Property RefDocto As String
+ Public Property TipoComprobante As String
+ Public Property RefDocto As String = ""
Public Property RealizarDevolucionAlmacen As Boolean
Public Property CveAlmacenDevolucionVenta As Integer
@@ -6437,24 +6439,24 @@ Namespace Modelos
End Get
End Property
- Public Property MotivoDescuento As String
+ Public Property MotivoDescuento As String = ""
#Region "Totales"
- Public Property SubTotal As Decimal
- Public Property Descuento As Decimal
- Public Property Amortizacion As Decimal
+ Public Property SubTotal As Decimal = 0
+ Public Property Descuento As Decimal = 0
+ Public Property Amortizacion As Decimal = 0
'IVA
- Public Property RetIVA As Decimal
- Public Property RetISR As Decimal
- Public Property IVA As Decimal
- Public Property IEPS As Decimal
+ Public Property RetIVA As Decimal = 0
+ Public Property RetISR As Decimal = 0
+ Public Property IVA As Decimal = 0
+ Public Property IEPS As Decimal = 0
- Public Property Total As Decimal
- Public Property Otros As Decimal
+ Public Property Total As Decimal = 0
+ Public Property Otros As Decimal = 0
- Public Property TotalRemNCAplicado As Decimal
+ Public Property TotalRemNCAplicado As Decimal = 0
#Region "Totales por Tipo de cambio"
@@ -6542,32 +6544,31 @@ Namespace Modelos
End Property
#End Region
#End Region
- Public Property AtencionA As String
- Public Property AtnA As String
- Public Property TelefonoGenerico As String
- Public Property Det_OrdenCompra As String
- Public Property Det_FechaOrdenCompra As String
- Public Property Det_ContraRecibo As String
- Public Property Observaciones As String
+ Public Property AtencionA As String = ""
+ Public Property TelefonoGenerico As String = ""
+ Public Property Det_OrdenCompra As String = ""
+ Public Property Det_FechaOrdenCompra As String = ""
+ Public Property Det_ContraRecibo As String = ""
+ Public Property Observaciones As String = ""
- Public Property Alfa1 As String
- Public Property Alfa2 As String
- Public Property Alfa3 As String
+ Public Property Alfa1 As String = ""
+ Public Property Alfa2 As String = ""
+ Public Property Alfa3 As String = ""
Public Property Fech1 As Date
Public Property Fech2 As Date
Public Property Fech3 As Date
- Public Property Num1 As Double
- Public Property Num2 As Double
- Public Property Num3 As Double
+ Public Property Num1 As Double = 0
+ Public Property Num2 As Double = 0
+ Public Property Num3 As Double = 0
Public Property DiasCredito As Integer
Public Property EsDiasCreditoFijo As Boolean
- Public Property CveCorte As Integer
- Public Property CveMesa As Integer
- Public Property NumeroPersonas As Integer
+ Public Property CveCorte As Integer = -1
+ Public Property CveMesa As Integer = -1
+ Public Property NumeroPersonas As Integer = 0
Public Property FechaPago As Date
@@ -6575,15 +6576,15 @@ Namespace Modelos
Public Property CveNCaVincular As Integer
Public Property FolioFiscal As String
Public Property NoSerieCertificado As String
- Public Property SelloCFDi As String
- Public Property SelloSAT As String
+ Public Property SelloCFDi As String = ""
+ Public Property SelloSAT As String = ""
Public Property FechaEmision As Date
Public Property FechaCertificacion As Date
Public Property NoSerieCertificadoContribuyente As String
- Public Property NumeroCuenta As String
+ Public Property NumeroCuenta As String = ""
Public Property CveTipoAmortizacionAnticipo As Integer = -1
- Public Property DescripcionContrato As String
- Public Property NumeroDescripcionContrato As String
+ Public Property DescripcionContrato As String = ""
+ Public Property NumeroDescripcionContrato As String = ""
Public Property CveComplementoTimbrado As Integer = 0
Public Property ComplementoINE As Modelos.ComplementoINE
Public Property FordGSDB As String = ""
@@ -6681,28 +6682,28 @@ Namespace Modelos
End If
End Sub
- Public Property CveClienteSucursal As Integer
+ Public Property CveClienteSucursal As Integer = 0
Public Property ClienteSucursal As Modelos.SucursalModel
Public Property EnviarA As Modelos.EnviarAModel
- Public Property NumeroContrato As String
- Public Property PedidoContrato As String
- Public Property OrdenCompra As String = "-1"
+ Public Property NumeroContrato As String = ""
+ Public Property PedidoContrato As String = ""
+ Public Property OrdenCompra As String = ""
Public Property CveMetodoPago As Integer
- Public Property MetodoPago As String
- Public Property ClaveMetodoPagoSAT As String
+ Public Property MetodoPago As String = ""
+ Public Property ClaveMetodoPagoSAT As String = ""
Public Property CveMetodoPago33 As Integer
- Public Property MetodoPago33 As String
+ Public Property MetodoPago33 As String = ""
Public Property CveFormaPago33 As Integer
- Public Property MetodoPagoSAT33 As String
- Public Property FormaPago33 As String
- Public Property FormaPagoSAT33 As String
+ Public Property MetodoPagoSAT33 As String = ""
+ Public Property FormaPago33 As String = ""
+ Public Property FormaPagoSAT33 As String = ""
Public Property UsoCFDI As String = ""
Public Property CveUsoCFDI As Integer
Public Property ClaveUsoCFDI As String = ""
Public Property CveTipoRelacion As Integer = -1
Public Property CveEstatusFactura As Integer
Public Property CveVendedor As Integer
- Public Property VendedorCodigo As String
+ Public Property VendedorCodigo As String = ""
Public Property CveSucursalEjecucion As Integer
Public Property FechaEjecucion As Date
Public Property CveSucursalCobranza As Integer
@@ -6710,15 +6711,15 @@ Namespace Modelos
Public Property CveSubProyectoCobranza As Integer
Public Property CveSubProyectoEjecucion As Integer
Public Property CveOS As Integer
- Public Property CveContrato As Integer
- Public Property CveVentaPadre As Integer
- Public Property CvePrePoliza As Integer
- Public Property Entrega As String
- Public Property TiempoEntrega As String
+ Public Property CveContrato As Integer = -1
+ Public Property CveVentaPadre As Integer = -1
+ Public Property CvePrePoliza As Integer = -1
+ Public Property Entrega As String = ""
+ Public Property TiempoEntrega As String = ""
Public Property Vigencia As Date
Public Property TipoEstatus As Integer
Public Property CveCondicionEntrega As Integer
- Public Property CondicionEntrega As String
+ Public Property CondicionEntrega As String = ""
Public Property TipoRelacion As String
Public Property UUIDRelacionados As List(Of String)
@@ -9702,21 +9703,21 @@ Namespace Modelos
End Sub
Public Property AplicaFEMSA As Boolean = False 'AplicaFEMSA
- Public Property FEMSA_NumSociedad As String 'TxtFEMSA_NumSociedad.Text.Trim,
- Public Property FEMSA_NumProveedor As String 'TxtFEMSA_NumProveedor.Text.Trim,
- Public Property FEMSA_Mail As String 'TxtFEMSA_Mail.Text.Trim
+ Public Property FEMSA_NumSociedad As String = "" 'TxtFEMSA_NumSociedad.Text.Trim,
+ Public Property FEMSA_NumProveedor As String = "" 'TxtFEMSA_NumProveedor.Text.Trim,
+ Public Property FEMSA_Mail As String = "" 'TxtFEMSA_Mail.Text.Trim
- Public Property FEMSA_Version As Integer 'TxtFEMSA_Version.Text.ToEntero, ClaseDocto,
+ Public Property FEMSA_Version As Integer 'TxtFEMSA_Version.Text.ToEntero, ClaseDocto,
Public Property FEMSA_NumPedido As Long 'TxtFEMSA_NumPedido.Text.Trim.ToLong,
- Public Property FEMSA_NumEntrada As String 'TxtFEMSA_NumEntrada.Text.Trim,
- Public Property FEMSA_NumRemision As String 'TxtFEMSA_NumRemision.Text.Trim,
- Public Property FEMSA_NumSocio As String 'TxtFEMSA_NumSocio.Text.Trim,
- Public Property FEMSA_CentroCosto As String 'TxtFEMSA_CentroCosto.Text.Trim,
- Public Property FEMSA_IPeriodoLiquidacion As String 'TxtFEMSA_IPeriodoLiquidacion.Text.Trim,
- Public Property FEMSA_FPeriodoLiquidacion As String 'TxtFEMSA_FPeriodoLiquidacion.Text.Trim,
- Public Property FEMSA_CodRetencion1 As String 'TxtFEMSA_CodRetencion1.Text.Trim,
- Public Property FEMSA_CodRetencion2 As String 'TxtFEMSA_CodRetencion2.Text.Trim,
+ Public Property FEMSA_NumEntrada As String = "" 'TxtFEMSA_NumEntrada.Text.Trim,
+ Public Property FEMSA_NumRemision As String = "" 'TxtFEMSA_NumRemision.Text.Trim,
+ Public Property FEMSA_NumSocio As String = "" 'TxtFEMSA_NumSocio.Text.Trim,
+ Public Property FEMSA_CentroCosto As String = "" 'TxtFEMSA_CentroCosto.Text.Trim,
+ Public Property FEMSA_IPeriodoLiquidacion As String = "" 'TxtFEMSA_IPeriodoLiquidacion.Text.Trim,
+ Public Property FEMSA_FPeriodoLiquidacion As String = "" 'TxtFEMSA_FPeriodoLiquidacion.Text.Trim,
+ Public Property FEMSA_CodRetencion1 As String = "" 'TxtFEMSA_CodRetencion1.Text.Trim,
+ Public Property FEMSA_CodRetencion2 As String = "" 'TxtFEMSA_CodRetencion2.Text.Trim,
End Class
diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb
index d354d4be3..c075709d5 100644
--- a/App_Code/Timbrado.vb
+++ b/App_Code/Timbrado.vb
@@ -1754,7 +1754,7 @@ Public Class Timbrado
If ObjCFDITimbre.Comprobante.TipoComprobante = "N" Then
Using ObjNomina2 As New ClsNominas()
- If ObjNomina2.UpdateEstatusNomNominas(3, UsuarioActual.Empresa.CvePAC, FolioFiscal, "", ("01/01/2000").ToDate, ObjCFDITimbre.Nomina.CveNomina, 0, 0, 0, 0, 0) Then
+ If ObjNomina2.UpdateEstatusNomNominas(3, UsuarioActual.Empresa.CvePAC, FolioFiscal, ObjCFDITimbre.Comprobante.Fecha, ObjCFDITimbre.Comprobante.Fecha, ObjCFDITimbre.Nomina.CveNomina, 0, 0, 0, 0, 0) Then
Retorno = ""
Else
Retorno = "Error"
@@ -2137,16 +2137,16 @@ Public Class Timbrado
Dim Carta As CFDICartaPorte = ObjCFDITimbre.Complementos.CartaPorte
''DATOS GENERALES
- cfdi.CartaPorte(Carta.TranspInternac, Carta.EntradaSalidaMercancia, "MEX", Carta.ViaEntradaSalida, Carta.TotalDistanciaRecorrida)
+ cfdi.CartaPorte(Carta.TranspInternac, Carta.EntradaSalidaMercancia, "", Carta.ViaEntradaSalida, Carta.TotalDistanciaRecorrida)
'UBICACIONES
If Carta.Ubicaciones IsNot Nothing AndAlso Carta.Ubicaciones.Count > 0 Then
For Each ubica As CFDICartaPorteUbicacion In Carta.Ubicaciones
'origen
- cfdi.CartaPorteUbicacion(ubica.TipoUbicacion, ubica.IDUbicacion, ubica.IDUbicacion, ubica.NombreRemitenteDestinatario, ubica.NumRegIdTrib, ubica.ResidenciaFiscal, ubica.NumEstacion, ubica.NombreEstacion, ubica.NavegacionTrafico, ubica.FechaHoraSalida, ubica.TipoEstacion, ubica.DistanciaRecorrida)
+ cfdi.CartaPorteUbicacion(ubica.TipoUbicacion, ubica.IDUbicacion, ubica.RFCRemitenteDestinatario, ubica.NombreRemitenteDestinatario, ubica.NumRegIdTrib, ubica.ResidenciaFiscal, ubica.NumEstacion, ubica.NombreEstacion, ubica.NavegacionTrafico, ubica.FechaHoraSalidaLlegada, ubica.TipoEstacion, ubica.DistanciaRecorrida)
'cfdi.CartaPorteOrigen(ubica.Origen.IDOrigen, ubica.Origen.RFCRemitente, ubica.Origen.NombreRemitente, ubica.NumRegIdTrib, ubica.Origen.ResidenciaFiscal, ubica.Origen.NumEstacion, ubica.Origen.NombreEstacion, ubica.Origen.NavegacionTrafico, ubica.Origen.FechaHoraSalida)
cfdi.CartaPorteDomicilio(ubica.Domicilio.Calle, ubica.Domicilio.NumeroExterior, ubica.Domicilio.NumeroInterior, ubica.Domicilio.Colonia, ubica.Domicilio.Localidad, ubica.Domicilio.Referencia, ubica.Domicilio.Municipio, ubica.Domicilio.Estado, ubica.Domicilio.Pais, ubica.Domicilio.CP)
- '''destino
+ ''''destino
'cfdi.CartaPorteUbicacion(ubica.TipoEstacion, ubica.DistanciaRecorridaDestino)
'cfdi.CartaPorteDestino(ubica.Destino.IDDestino, ubica.Destino.RFCDestinatario, ubica.Destino.NombreDestinatario, ubica.Destino.NumRegIdTrib, ubica.Destino.ResidenciaFiscal, ubica.Destino.NumEstacion, ubica.Destino.NombreEstacion, ubica.Destino.NavegacionTrafico, ubica.Destino.FechaHoraProgLlegada)
' cfdi.CartaPorteDomicilio(ubica.Destino.Domicilio.Calle, ubica.Destino.Domicilio.NumeroExterior, ubica.Destino.Domicilio.NumeroInterior, ubica.Destino.Domicilio.Colonia, ubica.Destino.Domicilio.Localidad, ubica.Destino.Domicilio.Referencia, ubica.Destino.Domicilio.Municipio, ubica.Destino.Domicilio.Estado, ubica.Destino.Domicilio.Pais, ubica.Destino.Domicilio.CP)
@@ -2154,22 +2154,24 @@ Public Class Timbrado
End If
- 'MERCANCIAS
- If Carta.Mercancias IsNot Nothing Then
- cfdi.CartaPorteMercancias(Carta.Mercancias.PesoBrutoTotal, Carta.Mercancias.UnidadPeso, Carta.Mercancias.PesoNetoTotal, Carta.Mercancias.NumTotalMercancias, Carta.Mercancias.CargoporTasacion)
- If Carta.Mercancias IsNot Nothing AndAlso Carta.Mercancias.Mercancias.Count > 0 Then
- For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias
+ 'MERCANCIAS
+ If Carta.Mercancias IsNot Nothing Then
+ cfdi.CartaPorteMercancias(Carta.Mercancias.PesoBrutoTotal, Carta.Mercancias.UnidadPeso, Carta.Mercancias.PesoNetoTotal, Carta.Mercancias.NumTotalMercancias, Carta.Mercancias.CargoporTasacion)
+ If Carta.Mercancias IsNot Nothing AndAlso Carta.Mercancias.Mercancias.Count > 0 Then
+ For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias
cfdi.CartaPorteMercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, If(concep.ClaveMaterialPeligroso <> "", concep.Embalaje, ""), concep.DescripEmbalaje, concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt)
+ For Each transp In concep.MercanciasCantidadTransporta
+ cfdi.CartaPorteCantidadTransporta(transp.Cantidad, transp.IDOrigen, transp.IDDestino, transp.CvesTransportes)
+ Next
Next
- End If
End If
-
+ End If
'
If Carta.FiguraTransporte IsNot Nothing Then
If Carta.FiguraTransporte.AutoTransporte IsNot Nothing Then
- cfdi.CartaPorteAutotransporte(Carta.FiguraTransporte.AutoTransporte.PermSCT, Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT)
+ cfdi.CartaPorteAutotransporte(Carta.FiguraTransporte.AutoTransporte.PermisoSCT, Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT)
cfdi.CartaPorteIdentificacionVehicular(Carta.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM, Carta.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM)
@@ -2186,13 +2188,15 @@ Public Class Timbrado
End If
End If
-
- 'If Carta.FiguraTransporte.Operadores IsNot Nothing AndAlso Carta.FiguraTransporte.Operadores.Count > 0 Then
- ' For Each concep As CFDICartaPorteOperador In Carta.FiguraTransporte.Operadores
- ' cfdi.CartaPorteOperador(concep.RFCOperador, concep.NumLicencia, concep.NombreOperador, concep.NumRegidTribOperador, concep.ResidenciaFiscalOperador)
- ' cfdi.CartaPorteOperadorDomicilio(concep.Domicilio.Calle, concep.Domicilio.NumeroExterior, concep.Domicilio.NumeroInterior, concep.Domicilio.Colonia, concep.Domicilio.Localidad, concep.Domicilio.Referencia, concep.Domicilio.Municipio, concep.Domicilio.Estado, concep.Domicilio.Pais, concep.Domicilio.CP)
- ' Next
- ' End If
+ If Carta.FiguraTransporte.Operadores IsNot Nothing AndAlso Carta.FiguraTransporte.Operadores.Count > 0 Then
+ For Each concep As CFDICartaPorteOperador In Carta.FiguraTransporte.Operadores
+ cfdi.CartaPorteTiposFigura(concep.TipoFigura, concep.RFCFigura, concep.NumLicencia, concep.NombreFigura, concep.NumRegidTribFigura, If(concep.ResidenciaFiscalFigura <> "MEX", concep.ResidenciaFiscalFigura, ""))
+ If concep.TipoFigura.Contiene("02", "03") Then ' “02”- Propietario o “03” -Arrendador
+ cfdi.CartaPortePartesTransporte("PT01")
+ cfdi.CartaPortePartesTransporteDomicilio(concep.Domicilio.Calle, concep.Domicilio.NumeroExterior, concep.Domicilio.NumeroInterior, concep.Domicilio.Colonia, concep.Domicilio.Localidad, concep.Domicilio.Referencia, concep.Domicilio.Municipio, concep.Domicilio.Estado, concep.Domicilio.Pais, concep.Domicilio.CP)
+ End If
+ Next
+ End If
End If
@@ -2414,45 +2418,28 @@ Public Class Timbrado
swmili = sw.ElapsedMilliseconds
sw.Start()
- If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then
+ Select Case ObjCFDITimbre.Comprobante.TipoComprobante
+ Case "N"
- 'Actualiza Estatus Factura
- If Ventas.CveVenta > 0 Then
-
- Using ObjVentas As New ClsVentas()
-
- If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", ObjCFDITimbre.Comprobante.Fecha, Ventas.CveVenta, CvePAC:=CvePACEspecial, RFCReceptor:=ObjCFDITimbre.Receptor.RFC) Then
- Retorno = ""
- Else
- Retorno = "Error"
- End If
- End Using
-
- 'Genero la addenda Ford
- If Ventas.Cliente.Ford_GSDB <> "" Then
-
- Dim RutaCadena As String = String.Format("{0}{1}.xml", RutaArchivo, NombreArchivoXML) 'If(UsuarioActual.Empresa.FacturaProduccion, String.Format("{0}XML\{1}\{2}.xml", Ruta, Ventas.SerieFolio), String.Format("{0}XML\{1}\{2}.xml", Ruta, Ventas.TipoDocto, Ventas.SerieFolio))
-
- Dim FolioFactura As String = ""
- If UsuarioActual.CveEmpresa = 8 Then FolioFactura = Ventas.Folio.ToString ' sogo, pordefault manda el folio de la factura
- GeneraAddendaFord(RutaCadena, FolioFactura, Ventas.FordASN, Ventas.FordGSDB)
-
- End If
-
- End If
-
- If ObjCFDITimbre.Comprobante.TipoComprobante = "N" Then
Using ObjNomina2 As New ClsNominas()
- If ObjNomina2.UpdateEstatusNomNominas(3, CvePACEspecial, FolioFiscal, "", ("01/01/2000").ToDate, ObjCFDITimbre.Nomina.CveNomina, 0, 0, 0, 0, 0, isFiniquito:=Ventas.Timbre.IStimbreFiniquito) Then
+ If ObjNomina2.UpdateEstatusNomNominas(3, CvePACEspecial, FolioFiscal, ObjCFDITimbre.Comprobante.Fecha, ("01/01/2000").ToDate, ObjCFDITimbre.Nomina.CveNomina, 0, 0, 0, 0, 0, isFiniquito:=Ventas.Timbre.IStimbreFiniquito) Then
Retorno = ""
Else
Retorno = "Error"
End If
End Using
- End If
- If ObjCFDITimbre.Comprobante.TipoComprobante = "T" Then
+ Case "T"
+
+ Dim objGrales As New ClsGenerales
+ If objGrales.UpdateTimbreTimbrado(Ventas.CveTimbre, FolioFiscal, ObjCFDITimbre.Comprobante.Fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.CvePAC) Then
+ Retorno = ""
+ Else
+ Retorno = "Error"
+ End If
+ objGrales.Dispose()
+
Using ObjInv As New ClsInventarios()
If ObjInv.UpdateMovimientoTimbrado(Ventas.Inv_CveMovimiento, 1, FolioFiscal, MinFecha) Then
Retorno = ""
@@ -2460,8 +2447,36 @@ Public Class Timbrado
Retorno = "Error"
End If
End Using
- End If
- End If
+
+
+ Case Else
+
+ 'Actualiza Estatus Factura
+ If Ventas.CveVenta > 0 Then
+
+ Using ObjVentas As New ClsVentas()
+
+ If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", ObjCFDITimbre.Comprobante.Fecha, Ventas.CveVenta, CvePAC:=CvePACEspecial, RFCReceptor:=ObjCFDITimbre.Receptor.RFC) Then
+ Retorno = ""
+ Else
+ Retorno = "Error"
+ End If
+ End Using
+
+ 'Genero la addenda Ford
+ If Ventas.Cliente.Ford_GSDB <> "" Then
+
+ Dim RutaCadena As String = String.Format("{0}{1}.xml", RutaArchivo, NombreArchivoXML) 'If(UsuarioActual.Empresa.FacturaProduccion, String.Format("{0}XML\{1}\{2}.xml", Ruta, Ventas.SerieFolio), String.Format("{0}XML\{1}\{2}.xml", Ruta, Ventas.TipoDocto, Ventas.SerieFolio))
+
+ Dim FolioFactura As String = ""
+ If UsuarioActual.CveEmpresa = 8 Then FolioFactura = Ventas.Folio.ToString ' sogo, pordefault manda el folio de la factura
+ GeneraAddendaFord(RutaCadena, FolioFactura, Ventas.FordASN, Ventas.FordGSDB)
+
+ End If
+
+ End If
+ End Select
+
If Not IO.Directory.Exists($"{UsuarioActual.Empresa.Ruta}CBB\") Then IO.Directory.CreateDirectory($"{UsuarioActual.Empresa.Ruta}CBB\")
@@ -3047,7 +3062,7 @@ Public Class Timbrado
If ObjCFDITimbre.Comprobante.TipoComprobante = "N" Then
Using ObjNomina2 As New ClsNominas()
- If ObjNomina2.UpdateEstatusNomNominas(3, CvePACEspecial, FolioFiscal, "", ("01/01/2000").ToDate, ObjCFDITimbre.Nomina.CveNomina, 0, 0, 0, 0, 0) Then
+ If ObjNomina2.UpdateEstatusNomNominas(3, CvePACEspecial, FolioFiscal, ObjCFDITimbre.Comprobante.Fecha, ObjCFDITimbre.Comprobante.Fecha, ObjCFDITimbre.Nomina.CveNomina, 0, 0, 0, 0, 0) Then
Retorno = ""
Else
Retorno = "Error"
@@ -3903,8 +3918,8 @@ Public Class Timbrado
ComCartaPorte.FiguraTransporte.CveTransporte = ProfactCartaPorte.c_CveTransporte.Item02
ComCartaPorte.Mercancias.AutotransporteFederal = New ProfactCartaPorte.CartaPorteMercanciasAutotransporteFederal
- If Carta.FiguraTransporte.AutoTransporte.PermSCT <> "" Then
- ComCartaPorte.Mercancias.AutotransporteFederal.PermSCT = CType([Enum].Parse(GetType(ProfactCartaPorte.c_TipoPermiso), Carta.FiguraTransporte.AutoTransporte.PermSCT), ProfactCartaPorte.c_TipoPermiso)
+ If Carta.FiguraTransporte.AutoTransporte.PermisoSCT <> "" Then
+ ComCartaPorte.Mercancias.AutotransporteFederal.PermSCT = CType([Enum].Parse(GetType(ProfactCartaPorte.c_TipoPermiso), Carta.FiguraTransporte.AutoTransporte.PermisoSCT), ProfactCartaPorte.c_TipoPermiso)
End If
ComCartaPorte.Mercancias.AutotransporteFederal.NumPermisoSCT = Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT
'pendiente RMF
@@ -3936,10 +3951,10 @@ Public Class Timbrado
ComCartaPorte.FiguraTransporte.Operadores = New ProfactCartaPorte.CartaPorteFiguraTransporteOperadoresOperador(Carta.FiguraTransporte.Operadores.Count - 1) {}
For Each concep As CFDICartaPorteOperador In Carta.FiguraTransporte.Operadores
ComCartaPorte.FiguraTransporte.Operadores(i) = New ProfactCartaPorte.CartaPorteFiguraTransporteOperadoresOperador
- ComCartaPorte.FiguraTransporte.Operadores(i).RFCOperador = concep.RFCOperador
+ ComCartaPorte.FiguraTransporte.Operadores(i).RFCOperador = concep.RFCFigura
ComCartaPorte.FiguraTransporte.Operadores(i).NumLicencia = concep.NumLicencia
- ComCartaPorte.FiguraTransporte.Operadores(i).NombreOperador = concep.NombreOperador
- ComCartaPorte.FiguraTransporte.Operadores(i).NumRegIdTribOperador = concep.NumRegidTribOperador
+ ComCartaPorte.FiguraTransporte.Operadores(i).NombreOperador = concep.NombreFigura
+ ComCartaPorte.FiguraTransporte.Operadores(i).NumRegIdTribOperador = concep.NumRegidTribFigura
'OComCartaPorte.FiguraTransporte.Operadores(i)(0) = concep.ResidenciaFiscalOperador 'falta
ComCartaPorte.FiguraTransporte.Operadores(i).Domicilio = New ProfactCartaPorte.CartaPorteFiguraTransporteOperadoresOperadorDomicilio()
diff --git a/App_Code/Timbres.vb b/App_Code/Timbres.vb
new file mode 100644
index 000000000..a8263dfde
--- /dev/null
+++ b/App_Code/Timbres.vb
@@ -0,0 +1,364 @@
+Imports System.Data
+Imports Extensiones
+
+Public Class Timbres
+ Private _MsgError As StringBuilder
+ Private _MensajeAlert As StringBuilder
+ Public Property TieneError As Boolean
+ Public ReadOnly Property MsgError As String
+ Get
+ Return _MsgError.ToString
+ End Get
+ End Property
+
+ Public ReadOnly Property MensajeAlert As String
+ Get
+ Return _MensajeAlert.ToString
+ End Get
+ End Property
+
+ Private Property CveMovimiento As Integer
+ Private Property UsuarioActual As Usuario
+ Private Property AplicaCP As Boolean
+ Private Property FechaSalida As Date
+ Private Property Serie As String
+ Private Property Folio As Integer
+ Private Property CveTimbre As Integer
+
+ Private Property CPCliente As Integer
+ Public Property ObjFactura As Modelos.Factura
+
+ Public Sub New()
+
+ End Sub
+
+ Public Sub New(TipoDocto As String, tCveTimbre As Integer, tUsuarioActual As Usuario)
+ _MsgError = New StringBuilder
+ UsuarioActual = tUsuarioActual
+ CveTimbre = tCveTimbre
+ CreaObjetosTraslados(TipoDocto, tCveTimbre)
+ End Sub
+
+
+ Private Sub CreaObjetosTraslados(TipoDocto As String, CveTimbre As Integer)
+ ObjFactura = New Modelos.Factura
+ ObjFactura.Version = "3.3"
+ ObjFactura.CveUsuario = UsuarioActual.CveUsuario
+ ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
+ ObjFactura.UsuarioActual = UsuarioActual
+ 'ObjFactura.TipoCambio = 1
+ ObjFactura.ConvertirPesos = False
+ ObjFactura.CveMoneda = 1
+ ObjFactura.Moneda = "XXX"
+ ObjFactura.MonedaSAT = "XXX"
+ ObjFactura.MonedaAbreviatura = "XXX"
+ ObjFactura.TipoDocto = TipoDocto
+ ObjFactura.TipoComprobante = "T"
+
+ ObjFactura.Fecha = Now
+ ObjFactura.FechaPago = Now
+ ObjFactura.FechaEjecucion = Now
+ ObjFactura.UsuarioCreo = UsuarioActual.Usuario
+ ObjFactura.TipoDocumento = "Traspaso"
+
+
+ ObjFactura.RFCReceptor = "XAXX010101000" ' RFC empresa traslado , si es entrega RFC Cliente
+
+ ObjFactura.Inv_CveMovimiento = CveMovimiento
+ ObjFactura.CveTimbre = CveTimbre
+
+ If CveTimbre > 0 AndAlso ObjFactura.TipoComprobante = "T" Then
+
+ ObjFactura.Timbre = PreParaTimbreCartaPorte(ObjFactura)
+
+ End If
+
+ End Sub
+
+ Private Function PreParaTimbreCartaPorte(Obj As Modelos.Factura) As CFDITimbre
+ Dim Timbre As New CFDITimbre
+ Timbre.Comprobante.TipoComprobante = "T"
+ Timbre.Comprobante.Fecha = Obj.Fecha
+ Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
+ Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
+ Timbre.Comprobante.SubTotal = Obj.SubTotal
+ Timbre.Comprobante.Descuentos = Obj.Descuento
+ Timbre.Comprobante.Moneda = "XXX"
+ Timbre.Comprobante.TipoCambio = "" ' CONDICIÓN SI LA MONEDA ES 'XXX'
+
+ Timbre.Receptor.RFC = UsuarioActual.Empresa.RFC
+ Timbre.Receptor.Nombre = UsuarioActual.Empresa.Empresa
+ Timbre.Receptor.UsoCFDI = "P01"
+
+
+ Dim totSubTotal As Decimal = Obj.SubTotal
+ Dim totIVA As Decimal = Obj.IVA
+ Dim totRetIVA As Decimal = Obj.RetIVA
+ Dim totRetISR As Decimal = Obj.RetISR
+ Dim i As Integer = 1
+
+
+ Timbre.Comprobante.LugarExpedicion = UsuarioActual.Empresa.CP.ToString
+
+
+ 'DETALLES
+ Dim tPS As String = ""
+
+ Dim CartaPorte As New CFDICartaPorte
+ CartaPorte.TranspInternac = "No"
+ CartaPorte.EntradaSalidaMercancia = ""
+ CartaPorte.ViaEntradaSalida = ""
+
+ CartaPorte.Mercancias.UnidadPeso = "KGM"
+ CartaPorte.Mercancias.CargoporTasacion = 0
+
+ Dim FI As Date = New Date(1900, 1, 1)
+ Dim FF As Date = New Date(9999, 1, 1)
+
+ Dim FechaLlegada As DateTime
+ Dim Distancia As Integer = 1
+
+ Dim ObjGrales As New ClsGenerales
+ If ObjGrales.GetGralTimbre(CveTimbre, "-1", FI, FF, 0, UsuarioActual.CveEmpresa, -1) Then
+
+ If ObjGrales.DtResultados.Rows.Count = 1 Then
+ Dim DtMovimientos As DataTable = Nothing
+
+ Dim drT As DataRow = ObjGrales.DtResultados.Rows(0)
+
+ CveMovimiento = drT("CveMovimientoAlmacen").ToString.ToEntero
+ FechaSalida = drT("FechaEntrega").ToString.ToDateTime
+ FechaLlegada = drT("FechaLlegada").ToString.ToDateTime
+ Distancia = drT("Distancia").ToString.ToEntero
+
+ ObjFactura.Folio = drT("Folio").ToString.ToEntero
+ ObjFactura.Serie = drT("Serie").ToString
+ Timbre.Comprobante.Serie = Obj.Serie
+ Timbre.Comprobante.Folio = Obj.Folio.ToString
+
+ If drT("FolioFiscalRelacionado").ToString <> "" Then
+
+ Timbre.CFDIRelacionados.TipoRelacion = "05"
+ Timbre.CFDIRelacionados.UUID.Add(drT("FolioFiscalRelacionado").ToString)
+
+ End If
+
+ If ObjGrales.GetGralMovimientosDetalleTimbre(CveTimbre, UsuarioActual.CveEmpresa) Then
+ DtMovimientos = ObjGrales.DtResultados
+ Else
+ TieneError = True
+ _MsgError.AppendLine("Error al obtener Movimientos")
+ End If
+
+ ObjFactura.DtDetalle = DtMovimientos
+
+ AplicaCP = Boolean.Parse(drT("AplicaCP").ToString)
+
+ ObjFactura.CveSubProyecto = drT("CveSubProyecto").ToString.ToEntero
+
+ ObjFactura.SetSubProyecto()
+ ObjFactura.SetSubProyectoMatriz()
+
+ If AplicaCP Then
+
+ CartaPorte.FiguraTransporte.AutoTransporte.PermisoSCT = drT("ClaveTipoPermisoSCT").ToString '"TPAF01"
+ CartaPorte.FiguraTransporte.AutoTransporte.NumPermisoSCT = drT("NumPermisoSCT").ToString
+ CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil = drT("NombreAseguradora").ToString
+ CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil = drT("NumPolizaSeguro").ToString
+ CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente = drT("NombreAseguradoraMedioAmbiente").ToString
+ CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente = drT("NumPolizaSeguroMedioAmbiente").ToString
+ CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroCarga = drT("NombreAseguradoraCarga").ToString
+ CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroCarga = drT("NumPolizaSeguroCarga").ToString
+ CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular = drT("ConfigCartaPorte").ToString
+ CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM = drT("Placa").ToString
+ CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM = drT("Anio").ToString.ToEntero
+
+
+ Dim DomOrigen As CFDICartaPorteDomicilio = Nothing
+ DomOrigen = New CFDICartaPorteDomicilio With {.Calle = drT("DirOriCalle").ToString,
+ .Colonia = drT("DirOriClaveSATColonia").ToString,
+ .CP = drT("DirOriCP").ToString,
+ .Estado = drT("DirOriClaveSATEstado").ToString,
+ .Pais = drT("DirOriClaveSATPais").ToString,
+ .Municipio = drT("DIrOriClaveSATMunicipio").ToString,
+ .Localidad = drT("DirOriClaveSATLocalidad").ToString}
+
+ Dim DomDestino As CFDICartaPorteDomicilio = Nothing
+
+
+ DomDestino = New CFDICartaPorteDomicilio With {.Calle = drT("DirDesCalle").ToString,
+ .Colonia = drT("DirDesClaveSATColonia").ToString,
+ .CP = drT("DirDesCP").ToString,
+ .Estado = drT("DirDesClaveSATEstado").ToString,
+ .Pais = drT("DirDesClaveSATPais").ToString,
+ .Municipio = drT("DirDesClaveSATMunicipio").ToString,
+ .Localidad = drT("DirDesClaveSATLocalidad").ToString}
+
+
+ Dim Ubica As New CFDICartaPorteUbicacion
+ Ubica.TipoEstacion = ""
+ Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Origen", .IDUbicacion = "OR000001", .RFCRemitenteDestinatario = drT("RemitenteRFC").ToString,
+ .FechaHoraSalidaLlegada = FechaSalida.ToString("yyyy-MM-ddTHH:mm:ss"),' "2021-08-23T11:13:01",
+ .NombreRemitenteDestinatario = drT("RemitenteNombre").ToString,
+ .Domicilio = DomOrigen}
+ CartaPorte.Ubicaciones.Add(Ubica)
+ Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Destino", .IDUbicacion = "DE000001", .RFCRemitenteDestinatario = drT("DestinatarioRFC").ToString,
+ .FechaHoraSalidaLlegada = FechaLlegada.ToString("yyyy-MM-ddTHH:mm:ss"),
+ .NombreRemitenteDestinatario = drT("DestinatarioNombre").ToString,
+ .Domicilio = DomDestino,
+ .DistanciaRecorrida = Distancia}
+
+ CartaPorte.Ubicaciones.Add(Ubica)
+ CartaPorte.FiguraTransporte.ClaveTransporte = "01"
+
+ Dim DomicilioOperador As New CFDICartaPorteDomicilio With {.Calle = drT("FiguraDomicilio").ToString,
+ .NumeroExterior = drT("FiguraNumeroExterior").ToString,
+ .NumeroInterior = drT("FiguraNumeroInterior").ToString,
+ .Colonia = drT("FiguraClaveSATColonia").ToString,
+ .Municipio = drT("FiguraClaveSATMunicipio").ToString,
+ .Estado = drT("FiguraClaveSATEstado").ToString,
+ .CP = drT("FiguraCP").ToString}
+
+
+
+ CartaPorte.FiguraTransporte.Operadores.Add(New CFDICartaPorteOperador With {
+ .RFCFigura = drT("FiguraRFC").ToString,
+ .NombreFigura = drT("FiguraChofer").ToString,
+ .NumLicencia = drT("FiguraLicencia").ToString,
+ .NumRegidTribFigura = drT("FiguraNumRegidTribFigura").ToString,
+ .ResidenciaFiscalFigura = drT("FiguraResidenciaFiscalFigura").ToString,
+ .Domicilio = DomicilioOperador})
+
+
+ 'concepto único
+ Dim concepto As New CFDIConceptos With {.Cantidad = 1,
+ .Descripcion = "Flete",
+ .ValorUnitario = 0,
+ .Importe = 0,
+ .Descuento = 0,
+ .Unidad = "Servicio",
+ .ClaveUnidad = "E48",
+ .ClaveProdServ = "78101802",
+ .Noidentificacion = "",
+ .CuentaPredial = ""}
+
+ Timbre.Conceptos.Add(concepto)
+
+ For Each drr As DataRow In Obj.DtDetalle.Rows
+
+ If drr("PS").ToString.Length = 1 Then
+ tPS = drr("Obs").ToString
+ Else
+ If drr("PS").ToString.Length = 0 Then
+ tPS = ""
+ Else
+ tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
+ End If
+ End If
+ Dim conceptoCarta As New CFDICartaPorteMercancia With {
+ .BienesTransp = drr("SATClaveProdServ").ToString,
+ .ClaveSTCC = "", 'para metodo ferroviario
+ .Cantidad = drr("Cantidad").ToString.ToDecimal,
+ .Descripción = tPS,
+ .ClaveUnidad = drr("SATClaveUM").ToString,
+ .Unidad = drr("UM").ToString,
+ .Dimensiones = "",
+ .PesoenKg = drr("PesoKg").ToString.ToDecimal,
+ .MaterialPeligroso = If(drr("ClaveMaterialPeligroso").ToString <> "", "Sí", "No"),
+ .ClaveMaterialPeligroso = drr("ClaveMaterialPeligroso").ToString,
+ .Embalaje = drr("ClaveEmbalaje").ToString,
+ .DescripEmbalaje = drr("Embalaje").ToString,
+ .ValorMercancia = drr("PU").ToString.ToDecimal,
+ .Moneda = "MXN", 'temporal
+ .FraccionArrancelaria = "",
+ .UUIDComercioExt = ""
+ }
+
+ Dim DetalleMercancia As New CFDICartaPorteMercanciaDetalleMercancia With {.PesoNeto = drr("PesoKg").ToString.ToDecimal}
+ conceptoCarta.DetalleMercancia = DetalleMercancia
+
+ Dim MercanciaTransporta As New CFDICartaPorteMercanciaTransporta With {.Cantidad = drr("Cantidad").ToString.ToDecimal, .IDOrigen = "OR000001", .IDDestino = "DE000001"}
+ conceptoCarta.MercanciasCantidadTransporta.Add(MercanciaTransporta)
+
+ totSubTotal = totSubTotal - concepto.Importe
+ CartaPorte.Mercancias.Mercancias.Add(conceptoCarta)
+
+ i += 1
+ Next
+ Timbre.Complementos.CartaPorte = CartaPorte
+
+ Else
+ '' T R A S L A D O S
+
+ 'DETALLES
+ If Obj.DtDetalle IsNot Nothing Then
+ For Each drr As DataRow In Obj.DtDetalle.Rows
+
+ If drr("PS").ToString.Length = 1 Then
+ tPS = drr("Obs").ToString
+ Else
+ If drr("PS").ToString.Length = 0 Then
+ tPS = ""
+ Else
+ tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
+ End If
+ End If
+
+ 'CONDICIONANTE, ESPECIAL
+ If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" 'LES COMENTAN QUE NO DEBE IR LA ETIQUETA DE LA UNIDAD EN EL PRODUCTO
+
+ Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
+ .Descripcion = tPS,
+ .ValorUnitario = drr("PU").ToString.ToDecimal,
+ .Importe = drr("TotalImporte").ToString.ToDecimal,
+ .Descuento = drr("Descuento").ToString.ToDecimal,
+ .Unidad = drr("UM").ToString,
+ .ClaveUnidad = drr("SATClaveUM").ToString,
+ .ClaveProdServ = drr("SATClaveProdServ").ToString,
+ .Noidentificacion = drr("Noidentificacion").ToString,
+ .CuentaPredial = ""}
+ 'VERIFICA SUMA SUBTOTALES
+ If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'PROCESO DE AJUSTA DE DECIMALES
+ concepto.Importe = totSubTotal
+ End If
+ totSubTotal = totSubTotal - concepto.Importe
+
+ Timbre.Conceptos.Add(concepto)
+ i += 1
+ Next
+ Else
+ TieneError = True
+ _MsgError.AppendLine("timbrado son detalle de productos")
+ End If
+
+ End If
+
+ Else
+ TieneError = True
+ _MsgError.AppendLine("Consultar datos de timbrado")
+ End If
+
+ ObjGrales.Dispose()
+
+ End If
+ Return Timbre
+ End Function
+ Public Function Timbrar() As Boolean
+
+ Dim Respuesta As Boolean = False
+
+ Dim ObjTimbrado As New Timbrado
+
+ If ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) Then
+ Respuesta = True
+ Else
+ Respuesta = False
+ _MsgError.AppendLine(ObjTimbrado.MensajeErrorCFDI)
+ End If
+
+ Return Respuesta
+
+ End Function
+
+
+End Class
diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb
index 63358b70f..bb6c90d07 100644
--- a/App_Code/modExtensiones.vb
+++ b/App_Code/modExtensiones.vb
@@ -3178,10 +3178,14 @@ Namespace Extensiones
Public Sub SelectedValueExistInsert(Obj As DropDownList, Valor As Object, Texto As String)
If (Obj.Items.FindByValue(Valor.ToString()) IsNot Nothing) Then
- Obj.SelectedValue = Valor.ToString
+ Obj.SelectedValue = Valor.ToString()
Else
- Obj.Items.Insert(1, New ListItem(Texto, Valor.ToString))
- Obj.SelectedValue = Valor.ToString
+ If Obj.Items.Count > 0 Then
+ Obj.Items.Insert(1, New ListItem(Texto, Valor.ToString()))
+ Else
+ Obj.Items.Insert(0, New ListItem(Texto, Valor.ToString()))
+ End If
+ Obj.SelectedValue = Valor.ToString()
End If
End Sub
diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx
index abe9f9840..a0b88fb36 100644
--- a/Ashx/SIGWeb.ashx
+++ b/Ashx/SIGWeb.ashx
@@ -6,6 +6,7 @@ Imports System.Data
Imports Newtonsoft.Json
Imports Extensiones
Imports System.IO
+Imports Microsoft.Reporting.WebForms
Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
'TEMPORAL, DEBE SER REEMPLAZADO POR EL MODELO DE LA LIBRERIA
@@ -116,15 +117,166 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Case "sendMailLPM"
context.Response.Write(sendMailLPM(context))
Case "getSATColomias"
- getSATColonias(context)
-
- Case "cancelarRemision"
+ getSatColonias(context)
+ Case "GetFilesDirectory"
+ GetFilesDirectory(context)
+ Case "Getetiquetas"
+ Getetiquetas(context)
+ Case "cancelarRemision"
cancelarRemision(context)
End Select
Catch ex As Exception
ex.GuardaLog(ex.Message)
End Try
End Sub
+
+
+ Public Sub ImprimirPDF(RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportViewer = Nothing, Optional Content_Disposition As String = "attachment")
+ 'limpio ReportViwer
+ ImprimirbytesPDF(StreamPDF(RutaReporte, DataSource, Parametros, NombreArchivo, Formato, MR), NombreArchivo, Formato, Content_Disposition:=Content_Disposition)
+ End Sub
+
+ Public Function StreamPDF(RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportViewer = Nothing) As Byte()
+ 'limpio ReportViwer
+ Dim sw As New System.Diagnostics.Stopwatch()
+ sw.Start()
+ Dim Bytes As Byte() = Nothing
+
+ Dim CveUsuario As Integer = 0
+ Dim CveEmpresa As Integer = 0
+ Dim RutaEmpresa As String = ""
+
+
+ Dim bdir As String = If(RutaReporte.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory)
+
+ 'TOMAR LA RUTA BASE PARA EL DIRECTORIO DE LA EMPRESA
+ If Not String.IsNullOrEmpty(RutaEmpresa) AndAlso Not RutaReporte.Contains("Grales") Then
+ bdir = RutaEmpresa.Replace($"{CveEmpresa}/", "")
+ End If
+
+ RutaReporte.Replace("/", "\")
+
+ If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then
+ RutaReporte = String.Format("{0}{1}", bdir, RutaReporte)
+ End If
+
+ If False Then
+
+ Dim wsreport As New WSRDLC.WebServiceSoapClient
+ Dim params As New List(Of WSRDLC.ReportParameter)
+ Dim ds As New DataSet
+ For Each rpds As ReportDataSource In DataSource
+ Dim dt As DataTable = DirectCast(rpds.Value, Data.DataTable)
+ If dt Is Nothing Then
+ dt = New DataTable()
+ Else
+ dt = dt.Copy()
+ End If
+ dt.TableName = rpds.Name
+ ds.Tables.Add(dt)
+ Next
+ For Each rpds As ReportParameter In Parametros
+ Dim param As New WSRDLC.ReportParameter
+ param.Name = rpds.Name
+ param.Values = {rpds.Values(0)}
+ params.Add(param)
+ Next
+ Bytes = wsreport.StreamPDFBytes(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario)
+ wsreport = Nothing
+ params = Nothing
+ ds.Dispose() : ds = Nothing
+ Else
+ If IsNothing(MR) Then MR = New ReportViewer
+ Try
+ ' MasterReporteador.LocalReport.DataSources.Clear()
+ For Each RDS As ReportDataSource In DataSource
+ MR.LocalReport.DataSources.Add(RDS)
+ Next
+
+ MR.LocalReport.ReportPath = RutaReporte
+ MR.ProcessingMode = ProcessingMode.Local
+ MR.LocalReport.EnableExternalImages = True
+ MR.LocalReport.SetParameters(Parametros)
+ MR.LocalReport.Refresh()
+ Dim Warnings As Warning() = Nothing
+ Dim StreamIds As String() = Nothing
+ Dim MimeType As String = Nothing
+ Dim Encoding As String = Nothing
+ Dim Extension As String = Nothing
+ Bytes = MR.LocalReport.Render(Formato, Nothing, MimeType, Encoding, Extension, StreamIds, Warnings)
+ Catch ex As Microsoft.Reporting.WebForms.ScriptManagerNotFoundException
+ GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, ex.Message) } | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))} - Ruta {RutaReporte}")
+ 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
+ 'GuardaLog($"Error: {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
+ Catch ex As Exception
+ GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, ex.Message) } | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))} - Ruta {RutaReporte}")
+ 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
+ 'GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
+ End Try
+ MR.Dispose()
+ MR = Nothing
+
+ End If
+ sw.Stop()
+
+ If sw.Elapsed.TotalSeconds > 5 Then
+ GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ")
+ End If
+
+ Return Bytes
+ End Function
+
+ Public Sub ImprimirbytesPDF(bytes As Byte(), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional Descarga As Boolean = False, Optional Content_Disposition As String = "attachment")
+ 'limpio ReportViwer
+ Dim mimeType As String = Nothing
+ Dim extension As String = Nothing
+
+ 'If Descarga Then
+ ' Try
+ ' bytes = bytes
+ ' File.WriteAllBytes(String.Format("{0}PDF/whatever.gif", UsuarioActual.Empresa.Ruta), img)
+ ' Catch ex As Exception
+ ' If UsuarioActual.CveRol = 1 Then
+ ' Alert(ex.Message, TipoMensaje.MsgAdvertencia)
+ ' Else
+ ' Alert("Ocurrió un error al generar la descarga. Favor de contactar a soporte tecnico cod'IMPDFclspag'", TipoMensaje.MsgAdvertencia)
+ ' End If
+ ' End Try
+ 'End If
+
+ Try
+ bytes = bytes
+ Response.Buffer = True
+ Response.Clear()
+ Response.ContentType = mimeType
+ Response.AddHeader("content-disposition", String.Format("{0}; filename={1}.{2}", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xls")))
+ Response.BinaryWrite(bytes) ' create the file
+ Response.Flush() ' send it to the client to download
+ HttpContext.Current.Response.SuppressContent = True
+ HttpContext.Current.ApplicationInstance.CompleteRequest()
+ HttpContext.Current.Response.End()
+ bytes = Nothing
+ Catch ex As Exception
+
+ Alert("Ocurrió un error al generar la descarga. Favor de contactar a soporte tecnico cod:'IMPDFclspag'", TipoMensaje.MsgAdvertencia)
+
+ End Try
+ End Sub
+ Dim Response As HttpResponse
+ Private Function Getetiquetas(context As HttpContext) As String
+ Dim retorno As String = ""
+ Dim params As New List(Of ReportParameter)
+ params.Add(New ReportParameter("Envase", "1 1/9"))
+ params.Add(New ReportParameter("Tamano", "Small"))
+ params.Add(New ReportParameter("Cultivo", "Tomate"))
+ params.Add(New ReportParameter("noPallet", "000001"))
+ Response = context.Response
+ Dim tablaReporte As New DataTable
+ '"Empresas/Grales/Formatos/EquiposGPS.rdlc"
+ '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
+ ImprimirPDF("GPS/PalletEtiqueta.rdlc", (New List(Of ReportDataSource)), params, "Equipo GPS")
+ Return retorno
+ End Function
Private Function GetTokenAngular(context As HttpContext) As String
Dim usuario As Usuario = UsuarioActual(context)
Dim tokenDescriptor = New Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor With {
@@ -1362,6 +1514,30 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
#End Region
+ Private Function GetFilesDirectory(ByVal context As HttpContext) As String
+ Dim retorno As String = ""
+ Dim urlhost As String = context.Request.Url.Host.ToUpper()
+ If (urlhost = "LOCALHOST") Then
+ Dim directorio As String = IfNull(context.Request("directorio"), "").ToString()
+
+ Dim xmlarchivos As System.Xml.Linq.XDocument = New System.Xml.Linq.XDocument()
+ Dim xfolder As XElement = New XElement("folder")
+ For Each urfile In System.IO.Directory.GetFiles(directorio)
+ Dim xfile As New XElement("archivo", urfile)
+ xfile.SetAttributeValue("EXT", Path.GetExtension(urfile))
+ xfolder.Add(xfile)
+
+ Next
+ xmlarchivos.Add(xfolder)
+ retorno = xmlarchivos.ToString()
+ context.Response.ContentType = "application/xml"
+ context.Response.Write(retorno)
+ context.Response.StatusCode = 200
+ Else
+ context.Response.StatusCode = 500
+ End If
+ Return retorno
+ End Function
#Region "Get SAT Colonmias"
Private Function getSATColonias(ByVal context As HttpContext) As String
@@ -1426,7 +1602,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End Function
#End Region
-#Region "Get SAT Colonmias"
+#Region "C A N C E L A R - R E M I S I O N"
Private Function cancelarRemision(ByVal context As HttpContext) As String
Dim retorno As String = ""
diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx
index 6a8e7f9bd..704255414 100644
--- a/Bancos/IE.aspx
+++ b/Bancos/IE.aspx
@@ -123,20 +123,48 @@
+
+
+
+
+ <%----%>
+
+
+
-
+
-
+
+
+
+ T.C.:
+
+
+
+
+
+
+
+
+
+
+ Dolares
+
+ <%----%>
+
+
+
+
@@ -1781,5 +1809,10 @@
return false;
}
+ function CambiaTCPagoOC() {
+
+ $("#LnkActualizaTCOC").click();
+ }
+
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index fa4a59b34..f24961ea0 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -297,6 +297,17 @@ Partial Class Bancos_IE
End Set
End Property
+
+ Private Property CveMonedaOriginal As Integer
+ Get
+ Return ViewState("CveMonedaOriginal").ToString.ToEntero
+ End Get
+ Set(value As Integer)
+ ViewState("CveMonedaOriginal") = value
+ End Set
+ End Property
+
+
Private Property CveOCSolicitudAnticipo As Integer
Get
@@ -504,6 +515,22 @@ Partial Class Bancos_IE
End Set
End Property
+
+ Private Property ImporteOriginalDolaras As Decimal
+ Get
+ If ViewState("ImporteOriginalDolaras") Is Nothing Then
+ Return 0
+ Else
+ Return ViewState("ImporteOriginalDolaras").ToString().ToDecimal()
+ End If
+
+ End Get
+ Set(value As Decimal)
+ ViewState("ImporteOriginalDolaras") = value
+ End Set
+ End Property
+
+
#Region "CANCELACIÓN COMPLEMENTO MODAL V2"
Property CveComplementoPagoCancelar As Integer
@@ -2471,6 +2498,9 @@ Partial Class Bancos_IE
If CveOCSolicitudAnticipo > 0 Then
+
+
+
Dim ObjOC As New ClsOC
If ObjOC.GetOCAnticipoSaldo(CveOCSolicitudAnticipo, UsuarioActual.CveEmpresa) Then
SaldoOCAnticipo = ObjOC.DtResultados(0)("Saldo").ToString.ToDecimal
@@ -2479,10 +2509,18 @@ Partial Class Bancos_IE
End If
ObjOC.Dispose()
- If TxtImporte.Text.ToDecimal > SaldoOCAnticipo Then
+ Dim ImporteComparacion As Decimal = TxtImporte.Text.ToDecimal
+
+ '
+ If ChkPagarPesos.Checked Then
+ ImporteComparacion = ImporteOriginalDolaras
+ End If
+
+ If ImporteComparacion > SaldoOCAnticipo Then
EsValido = False
Alert($"El importe del movimiento es mayor al saldo de la orden de compra importe movmiento {TxtImporte.Text.FormatoNumero } saldo orden de compra: {SaldoOCAnticipo.ToString.FormatoNumero}", TipoMensaje.MsgAdvertencia)
End If
+
End If
Return EsValido
@@ -5557,11 +5595,23 @@ Partial Class Bancos_IE
Else
TxtImporte.Text = DrOC("ImporteAnticipo").ToString.FormatoNumero
TxtImporteLetra.Text = DrOC("ImporteAnticipo").ToString.ToDouble.Texto2Letras(DrOC("CveMoneda").ToString.ToEntero)
+
+ ImporteOriginalDolaras = DrOC("ImporteAnticipo").ToString.ToDecimal
End If
DdlMoneda.SelectedValue = DrOC("CveMoneda").ToString
+
CveMoneda = DrOC("CveMoneda").ToString.ToEntero
CargaCuenta(DrOC("CveMoneda").ToString.ToEntero)
+
+ CveMonedaOriginal = DrOC("CveMoneda").ToString.ToEntero
+
+
+ If CveMonedaOriginal > 1 Then
+ MostrarPagoEnPesos(True)
+ End If
+
+
UpCuentaDeposito.Update()
If DrOC("CveProveedor").ToString.ToEntero > 0 Then
HdnCveProveedor.Value = DrOC("CveProveedor").ToString
@@ -5644,6 +5694,69 @@ Partial Class Bancos_IE
End If
End Sub
+
+
+ Private Sub MostrarPagoEnPesos(Mostrar As Boolean)
+
+ LbTipoMoneda.Visible = Mostrar
+ LbTipoMoneda.Text = If(Mostrar, "Pago en doalres", "")
+ DVPAgoEnPesos.Visible = Mostrar
+ ChkPagarPesos.Visible = Mostrar
+
+ TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
+
+ End Sub
+
+
+ Protected Sub ChkPagarPesos_CheckedChanged(sender As Object, e As EventArgs)
+
+ If ChkPagarPesos.Checked Then
+ DivTC.Visible = True
+ DivTC2.Visible = True
+ ' DivDolaresDolares.Visible = False
+ 'CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
+ CargaCuenta(1)
+ 'TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
+ 'TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
+ TxtImporteDolares.Text = TxtImporte.Text
+ 'TxtImporteDolares.Text = TxtImporte.Text
+ 'TxtImporte.Text = (TxtImporte.Text.ToDecimal * (TxtTC.Text.ToDecimal)).ToString("###,###,###.00")
+ CveMoneda = 1
+ Else
+ DivTC.Visible = False
+ DivTC2.Visible = False
+ CveMoneda = CveMonedaOriginal
+ 'DivDolaresDolares.Visible = True
+ 'CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
+ CargaCuenta(CveMonedaOriginal)
+ 'TxtFechaDocumento.Attributes.Remove("onchange")
+ TxtImporte.Text = ImporteOriginalDolaras.ToString("###,###,###.00")
+ End If
+
+ CambiaTCPagoOC()
+
+ UpDatos.Update()
+
+ ' RegistraScript("CambiaPesosDolares();")
+ End Sub
+
+
+ Public Sub CambiaTCPagoOC()
+
+ If ChkPagarPesos.Checked Then
+ TxtImporte.Text = (TxtImporteDolares.Text.ToDecimal * (TxtTC.Text.ToDecimal)).ToString("###,###,###.00")
+ Else
+ TxtImporte.Text = TxtImporteDolares.Text
+ End If
+
+ UpDatos.Update()
+ End Sub
+
+ Protected Sub LnkActualizaTCOC_Click(sender As Object, e As EventArgs)
+ CambiaTCPagoOC()
+ End Sub
+
+
Private Function GuardaSolicitudAnticipoOC(ByRef ObjOC As ClsOC) As String
Dim ObjOI As New ClsOIEventos
Dim CveEvento As Integer = 0
@@ -6724,4 +6837,5 @@ Partial Class Bancos_IE
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
Calendario.EndDate = DateTime.Now
End Sub
+
End Class
\ No newline at end of file
diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb
index 2babcb0ea..654746115 100644
--- a/Bancos/PopIECompras.aspx.vb
+++ b/Bancos/PopIECompras.aspx.vb
@@ -1812,7 +1812,7 @@ Partial Class Bancos_PopIECompras
Funcionalidad = 313
ConceptoContable = 248
ElseIf MovimientoPagar.ConceptoRetIVA = 5 Then
- Funcionalidad = 578
+ Funcionalidad = 577
ConceptoContable = 285
End If
diff --git a/Bancos/PopIEVentas.aspx b/Bancos/PopIEVentas.aspx
index d3cfbc3b7..f42d31759 100644
--- a/Bancos/PopIEVentas.aspx
+++ b/Bancos/PopIEVentas.aspx
@@ -60,7 +60,7 @@
F y EIngresos X ComprobarDeudores
- Compras
+ Compras
diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb
index d3cd9ce9f..57ab71324 100644
--- a/Bancos/PopIEVentas.aspx.vb
+++ b/Bancos/PopIEVentas.aspx.vb
@@ -785,11 +785,25 @@ Partial Class Bancos_PopIEVentas
End If
If RFCCliente.ToUpper <> "XAXX010101000" Then
- Dim ObjCompras As New ClsCompras
- If ObjCompras.GetCompras(-1, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, ProveedorRFC:=RFCCliente) Then
- RBLContado.Items(4).Enabled = True
+ Dim CveProveedor As Integer = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, RFC:=RFCCliente.ToUpper).FiltroPrimeroValor("CveProveedor").ToEntero
+
+ If CveProveedor > 0 Then
+ Dim Mov As New ClsMovimientos
+ If Mov.GetCxPProveedor(CveProveedor, MinFecha.ToShortDateString, MaxFecha.ToShortDateString, -1, -1, -1, -1, -1, 1, -1, -1, "-1", "-1", "-1") Then
+ If Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio").Rows.Count > 0 Then
+ RBLContado.Items(4).Enabled = True
+ End If
+ End If
+
+ Mov.Dispose()
End If
- ObjCompras.Dispose()
+
+
+ 'Dim ObjCompras As New ClsCompras
+ 'If ObjCompras.GetCompras(-1, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, ProveedorRFC:=RFCCliente) Then
+ ' RBLContado.Items(4).Enabled = True
+ 'End If
+ 'ObjCompras.Dispose()
End If
If Not Validada Then
@@ -926,6 +940,9 @@ Partial Class Bancos_PopIEVentas
End Sub
Protected Sub CargaCompras(Optional CveMoneda As Integer = 1)
+
+ If RFCCliente = "XAXX010101000" Then Exit Sub
+
Dim ObjCompras As New ClsCompras
Dim ObjProveedor As New ClsCompProveedores
Dim CveProveedor As Integer = -1
diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb
index 3f30f6b29..1ba70513e 100644
--- a/Bancos/ProveedoresAbonar.aspx.vb
+++ b/Bancos/ProveedoresAbonar.aspx.vb
@@ -1066,7 +1066,7 @@ Partial Class Bancos_ProveedoresAbonar
Funcionalidad = 313
ConceptoContable = 248
ElseIf gvr.DataKey("CveRetIVAConcepto").ToEntero = 5 Then
- Funcionalidad = 578
+ Funcionalidad = 577
ConceptoContable = 285
End If
@@ -1221,13 +1221,13 @@ Partial Class Bancos_ProveedoresAbonar
importeMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
- importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago)
+ importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * tipoCambioCompra
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
- importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago)
+ importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
diff --git a/Bancos/RepProgramarRecursos.aspx.vb b/Bancos/RepProgramarRecursos.aspx.vb
index 9d3ad6219..7e53e652a 100644
--- a/Bancos/RepProgramarRecursos.aspx.vb
+++ b/Bancos/RepProgramarRecursos.aspx.vb
@@ -654,7 +654,7 @@ Partial Class Bancos_RepProgramarRecursos
ObjUsuarios.Dispose()
End Sub
Private Sub EnviaCorreoNotificacion()
- If UsuarioActual.CveEmpresa = 13 Then
+ If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
Dim strBody As New StringBuilder
Try
diff --git a/Bin/GoCfdi.dll b/Bin/GoCfdi.dll
index c1d9e7fa4..9ccff8cbe 100644
Binary files a/Bin/GoCfdi.dll and b/Bin/GoCfdi.dll differ
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 7a895576b..7c8ceedc8 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -4618,7 +4618,7 @@ Partial Class Compras_Compras
'End If
'METODO DE PREPOLIZA DE ALMACEN
- If UsuarioActual.CveEmpresa.Contiene(1, 119, 72, 80, 140, 141, 152, 153, 154, 159, 160, 161, 162, 163) And UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
+ If UsuarioActual.CveEmpresa.Contiene(1, 119, 72, 80, 140, 141, 145, 152, 153, 154, 159, 160, 161, 162, 163) And UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
Dim ImporteAlmacen = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal
If ImporteAlmacen > 0 Then
If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
@@ -6078,7 +6078,7 @@ Partial Class Compras_Compras
End If
'si aplica NC sobre mov de almacen, el impuesto lo toma de la Factura.para la consideracion de mcia en tránsito
- If ChkNCInvNC.Checked And CveMoneda <> 1 AndAlso importeMovimiento > 0 Then
+ If ChkNCInvNC.Checked And CveMoneda > 1 AndAlso importeMovimiento > 0 Then
Dim diferenciaTransito As Decimal = 0
For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows
@@ -8626,7 +8626,7 @@ Partial Class Compras_Compras
Dim IndicePrimero As Integer = 0
For Each dRow As DataRow In TmpDT.Rows
- If Boolean.Parse(dRow("AplicaIEPS").ToString) Then
+ If Boolean.Parse(dRow("AplicaIEPS").ToString) And dRow("IEPSPS").ToString.ToDecimal > 0 Then
IndicePrimero = IndiceContador
Exit For
End If
@@ -10392,7 +10392,8 @@ Partial Class Compras_Compras
(row1("CveTipoGasto").ToString.ToEntero <> row2("CveTipoGasto").ToString.ToEntero) Or
(row1("Total").ToString.ToDouble <> row2("Total").ToString.ToDouble) Or
(row1("NoDeducible").ToString <> row2("NoDeducible").ToString) Or
- (row1("CveActivoFijo").ToString.ToEntero <> row2("CveActivoFijo").ToString.ToEntero) Or
+ (row1("CveActivoFijo").ToString.ToEntero <> row2("CveActivoFijo").ToString.ToEntero) Or
+ (row1("AFMedida").ToString.ToEntero <> row2("AFMedida").ToString.ToEntero) Or
(row1("CvePS").ToString.ToEntero <> row2("CvePS").ToString.ToEntero) Then
Return False
End If
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index 2bb063817..fdb758268 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -195,11 +195,84 @@ Partial Class PopUpVerFactura
SeleccionaReporte(UrlParametros)
End If
End If
-
+ If Request("onlyPrint") IsNot Nothing Then
+ If Request("onlyPrint").ToString() = "Pallet" Then
+ imprimirpallet2(Request("CvePallet").ToString.ToEntero())
+ End If
+ If Request("onlyPrint").ToString() = "PalletCaja" Then
+ imprimirpallet(Request("CvePallet").ToString.ToEntero())
+ End If
+ End If
End If
End Sub
+ Private Sub imprimirpallet2(cvePallet As Integer)
+ Dim Envase As String = ""
+ Dim Tamano As String = ""
+ Dim Cultivo As String = ""
+ Dim noPallet As String = ""
+ Dim Variedad As String = ""
+
+ 'Envase = "1 1/9"
+ 'Tamano = "Small"
+ 'Cultivo = "Tomate"
+ 'noPallet = "000001"
+ 'Variedad = "Golden"
+ Using objnom As New ClsNominas
+ If objnom.PA_Agro_Embarque_PalletGet(cvePallet, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1) And objnom.DtResultados.Rows.Count > 0 Then
+ Dim row As DataRow = objnom.DtResultados.Rows(0)
+ Envase = row("Envase").ToString()
+ Tamano = row("Tamaño").ToString()
+ Cultivo = row("Cultivo").ToString()
+ noPallet = row("Codigo").ToString()
+ Variedad = row("CultivoVariedad").ToString()
+
+ End If
+
+ End Using
+ Dim params As New List(Of ReportParameter)
+ params.Add(New ReportParameter("Envase", Envase))
+ params.Add(New ReportParameter("Tamano", Tamano))
+ params.Add(New ReportParameter("Cultivo", Cultivo))
+ params.Add(New ReportParameter("noPallet", noPallet))
+ params.Add(New ReportParameter("Variedad", Variedad))
+ Dim tablaReporte As New DataTable
+ '"Empresas/Grales/Formatos/EquiposGPS.rdlc"
+ '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
+ ImprimirPDF("GPS/PalletEtiqueta2.rdlc", (New List(Of ReportDataSource)), params, "Equipo GPS")
+ End Sub
+ Private Sub imprimirpallet(cvePallet As Integer)
+ Dim Envase As String = ""
+ Dim Tamano As String = ""
+ Dim Cultivo As String = ""
+ Dim noPallet As String = ""
+
+ 'Envase = "1 1/9"
+ 'Tamano = "Small"
+ 'Cultivo = "Tomate"
+ 'noPallet = "000001"
+ Using objnom As New ClsNominas
+ If objnom.PA_Agro_Embarque_PalletGet(cvePallet, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1) And objnom.DtResultados.Rows.Count > 0 Then
+ Dim row As DataRow = objnom.DtResultados.Rows(0)
+ Envase = row("Envase").ToString()
+ Tamano = row("Tamaño").ToString()
+ Cultivo = row("Cultivo").ToString()
+ noPallet = row("Codigo").ToString()
+
+ End If
+
+ End Using
+ Dim params As New List(Of ReportParameter)
+ params.Add(New ReportParameter("Envase", Envase))
+ params.Add(New ReportParameter("Tamano", Tamano))
+ params.Add(New ReportParameter("Cultivo", Cultivo))
+ params.Add(New ReportParameter("noPallet", noPallet))
+ Dim tablaReporte As New DataTable
+ '"Empresas/Grales/Formatos/EquiposGPS.rdlc"
+ '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
+ ImprimirPDF("GPS/PalletEtiqueta.rdlc", (New List(Of ReportDataSource)), params, "Equipo GPS")
+ End Sub
#Region "U S U A R I O - T O K E N"
Private Function ValidaUsuarioSistema(CveEmpresa As Integer, Optional CveUsuario As Integer = 100) As Usuario
@@ -846,15 +919,17 @@ Partial Class PopUpVerFactura
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
- params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, ImageToBase64(Drawing.Image.FromFile(Imagen.FullName), Drawing.Imaging.ImageFormat.Png), "")))
- 'If Imagen.Exists Then
- ' params.Add(New ReportParameter("LogoPath", logouri))
+ 'params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, ImageToBase64(Drawing.Image.FromFile(Imagen.FullName), Drawing.Imaging.ImageFormat.Png), "")))
+
+ If Imagen.Exists Then
+ Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
+ params.Add(New ReportParameter("LogoPath", LogoRuta))
- 'Else
- ' params.Add(New ReportParameter("LogoPath", ""))
- 'End If
+ Else
+ params.Add(New ReportParameter("LogoPath", ""))
+ End If
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
@@ -931,8 +1006,8 @@ Partial Class PopUpVerFactura
Dim TransporteInternacional As String = ""
Dim PermisoSTCC As String = ""
Dim NumPermiso As String = ""
- Dim Aseguradora As String = ""
- Dim NumPolizaSeguro As String = ""
+ Dim AseguradoraRespCivil As String = ""
+ Dim NumPolizaSeguroRespCivil As String = ""
Dim NombreAseguradoraMedioAmbiente As String = ""
Dim NumPolizaSeguroMedioAmbiente As String = ""
Dim NombreAseguradoraCarga As String = ""
@@ -940,6 +1015,7 @@ Partial Class PopUpVerFactura
+
Dim PlacaVM As String = ""
Dim AnioModeloVM As String = ""
'TIMBRADO
@@ -950,15 +1026,17 @@ Partial Class PopUpVerFactura
Dim FechaCertificacion As DateTime = Nothing
Dim SelloCFDi As String = ""
Dim SelloSAT As String = ""
+ Dim TipoDocto As String = ""
Dim ObjInv As New ClsGenerales
- If ObjInv.GetGralTimbre(CveTimbre, "-1", "-1", -1, MinFecha, MaxFecha, -1, UsuarioActual.CveEmpresa, -1) Then
+ If ObjInv.GetGralTimbre(CveTimbre, "-1", MinFecha, MaxFecha, -1, UsuarioActual.CveEmpresa, -1) Then
If ObjInv.DtResultados.Rows.Count > 0 Then
Dim Dr As DataRow = ObjInv.DtResultados.Rows(0)
If Dr IsNot Nothing Then
SerieFolio = Dr("SerieFolio").ToString
- Telefono = Dr("Telefono").ToString
+ Telefono = Dr("FiguraTelefono").ToString
+ TipoDocto = Dr("TipoDocto").ToString
End If
End If
End If
@@ -973,11 +1051,12 @@ Partial Class PopUpVerFactura
Dim DtUbicaciones As New DataTable()
DtUbicaciones.Columns.Add(New DataColumn("Distancia", GetType(String)))
+ DtUbicaciones.Columns.Add(New DataColumn("TipoUbicacion", GetType(String)))
DtUbicaciones.Columns.Add(New DataColumn("RFC", GetType(String)))
DtUbicaciones.Columns.Add(New DataColumn("Nombre", GetType(String)))
DtUbicaciones.Columns.Add(New DataColumn("FechaHoraSalida", GetType(DateTime)))
DtUbicaciones.Columns.Add(New DataColumn("Direccion", GetType(String)))
-
+
Dim DtMercancias As New DataTable()
DtMercancias.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
DtMercancias.Columns.Add(New DataColumn("UnidadMedida", GetType(String)))
@@ -990,7 +1069,7 @@ Partial Class PopUpVerFactura
DtOperadores.Columns.Add(New DataColumn("NombreOperador", GetType(String)))
Dim XMLDoc As New XmlDocument
- Dim Path As String = String.Format("{0}\{1}\{2}\{3}.{4}", UsuarioActual.Empresa.Ruta, "XML", "Tra", String.Format("{0}", SerieFolio), "xml")
+ Dim Path As String = String.Format("{0}\{1}\{2}\{3}.{4}", UsuarioActual.Empresa.Ruta, "XML", TipoDocto, String.Format("{0}", SerieFolio), "xml")
Dim Archivo As New System.IO.FileInfo(Path)
If Archivo.Exists Then
@@ -1024,6 +1103,7 @@ Partial Class PopUpVerFactura
namespaces.AddNamespace("implocal", "http://www.sat.gob.mx/implocal")
namespaces.AddNamespace("registrofiscal", "http://www.sat.gob.mx/registrofiscal")
namespaces.AddNamespace("cartaporte", "http://www.sat.gob.mx/CartaPorte")
+ namespaces.AddNamespace("cartaporte20", "http://www.sat.gob.mx/CartaPorte20")
Dim nodeComprobante As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Comprobante", Prefijo), namespaces)
If nodeComprobante IsNot Nothing Then
@@ -1060,40 +1140,42 @@ Partial Class PopUpVerFactura
Dim nodeComp As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Complemento", Prefijo), namespaces)
- Dim nodeCartaPorte As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:CartaPorte", "cartaporte"), namespaces)
+ Dim nodeCartaPorte As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:CartaPorte", "cartaporte20"), namespaces)
If nodeCartaPorte IsNot Nothing Then
TransporteInternacional = ValorXML(nodeCartaPorte, "TranspInternac", "")
End If
- Dim nodeAutotransporteFederal As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:AutotransporteFederal", "cartaporte"), namespaces)
+ Dim nodeAutotransporteFederal As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:Autotransporte", "cartaporte20"), namespaces)
If nodeAutotransporteFederal IsNot Nothing Then
PermisoSTCC = ValorXML(nodeAutotransporteFederal, "PermSCT", "")
NumPermiso = ValorXML(nodeAutotransporteFederal, "NumPermisoSCT", "")
- Aseguradora = ValorXML(nodeAutotransporteFederal, "NombreAseg", "")
- NumPolizaSeguro = ValorXML(nodeAutotransporteFederal, "NumPolizaSeguro", "")
-
- 'Por Definir de donde sale
- 'NombreAseguradoraMedioAmbiente = ValorXML(nodeAutotransporteFederal, "", "")
- 'NumPolizaSeguroMedioAmbiente = ValorXML(nodeAutotransporteFederal, "", "")
- 'NombreAseguradoraCarga = ValorXML(nodeAutotransporteFederal, "", "")
- 'NumPolizaSeguroCarga = ValorXML(nodeAutotransporteFederal, "", "")
-
-
End If
- Dim nodeIdentificacionVehicular As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:IdentificacionVehicular", "cartaporte"), namespaces)
+ Dim nodeIdentificacionVehicular As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:IdentificacionVehicular", "cartaporte20"), namespaces)
If nodeIdentificacionVehicular IsNot Nothing Then
PlacaVM = ValorXML(nodeIdentificacionVehicular, "PlacaVM", "")
AnioModeloVM = ValorXML(nodeIdentificacionVehicular, "AnioModeloVM", "")
End If
- Dim nodeFiguraTransporte As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:FiguraTransporte", "cartaporte"), namespaces)
- If nodeFiguraTransporte IsNot Nothing Then
- Dim CveTransporte As String = ValorXML(nodeFiguraTransporte, "CveTransporte", "")
- MedioTransporte = String.Format("{0} - {1}", CveTransporte, HtTransporte(CveTransporte).ToString())
+ Dim nodeSeguros As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:Seguros", "cartaporte20"), namespaces)
+ If nodeIdentificacionVehicular IsNot Nothing Then
+ AseguradoraRespCivil = ValorXML(nodeSeguros, "AseguraRespCivil", "")
+ NumPolizaSeguroRespCivil = ValorXML(nodeSeguros, "PolizaRespCivil", "")
+
+ 'Por Definir de donde sale
+ NombreAseguradoraMedioAmbiente = ValorXML(nodeSeguros, "AseguraMedAmbiente", "")
+ NumPolizaSeguroMedioAmbiente = ValorXML(nodeSeguros, "PolizaMedAmbiente", "")
+ NombreAseguradoraCarga = ValorXML(nodeSeguros, "AseguraCarga", "")
+ NumPolizaSeguroCarga = ValorXML(nodeSeguros, "PolizaCarga", "")
End If
- Dim nodeMercancias As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Mercancia", "cartaporte"), namespaces)
+ 'Dim nodeFiguraTransporte As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:FiguraTransporte", "cartaporte20"), namespaces)
+ 'If nodeFiguraTransporte IsNot Nothing Then
+ ' Dim CveTransporte As String = ValorXML(nodeFiguraTransporte, "TipoFigura", "")
+ ' MedioTransporte = String.Format("{0} - {1}", CveTransporte, HtTransporte(CveTransporte).ToString())
+ 'End If
+
+ Dim nodeMercancias As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Mercancia", "cartaporte20"), namespaces)
For Each node As XmlNode In nodeMercancias
Dim Row As DataRow = DtMercancias.NewRow
@@ -1105,47 +1187,48 @@ Partial Class PopUpVerFactura
DtMercancias.Rows.Add(Row)
Next
- Dim nodeOperadores As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Operador", "cartaporte"), namespaces)
+ Dim nodeOperadores As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:TiposFigura", "cartaporte20"), namespaces)
For Each node As XmlNode In nodeOperadores
Dim Row As DataRow = DtOperadores.NewRow
- Row("RFC") = ValorXML(node, "RFCOperador", "")
+ Row("RFC") = ValorXML(node, "RFCFigura", "")
Row("NumLicencia") = ValorXML(node, "NumLicencia", "")
- Row("NombreOperador") = ValorXML(node, "NombreOperador", "")
+ Row("NombreOperador") = ValorXML(node, "NombreFigura", "")
DtOperadores.Rows.Add(Row)
Next
- Dim nodeUbicaciones As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Ubicacion", "cartaporte"), namespaces)
+ Dim nodeUbicaciones As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Ubicacion", "cartaporte20"), namespaces)
For Each node As XmlNode In nodeUbicaciones
Dim Row As DataRow = DtUbicaciones.NewRow
Row("Distancia") = ValorXML(node, "DistanciaRecorrida", "")
- Dim nodeOrigen = node.ChildNodes.Cast(Of XmlNode).FirstOrDefault(Function(x) x.Name = "cartaporte:Origen")
- If nodeOrigen IsNot Nothing Then
- Row("RFC") = ValorXML(nodeOrigen, "RFCRemitente", "")
- Row("Nombre") = ValorXML(nodeOrigen, "NombreRemitente", "")
- Row("FechaHoraSalida") = ValorXML(nodeOrigen, "FechaHoraSalida", "").ToDateTime()
- End If
+ Row("TipoUbicacion") = ValorXML(node, "TipoUbicacion", "")
+ Row("FechaHoraSalida") = ValorXML(node, "FechaHoraSalidaLlegada", "")
+ Row("RFC") = ValorXML(node, "RFCRemitenteDestinatario", "")
+ Row("Nombre") = ValorXML(node, "NombreRemitenteDestinatario", "")
- Dim nodeDestino = node.ChildNodes.Cast(Of XmlNode).FirstOrDefault(Function(x) x.Name = "cartaporte:Destino") 'node.SelectSingleNode(String.Format("//{0}:Destino", "cartaporte"), namespaces)
- If nodeDestino IsNot Nothing Then
- Row("RFC") = ValorXML(nodeDestino, "RFCDestinatario", "")
- Row("Nombre") = ValorXML(nodeDestino, "NombreDestinatario", "")
- Row("FechaHoraSalida") = ValorXML(nodeDestino, "FechaHoraProgLlegada", "").ToDateTime()
- End If
-
- Dim nodeDomicilio = node.ChildNodes.Cast(Of XmlNode).FirstOrDefault(Function(x) x.Name = "cartaporte:Domicilio") 'node.SelectSingleNode(String.Format("//{0}:Domicilio", "cartaporte"), namespaces)
+ Dim nodeDomicilio = node.ChildNodes.Cast(Of XmlNode).FirstOrDefault(Function(x) x.Name = "cartaporte20:Domicilio") 'node.SelectSingleNode(String.Format("//{0}:Domicilio", "cartaporte"), namespaces)
If nodeDomicilio IsNot Nothing Then
+
+ Dim Estado As String = ""
+ Dim Municipio As String = ""
+ Dim Colonia As String = ""
Dim calle = ValorXML(nodeDomicilio, "Calle", "")
- Dim Estado = ValorXML(nodeDomicilio, "Estado", "")
- Dim Pais = ValorXML(nodeDomicilio, "MEX", "")
Dim CP = ValorXML(nodeDomicilio, "CodigoPostal", "")
- Row("Direccion") = String.Format("{0} ,{1},{2}. CP {3}", calle, Estado, Pais, CP)
+ Dim dr As DataRow = GlobalDTGralColonias(ValorXML(nodeDomicilio, "Estado", ""), ValorXML(nodeDomicilio, "Municipio", ""), ValorXML(nodeDomicilio, "Colonia", "")).FiltroPrimero("")
+ If dr IsNot Nothing Then
+ Estado = dr("NombreEstado").ToString
+ Municipio = dr("NombreMunicipio").ToString
+ Colonia = dr("NombreAsentamiento").ToString
+ End If
+ Row("Direccion") = String.Format("{0} Col.{1},{2},{3}. CP {4}", calle, Colonia, Municipio, Estado, CP)
End If
+
+
DtUbicaciones.Rows.Add(Row)
Next
@@ -1166,15 +1249,25 @@ Partial Class PopUpVerFactura
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, ClienteRFC, Total, FolioFiscal, RutaCBB)
End If
- ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, SerieFolio)
+
+ ImagenCBB = New System.IO.FileInfo(RutaCBB)
+
+ If ImagenCBB.Exists Then
+ ImgCBB = String.Format("file://{0}", ImagenCBB.FullName)
+ Else
+ ImgCBB = ""
+ End If
+
End If
If DtConceptos.Rows.Count > 0 Then
Dim params As New List(Of ReportParameter)
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
- Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
- If Imagen.Exists Then
- params.Add(New ReportParameter("LogoPath", logouri))
+ Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+
+ If Imagen.Exists Then
+ Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
+ params.Add(New ReportParameter("LogoPath", LogoRuta))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
@@ -1197,8 +1290,8 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("PermisoSTCC", PermisoSTCC))
params.Add(New ReportParameter("NumPermiso", NumPermiso))
- params.Add(New ReportParameter("Aseguradora", Aseguradora))
- params.Add(New ReportParameter("NumPoliza", NumPolizaSeguro))
+ params.Add(New ReportParameter("Aseguradora", AseguradoraRespCivil))
+ params.Add(New ReportParameter("NumPoliza", NumPolizaSeguroRespCivil))
params.Add(New ReportParameter("NombreAseguradoraMedioAmbiente", NombreAseguradoraMedioAmbiente))
params.Add(New ReportParameter("NumPolizaSeguroMedioAmbiente", NumPolizaSeguroMedioAmbiente))
@@ -1221,6 +1314,9 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("SubTotal", SubTotal.ToString()))
params.Add(New ReportParameter("Descuentos", Descuentos.ToString()))
params.Add(New ReportParameter("Total", Total.ToString()))
+
+
+
' [@CertificadoContribuyente]
'[@CadenaOriginal]
@@ -1246,7 +1342,7 @@ Partial Class PopUpVerFactura
rds4.Value = DtOperadores
lrds.Add(rds4)
- ImprimirPDF("Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc", lrds, params, String.Format("Carta Porte -{0}", Now.ToDateTime.ToShortDateString))
+ ImprimirPDF("Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc", lrds, params, SerieFolio)
End If
End If
End Sub
@@ -1256,7 +1352,7 @@ Partial Class PopUpVerFactura
#Region "OP = 'DesXmlTra' - IMPRIME XML TRASLADO"
Private Sub DescargaXMLTraslado(Parametros As Hashtable)
- If Parametros("CVEMOVIMIENTO") IsNot Nothing AndAlso Parametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
+ If Parametros("TIPODOCTO") IsNot Nothing AndAlso Parametros("TIPODOCTO").ToString <> "" Then
Dim Exten As String = If(Parametros("EXT").ToString.ToLower = "xml", "xml", "pdf")
Dim Path As String = String.Format("{0}\{1}\{2}\{3}.{4}", UsuarioActual.Empresa.Ruta, Parametros("EXT").ToString, Parametros("TIPODOCTO").ToString, Parametros("FOLIO").ToString, Exten)
Dim Archivo As New System.IO.FileInfo(Path)
@@ -1280,16 +1376,19 @@ Partial Class PopUpVerFactura
#Region "OP = 'DesPdfTra' - IMPRIME PDF TRASLADO"
Private Sub DescargaPDFTraslado(Parametros As Hashtable)
- If Parametros("CVEMOVIMIENTO") IsNot Nothing AndAlso Parametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
+ If Parametros("TIPODOCTO") IsNot Nothing AndAlso Parametros("TIPODOCTO").ToString <> "" Then
Dim Exten As String = If(Parametros("EXT").ToString.ToLower = "xml", "xml", "pdf")
Dim Path As String = String.Format("{0}\{1}\{2}\{3}.{4}", UsuarioActual.Empresa.Ruta, Parametros("EXT").ToString, Parametros("TIPODOCTO").ToString, Parametros("FOLIO").ToString, Exten)
Dim Archivo As New System.IO.FileInfo(Path)
+ Dim cvetimbre As Integer = IfNull(Parametros("CVETIMBRE"), "0").ToString.ToEntero
If Archivo.Exists Then
DescargarArchivoPDFTraslado(Archivo, Path)
Else
If Exten = "pdf" Then
- GeneraPDFFactura(Parametros("CVEMOVIMIENTO").ToString.ToEntero)
+ Dim ObjTimbres As New Timbres(Parametros("TIPODOCTO").ToString, cvetimbre, UsuarioActual)
+
+ GeneraPDFFactura(ObjTimbres.ObjFactura)
Archivo = New System.IO.FileInfo(Path)
If Archivo.Exists Then
DescargarArchivoPDFTraslado(Archivo, Path)
@@ -1302,7 +1401,7 @@ Partial Class PopUpVerFactura
Private Sub DescargarArchivoPDFTraslado(Archivo As System.IO.FileInfo, path As String)
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent()
- HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = "xml", "application/xml", "application/pdf")
+ HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = "xml", "text/xml", "application/pdf")
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
HttpContext.Current.Response.TransmitFile(path)
@@ -1310,12 +1409,12 @@ Partial Class PopUpVerFactura
HttpContext.Current.Response.End()
End Sub
- Private Sub GeneraPDFFactura(CveMovimiento As Integer)
+ Private Sub GeneraPDFFactura(ObjFactura As Modelos.Factura)
Try
- Dim objFactura = CreaObjetosTraslado(CveMovimiento)
- If objFactura IsNot Nothing Then
- PdfFactura(objFactura)
- objFactura.Dispose()
+ ' Dim objFactura = CreaObjetosTraslado(CveMovimiento)
+ If ObjFactura IsNot Nothing Then
+ PdfFactura(ObjFactura)
+ ObjFactura.Dispose()
End If
Catch ex As Exception
OnError("Ocurrió un error al generar el PDF", ex)
diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb
index 0d721b704..8763f2b39 100644
--- a/Compras/Proveedores.aspx.vb
+++ b/Compras/Proveedores.aspx.vb
@@ -1482,7 +1482,7 @@ Partial Class Compras_Proveedores
DdlCveClasificacionProveedor.Items.Insert(0, New ListItem("Sin Clasificación", "0"))
End Sub
Private Sub CargaDIOTPais()
- DdlDIOTPais.DataSource = GlobalDTPais()
+ DdlDIOTPais.DataSource = GlobalDTGralPaises()
DdlDIOTPais.DataBind()
DdlDIOTPais.Items.Insert(0, New ListItem("-", "0"))
End Sub
diff --git a/Compras/ReembolsosComprobaciones.aspx b/Compras/ReembolsosComprobaciones.aspx
index 501e2f58e..165b2899a 100644
--- a/Compras/ReembolsosComprobaciones.aspx
+++ b/Compras/ReembolsosComprobaciones.aspx
@@ -398,7 +398,7 @@
Ot. Ing.
-
+
@@ -459,6 +459,21 @@
txt.value = "";
}
+ //let chequeSeleccionado = parseInt($('#C_DDlCheques option:selected').val());
+
+ //if (chequeSeleccionado > 0) {
+
+
+ // let TotalOtrosEgresos = 0.0;
+ // $('.CsTxtComision').each(function () {
+ // TotalOtrosEgresos = parseFloat($(this).val());
+ // });
+
+ // alert("Excedente " + Excedente + " TotalOtrosEgresos " + TotalOtrosEgresos);
+
+ //}
+
+
Excedente = SumaValores();
if (Excedente > 0) {
@@ -666,9 +681,28 @@
$get('TxtTotal').value = FormatoNumero(Suma + (ToDouble($get('TxtOtrosImportes').value * -1)), 2);
}
+
+ let chequeSeleccionado = parseInt($('#C_DDlCheques option:selected').val());
+ let TotalOtrosEgresos = 0.0;
+
+ if (chequeSeleccionado > 0) {
+
+
+
+ $('.CsTxtComision').each(function () {
+ TotalOtrosEgresos = parseFloat($(this).val());
+ });
+
+ //alert("Excedente " + Excedente + " TotalOtrosEgresos " + TotalOtrosEgresos); EEEEEEEEEEEEEEEEEEEEEEEEE
+
+ Excedente = Excedente + TotalOtrosEgresos;
+
+ }
+
+
if (Excedente > 0) {
txt.value = FormatoNumero(ToDouble(txt.value) - Excedente, 2);
- alert("El Importe no debe de exceder a el saldo del cheque");
+ alert("Excedente " + Excedente + " TotalOtrosEgresos " + TotalOtrosEgresos);
}
diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb
index da89c665e..748d2bd4c 100644
--- a/Compras/ReembolsosComprobaciones.aspx.vb
+++ b/Compras/ReembolsosComprobaciones.aspx.vb
@@ -744,9 +744,7 @@ Partial Class Compras_ReembolsosComprobaciones
End If
-
-
-
+ Dim ComisionTmp As Decimal = gvr.FCTextBox("TxtComision").Text.ToDecimal
'Otros Ingresos
If (ChkAjusteOI.Checked Or ChkOtrosIngresosCheque.Checked) AndAlso gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then
@@ -764,8 +762,15 @@ Partial Class Compras_ReembolsosComprobaciones
If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = (ImporteMovto / gvr.DataKey("Original").ToDecimal) Else PorcentajePago = 1
If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119, 158)) Then
+
+
+ Dim ImporteMovtoTmp As Decimal = ImporteMovto
+ If ComisionTmp < 0 Then
+ ImporteMovtoTmp = ImporteMovto + ComisionTmp
+ End If
+
'Si es caja chica metemos el concepto 30, si es funcionario metemos 29
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, ImporteMovto, Referencia, If(CveCajaChica > 0, 30, 29), ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEPago, CveIEDevolucion:=If(CveCajaChica > 0, If(DDlCheques.SelectedValue.ToEntero = -1, CveIECajaChica, DDlCheques.SelectedValue.ToEntero), -1), CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=ImporteMovto * tipoCambio, CveCuenta:=CveCuentaPersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, ImporteMovtoTmp, Referencia, If(CveCajaChica > 0, 30, 29), ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEPago, CveIEDevolucion:=If(CveCajaChica > 0, If(DDlCheques.SelectedValue.ToEntero = -1, CveIECajaChica, DDlCheques.SelectedValue.ToEntero), -1), CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovtoTmp), ImporteMX:=ImporteMovtoTmp * tipoCambio, CveCuenta:=CveCuentaPersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then
MsgError = "Detalle"
End If
End If
diff --git a/Compras/RepComprasAF.aspx b/Compras/RepComprasAF.aspx
index b6ee8e1f9..875cfda95 100644
--- a/Compras/RepComprasAF.aspx
+++ b/Compras/RepComprasAF.aspx
@@ -81,7 +81,7 @@
Grupo:
-
+
@@ -92,6 +92,7 @@
+
@@ -147,12 +148,21 @@
+
Clasificación:
-
+
+
+
+
Clasificación 2:
+
+
+
+
+
Producto Servicio:
@@ -164,10 +174,11 @@
-
+
-
+
diff --git a/Compras/RepComprasAF.aspx.vb b/Compras/RepComprasAF.aspx.vb
index 2c5fc308c..f6dae6e0f 100644
--- a/Compras/RepComprasAF.aspx.vb
+++ b/Compras/RepComprasAF.aspx.vb
@@ -90,6 +90,22 @@ Partial Class Compras_RepComprasAF
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
DdlClasificacion.DataBind()
+
+ Dim ObjClasificacion As New ClsClasificaciones
+
+ If ObjClasificacion.GetClasificacion2ProductoServicio(UsuarioActual.CveEmpresa) Then
+ DdlClasificacion2.DataSource = ObjClasificacion.DtResultados
+ Else
+ DdlClasificacion2.DataSource = Nothing
+ End If
+
+
+ ObjClasificacion.Dispose()
+ DdlClasificacion2.DataBind()
+
+
+
+
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
DdlActivoFijo.DataBind()
@@ -154,10 +170,12 @@ Partial Class Compras_RepComprasAF
Else
TCEspecifico = -1
End If
+
If ObjCompras.GetRepComprasAF(FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero, DdlMonedas.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero,
DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico,
DdlClasificacion.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, DdlTipoActivoFijo.SelectedValue.ToEntero, DdlSubTipoActivoFijo.SelectedValue.ToEntero,
- CvePS, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
+ CvePS, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero) Then
+
DTDatos = ObjCompras.DtResultados
GvDatos.DataSource = ObjCompras.DtResultados
Else
@@ -187,12 +205,19 @@ Partial Class Compras_RepComprasAF
If CvePS = "" Or CvePS = "0" Then
CvePS = "-1"
End If
- Dim Liga As String = $"/Compras/RepComprasAFDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={ e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&CveProveedor={ e.Row.DBCampo("CveProveedor")}&CveActivoFijo={e.Row.DBCampo("CveActivoFijo")}&CveTipoActivoFijo={e.Row.DBCampo("CveTipoActivoFijo")}&CveSubTipoActivoFijo={e.Row.DBCampo("CveSubTipoActivoFijo")}&CveProyecto={ DdlProyecto.SelectedValue}&CveSubProyecto={DdlSubProyecto.SelectedValue}&CvePS={CvePS}&CveClasificacion={e.Row.DBCampo("CveClasificacion")}&CveMoneda={ e.Row.DBCampo("CveMoneda")}&FechaI={FechaI}&FechaF={FechaF}&PS={PS}"
+
+
If e.Row.DBCampo("Orden") = "1" Then
+ Dim Liga As String = $"/Compras/RepComprasAFDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={ e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&CveProveedor={ e.Row.DBCampo("CveProveedor")}&CveActivoFijo={e.Row.DBCampo("CveActivoFijo")}&CveTipoActivoFijo={e.Row.DBCampo("CveTipoActivoFijo")}&CveSubTipoActivoFijo={e.Row.DBCampo("CveSubTipoActivoFijo")}&CveProyecto={ DdlProyecto.SelectedValue}&CveSubProyecto={DdlSubProyecto.SelectedValue}&CvePS={CvePS}&CveClasificacion={e.Row.DBCampo("CveClasificacion")}&CveMoneda={ e.Row.DBCampo("CveMoneda")}&FechaI={FechaI}&FechaF={FechaF}&PS={PS}&CveClasificacion2={e.Row.DBCampo("CveClasificacion2")}"
e.Row.Cells(0).Text = String.Format("{2}", "Texto", Liga, e.Row.DataKey("GPO").ToString)
Else
e.Row.BackColor = Drawing.Color.LightGray
+ Dim Liga As String = $"/Compras/RepComprasAFDetalle.aspx?GPO=-1&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={ e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&CveProveedor={ e.Row.DBCampo("CveProveedor")}&CveActivoFijo={e.Row.DBCampo("CveActivoFijo")}&CveTipoActivoFijo={e.Row.DBCampo("CveTipoActivoFijo")}&CveSubTipoActivoFijo={e.Row.DBCampo("CveSubTipoActivoFijo")}&CveProyecto={ DdlProyecto.SelectedValue}&CveSubProyecto={DdlSubProyecto.SelectedValue}&CvePS={CvePS}&CveClasificacion={e.Row.DBCampo("CveClasificacion")}&CveMoneda={ e.Row.DBCampo("CveMoneda")}&FechaI={FechaI}&FechaF={FechaF}&PS={PS}&CveClasificacion2={e.Row.DBCampo("CveClasificacion2")}"
+
+ e.Row.Cells(0).Text = String.Format("{2}", "Texto", Liga, e.Row.DataKey("Moneda").ToString)
+
End If
+
End If
End Sub
@@ -285,6 +310,11 @@ Partial Class Compras_RepComprasAF
If DdlClasificacion.SelectedIndex > 0 Then
ListaFiltros.Add("Clasificación: " & DdlClasificacion.SelectedItem.Text)
End If
+
+ If DdlClasificacion2.SelectedIndex > 0 Then
+ ListaFiltros.Add("Clasificación: " & DdlClasificacion2.SelectedItem.Text)
+ End If
+
For Each s As String In ListaFiltros
If Contador > 0 Then
filtro = filtro & ", " & s
diff --git a/Compras/RepComprasAFDetalle.aspx b/Compras/RepComprasAFDetalle.aspx
index fc94f34da..23ec0098d 100644
--- a/Compras/RepComprasAFDetalle.aspx
+++ b/Compras/RepComprasAFDetalle.aspx
@@ -173,10 +173,7 @@
-
-
-
-
+
@@ -190,6 +187,14 @@
+
+
Clasificación 2:
+
+
+
+
+
+
Producto Servicio:
@@ -218,12 +223,23 @@
+
+
+
+ SubProyecto
+
+
+
+
+
+
ActivoFijo
-
+ <%----%>
+
@@ -245,6 +261,48 @@
+
+
+
+ Responsable
+
+
+
+
+
+
+
+
+ Horometro/Odometro
+
+
+
+
+
+
+
+
+
+ Tipo Mantenimiento
+
+
+
+
+
+
+
+
+ Clasificación 2
+
+
+
+
+
+
+
+
+
+
Unidad de Medida
diff --git a/Compras/RepComprasAFDetalle.aspx.vb b/Compras/RepComprasAFDetalle.aspx.vb
index e8de3702b..fd65f6a70 100644
--- a/Compras/RepComprasAFDetalle.aspx.vb
+++ b/Compras/RepComprasAFDetalle.aspx.vb
@@ -106,6 +106,7 @@ Partial Class Compras_RepComprasAFDetalle
DdlSubProyecto.SelectedValueExist(Request.QueryString("CveSubProyecto").ToString)
DdlProveedores.SelectedValueExist(Request.QueryString("CveProveedor").ToString)
DdlClasificacion.SelectedValueExist(Request.QueryString("CveClasificacion").ToString)
+ DdlClasificacion2.SelectedValueExist(Request.QueryString("CveClasificacion2").ToString)
If Request.QueryString("CvePS").ToString.Length > 0 Then
DdlPS.txtText.Value = Request.QueryString("PS").ToString
@@ -162,7 +163,7 @@ Partial Class Compras_RepComprasAFDetalle
End If
If UsuarioActual.CveEmpresa = 72 Then
- GvDatos.Columns(2).Visible = True
+ GvDatos.Columns(3).Visible = True
End If
End If
@@ -185,6 +186,25 @@ Partial Class Compras_RepComprasAFDetalle
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
DdlClasificacion.DataBind()
+ 'DdlClasificacion2.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
+ 'DdlClasificacion2.DataBind()
+
+ Dim ObjClasificacion As New ClsClasificaciones
+
+ If ObjClasificacion.GetClasificacion2ProductoServicio(UsuarioActual.CveEmpresa) Then
+ DdlClasificacion2.DataSource = ObjClasificacion.DtResultados
+ Else
+ DdlClasificacion2.DataSource = Nothing
+ End If
+
+
+ ObjClasificacion.Dispose()
+ DdlClasificacion2.DataBind()
+ DdlClasificacion2.Items.Insert(0, New ListItem("Totas", "-1"))
+ DdlClasificacion2.Items.Insert(1, New ListItem("Sin Clasificación", "-2"))
+ DdlClasificacion2.SelectedValueExist(-1)
+
+
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
DdlActivoFijo.DataBind()
DdlActivoFijo.Items.Insert(0, New ListItem("Seleccione", "-1"))
@@ -276,7 +296,7 @@ Partial Class Compras_RepComprasAFDetalle
If ObjCompras.GetRepComprasAFDetalle(FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero, DdlMonedas.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1,
DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico,
DdlClasificacion.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, DdlTipoActivoFijo.SelectedValue.ToEntero, DdlSubTipoActivoFijo.SelectedValue.ToEntero,
- CvePS, Anio.ToEntero, Mes.ToEntero, AnioMes, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
+ CvePS, Anio.ToEntero, Mes.ToEntero, AnioMes, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero) Then
DTDatos = ObjCompras.DtResultados
GvDatos.DataSource = ObjCompras.DtResultados
@@ -312,6 +332,7 @@ Partial Class Compras_RepComprasAFDetalle
e.Row.Cells(0).Text = String.Format("{2}", "Texto", Liga, e.Row.DBCampo("SerieFolio").ToString)
Else
e.Row.BackColor = Drawing.Color.LightGray
+ e.Row.Font.Bold = True
End If
End If
@@ -434,6 +455,11 @@ Partial Class Compras_RepComprasAFDetalle
ListaFiltros.Add("Clasificación: " & DdlClasificacion.SelectedItem.Text)
End If
+
+ If DdlClasificacion2.SelectedIndex > 0 Then
+ ListaFiltros.Add("Clasificación 2: " & DdlClasificacion2.SelectedItem.Text)
+ End If
+
For Each s As String In ListaFiltros
If Contador > 0 Then
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb
index aa0875392..9879cf3e2 100644
--- a/Contabilidad/RegPrePolizaS.aspx.vb
+++ b/Contabilidad/RegPrePolizaS.aspx.vb
@@ -893,7 +893,7 @@ Partial Class ContabilidadC_RegPrePolizaS
'validaciones
- If Not (TotalCargos = TotalAbonos AndAlso (GvPrePoliza.Rows.Count > 0 Or GvMov.Rows.Count > 0)) Then
+ If Not (TotalCargos = TotalAbonos AndAlso (GvPrePoliza.Rows.Count > 0 Or GvMov.Rows.Count > 0)) AndAlso UsuarioActual.CveRol <> 1 Then
Alert($"La suma de los movimientos no son iguales ({TotalCargos}-{TotalAbonos})", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
diff --git a/Contabilidad/RepIVA.aspx b/Contabilidad/RepIVA.aspx
index 648e85ef5..9796dade0 100644
--- a/Contabilidad/RepIVA.aspx
+++ b/Contabilidad/RepIVA.aspx
@@ -217,7 +217,7 @@
-
+
diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs
index 075d299bf..94263da4f 100644
--- a/Contabilidad/RepIVA.aspx.cs
+++ b/Contabilidad/RepIVA.aspx.cs
@@ -104,7 +104,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
LblMsgAcreditable.Text = "La información presenta importes en negativo, estos no se incluirán en el archivo generado para DIOT";
}
- GvA.Columns[10].Visible = DtIVAAcreditable.SUM("IvaExentoImpo") > 0; // sino tiene valor la columna de importación de oculta
+ GvA.Columns[11].Visible = DtIVAAcreditable.SUM("valorActosImp1516") > 0; // sino tiene valor la columna de importación de oculta
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
diff --git a/Content/AjaxControlToolkit/Styles/Tabs.css b/Content/AjaxControlToolkit/Styles/Tabs.css
index 8151906c9..5908a0886 100644
--- a/Content/AjaxControlToolkit/Styles/Tabs.css
+++ b/Content/AjaxControlToolkit/Styles/Tabs.css
@@ -86,7 +86,7 @@
border: 1px solid #999999;
border-top: 0;
font-family: verdana,tahoma,helvetica;
- font-size: 10pt;
+ font-size: 12px;
padding: 8px;
}
diff --git a/Content/AjaxControlToolkit/Styles/Tabs.min.css b/Content/AjaxControlToolkit/Styles/Tabs.min.css
index f6666f315..7eaf91406 100644
--- a/Content/AjaxControlToolkit/Styles/Tabs.min.css
+++ b/Content/AjaxControlToolkit/Styles/Tabs.min.css
@@ -1 +1 @@
-.ajax__tab_default .ajax__tab_header{white-space:normal !important}.ajax__tab_default .ajax__tab_outer{display:inline-block;display:-moz-inline-box}.ajax__tab_default .ajax__tab_inner{display:inline-block;display:-moz-inline-box}.ajax__tab_default .ajax__tab_tab{display:inline-block;display:-moz-inline-box;overflow:hidden;text-align:center}.ajax__tab_xp .ajax__tab_disabled{color:#a0a0a0;cursor:default}.ajax__tab_xp .ajax__tab_header{background-position:bottom;background-repeat:repeat-x;font-family:verdana,tahoma,helvetica;font-size:11px;height:21px}.ajax__tab_xp .ajax__tab_header .ajax__tab_outer{background-position:right;background-repeat:no-repeat;height:21px;padding-right:4px}.ajax__tab_xp .ajax__tab_header .ajax__tab_inner{background-repeat:no-repeat;padding-left:3px}.ajax__tab_xp .ajax__tab_header .ajax__tab_tab{background-repeat:repeat-x;margin:0;padding:4px}.ajax__tab_xp .ajax__tab_header .ajax__tab_hover .ajax__tab_outer{background-position:right;background-repeat:no-repeat;cursor:pointer}.ajax__tab_xp .ajax__tab_header .ajax__tab_hover .ajax__tab_inner{background-repeat:no-repeat;cursor:pointer}.ajax__tab_xp .ajax__tab_header .ajax__tab_hover .ajax__tab_tab{background-repeat:repeat-x;cursor:pointer}.ajax__tab_xp .ajax__tab_header .ajax__tab_active .ajax__tab_outer{background-position:right;background-repeat:no-repeat}.ajax__tab_xp .ajax__tab_header .ajax__tab_active .ajax__tab_inner{background-repeat:no-repeat}.ajax__tab_xp .ajax__tab_header .ajax__tab_active .ajax__tab_tab{background-repeat:repeat-x}.ajax__tab_xp .ajax__tab_body{background-color:#fff;border:1px solid #999;border-top:0;font-family:verdana,tahoma,helvetica;font-size:10pt;padding:8px}.ajax__tab_xp .ajax__tab_header_verticalleft{background-position:right;background-repeat:repeat-y;font-family:verdana,tahoma,helvetica;font-size:11px}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_outer{background-position:right;background-repeat:no-repeat;height:21px;padding-right:4px}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_inner{background-repeat:no-repeat;padding-left:3px}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_tab{background-repeat:repeat-x;margin:0;padding:4px}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_hover .ajax__tab_outer{background-position:right;background-repeat:no-repeat;cursor:pointer}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_hover .ajax__tab_inner{background-repeat:no-repeat;cursor:pointer}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_hover .ajax__tab_tab{background-repeat:repeat-x;cursor:pointer}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_active:not(:first-child){margin-top:1px}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_active .ajax__tab_outer{background-position:right;background-repeat:no-repeat}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_active .ajax__tab_inner{background-repeat:no-repeat}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_active .ajax__tab_tab{background-repeat:repeat-x}.ajax__tab_xp .ajax__tab_body_verticalleft{background-color:#fff;border:1px solid #999;border-left:0;font-family:verdana,tahoma,helvetica;font-size:10pt;padding:8px}.ajax__tab_xp .ajax__tab_header_verticalright{background-position:left;background-repeat:repeat-y;font-family:verdana,tahoma,helvetica;font-size:11px}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_outer{background-position:right;background-repeat:no-repeat;height:21px;padding-right:4px}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_inner{background-repeat:no-repeat;padding-left:3px}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_tab{background-repeat:repeat-x;margin:0;padding:4px}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_hover .ajax__tab_outer{background-position:right;background-repeat:no-repeat;cursor:pointer}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_hover .ajax__tab_inner{background-repeat:no-repeat;cursor:pointer}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_hover .ajax__tab_tab{background-repeat:repeat-x;cursor:pointer}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_active{margin-top:1px}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_active .ajax__tab_outer{background-position:right;background-repeat:no-repeat}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_active .ajax__tab_inner{background-repeat:no-repeat}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_active .ajax__tab_tab{background-repeat:repeat-x}.ajax__tab_xp .ajax__tab_body_verticalright{background-color:#fff;border:1px solid #999;border-right:0;font-family:verdana,tahoma,helvetica;font-size:10pt;padding:8px}.ajax__tab_xp .ajax__tab_header_bottom{background-position:top;background-repeat:repeat-x;font-family:verdana,tahoma,helvetica;font-size:11px}.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_outer{background-position:right;background-repeat:no-repeat;height:21px;padding-right:4px}.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_inner{background-repeat:no-repeat;padding-left:3px}.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_tab{background-repeat:repeat-x;height:17px;margin:0;padding:0 4px 4px 4px}.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_hover .ajax__tab_outer{background-position:right;background-repeat:no-repeat;cursor:pointer}.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_hover .ajax__tab_inner{background-repeat:no-repeat;cursor:pointer}.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_hover .ajax__tab_tab{background-repeat:repeat-x;cursor:pointer}.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_active .ajax__tab_outer{background-position:right;background-repeat:no-repeat}.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_active .ajax__tab_inner{background-repeat:no-repeat}.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_active .ajax__tab_tab{background-repeat:repeat-x}.ajax__tab_xp .ajax__tab_body_bottom{background-color:#fff;border:1px solid #999;border-bottom:0;font-family:verdana,tahoma,helvetica;font-size:10pt;padding:8px}.ajax__scroll_horiz{overflow-x:scroll}.ajax__scroll_vert{overflow-y:scroll}.ajax__scroll_both{overflow:scroll}.ajax__scroll_auto{overflow:auto}.ajax__scroll_none{overflow:hidden}.ajax__tab_plain .ajax__tab_outer{border:2px solid #999;text-align:center;vertical-align:middle}.ajax__tab_plain .ajax__tab_inner{text-align:center;vertical-align:middle}.ajax__tab_plain .ajax__tab_body{text-align:center;vertical-align:middle}.ajax__tab_plain .ajax__tab_header{text-align:center;vertical-align:middle}.ajax__tab_plain .ajax__tab_active .ajax__tab_outer{background:#ffffe1}
\ No newline at end of file
+.ajax__tab_default .ajax__tab_header{white-space:normal !important}.ajax__tab_default .ajax__tab_outer{display:inline-block;display:-moz-inline-box}.ajax__tab_default .ajax__tab_inner{display:inline-block;display:-moz-inline-box}.ajax__tab_default .ajax__tab_tab{display:inline-block;display:-moz-inline-box;overflow:hidden;text-align:center}.ajax__tab_xp .ajax__tab_disabled{color:#a0a0a0;cursor:default}.ajax__tab_xp .ajax__tab_header{background-position:bottom;background-repeat:repeat-x;font-family:verdana,tahoma,helvetica;font-size:11px;height:21px}.ajax__tab_xp .ajax__tab_header .ajax__tab_outer{background-position:right;background-repeat:no-repeat;height:21px;padding-right:4px}.ajax__tab_xp .ajax__tab_header .ajax__tab_inner{background-repeat:no-repeat;padding-left:3px}.ajax__tab_xp .ajax__tab_header .ajax__tab_tab{background-repeat:repeat-x;margin:0;padding:4px}.ajax__tab_xp .ajax__tab_header .ajax__tab_hover .ajax__tab_outer{background-position:right;background-repeat:no-repeat;cursor:pointer}.ajax__tab_xp .ajax__tab_header .ajax__tab_hover .ajax__tab_inner{background-repeat:no-repeat;cursor:pointer}.ajax__tab_xp .ajax__tab_header .ajax__tab_hover .ajax__tab_tab{background-repeat:repeat-x;cursor:pointer}.ajax__tab_xp .ajax__tab_header .ajax__tab_active .ajax__tab_outer{background-position:right;background-repeat:no-repeat}.ajax__tab_xp .ajax__tab_header .ajax__tab_active .ajax__tab_inner{background-repeat:no-repeat}.ajax__tab_xp .ajax__tab_header .ajax__tab_active .ajax__tab_tab{background-repeat:repeat-x}.ajax__tab_xp .ajax__tab_body{background-color:#fff;border:1px solid #999;border-top:0;font-family:verdana,tahoma,helvetica;font-size:12px;padding:8px}.ajax__tab_xp .ajax__tab_header_verticalleft{background-position:right;background-repeat:repeat-y;font-family:verdana,tahoma,helvetica;font-size:11px}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_outer{background-position:right;background-repeat:no-repeat;height:21px;padding-right:4px}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_inner{background-repeat:no-repeat;padding-left:3px}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_tab{background-repeat:repeat-x;margin:0;padding:4px}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_hover .ajax__tab_outer{background-position:right;background-repeat:no-repeat;cursor:pointer}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_hover .ajax__tab_inner{background-repeat:no-repeat;cursor:pointer}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_hover .ajax__tab_tab{background-repeat:repeat-x;cursor:pointer}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_active:not(:first-child){margin-top:1px}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_active .ajax__tab_outer{background-position:right;background-repeat:no-repeat}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_active .ajax__tab_inner{background-repeat:no-repeat}.ajax__tab_xp .ajax__tab_header_verticalleft .ajax__tab_active .ajax__tab_tab{background-repeat:repeat-x}.ajax__tab_xp .ajax__tab_body_verticalleft{background-color:#fff;border:1px solid #999;border-left:0;font-family:verdana,tahoma,helvetica;font-size:10pt;padding:8px}.ajax__tab_xp .ajax__tab_header_verticalright{background-position:left;background-repeat:repeat-y;font-family:verdana,tahoma,helvetica;font-size:11px}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_outer{background-position:right;background-repeat:no-repeat;height:21px;padding-right:4px}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_inner{background-repeat:no-repeat;padding-left:3px}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_tab{background-repeat:repeat-x;margin:0;padding:4px}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_hover .ajax__tab_outer{background-position:right;background-repeat:no-repeat;cursor:pointer}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_hover .ajax__tab_inner{background-repeat:no-repeat;cursor:pointer}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_hover .ajax__tab_tab{background-repeat:repeat-x;cursor:pointer}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_active{margin-top:1px}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_active .ajax__tab_outer{background-position:right;background-repeat:no-repeat}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_active .ajax__tab_inner{background-repeat:no-repeat}.ajax__tab_xp .ajax__tab_header_verticalright .ajax__tab_active .ajax__tab_tab{background-repeat:repeat-x}.ajax__tab_xp .ajax__tab_body_verticalright{background-color:#fff;border:1px solid #999;border-right:0;font-family:verdana,tahoma,helvetica;font-size:10pt;padding:8px}.ajax__tab_xp .ajax__tab_header_bottom{background-position:top;background-repeat:repeat-x;font-family:verdana,tahoma,helvetica;font-size:11px}.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_outer{background-position:right;background-repeat:no-repeat;height:21px;padding-right:4px}.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_inner{background-repeat:no-repeat;padding-left:3px}.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_tab{background-repeat:repeat-x;height:17px;margin:0;padding:0 4px 4px 4px}.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_hover .ajax__tab_outer{background-position:right;background-repeat:no-repeat;cursor:pointer}.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_hover .ajax__tab_inner{background-repeat:no-repeat;cursor:pointer}.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_hover .ajax__tab_tab{background-repeat:repeat-x;cursor:pointer}.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_active .ajax__tab_outer{background-position:right;background-repeat:no-repeat}.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_active .ajax__tab_inner{background-repeat:no-repeat}.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_active .ajax__tab_tab{background-repeat:repeat-x}.ajax__tab_xp .ajax__tab_body_bottom{background-color:#fff;border:1px solid #999;border-bottom:0;font-family:verdana,tahoma,helvetica;font-size:10pt;padding:8px}.ajax__scroll_horiz{overflow-x:scroll}.ajax__scroll_vert{overflow-y:scroll}.ajax__scroll_both{overflow:scroll}.ajax__scroll_auto{overflow:auto}.ajax__scroll_none{overflow:hidden}.ajax__tab_plain .ajax__tab_outer{border:2px solid #999;text-align:center;vertical-align:middle}.ajax__tab_plain .ajax__tab_inner{text-align:center;vertical-align:middle}.ajax__tab_plain .ajax__tab_body{text-align:center;vertical-align:middle}.ajax__tab_plain .ajax__tab_header{text-align:center;vertical-align:middle}.ajax__tab_plain .ajax__tab_active .ajax__tab_outer{background:#ffffe1}
\ No newline at end of file
diff --git a/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb
index 48783158d..c920c753a 100644
--- a/Contratos/ContratoObra.aspx.vb
+++ b/Contratos/ContratoObra.aspx.vb
@@ -2808,7 +2808,7 @@ Partial Class Contratos_ContratoObra
Private Sub CargaGVGastos()
Dim objContrato As New ClsContratos
- If objContrato.GetContratoGastos(CveContrato) Then
+ If objContrato.GetContratoGastos(CveContrato, UsuarioActual.CveEmpresa) Then
DtGastos = objContrato.DtResultados
GvContratosGastos.DataSource = DtGastos
SumaGasto = objContrato.DtResultados.SUM("Importe", "CveContratoGasto IS NULL")
diff --git a/Documentacion/TableroMaterialidad.aspx b/Documentacion/TableroMaterialidad.aspx
new file mode 100644
index 000000000..c7a5d2ecc
--- /dev/null
+++ b/Documentacion/TableroMaterialidad.aspx
@@ -0,0 +1,321 @@
+<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="TableroMaterialidad.aspx.cs" Inherits="Documentacion_TableroMaterialidad" %>
+
+
+
+
+
+
+
+ Materialidad
+
+
+
+
+
+
+