diff --git a/Inventarios/EntregaAlmacenRuta.aspx b/Inventarios/EntregaAlmacenRuta.aspx
index 58152aa09..4cf98b423 100644
--- a/Inventarios/EntregaAlmacenRuta.aspx
+++ b/Inventarios/EntregaAlmacenRuta.aspx
@@ -326,13 +326,13 @@
diff --git a/Inventarios/EntregaAlmacenRuta.aspx.cs b/Inventarios/EntregaAlmacenRuta.aspx.cs
index 5d62f7b4b..9a9c5cd0a 100644
--- a/Inventarios/EntregaAlmacenRuta.aspx.cs
+++ b/Inventarios/EntregaAlmacenRuta.aspx.cs
@@ -379,11 +379,10 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
}
}
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
- CargaDatos();
+ CargaDatosRecoleccion();
DdlChofer.SelectedValueExist("-1");
DdlUnidadCamion.SelectedValueExist("-1");
- ChkEmitirCartaPorte.Checked = false;
-
+
SeleccionEntrega = false;
SeleccionarGenerar(1);
UpDatos.Update();
@@ -437,6 +436,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
TxtFechaEntrega.Text = DateTime.Now.ToShortDateString();
TabRecoleccion.Visible = UsuarioActual.Empresa.Funcionalidad(531)=="1";
+ TxtFechaLimite.Text = DateTime.Now.ToShortDateString();
CargarCentrosDeCosto(null, DdlSubProyecto, null, LblSubProyecto);
CargarCentrosDeCosto(null, DdlSubProyectoRecoleccion, null, LblSubProyectoRecoleccion);
@@ -704,7 +704,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
ClsClientes ObjClientes = new ClsClientes();
if (ObjClientes.DireccionEnvioGet(-1, DdlModalRecoleccionCliente.SelectedValue.ToEntero(), -1))
{
- DdlmodalRecoleccionDireccion.DataSource = ObjClientes.DtResultados;
+ DdlmodalRecoleccionDireccion.DataSource = ObjClientes.DtResultados.FiltraParametros("CveSubProyecto = " + DdlSubProyectoRecoleccion.SelectedValue.ToEntero());
}
ObjClientes.Dispose();
}
@@ -816,7 +816,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
if( CveEntregaAlmacen == -1)
{
DateTime fechallegada = (TxtFechaEntrega.Text + " 23:59").ToDate();
- CveEntregaAlmacen = ObjGenerales.AddInvEntregaAlmacenRuta(DdlSubProyectoRecoleccion.SelectedValue.ToEntero(), DdlmodalRecoleccionDireccion.SelectedValue.ToEntero(), -1,-1, DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada, "R",TxtFolioReferencia.Text, TxtReferencia.Text, TxtFechaLimite.Text.ToDate(), 1,0,1) ;
+ CveEntregaAlmacen = ObjGenerales.AddInvEntregaAlmacenRuta(DdlSubProyectoRecoleccion.SelectedValue.ToEntero(), DdlmodalRecoleccionDireccion.SelectedValue.ToEntero(), -1,-1, DdlChoferRec.SelectedValue.ToEntero(), DdlUnidadRec.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada, "R",TxtFolioReferencia.Text, TxtReferencia.Text, TxtFechaLimite.Text.ToDate(), 1,0,1) ;
if (CveEntregaAlmacen > 0)
{
//CveTimbrenuevo = ObjGenerales.AddGralTimbre("Rec", "-1", -1, "-1", TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, -1, ChkEmitirCartaPorte.Checked, CveEntregaAlmacen, -1);
@@ -1027,4 +1027,26 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
}
+
+ protected void gvR_RowDataBound(object sender, GridViewRowEventArgs e)
+ {
+ if (e.Row.RowType == DataControlRowType.DataRow)
+ {
+ LinkButton LnkEditar = e.Row.FCLinkButton("LnkGvDatosRecoleccionEditar");
+ LinkButton LnkEliminar = e.Row.FCLinkButton("LnkGvDatosRecoleccionEliminar");
+
+ if (e.Row.DataKey("Estatus") == "0" || e.Row.DataKey("Estatus") == "")
+ {
+ LnkEditar.Visible = true;
+ LnkEliminar.Visible = true;
+
+ }
+ if (e.Row.DataKey("CveTimbre") != "")
+ {
+ e.Row.FCCheckBox("Chk").Visible = false;
+ }
+
+
+ }
+ }
}
\ No newline at end of file
diff --git a/Inventarios/RepEntregaAlmacenRuta.aspx.cs b/Inventarios/RepEntregaAlmacenRuta.aspx.cs
index 4128e72cc..97a5503f1 100644
--- a/Inventarios/RepEntregaAlmacenRuta.aspx.cs
+++ b/Inventarios/RepEntregaAlmacenRuta.aspx.cs
@@ -514,6 +514,8 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
int CvePACCancelacion = GvRow.DataKey("CvePAC").ToEntero();
int CveSubProyecto = GvRow.DataKey("CveSubProyecto").ToEntero();
int CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero();
+ string TimbreTipoDocto = GvRow.DataKey("TimbreTipoDocto").ToString();
+
Timbrado ObjCancelacion = new Timbrado();
ClsGenerales ObjGenerales = new ClsGenerales();
@@ -534,10 +536,10 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
if (ObjGenerales.CancelarTimbreTimbrado(CveTimbre, DateTime.Now, CvePACCancelacion, ObjCancelacion.CancelacionAcuse, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{
//regenero el tmbre
- CveTimbre = ObjGenerales.AddGralTimbre("Tra", CveSubProyecto, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen : CveEntregaAlmacen, AplicaCP: true);
-
-
-
+ if (TimbreTipoDocto == "Tra")
+ {
+ CveTimbre = ObjGenerales.AddGralTimbre("Tra", CveSubProyecto, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen: CveEntregaAlmacen, AplicaCP: true);
+ }
ProcesoOK = true;
}
}