Generar NC En Clientes abonar
This commit is contained in:
@@ -13638,19 +13638,32 @@ Partial Class Compras_Compras
|
||||
End Sub
|
||||
|
||||
Private Sub VinculaDevolucion()
|
||||
'Borramos el TmpDT
|
||||
TmpDT.Clear()
|
||||
'LIMPIAR PARTIDAS DE LA COMPRA PARA AGREGAR NUEVAS
|
||||
TmpDT.Clear()
|
||||
|
||||
Dim SubTotalCompra As Decimal = TxtSubTotal.Text.ToDecimal()
|
||||
Dim TotalCompra As Decimal = TxtTotal.Text.ToDecimal()
|
||||
Dim IVACompra As Decimal = TxtIVA.Text.ToDecimal()
|
||||
Dim IEPSCompra As Decimal = TxtIEPS.Text.ToDecimal()
|
||||
Dim RetIVACompra As Decimal = TxtRetIVA.Text.ToDecimal()
|
||||
Dim RetISRCompra As Decimal = TxtRetISR.Text.ToDecimal()
|
||||
|
||||
'Dim TotalCalculable As Decimal = TotalCompra - IEPSCompra + RetIVACompra + RetISRCompra
|
||||
|
||||
Dim IVAPorcentajeCompra As Decimal = Math.Round((IVACompra / SubTotalCompra), 2)
|
||||
|
||||
'Iteramos el GridView de la OC
|
||||
For Each gvr As GridViewRow In GVDevolucion.Rows
|
||||
If gvr.FCTextBox("TxtCantidad").Text.ToDecimal > 0 Then
|
||||
|
||||
If gvr.FCTextBox("TxtCantidad").Text.ToDecimal > 0 Then
|
||||
|
||||
Dim CvePS As Integer = gvr.DataKey("CvePS").ToString.ToEntero
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).Rows(0)
|
||||
|
||||
Dim Cantidad As Decimal = gvr.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
Dim CveUM As Integer = gvr.DataKey("CveUM").ToString.ToEntero
|
||||
Dim UM As String = gvr.DataKey("UM").ToString
|
||||
Dim CveClasificacion As Integer = gvr.DataKey("CveClasificacion").ToString.ToEntero
|
||||
Dim Clasificacion As String = gvr.DataKey("Clasificacion").ToString
|
||||
Dim CvePS As Integer = gvr.DataKey("CvePS").ToString.ToEntero
|
||||
Dim PS As String = gvr.DataKey("PS").ToString
|
||||
Dim CveTipoPS As Integer = gvr.DataKey("CveTipoPS").ToString.ToEntero
|
||||
Dim CveSubProyectoContrato As String = "-1"
|
||||
@@ -13660,7 +13673,7 @@ Partial Class Compras_Compras
|
||||
Dim Obs As String = ""
|
||||
Dim PU As Decimal = gvr.DataKey("PU").ToString.ToDecimal
|
||||
Dim Total As Decimal = gvr.FCTextBox("TxtTotalDevolucion").Text.ToDecimal
|
||||
Dim IVA As Decimal = 0
|
||||
Dim IVA As Decimal = IVAPorcentajeCompra 'Math.Round(Total * IVAPorcentajeCompra, 2)
|
||||
Dim Descuento As Decimal = 0
|
||||
|
||||
AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, 0, 0, 0, 0, Descuento, -1, False)
|
||||
@@ -17531,15 +17544,17 @@ Partial Class Compras_Compras
|
||||
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("Obs") = TxtPSAlias.Text.Trim
|
||||
|
||||
'busco si el producto está en otros renglones QUE NO LO TENGAN ASIGNADO, LO VINCULE
|
||||
For Each drt As DataRow In TmpDT.Select($"PS ='{TxtPSAlias.Text.Trim}' and ISNULL(CvePS,0) = 0")
|
||||
drt("CvePS") = CvePS
|
||||
drt("PS") = tPS
|
||||
drt("CveUM") = DdlUnidadAlias.SelectedValue.ToEntero
|
||||
drt("UM") = DdlUnidadAlias.SelectedItem.Text
|
||||
drt("CveClasificacion") = HdnPSAliasCveClasificacion.Value.ToEntero
|
||||
drt("Clasificacion") = HdnPSAliasClasificacion.Value
|
||||
drt("Obs") = TxtPSAlias.Text.Trim
|
||||
Next
|
||||
If UsuarioActual.CveEmpresa <> 141 Then
|
||||
For Each drt As DataRow In TmpDT.Select($"PS ='{TxtPSAlias.Text.Trim}' and ISNULL(CvePS,0) = 0")
|
||||
drt("CvePS") = CvePS
|
||||
drt("PS") = tPS
|
||||
drt("CveUM") = DdlUnidadAlias.SelectedValue.ToEntero
|
||||
drt("UM") = DdlUnidadAlias.SelectedItem.Text
|
||||
drt("CveClasificacion") = HdnPSAliasCveClasificacion.Value.ToEntero
|
||||
drt("Clasificacion") = HdnPSAliasClasificacion.Value
|
||||
drt("Obs") = TxtPSAlias.Text.Trim
|
||||
Next
|
||||
End If
|
||||
|
||||
TmpDT.AcceptChanges()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user