Correcion de usados
This commit is contained in:
@@ -2560,11 +2560,12 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Case "0" ' USADOS
|
||||
CvePS = Row.DataKey("CvePS").ToEntero()
|
||||
Case "1" ' AJUSTE/GARANTIA
|
||||
Dim drDatos As DataRow = GlobalDTAcumTamaños().FiltroPrimero(String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa))
|
||||
CvePS = Row.DataKey("CvePS").ToEntero()
|
||||
'Dim drDatos As DataRow = GlobalDTAcumTamaños().FiltroPrimero(String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa))
|
||||
|
||||
If drDatos IsNot Nothing Then
|
||||
CvePS = drDatos.Item("CvePSCargo").ToString.ToEntero
|
||||
End If
|
||||
'If drDatos IsNot Nothing Then
|
||||
' CvePS = drDatos.Item("CvePSCargo").ToString.ToEntero
|
||||
'End If
|
||||
End Select
|
||||
|
||||
If CvePS > 0 Then
|
||||
@@ -3104,28 +3105,37 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End If
|
||||
Dim drDatos As DataRow = GlobalDTAcumTamaños().FiltroPrimero(String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa))
|
||||
|
||||
Dim Importe As Decimal = 0
|
||||
Dim drTamañoPS As DataRow = Nothing
|
||||
|
||||
DtMovimientos.Rows.Clear()
|
||||
|
||||
' USADOS
|
||||
If drDatos IsNot Nothing Then
|
||||
Dim Importe As Decimal = drDatos("Cargo").ToString.ToDecimal
|
||||
Dim drTamañoPS As DataRow = Nothing
|
||||
If RblUsadosAjuste.SelectedValue = "0" Then
|
||||
CvePS = drDatos.Item("CvePSCargo").ToString.ToEntero
|
||||
End If
|
||||
Importe = drDatos("Cargo").ToString.ToDecimal
|
||||
Else
|
||||
Importe = TxtImporteAjuste.Text.ToDecimal
|
||||
End If
|
||||
|
||||
DtMovimientos.Rows.Clear()
|
||||
|
||||
Select Case RblUsadosAjuste.SelectedValue
|
||||
Case "0" ' USADOS
|
||||
CvePS = drDatos.Item("CvePSCargo").ToString.ToEntero
|
||||
Case "1" ' AJUSTE/GARANTIA
|
||||
CvePS = DdlPSAjuste.SelectedValue.ToEntero
|
||||
End Select
|
||||
'AJUSTE/GARANTIA
|
||||
If RblUsadosAjuste.SelectedValue = "1" Then
|
||||
CvePS = DdlPSAjuste.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
If CvePS > 0 Then
|
||||
If ObjPS.GetPS(CvePS, -1, UsuarioActual.CveEmpresa) Then
|
||||
drTamañoPS = ObjPS.DtResultados.FiltroPrimero("")
|
||||
'CveTamaño = -1 'limpio esta variable para que no se registre dos veces en la clase Modelos
|
||||
AddNew(drTamañoPS.Item("CvePS").ToString.ToEntero, drTamañoPS.Item("PSCodigo").ToString, drTamañoPS.Item("CveUM").ToString.ToEntero, drTamañoPS.Item("UnidadMedida").ToString, 1.0, Importe,
|
||||
"", "-1", "-1", "-1", "", "", -1, "", "", CveTamaño)
|
||||
"", "-1", "-1", "-1", "", "", -1, "", "", CveTamaño)
|
||||
End If
|
||||
Else
|
||||
Alert("No se pudo cargar el producto", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar el producto", ex)
|
||||
End Try
|
||||
|
||||
Reference in New Issue
Block a user