- cambios en refacturación , que el pago sobre la nueva factura se utilice el pagoprepolizascompra
This commit is contained in:
@@ -10,7 +10,6 @@ Imports System.Threading.Tasks
|
|||||||
Imports Newtonsoft.Json
|
Imports Newtonsoft.Json
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports MoreLinq
|
Imports MoreLinq
|
||||||
Imports ClbNegBICFDv3_3
|
|
||||||
|
|
||||||
Partial Class Compras_Compras
|
Partial Class Compras_Compras
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -7035,7 +7034,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
'EMPIEZA REFACTURACION
|
'EMPIEZA REFACTURACION
|
||||||
If Not ErrorPrepoliza AndAlso CveCompraRefacturacion > 0 Then
|
If Not ErrorPrepoliza AndAlso CveCompraRefacturacion > 0 Then
|
||||||
ErrorBitacora = GuardaRefacturacion(ObjCompras, ObjEventos, CvePrePoliza)
|
ErrorBitacora = GuardaRefacturacion(ObjCompras, ObjEventos, CvePrePoliza, ObjConta, CompraActual)
|
||||||
If ErrorBitacora Then
|
If ErrorBitacora Then
|
||||||
Alert("Ocurrió un error al hacer la Refacturación", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al hacer la Refacturación", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
@@ -13098,7 +13097,7 @@ Partial Class Compras_Compras
|
|||||||
RegistraScript(String.Format("$('#{0}').modal('hide')", DivRefacturacion.ClientID))
|
RegistraScript(String.Format("$('#{0}').modal('hide')", DivRefacturacion.ClientID))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function GuardaRefacturacion(ByRef ObjCompra As ClsCompras, ByRef ObjEventos As ClsOIEventos, CvePrePoliza As Integer) As Boolean
|
Private Function GuardaRefacturacion(ByRef ObjCompra As ClsCompras, ByRef ObjEventos As ClsOIEventos, CvePrePoliza As Integer, ByRef ObjConta As ClsContabilidad, ByRef CompraActual As Compra) As Boolean
|
||||||
Dim dr As DataRow = Nothing
|
Dim dr As DataRow = Nothing
|
||||||
Dim ErrorBitacora As Boolean = False
|
Dim ErrorBitacora As Boolean = False
|
||||||
Dim IdPolizaAnterior As Integer = -1
|
Dim IdPolizaAnterior As Integer = -1
|
||||||
@@ -13118,8 +13117,28 @@ Partial Class Compras_Compras
|
|||||||
If ChkRefacNC.Checked Then Tipo = 2
|
If ChkRefacNC.Checked Then Tipo = 2
|
||||||
|
|
||||||
'CONTABILIZA REFACTURACION
|
'CONTABILIZA REFACTURACION
|
||||||
If Not ObjCompra.Refacturacion(CveCompraRefacturacion, CveCompra, UsuarioActual.CveEmpresa, Tipo) Then
|
If ObjCompra.Refacturacion(CveCompraRefacturacion, CveCompra, UsuarioActual.CveEmpresa, Tipo) Then
|
||||||
|
Dim dttpagos As DataTable
|
||||||
|
If ObjCompra.GetComprasPagos(CveCompraRefacturacion, UsuarioActual.CveEmpresa) Then
|
||||||
|
dttpagos = ObjCompra.DtResultados
|
||||||
|
|
||||||
|
For Each drp As DataRow In dttpagos.Rows
|
||||||
|
Dim Pago As New CompraPago
|
||||||
|
Pago.ImportePago = drp("ImporteMN").ToString.ToDecimal
|
||||||
|
Pago.CveIE = drp("CveIE").ToString.ToEntero
|
||||||
|
Pago.CveMonedaPago = 1
|
||||||
|
Pago.CveCompraAmortizacion = -1
|
||||||
|
Pago.TipoPago = If(drp("CveIE").ToString.ToEntero > 0, "B", "NC")
|
||||||
|
|
||||||
|
Dim ErrorMovtosCxP As Boolean = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||||
|
Next
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
ErrorBitacora = True
|
ErrorBitacora = True
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user