diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 6649955fd..3f019b83f 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -3770,7 +3770,8 @@ Public Class ClsGenerales End Function - 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, Orden As Integer, Estatus As Integer, Distancia 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") @@ -3784,6 +3785,9 @@ Public Class ClsGenerales .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 @@ -3826,6 +3830,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/Timbres.vb b/App_Code/Timbres.vb index 028c32892..a8263dfde 100644 --- a/App_Code/Timbres.vb +++ b/App_Code/Timbres.vb @@ -159,23 +159,23 @@ Public Class Timbres ObjFactura.SetSubProyecto() ObjFactura.SetSubProyectoMatriz() - If AplicaCP Then + 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 + 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, + 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, @@ -183,10 +183,10 @@ Public Class Timbres .Municipio = drT("DIrOriClaveSATMunicipio").ToString, .Localidad = drT("DirOriClaveSATLocalidad").ToString} - Dim DomDestino As CFDICartaPorteDomicilio = Nothing + Dim DomDestino As CFDICartaPorteDomicilio = Nothing - DomDestino = New CFDICartaPorteDomicilio With {.Calle = drT("DirDesCalle").ToString, + DomDestino = New CFDICartaPorteDomicilio With {.Calle = drT("DirDesCalle").ToString, .Colonia = drT("DirDesClaveSATColonia").ToString, .CP = drT("DirDesCP").ToString, .Estado = drT("DirDesClaveSATEstado").ToString, @@ -195,23 +195,23 @@ Public Class Timbres .Localidad = drT("DirDesClaveSATLocalidad").ToString} - Dim Ubica As New CFDICartaPorteUbicacion - Ubica.TipoEstacion = "" - Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Origen", .IDUbicacion = "OR000001", .RFCRemitenteDestinatario = UsuarioActual.Empresa.RFC,'UsuarioActual.Empresa.RFC, + 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 = UsuarioActual.Empresa.Empresa, + .NombreRemitenteDestinatario = drT("RemitenteNombre").ToString, .Domicilio = DomOrigen} - CartaPorte.Ubicaciones.Add(Ubica) - Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Destino", .IDUbicacion = "DE000001", .RFCRemitenteDestinatario = drT("DestinatarioRFC").ToString, + 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" + CartaPorte.Ubicaciones.Add(Ubica) + CartaPorte.FiguraTransporte.ClaveTransporte = "01" - Dim DomicilioOperador As New CFDICartaPorteDomicilio With {.Calle = drT("FiguraDomicilio").ToString, + Dim DomicilioOperador As New CFDICartaPorteDomicilio With {.Calle = drT("FiguraDomicilio").ToString, .NumeroExterior = drT("FiguraNumeroExterior").ToString, .NumeroInterior = drT("FiguraNumeroInterior").ToString, .Colonia = drT("FiguraClaveSATColonia").ToString, @@ -221,7 +221,7 @@ Public Class Timbres - CartaPorte.FiguraTransporte.Operadores.Add(New CFDICartaPorteOperador With { + CartaPorte.FiguraTransporte.Operadores.Add(New CFDICartaPorteOperador With { .RFCFigura = drT("FiguraRFC").ToString, .NombreFigura = drT("FiguraChofer").ToString, .NumLicencia = drT("FiguraLicencia").ToString, @@ -230,8 +230,8 @@ Public Class Timbres .Domicilio = DomicilioOperador}) - 'concepto único - Dim concepto As New CFDIConceptos With {.Cantidad = 1, + 'concepto único + Dim concepto As New CFDIConceptos With {.Cantidad = 1, .Descripcion = "Flete", .ValorUnitario = 0, .Importe = 0, @@ -242,20 +242,20 @@ Public Class Timbres .Noidentificacion = "", .CuentaPredial = ""} - Timbre.Conceptos.Add(concepto) + Timbre.Conceptos.Add(concepto) - For Each drr As DataRow In Obj.DtDetalle.Rows + For Each drr As DataRow In Obj.DtDetalle.Rows - If drr("PS").ToString.Length = 1 Then - tPS = drr("Obs").ToString + If drr("PS").ToString.Length = 1 Then + tPS = drr("Obs").ToString + Else + If drr("PS").ToString.Length = 0 Then + tPS = "" Else - If drr("PS").ToString.Length = 0 Then - tPS = "" - Else - tPS = String.Format("{0} {1}", drr("PS"), drr("Obs")) - End If + tPS = String.Format("{0} {1}", drr("PS"), drr("Obs")) End If - Dim conceptoCarta As New CFDICartaPorteMercancia With { + End If + Dim conceptoCarta As New CFDICartaPorteMercancia With { .BienesTransp = drr("SATClaveProdServ").ToString, .ClaveSTCC = "", 'para metodo ferroviario .Cantidad = drr("Cantidad").ToString.ToDecimal, @@ -274,62 +274,62 @@ Public Class Timbres .UUIDComercioExt = "" } - Dim DetalleMercancia As New CFDICartaPorteMercanciaDetalleMercancia With {.PesoNeto = drr("PesoKg").ToString.ToDecimal} - conceptoCarta.DetalleMercancia = DetalleMercancia + 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) + 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 - CartaPorte.Mercancias.Mercancias.Add(conceptoCarta) + Timbre.Conceptos.Add(concepto) 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 = drr("CuentaPredial").ToString} - '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 - - 'SIEMPRE ESTAMOS AGREGANDO EL IVA - 'concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal}) - - Timbre.Conceptos.Add(concepto) - i += 1 - Next - End If + TieneError = True + _MsgError.AppendLine("timbrado son detalle de productos") + End If End If diff --git a/Inventarios/EntregaAlmacenRuta.aspx b/Inventarios/EntregaAlmacenRuta.aspx index e356f8e91..85f2ffb50 100644 --- a/Inventarios/EntregaAlmacenRuta.aspx +++ b/Inventarios/EntregaAlmacenRuta.aspx @@ -170,7 +170,7 @@ - - Recoleccion + +
+ +
+ + + + + + +
+ +
+ + + + + +
+ +
+
+ + + + + + + + + + +
+
+
+ + + +
+
+
+ Recoleccion + + +
@@ -314,7 +357,12 @@ <%----%> -   +   + + + + +   @@ -441,6 +489,44 @@
+
+
+ + +
+
+ + + + +
+ + + + + + + +
+
+
+ + +
+
+
+ + + +
+
+
+
+ + + +
+
diff --git a/Inventarios/EntregaAlmacenRuta.aspx.cs b/Inventarios/EntregaAlmacenRuta.aspx.cs index f1f8567ac..8cb0d13db 100644 --- a/Inventarios/EntregaAlmacenRuta.aspx.cs +++ b/Inventarios/EntregaAlmacenRuta.aspx.cs @@ -155,7 +155,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas break; } DateTime fechallegada = (TxtFechaEntrega.Text + " 23:59").ToDate(); - int CveEntregaAlmacen = ObjGeneral.AddInvEntregaAlmacenRuta(row.DataKey("CveSubProyectoOrigen").ToEntero(), CveDireccionOrigen, CveDireccionDestino, row.DataKey("CveMovimiento").ToEntero(), DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada, "E",Orden,0,1); + int CveEntregaAlmacen = ObjGeneral.AddInvEntregaAlmacenRuta(row.DataKey("CveSubProyectoOrigen").ToEntero(), CveDireccionOrigen, CveDireccionDestino, row.DataKey("CveMovimiento").ToEntero(), DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada, "E", "","", "1900-01-01".ToDate(), Orden,0, 1); CveDireccionOrigen = row.DataKey("CveDireccionEnvio").ToEntero(); if (CveEntregaAlmacen > 0) @@ -249,13 +249,13 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas { - if (DdlChofer.SelectedValue.ToEntero() <= 0) + if (DdlChoferRec.SelectedValue.ToEntero() <= 0) { Alert("Debe seleccionar un chofer.", ModExtensiones.TipoMensaje.MsgAdvertencia); return; } - if (DdlUnidadCamion.SelectedValue.ToEntero() <= 0) + if (DdlUnidadRec.SelectedValue.ToEntero() <= 0) { Alert("Debe seleccionar una unidad", ModExtensiones.TipoMensaje.MsgAdvertencia); return; @@ -284,22 +284,32 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas if (CveEntregaAlmacen > 0) { - int CveTimbre = ObjGeneral.AddGralTimbre("Rec", row.DataKey("CveSubProyecto").ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen:CveEntregaAlmacen , AplicaCP: ChkEmitirCartaPorte.Checked); - - if (CveTimbre <= 0) + // se actualizan los datos de unidad, chofer, fechas y Carta porte + if (ObjGeneral.AsignaEntregaAlmacenRuta(DdlUnidadRec.SelectedValue.ToEntero(), DdlChoferRec.SelectedValue.ToEntero(), TxtFechaRec.Text.ToDate(), CveEntregaAlmacen, UsuarioActual.CveEmpresa)) { - SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al agregar timbre. "); - TieneError = true; - break; + int CveTimbre = ObjGeneral.AddGralTimbre("Rec", row.DataKey("CveSubProyecto").ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen: CveEntregaAlmacen, AplicaCP: ChkEmitirPorteRec.Checked); + + if (CveTimbre <= 0) + { + SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al agregar timbre. "); + TieneError = true; + break; + } + else + { + ListaTimbres.Add(CveTimbre); + } } else { - ListaTimbres.Add(CveTimbre); + SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al aplicar condiciones de entrega. "); + TieneError = true; + break; } } else { - SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al agregar entrega alamcen. "); + SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al agregar entrega almacen. "); TieneError = true; break; } @@ -405,10 +415,12 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas private void CargaCombos() { - DdlUnidadCamion.DataSource = get_GlobalDTInvCamiones(UsuarioActual.CveEmpresa); - + DdlUnidadCamion.DataSource = get_GlobalDTInvCamiones(UsuarioActual.CveEmpresa); DdlUnidadCamion.Items.Insert(0, new ListItem("Seleccione", "-1")); DdlUnidadCamion.DataBind(); + DdlUnidadRec.DataSource = get_GlobalDTInvCamiones(UsuarioActual.CveEmpresa); + DdlUnidadRec.Items.Insert(0, new ListItem("Seleccione", "-1")); + DdlUnidadRec.DataBind(); TxtFechaI.Text = DateTime.Now.AddDays(-1).ToShortDateString(); TxtFechaF.Text = DateTime.Now.ToShortDateString(); @@ -416,6 +428,9 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas DdlChofer.DataSource = get_GlobalDTChoferes(UsuarioActual.CveEmpresa); DdlChofer.DataBind(); DdlChofer.Items.Insert(0, new ListItem("Seleccione", "-1")); + DdlChoferRec.DataSource = get_GlobalDTChoferes(UsuarioActual.CveEmpresa); + DdlChoferRec.DataBind(); + DdlChoferRec.Items.Insert(0, new ListItem("Seleccione", "-1")); TxtFechaEntrega.Text = DateTime.Now.ToShortDateString(); @@ -799,7 +814,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", 1,0,1); + 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) ; if (CveEntregaAlmacen > 0) { //CveTimbrenuevo = ObjGenerales.AddGralTimbre("Rec", "-1", -1, "-1", TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, -1, ChkEmitirCartaPorte.Checked, CveEntregaAlmacen, -1);