diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb
index 36a2814a5..e82343f8c 100644
--- a/App_Code/ClsGenerales.vb
+++ b/App_Code/ClsGenerales.vb
@@ -4012,7 +4012,7 @@ Public Class ClsGenerales
End Function
- Public Function GetInvEntregaAlmacenRutaRep(CveSubProyecto As Integer, CveEmpresa As Integer, Estatus As Integer, FechaInicio As Date, FechaFin As Date, CveChofer As Integer, Optional CveTimbre As Integer = -1) As Boolean
+ Public Function GetInvEntregaAlmacenRutaRep(CveSubProyecto As Integer, CveEmpresa As Integer, Estatus As Integer, FechaInicio As Date, FechaFin As Date, CveChofer As Integer, CveUsuario As Integer, Optional CveTimbre As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -4027,7 +4027,7 @@ Public Class ClsGenerales
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
.Add("@CveTimbre", SqlDbType.Int).Value = CveTimbre
-
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With
Try
diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index 2fcd6752f..fe1fe6f3f 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -2298,7 +2298,7 @@ Public Class ClsInventarios
Return Retorno
End Function
- Public Function GetInventarioFisico(CveInventarioFisico As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, Estado As Integer) As Boolean
+ Public Function GetInventarioFisico(CveInventarioFisico As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, Estado As Integer, CveUsuario As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_InventarioFisicoGet")
With SqlAdapter.SelectCommand.Parameters
@@ -2306,6 +2306,7 @@ Public Class ClsInventarios
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@Estado", SqlDbType.Int).Value = Estado
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With
Try
SqlAdapter.Fill(Data)
diff --git a/Inventarios/InventarioFisico.aspx.vb b/Inventarios/InventarioFisico.aspx.vb
index cffe5140e..4fe1da3d9 100644
--- a/Inventarios/InventarioFisico.aspx.vb
+++ b/Inventarios/InventarioFisico.aspx.vb
@@ -104,7 +104,7 @@ Partial Class Inventarios_InventarioFisico
Dim Inventario As New ClsInventarios
Dim dt As New DataTable
- If Inventario.GetInventarioFisico(-1, CveEmpresa, DdlFiltroSubProyecto.SelectedValue.ToEntero, DdlEstado.SelectedValue.ToEntero) Then
+ If Inventario.GetInventarioFisico(-1, CveEmpresa, DdlFiltroSubProyecto.SelectedValue.ToEntero, DdlEstado.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
dt = Inventario.DtResultados
End If
Inventario.Dispose()
diff --git a/Inventarios/RepEntregaAlmacenRuta.aspx b/Inventarios/RepEntregaAlmacenRuta.aspx
index 22b756e5f..99c34b4b8 100644
--- a/Inventarios/RepEntregaAlmacenRuta.aspx
+++ b/Inventarios/RepEntregaAlmacenRuta.aspx
@@ -99,7 +99,7 @@
" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info">
diff --git a/Inventarios/RepEntregaAlmacenRuta.aspx.cs b/Inventarios/RepEntregaAlmacenRuta.aspx.cs
index 1d2ff4eec..8a8337a05 100644
--- a/Inventarios/RepEntregaAlmacenRuta.aspx.cs
+++ b/Inventarios/RepEntregaAlmacenRuta.aspx.cs
@@ -512,9 +512,12 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
string RFCReceptor = GvRow.DataKey("RFCReceptor").ToString();
string RFCEmisor = GvRow.DataKey("RFCEmisor").ToString();
int CvePACCancelacion = GvRow.DataKey("CvePAC").ToEntero();
+ int CveSubProyecto = GvRow.DataKey("CveSubProyecto").ToEntero();
+ int CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero();
Timbrado ObjCancelacion = new Timbrado();
ClsGenerales ObjGenerales = new ClsGenerales();
+ ObjGenerales.IniciaTransacSQL ();
if (EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptor))
{
@@ -528,22 +531,27 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
if (ObjGenerales.CancelarTimbreTimbrado(CveTimbre, DateTime.Now, CvePACCancelacion, ObjCancelacion.CancelacionAcuse, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{
- Alert("El complemento se cancelo correctamente.");
+ //regenero el tmbre
+ CveTimbre = ObjGenerales.AddGralTimbre("Tra", CveSubProyecto, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen : CveEntregaAlmacen, AplicaCP: true);
+
+
+
ProcesoOK = true;
}
}
- else
- {
- Alert("Se presento un error al cancelar el Folio Fiscal", ModExtensiones.TipoMensaje.MsgAdvertencia);
- }
}
- ObjGenerales.Dispose();
-
if (ProcesoOK)
{
- CargaDatos();
+ ObjGenerales.Commit();
+ Alert("El complemento se cancelo correctamente.");
}
+ else
+ {
+ ObjGenerales.RollBack();
+ Alert("Se presento un error al cancelar el Folio Fiscal", ModExtensiones.TipoMensaje.MsgAdvertencia);
+ }
+ ObjGenerales.Dispose();
}
@@ -622,11 +630,11 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
LnkTimbrar.Visible = true;
}
- if (e.Row.DataKey("TimbreTipoDocto") == "Man")
- {
- e.Row.FCLinkButton("LnkEditarDirOrigen").Visible = true;
- e.Row.FCLinkButton("LnkEditarDirDestino").Visible = true;
- }
+ //if (e.Row.DataKey("TimbreTipoDocto") == "Man")
+ //{
+ // e.Row.FCLinkButton("LnkEditarDirOrigen").Visible = true;
+ // e.Row.FCLinkButton("LnkEditarDirDestino").Visible = true;
+ //}
if (e.Row.DataKey("Estatus").ToEntero() == 1)
{