eFacturas, mensajes vinculacion complemento
This commit is contained in:
@@ -2639,6 +2639,7 @@ Partial Class Compras_eFacturas
|
|||||||
Protected Sub LnkAgregarPago_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkAgregarPago_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim sbSinIE As New StringBuilder
|
Dim sbSinIE As New StringBuilder
|
||||||
|
Dim TieneCompras As Boolean = False
|
||||||
|
|
||||||
HdnCveIE.Value = ""
|
HdnCveIE.Value = ""
|
||||||
MSGComplemento = ""
|
MSGComplemento = ""
|
||||||
@@ -2841,6 +2842,15 @@ Partial Class Compras_eFacturas
|
|||||||
GVPDocumentosRelacionadosPagos.DataBind()
|
GVPDocumentosRelacionadosPagos.DataBind()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If DTDocumentosRelacionados.MAX("CveCompra").ToString.ToEntero > 0 Then
|
||||||
|
TieneCompras = True
|
||||||
|
Else
|
||||||
|
TieneCompras = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
For Each dRow2 As DataRow In DTDocumentosRelacionados.Rows
|
For Each dRow2 As DataRow In DTDocumentosRelacionados.Rows
|
||||||
If dRow2("CveMetodoPago").ToString.ToEntero > 0 Then
|
If dRow2("CveMetodoPago").ToString.ToEntero > 0 Then
|
||||||
If dRow2("CveMetodoPago").ToString.ToEntero = 1 Then
|
If dRow2("CveMetodoPago").ToString.ToEntero = 1 Then
|
||||||
@@ -2947,27 +2957,41 @@ Partial Class Compras_eFacturas
|
|||||||
ObjCompras.Dispose()
|
ObjCompras.Dispose()
|
||||||
|
|
||||||
|
|
||||||
If Math.Abs(DiferenciaImportes) > 5 Then
|
If TieneCompras Then
|
||||||
TextoDiferenciaImporte = $"<b> - IE ${ImporteIES.FormatoNumero}</b> <div style='color:red'><strong>Diferencia { DiferenciaImportes.FormatoNumero() }</strong></div>"
|
If ImporteIES > 0 Then
|
||||||
BtnVincularPago.Visible = False
|
If Math.Abs(DiferenciaImportes) > 5 Then
|
||||||
MSGComplemento = MSGComplemento & $" Existe una diferencia mayor a $5.00 ({Math.Abs(DiferenciaImportes)})"
|
TextoDiferenciaImporte = $"<b> - IE ${ImporteIES.FormatoNumero}</b> <div style='color:red'><strong>Diferencia { DiferenciaImportes.FormatoNumero() }</strong></div>"
|
||||||
|
BtnVincularPago.Visible = False
|
||||||
|
MSGComplemento = MSGComplemento & $" Existe una diferencia mayor a $5.00 ({Math.Abs(DiferenciaImportes)})"
|
||||||
|
|
||||||
If TieneRegistros AndAlso UsuarioActual.TienePermisoProceso(286) Then
|
If TieneRegistros AndAlso UsuarioActual.TienePermisoProceso(286) Then
|
||||||
DivVincularPagoManualmente.Visible = True
|
DivVincularPagoManualmente.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
TextoDiferenciaImporte = $"No se encontraron pagos "
|
||||||
|
BtnVincularPago.Visible = False
|
||||||
|
MSGComplemento = MSGComplemento & $" No se encontraron pagos "
|
||||||
|
If TieneRegistros AndAlso UsuarioActual.TienePermisoProceso(286) Then
|
||||||
|
DivVincularPagoManualmente.Visible = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
'BtnVincularPago.Visible = True
|
BtnVincularPago.Visible = False
|
||||||
'TextoDiferenciaImporte = ""
|
MSGComplemento = MSGComplemento & $"No se encontraron compras relacionadas"
|
||||||
|
DivVincularPagoManualmente.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
LblSerieFolioPago.Text = $"{SeriePago}-{FolioPago}"
|
LblSerieFolioPago.Text = $"{SeriePago}-{FolioPago}"
|
||||||
LblImportePago.Text = Monto.ToString("###,###,###.00") 'ImportePago.FormatoNumero
|
LblImportePago.Text = Monto.ToString("###,###,###.00") 'ImportePago.FormatoNumero
|
||||||
LblPagosCantidad.Text = PagosCantidad.ToString
|
LblPagosCantidad.Text = PagosCantidad.ToString
|
||||||
LblImporteIE.Text = ImporteIES.FormatoNumero
|
LblImporteIE.Text = ImporteIES.FormatoNumero
|
||||||
LblDiferencia.Text = If(DiferenciaImportes <> 0, DiferenciaImportes.FormatoNumero, "")
|
LblDiferencia.Text = If(DiferenciaImportes <> 0 And ImporteIES > 0, DiferenciaImportes.FormatoNumero, "")
|
||||||
|
|
||||||
|
|
||||||
If MSGComplemento.Trim.Length > 0 And CveComplementoPagoCompra <= 0 Then
|
If MSGComplemento.Trim.Length > 0 And CveComplementoPagoCompra <= 0 Then
|
||||||
|
|||||||
Reference in New Issue
Block a user