carta porte

This commit is contained in:
2021-12-24 07:13:36 -07:00
parent dd7a15c636
commit 9cc73f258c
6 changed files with 50 additions and 28 deletions

View File

@@ -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