-- activar poder desaplicar "pago deudor diverso"
This commit is contained in:
@@ -219,6 +219,12 @@ Partial Class PopUpAuxiliar
|
|||||||
Else
|
Else
|
||||||
e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}|{3}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompraAmortizacion"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveIE"))
|
e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}|{3}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompraAmortizacion"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveIE"))
|
||||||
End If
|
End If
|
||||||
|
ElseIf e.Row.DBCampo("CveConceptoContable").Contiene("37") Then 'desaplicar Deudores Diversos- Compra
|
||||||
|
|
||||||
|
e.Row.FCLinkButton("LnkDesAplicar").Visible = True
|
||||||
|
e.Row.FCLinkButton("LnkDesAplicar").CommandName = "DesAplicarDeudorDiversoCompra"
|
||||||
|
e.Row.FCLinkButton("imgD").Visible = False
|
||||||
|
e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveIE"))
|
||||||
|
|
||||||
ElseIf e.Row.DBCampo("CveConceptoContable").Contiene("21") Then 'desaplicar anticipo de compra
|
ElseIf e.Row.DBCampo("CveConceptoContable").Contiene("21") Then 'desaplicar anticipo de compra
|
||||||
|
|
||||||
@@ -552,5 +558,40 @@ Partial Class PopUpAuxiliar
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If e.CommandName = "DesAplicarDeudorDiversoCompra" Then
|
||||||
|
|
||||||
|
Dim CvePrePoliza, CveCompra, CveIE As Integer
|
||||||
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
|
Dim St As String() = e.CommandArgument.ToString.Split("|"c)
|
||||||
|
If St.Length > 0 Then
|
||||||
|
CvePrePoliza = St(0).ToEntero
|
||||||
|
CveCompra = St(1).ToEntero
|
||||||
|
CveIE = St(2).ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CvePrePoliza > 0 Then
|
||||||
|
Dim Conta As New ClsContabilidad()
|
||||||
|
Conta.IniciaTransacSQL()
|
||||||
|
|
||||||
|
If Not Conta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not TieneError AndAlso Not Conta.DesAplicarPago(CvePrePoliza, 37, CveCompra, CveIE) Then
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not TieneError Then
|
||||||
|
Conta.Commit()
|
||||||
|
Alert("Pago Desaplicado.", TipoMensaje.ToastInformacion)
|
||||||
|
Else
|
||||||
|
Conta.RollBack()
|
||||||
|
Alert("Pago no fue desaplicado.", TipoMensaje.ToastError)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user