PV.aspx Correcion al eliminar/actualizar recepcion de usados
This commit is contained in:
@@ -2009,8 +2009,8 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If TmpDTRecepcionUsados IsNot Nothing Then
|
If TmpDTRecepcionUsados IsNot Nothing Then
|
||||||
If TmpDTRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then
|
If TmpDTRecepcionUsados.Select($"ConsecUsado={Row("Consec").ToString.ToEntero} AND CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then
|
||||||
Dim rowInv As DataRow = TmpDTRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}")(0)
|
Dim rowInv As DataRow = TmpDTRecepcionUsados.Select($"ConsecUsado={Row("Consec").ToString.ToEntero} AND CvePS={Row("CvePS").ToString.ToEntero}")(0)
|
||||||
rowInv("CveVentaDetalle") = CveVentaDetalle
|
rowInv("CveVentaDetalle") = CveVentaDetalle
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -7858,11 +7858,15 @@ Partial Class PV
|
|||||||
If TmpDTRecepcionUsados.Rows.Count > 0 Then
|
If TmpDTRecepcionUsados.Rows.Count > 0 Then
|
||||||
Dim Elimino As Boolean = False
|
Dim Elimino As Boolean = False
|
||||||
For Each Row As DataRow In TmpDTRecepcionUsados.Rows
|
For Each Row As DataRow In TmpDTRecepcionUsados.Rows
|
||||||
If Row("CvePSRelacionado").ToString().ToEntero() = CvePS Then
|
If Row("CvePSRelacionado").ToString().ToEntero() = CvePS AndAlso
|
||||||
|
Row("ConsecUsado").ToString().ToEntero() = ListaPSCargo.FirstOrDefault().ConsecutivoUsado AndAlso
|
||||||
|
Row("ConsecRelacionado").ToString().ToEntero() = ListaPSCargo.FirstOrDefault().Consecutivo Then
|
||||||
|
|
||||||
Row.Delete()
|
Row.Delete()
|
||||||
Elimino = True
|
Elimino = True
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If Elimino Then
|
If Elimino Then
|
||||||
TmpDTRecepcionUsados.AcceptChanges()
|
TmpDTRecepcionUsados.AcceptChanges()
|
||||||
End If
|
End If
|
||||||
@@ -8179,7 +8183,7 @@ Partial Class PV
|
|||||||
'ELIMINAR LOS USADOS QUE SE MANDAN A RECEPCION
|
'ELIMINAR LOS USADOS QUE SE MANDAN A RECEPCION
|
||||||
For Each drow As DataRow In TmpDT.Select($"Consec ={Consec}")
|
For Each drow As DataRow In TmpDT.Select($"Consec ={Consec}")
|
||||||
For Each RowRecepcionUsados As DataRow In TmpDTRecepcionUsados.Rows
|
For Each RowRecepcionUsados As DataRow In TmpDTRecepcionUsados.Rows
|
||||||
If (RowRecepcionUsados("CvePSRelacionado").ToString() = drow("CvePS").ToString()) Then
|
If (RowRecepcionUsados("CvePSRelacionado").ToString() = drow("CvePS").ToString()) AndAlso RowRecepcionUsados("ConsecRelacionado").ToString() = drow("Consec").ToString() Then
|
||||||
RowRecepcionUsados.Delete()
|
RowRecepcionUsados.Delete()
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|||||||
Reference in New Issue
Block a user