diff --git a/AC/RepEstadoActividades.aspx.vb b/AC/RepEstadoActividades.aspx.vb
index f26d16383..79d17e979 100644
--- a/AC/RepEstadoActividades.aspx.vb
+++ b/AC/RepEstadoActividades.aspx.vb
@@ -330,8 +330,8 @@ Partial Class AC_RepEstadoActividades
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
If (UsuarioActual.CveEmpresa = 48 And ChkFirma.Checked) Then
- params.Add(New ReportParameter("pFirma1", String.Format("Lic. Damian A. Benitez Alcantar{0}Director Administrativo", vbCrLf)))
- params.Add(New ReportParameter("pFirma2", String.Format("Ing. Soraida Mesinas Reyes{0}Director General", vbCrLf)))
+ params.Add(New ReportParameter("pFirma1", String.Format("Ing. Héctor Díaz Young{0}Dirección Administrativa", vbCrLf)))
+ params.Add(New ReportParameter("pFirma2", String.Format("M.E.R Carla Neudert Cordova{0}Dirección General", vbCrLf)))
ElseIf (UsuarioActual.CveEmpresa = 120 And ChkFirma.Checked) Then
params.Add(New ReportParameter("pFirma1", String.Format("C.P.NEFTALI PEÑA MIRANDA{0}Subdirector de Contabilidad", vbCrLf)))
params.Add(New ReportParameter("pFirma2", String.Format("Dra. María Antonieta Laso López{0}Director General", vbCrLf)))
diff --git a/AC/RepSituacionFinanciera.aspx.vb b/AC/RepSituacionFinanciera.aspx.vb
index 57265aeff..75a53e925 100644
--- a/AC/RepSituacionFinanciera.aspx.vb
+++ b/AC/RepSituacionFinanciera.aspx.vb
@@ -639,9 +639,10 @@ Partial Class AC_SituacionFinanciera
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("CveEmpresa", UsuarioActual.CveEmpresa.ToString))
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
+
If (UsuarioActual.CveEmpresa = 48 And ChkFirma.Checked) Then
- params.Add(New ReportParameter("pFirma1", String.Format("Lic. Damian A. Benitez Alcantar{0}Director Administrativo", vbCrLf)))
- params.Add(New ReportParameter("pFirma2", String.Format("Ing. Soraida Mesinas Reyes{0}Director General", vbCrLf)))
+ params.Add(New ReportParameter("pFirma1", String.Format("Ing. Héctor Díaz Young{0}Dirección Administrativa", vbCrLf)))
+ params.Add(New ReportParameter("pFirma2", String.Format("M.E.R Carla Neudert Cordova{0}Dirección General", vbCrLf)))
ElseIf (UsuarioActual.CveEmpresa = 120 And ChkFirma.Checked) Then
params.Add(New ReportParameter("pFirma1", String.Format("C.P.NEFTALI PEÑA MIRANDA{0}Subdirector de Contabilidad", vbCrLf)))
params.Add(New ReportParameter("pFirma2", String.Format("Dra. María Antonieta Laso López{0}Director General", vbCrLf)))
@@ -652,6 +653,7 @@ Partial Class AC_SituacionFinanciera
params.Add(New ReportParameter("pFirma1", ""))
params.Add(New ReportParameter("pFirma2", ""))
End If
+
params.Add(New ReportParameter("pFechaFin", FechaF))
params.Add(New ReportParameter("Level2", If(ChkNivel.Checked, "SI", "NO")))
ImprimirPDF(reportpath, lrds, params, fileName, Formato)
diff --git a/AC/Reportes/RepEstadoActividades.rdlc b/AC/Reportes/RepEstadoActividades.rdlc
index de0652b3b..931f42736 100644
--- a/AC/Reportes/RepEstadoActividades.rdlc
+++ b/AC/Reportes/RepEstadoActividades.rdlc
@@ -1008,18 +1008,7 @@
- C.P Vera Guadalupe Tarazon Moreno
-
-
-
-
-
-
-
-
- Director Administrativo
+ =Parameters!pFirma1.Value
diff --git a/AC/Reportes/RepSituacionFinanciera.rdlc b/AC/Reportes/RepSituacionFinanciera.rdlc
index ab0b3f9b8..3723ffd7a 100644
--- a/AC/Reportes/RepSituacionFinanciera.rdlc
+++ b/AC/Reportes/RepSituacionFinanciera.rdlc
@@ -2942,18 +2942,7 @@
- C.P Vera Guadalupe Tarazon Moreno
-
-
-
-
-
-
-
-
- Director Administrativo
+ =Parameters!pFirma1.Value
diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb
index 939808c43..16c9f5209 100644
--- a/App_Code/ClsGenerales.vb
+++ b/App_Code/ClsGenerales.vb
@@ -2955,7 +2955,9 @@ Public Class ClsGenerales
.Add("@FechaIngFin", SqlDbType.VarChar).Value = FechaIngFin
.Add("@Filtro", SqlDbType.Int).Value = Filtro
.Add("@CveUsuarioEntrega", SqlDbType.Int).Value = CveUsuarioEntrega
- .Add("@EsEntregaInterna", SqlDbType.Bit).Value = EsEntregaInterna
+ .Add("@EsEntregaInterna", SqlDbType.Bit).Value = EsEntregaInterna
+
+
End With
Try
SqlAdapter.Fill(Data)
@@ -2965,8 +2967,8 @@ Public Class ClsGenerales
End Try
Return Retorno
- End Function
-
+ End Function
+
Public Function UpdatePaqueteriasGuias(CvePaqueteriaGuia As Integer, CvePaqueteriaGuiaTipo As Integer, CveSubProyecto As Integer, CvePaqueteria As Integer, CveEstatus As Integer, Fecha As String, Rastreo As String, Guia As String, NumCajas As Integer, Peso As Double,
Dimensiones As String, FechaEstimada As String, Observaciones As String, Optional ImplicaCosto As Boolean = True) As Boolean
Dim Retorno As Boolean = False
@@ -3029,7 +3031,8 @@ Public Class ClsGenerales
DataAdapter("PA_Gral_EntregasPorRealizarGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
- .Add("@CveAsignacionEntrega", SqlDbType.BigInt).Value = CveAsignacionEntrega
+ .Add("@CveAsignacionEntrega", SqlDbType.BigInt).Value = CveAsignacionEntrega
+
End With
Try
SqlAdapter.Fill(Data)
@@ -3041,15 +3044,14 @@ Public Class ClsGenerales
Return Retorno
End Function
- Public Function AsignarEntregasPorRealizar(CvePaqueteriaGuia As Integer, CvePersonal As Integer, Optional CveAsignacionEntrega As Long = -1, Optional CveMotivoRechazoPaqueteria As Integer = -1, Optional Orden As Integer = 0) As Boolean
+ Public Function AsignarEntregasPorRealizar(CvePaqueteriaGuia As Integer, CvePersonal As Integer, Optional CveAsignacionEntrega As Long = -1, Optional CveMotivoRechazoPaqueteria As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_AsignarEntregasPorRealizar")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePaqueteriaGuia", SqlDbType.Int).Value = CvePaqueteriaGuia
.Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CvePersonal
.Add("@CveAsignacionEntrega", SqlDbType.BigInt).Value = CveAsignacionEntrega
- .Add("@CveMotivoRechazoPaqueteria", SqlDbType.Int).Value = CveMotivoRechazoPaqueteria
- .Add("@Orden", SqlDbType.Int).Value = Orden
+ .Add("@CveMotivoRechazoPaqueteria", SqlDbType.Int).Value = CveMotivoRechazoPaqueteria
End With
Try
SqlAdapter.Fill(Data)
@@ -3611,8 +3613,9 @@ Public Class ClsGenerales
#Region "GRAL TIMBRES"
- Public Function AddGralTimbre(TipoDocto As String, Serie As String, Folio As Integer, FolioFiscal As String, Fecha As Date, CvePaqueteriaGuia As Integer, CveMovimientoAlmacen As Integer, CveUsuario As Integer, CveEmpresa As Integer,
- Estatus As Integer, CvePAC As Integer, AplicaCP As Boolean, CveSubProyectoOrigen As Integer, CveDireccionOrigen As Integer, CveDireccionDestino As Integer, CveChofer As Integer, CveCamion As Integer, FechaEntrega As Date) As Integer
+ 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
+
Dim Retorno As Integer = -1
DataAdapter("PA_Gral_TimbreAdd")
@@ -3623,19 +3626,13 @@ Public Class ClsGenerales
.Add("@Folio", SqlDbType.Int).Value = Folio
.Add("@FolioFiscal", SqlDbType.VarChar).Value = FolioFiscal
.Add("@Fecha", SqlDbType.Date).Value = Fecha
- .Add("@CvePaqueteriaGuia", SqlDbType.Int).Value = CvePaqueteriaGuia
- .Add("@CveMovimientoAlmacen", SqlDbType.Int).Value = CveMovimientoAlmacen
.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("@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("@CveTimbre", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@FolioInsertado", SqlDbType.Int).Direction = ParameterDirection.Output
@@ -3657,7 +3654,7 @@ 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, CvePaqueteriaGuia As Integer) As Boolean
+ 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
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_TimbreGet")
@@ -3671,10 +3668,7 @@ Public Class ClsGenerales
.Add("@Estatus", SqlDbType.Int).Value = Estatus
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveMovimiento", SqlDbType.Int).Value = CveMovimiento
- .Add("@CvePaqueteriaGuia", SqlDbType.Int).Value = CvePaqueteriaGuia
-
-
-
+
End With
Try
@@ -3687,9 +3681,9 @@ 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, CvePaqueteriaGuia As Integer, CveMovimientoAlmacen As Integer, CveUsuario As Integer, CveEmpresa As Integer,
- Estatus As Integer, CvePAC As Integer, CvePACCancelacion As Integer, FechaCancelacion As Date, AplicaCP As Boolean, CveSubProyectoOrigen As Integer, CveDireccionOrigen As Integer, CveDireccionDestino As Integer,
- CveChofer As Integer, CveCamion As Integer) As Boolean
+ 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
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_TimbreUpdate")
@@ -3701,21 +3695,16 @@ Public Class ClsGenerales
.Add("@Folio", SqlDbType.Int).Value = Folio
.Add("@FolioFiscal", SqlDbType.VarChar).Value = FolioFiscal
.Add("@Fecha", SqlDbType.Date).Value = Fecha
- .Add("@CvePaqueteriaGuia", SqlDbType.Int).Value = CvePaqueteriaGuia
- .Add("@CveMovimientoAlmacen", SqlDbType.Int).Value = CveMovimientoAlmacen
.Add("@Estatus", SqlDbType.Int).Value = Estatus
.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("@CveSubProyectoOrigen", SqlDbType.Int).Value = CveSubProyectoOrigen
- .Add("@CveDireccionOrigen", SqlDbType.Int).Value = CveDireccionOrigen
- .Add("@CveDireccionDestino", SqlDbType.Int).Value = CveDireccionDestino
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
- .Add("@CveChofer", SqlDbType.Int).Value = CveChofer
- .Add("@CveCamion", SqlDbType.Int).Value = CveCamion
-
+ .Add("@SelloCancelacion", SqlDbType.VarChar).Value = SelloCancelacion
+
+
End With
Try
@@ -3769,8 +3758,114 @@ 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) As Integer
+ Dim Retorno As Integer = -1
+ DataAdapter("PA_Inv_EntregaAlmacenRutaAdd")
+
+ With SqlAdapter.SelectCommand.Parameters
+
+ .Add("@CveSubProyectoOrigen", SqlDbType.Int).Value = CveSubProyectoOrigen
+ .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("@Orden", SqlDbType.Int).Value = Orden
+ .Add("@Tipo", SqlDbType.VarChar).Value = Tipo
+ .Add("@CveEntregaAlmacen", SqlDbType.Int).Direction = ParameterDirection.Output
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = SqlAdapter.SelectCommand.Parameters("@CveEntregaAlmacen").Value.ToString.ToEntero
+ Catch ex As Exception
+ OnError("Ocurrió un error al agregar la entrega almacen", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return Retorno
+ End Function
+
+ Public Function UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen As Integer, CveDireccionOrigen As Integer, CveDireccionDestino As Integer, CveChofer As Integer, CveCamion As Integer, FechaEntrega As Date, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Inv_EntregaAlmacenRutaUpdate")
+
+ With SqlAdapter.SelectCommand.Parameters
+
+
+ .Add("@CveEntregaAlmacen", SqlDbType.Int).Value = CveEntregaAlmacen
+ .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("@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) As Boolean
+
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_Inv_EntregaAlmacenRutaGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
+ .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
+ .Add("@FechaFin", SqlDbType.Date).Value = FechaFin
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@Opcion", SqlDbType.Int).Value = Opcion
+
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error obtener las entregas", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return Retorno
+ End Function
+
+
+ Public Function GetInvEntregaAlmacenRutaRep(CveSubProyecto As Integer, CveEmpresa As Integer, Estatus As Integer, FechaInicio As Date, FechaFin As Date, CveChofer As Integer) As Boolean
+
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_Inv_EntregaAlmacenRutaRepGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@Estatus", SqlDbType.Int).Value = Estatus
+ .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
+ .Add("@FechaFin", SqlDbType.Date).Value = FechaFin
+ .Add("@CveChofer", SqlDbType.Int).Value = CveChofer
+
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error obtener las entregas", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return Retorno
+ End Function
+
#End Region
End Class
+
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 389ad3700..9a9ab5e36 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -4870,6 +4870,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Inventarios/AjustesSeccionAlmacen.aspx".ToUpper(), 892)
PaginaDict.Add("/Inventarios/RepTraspasoAlmacen.aspx".ToUpper(), 688)
PaginaDict.Add("/Inventarios/EntregasPorRealizar.aspx".ToUpper(), 728)
+
PaginaDict.Add("/Inventarios/CatAlmacenClasificacionSecciones.aspx".ToUpper(), 764)
PaginaDict.Add("/Inventarios/ReconstruirCostos.aspx".ToUpper(), 764)
PaginaDict.Add("/Inventarios/RecepcionDevolucion.aspx".ToUpper(), 696)
@@ -4879,6 +4880,14 @@ Public Class ClsPaginas
+ '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)
+
+
+
#End Region
#Region "MF"
PaginaDict.Add("/MF/BitacoraDiaria.aspx".ToUpper(), 801)
@@ -8492,7 +8501,8 @@ Public Class ClsPaginas
Dim PathXML As String = $"{Ruta}XML\Pag\{Serie}-{Folio}.xml"
Dim PathPDF As String = $"{Ruta}PDF\Pag\{Serie}-{Folio}.pdf"
SerieFolio = $"{Serie}-{Folio}"
- Dim ImagenCBB As String = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, $"{Serie}-{Folio}.jpg")
+
+ Dim ImagenCBB As String = $"file://{Ruta}CBB\{Serie}-{Folio}.jpg"
If File.Exists(PathXML) Then
Dim XmlDoc As New System.Xml.XmlDocument
diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb
index e6d226c83..b2bc2dcd0 100644
--- a/App_Code/Timbrado.vb
+++ b/App_Code/Timbrado.vb
@@ -3313,6 +3313,18 @@ Public Class Timbrado
comprobante.MetodoPagoSpecified = If(ObjCFDITimbre.Comprobante.MetodoPago <> "", True, False)
comprobante.LugarExpedicion = ObjCFDITimbre.Comprobante.LugarExpedicion
+ If ObjCFDITimbre.CFDIRelacionados.TipoRelacion <> "" Then
+ Dim CfdiRelacionados As New Profact.TimbraCFDI33.ComprobanteCfdiRelacionados
+ CfdiRelacionados.CfdiRelacionado = New Profact.TimbraCFDI33.ComprobanteCfdiRelacionadosCfdiRelacionado(ObjCFDITimbre.CFDIRelacionados.UUID.Count - 1) {}
+ Dim i As Integer = 0
+ For Each uid As String In ObjCFDITimbre.CFDIRelacionados.UUID
+ CfdiRelacionados.CfdiRelacionado(i) = New Profact.TimbraCFDI33.ComprobanteCfdiRelacionadosCfdiRelacionado With {.UUID = uid}
+ i += 1
+ Next
+ CfdiRelacionados.TipoRelacion = ObjCFDITimbre.CFDIRelacionados.TipoRelacion
+ comprobante.CfdiRelacionados = CfdiRelacionados
+ End If
+
#Region "Emisor"
comprobante.Emisor = New Profact.TimbraCFDI33.ComprobanteEmisor()
comprobante.Emisor.Rfc = EmisorRFC
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index 9fa47aee1..5d88ea8c2 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -2860,7 +2860,9 @@ Partial Class Bancos_IE
'Agregamos el IVA
If DivIvaIxC.Visible AndAlso TxtIvaIxC.Text.ToDecimal <> 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, 61, Concepto, FechaMovimiento, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera) Then
+ Dim CveConIVA As Integer = 61
+ If UsuarioActual.CveEmpresa = 70 Then CveConIVA = 299
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, CveConIVA, Concepto, FechaMovimiento, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera) Then
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
End If
End If
@@ -4502,16 +4504,18 @@ Partial Class Bancos_IE
If Not ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
ErrorCancelar = True
MensajeError = "Error al desbloquear prepoliza."
+ Else
+ 'CANCELA IE MES ACTUAL
+ CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate, CveTipoTransaccionCancelacion:=DdlTipoTransaccionCancelacion.SelectedValue.ToEntero)
+ If CvePrePolizaCancelacion <= 0 Then
+ ErrorCancelar = True
+ MensajeError = "Error al cancelar IE MES ACTUAL"
+ End If
End If
- 'CANCELA IE MES ACTUAL
- CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate, CveTipoTransaccionCancelacion:=DdlTipoTransaccionCancelacion.SelectedValue.ToEntero)
- If CvePrePolizaCancelacion <= 0 Then
- ErrorCancelar = True
- MensajeError = "Error al cancelar IE MES ACTUAL"
- End If
+
End If
- If UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
+ If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
If Not ObjConta.ContabilizarPrePoliza(CvePrePolizaCancelacion, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IDPoliza > 0, IDPoliza, -1), ObjConta:=ObjAC) Then
ErrorCancelar = True
@@ -4577,7 +4581,7 @@ Partial Class Bancos_IE
End If
- If Not ErrorCancelarComplemento Then
+ If Not ErrorCancelarComplemento AndAlso Not ErrorCancelar Then
If ObjAC IsNot Nothing Then ObjAC.Commit()
Banc.Commit()
@@ -5698,24 +5702,30 @@ Partial Class Bancos_IE
DVGenerarComplementoModal.Visible = False
- If ObjBancos.GetVincularPago(CveProveedor, CveCompra, 2, MinFecha, MaxFecha, UsuarioActual.CveEmpresa, CveIE) Then
+ If Tipo = "Abono" Then
- GvComplementoPagos.DataSource = ObjBancos.DtResultados
+ If ObjBancos.GetVincularPago(CveProveedor, CveCompra, 2, MinFecha, MaxFecha, UsuarioActual.CveEmpresa, CveIE) Then
- If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 And ObjBancos.DtResultados.FiltraParametros(" CveIECancelacion > 0 ").Rows.Count = 0 Then
- DVGenerarComplementoModal.Visible = True
+ GvComplementoPagos.DataSource = ObjBancos.DtResultados
+
+ If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 And ObjBancos.DtResultados.FiltraParametros(" CveIECancelacion > 0 ").Rows.Count = 0 Then
+ DVGenerarComplementoModal.Visible = True
+ End If
+ Else
+ GvComplementoPagos.DataSource = Nothing
End If
Else
- GvComplementoPagos.DataSource = Nothing
- End If
+ If CveIE > 0 Then
+ If ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) Then
+ GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"})
+ End If
+ End If
+ End If
ObjBancos.Dispose()
GvComplementoPagos.DataBind()
UpComplementoPagos.Update()
- 'If ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) Then
- ' GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"})
- 'End If
'ObjBancos.Dispose()
'GvComplementoPagos.DataBind()
@@ -5727,7 +5737,7 @@ Partial Class Bancos_IE
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DataKey("Tipo") = "Ing" Then
- e.Row.Cells(3).Text = String.Format("", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
+ e.Row.Cells(3).Text = String.Format("", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
e.Row.Cells(4).Text = String.Format("", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
If e.Row.DataKey("Estatus").Contiene("1", "3") Then
@@ -5738,7 +5748,7 @@ Partial Class Bancos_IE
ElseIf e.Row.DataKey("Tipo") = "Egs" Then
- e.Row.Cells(3).Text = String.Format("", Encripta(String.Format("OP=Fact&EXT=xml&CveFactura={0}&RFC={1}", e.Row.DBCampo("CveFactura"), e.Row.DBCampo(("RFCde").ToString.Replace("&", "%26%")))))
+ e.Row.Cells(3).Text = String.Format("", Encripta(String.Format("OP=Fact&EXT=xml&CveFactura={0}&RFC={1}", e.Row.DBCampo("CveFactura"), e.Row.DBCampo(("RFCde").ToString.Replace("&", "%26%")))))
e.Row.Cells(4).Text = String.Format("", Encripta(String.Format("OP=Fact&EXT=pdf&CveFactura={0}&RFC={1}", e.Row.DBCampo("CveFactura"), e.Row.DBCampo("RFCde").ToString.Replace("&", "%26%"))))
GvComplementoPagos.Columns(6).Visible = False
diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb
index 1336491e0..87c387537 100644
--- a/Bancos/PopIEVentas.aspx.vb
+++ b/Bancos/PopIEVentas.aspx.vb
@@ -596,14 +596,11 @@ Partial Class Bancos_PopIEVentas
End If
CargaTipoTransaccion(TipoTransaccion)
- CargaCuentas()
-
- 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()
-
+ CargaCuentas()
+
+
+
+
Dim dia As Integer = If(UsuarioActual.CveEmpresa = 13, Now.Day - 1, Now.Day)
Fecha = (dia.ToString + "/" + Now.Month.ToString + "/" + Now.Year.ToString).ToDate
@@ -726,7 +723,7 @@ Partial Class Bancos_PopIEVentas
CveMoneda = dr("CveMoneda").ToString.ToEntero
CveMonedaVenta = dr("CveMoneda").ToString.ToEntero
CveMonedaFiltros = dr("CveMoneda").ToString.ToEntero
- NombreCliente = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre", String.Format("CveCliente = {0}", CveCliente))
+ NombreCliente = dr("ClienteNombre").ToString '' GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre", String.Format("CveCliente = {0}", CveCliente))
SerieFolio = dr("SerieFolio").ToString
TipoCambioOriginal = dr("TipoCambio").ToString.ToDecimal
CveSubProyectoVenta = dr("CveSubProyecto").ToString.ToEntero
@@ -785,6 +782,14 @@ Partial Class Bancos_PopIEVentas
'Cortes de Caja
If UsuarioActual.TienePermisoProceso(160) Then
CargaCorteCaja()
+ 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
+ End If
+ ObjCompras.Dispose()
End If
If Not Validada Then
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index 398a7575e..435be40ab 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -946,7 +946,7 @@ Partial Class PopUpVerFactura
Dim ObjInv As New ClsGenerales
- If ObjInv.GetGralTimbre(CveTimbre, "-1", "-1", -1, MinFecha, MaxFecha, -1, UsuarioActual.CveEmpresa, -1, -1) Then
+ If ObjInv.GetGralTimbre(CveTimbre, "-1", "-1", -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
diff --git a/Compras/RepProductosServicios.aspx b/Compras/RepProductosServicios.aspx
index ae60b1db0..e9a1bf7d1 100644
--- a/Compras/RepProductosServicios.aspx
+++ b/Compras/RepProductosServicios.aspx
@@ -262,7 +262,7 @@
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb
index 94b4ba3ab..ef1112da5 100644
--- a/Ventas/Clientes.aspx.vb
+++ b/Ventas/Clientes.aspx.vb
@@ -911,6 +911,8 @@ Partial Class Clientes
End If
LtlTareaNueva.Text = String.Format(" Tarea", CveCliente)
+
+ MostrarTxtDireccionesClienteEnvio()
End If
'EN SERIO SE OCUPA EN CADA POSTBACK ??? IPP 7 SEPTIEMNRE 2017
@@ -921,6 +923,16 @@ Partial Class Clientes
End Sub
#Region " PERMISOS PAGINAS "
+
+ Private Sub MostrarTxtDireccionesClienteEnvio()
+
+ If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
+ DVDireccionCliente1.Visible = True
+ DVDireccionCliente2.Visible = True
+ End If
+
+ End Sub
+
Private Function PermiteGuardar() As Boolean
Return UsuarioActual.TienePermisoProceso(192)
End Function