diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index d6556f4de..fcae2a7bd 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -777,13 +777,14 @@ Partial Class Inventarios_EntradasSalidas If drM("CveEstatusTimbrado").ToString.ToEntero > 0 Then HplDescargaXml.Visible = True HplDescargaXml.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "XML", drM("TimbreSerieFolio"), "Tra"))) - HplDescargaPdf.Visible = True - HplDescargaPdf.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "PDF", drM("TimbreSerieFolio"), "Tra"))) If drM("AplicaCP").ToString = "True" Then HplCartaPorteTimbre.Visible = True - HplCartaPorteTimbre.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CARPOTIMBRE&CVEMOV={0}", CveMovimiento))) + HplCartaPorteTimbre.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CARPOTIMBRE&CVEMOV={0}&CVETIMBRE={1}", CveMovimiento, drM("CveTimbre")))) Else + HplDescargaPdf.Visible = True + HplDescargaPdf.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "PDF", drM("TimbreSerieFolio"), "Tra"))) + HplCartaPorte.Visible = True HplCartaPorte.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CARPO&CVEMOV={0}", CveMovimiento))) End If diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index a71cb65b7..8672666da 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -931,9 +931,15 @@ Partial Class Inventarios_EntregaAlmacen Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - If CBool(e.Row.DBCampo("AplicaSerie")) Then + 'código temporal + Dim AplicaSerie As Boolean = CBool(e.Row.DBCampo("AplicaSerie")) + If UsuarioActual.CveEmpresa = 140 AndAlso Not CveSubProyecto.Contiene(11793, 11993, 11794, 11795) Then + AplicaSerie = False + End If + + If AplicaSerie Then e.Row.FCButton("BtnSerie").Visible = True - e.Row.FCButton("BtnSerie").Text = If(e.Row.DBCampo("Inv_CveMetodoInventario").ToString() = "5", "Serie", "Lote-Batch") + e.Row.FCButton("BtnSerie").Text = "Serie" e.Row.FCButton("BtnSerie").CommandArgument = String.Format("{0}°{1}°{2}°{3}°{4}°{5}", e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveUM"), e.Row.DBCampo("PS"), e.Row.DBCampo("CantidadF"), e.Row.DBCampo("Consec"), e.Row.DBCampo("Inv_CveMetodoInventario")) e.Row.FCTextBox("TbCantidadF").Enabled = False e.Row.FCCheckBox("cbInv").Enabled = False @@ -1040,7 +1046,7 @@ Partial Class Inventarios_EntregaAlmacen e.Row.FCTextBox("TbCantidadF").Text = "0" 'NO BLOQUEA PARA ROL AD If UsuarioActual.CveRol = 1 Then - If e.Row.DBCampo("Inv_CveMetodoInventario").Contiene("5", "6") Then + If AplicaSerie Then e.Row.FCTextBox("TbCantidadF").Enabled = False Else e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").ToDecimal.ToString("#,##0.######") @@ -1094,18 +1100,20 @@ Partial Class Inventarios_EntregaAlmacen CveUMSerie = Argumentos(1).ToEntero() PSSerie = Argumentos(2).ToString() CveConsecSerie = Argumentos(4).ToEntero() - CveMetodoInventario = Argumentos(5).ToEntero() - - If CveMetodoInventario = 5 Then - RegistraScript("$('#DivSerie').modal('show')") - CargaSerie() - UpSerie.Update() - ElseIf CveMetodoInventario = 6 Then + CveMetodoInventario = Argumentos(5).ToEntero() + + + If CveMetodoInventario = 6 Then RegistraScript("$('#DivLote').modal('show')") - CargaLote() + CargaLote() UpLoteBatch.Update() - End If - + Else + RegistraScript("$('#DivSerie').modal('show')") + CargaSerie() + UpSerie.Update() + End If + + End Sub #Region " AGREGA POR SERIE/LOTE " @@ -1193,7 +1201,7 @@ Partial Class Inventarios_EntregaAlmacen 'SI TIENE SALIDA POR SERIE LOTE, BLOQUEAMOS CHECK Y TXTCANTIDAD Dim Contador = 0 For Each Gvr As GridViewRow In GvDatos.Rows - If Gvr.DataKey("AplicaSerieLote") = "True" Then + If Gvr.DataKey("AplicaSerie") = "True" Then Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count Gvr.FCCheckBox("cbInv").Enabled = False Gvr.FCCheckBox("cbInv").Checked = True @@ -2319,8 +2327,9 @@ Partial Class Inventarios_EntregaAlmacen Dim CveTamaño As Integer = RowGarantia("CveTamaño").ToString().ToEntero() Dim CveUM As Integer = RowGarantia("CveUnidadMedida").ToString().ToEntero() Dim PU As Decimal = RowGarantia("Importe").ToString().ToDecimal() ' / RowGarantia("Cantidad").ToString().ToDouble() + Dim Serie As String = RowGarantia("Comprobante").ToString - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoGarantia, RowGarantia("Cantidad").ToString().ToDouble(), CveUM, CvePS, PU) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoGarantia, RowGarantia("Cantidad").ToString().ToDouble(), CveUM, CvePS, PU, Serie:=Serie) Then ErrorMovInv = True TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.") Exit For diff --git a/Inventarios/EntregaAlmacenRuta.aspx b/Inventarios/EntregaAlmacenRuta.aspx index 85f2ffb50..a86fa953e 100644 --- a/Inventarios/EntregaAlmacenRuta.aspx +++ b/Inventarios/EntregaAlmacenRuta.aspx @@ -60,8 +60,8 @@
-
- +
+ @@ -76,8 +76,8 @@
-
- +
+ diff --git a/Inventarios/RepEntregaAlmacenRuta.aspx b/Inventarios/RepEntregaAlmacenRuta.aspx index 7fbf4c8e7..e3256bc77 100644 --- a/Inventarios/RepEntregaAlmacenRuta.aspx +++ b/Inventarios/RepEntregaAlmacenRuta.aspx @@ -44,7 +44,7 @@
-
+
@@ -60,7 +60,7 @@
-
+
diff --git a/Inventarios/RepEntregaAlmacenRuta.aspx.cs b/Inventarios/RepEntregaAlmacenRuta.aspx.cs index d36145e06..6f8694a6a 100644 --- a/Inventarios/RepEntregaAlmacenRuta.aspx.cs +++ b/Inventarios/RepEntregaAlmacenRuta.aspx.cs @@ -347,7 +347,9 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas else { MensajeAlert.AppendFormat("
  • {0}
", ObjTimbres.MsgError); + Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgError); } + } protected void LnkCancelaTimbre_Click(object sender, EventArgs e) diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index c4fab3d5a..a762fe860 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -1381,13 +1381,23 @@ Partial Class Inventarios_TraspasoAlmacen DdlSeccionAlmacen.Visible = CBool(drP("AplicaSeccion")) 'GvDatos.Columns(5).Visible = CBool(drP("AplicaSeccion")) + Dim AplicaSerie As Boolean = CBool(drP("AplicaSerie")) - ThSerie.Visible = CBool(drP("AplicaSerie")) - TdSerie.Visible = CBool(drP("AplicaSerie")) - TxtnSerie.Visible = CBool(drP("AplicaSerie")) + 'codigo temporal + If UsuarioActual.CveEmpresa = 140 Then + Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen = {DdlAlmacenOrigen.SelectedValue}").ToEntero + + If Not CveSubProyecto.Contiene(11793, 11993, 11794, 11795) Then + AplicaSerie = False + End If + + End If + + ThSerie.Visible = AplicaSerie + TdSerie.Visible = AplicaSerie + TxtnSerie.Visible = AplicaSerie 'GvDatos.Columns(6).Visible = CBool(drP("AplicaSerie")) - TxtnLote.Visible = CBool(drP("AplicaLote")) ThLote.Visible = CBool(drP("AplicaLote")) TdLote.Visible = CBool(drP("AplicaLote"))