--validaciones de cuadre
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Net.NetworkInformation
|
||||
Imports ADSNetLibrary.SIGAPI.Models.OC.Response
|
||||
'Imports DocumentFormat.OpenXml
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.JScript
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class ContabilidadC_RegPrePolizaS
|
||||
Inherits ClsPaginas
|
||||
@@ -260,6 +256,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
'End If
|
||||
|
||||
Tick = DateTime.Now.Ticks.ToString
|
||||
TxtTotalCargos.Attributes.Add("readonly", "readonly")
|
||||
TxtTotalAbonos.Attributes.Add("readonly", "readonly")
|
||||
|
||||
CveMoneda = 1
|
||||
ViewState("CvePrePoliza") = 0
|
||||
@@ -778,6 +776,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
CargaSubProyectos()
|
||||
CargaCuentasContables()
|
||||
End If
|
||||
divPrePolizas.Visible = True
|
||||
GvPrePoliza.Visible = True
|
||||
DivAgregarConceptos.Visible = False
|
||||
divMovtos.Visible = False
|
||||
@@ -786,6 +785,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Else
|
||||
DivAgregarConceptos.Visible = False
|
||||
divMovtos.Visible = True
|
||||
divPrePolizas.Visible = False
|
||||
UPMovs.Update()
|
||||
End If
|
||||
|
||||
@@ -936,12 +936,15 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
|
||||
'validaciones
|
||||
If Not (TotalCargos = TotalAbonos AndAlso (GvPrePoliza.Rows.Count > 0 Or GvMov.Rows.Count > 0)) AndAlso UsuarioActual.CveRol <> 1 Then
|
||||
If ((GvPrePoliza.Visible AndAlso GvPrePoliza.Rows.Count = 0) OrElse ((GvMov.Visible AndAlso GvMov.Rows.Count = 0))) Then
|
||||
Alert(" No se han especificado partidas", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
If (TotalCargos <> TotalAbonos) Then
|
||||
Alert($"La suma de los movimientos no son iguales ({TotalCargos}-{TotalAbonos})", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If Not CvePrePoliza > 0 Then
|
||||
|
||||
For Each Gvr As GridViewRow In GvMov.Rows
|
||||
@@ -1119,10 +1122,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If CveIE > 0 AndAlso gvr.DataKey("CveConceptoContable").ToEntero = 30 Then
|
||||
MensajeAlert.AppendFormat("<br/><br/>Folio Bancario: <b><a href = ""/Bancos/IE.aspx?CveIE={0}"" class=""Texto"" target=""_blank"" >{1}</a></b>", CveIE, FolioIE)
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaInsertada, 1) Then
|
||||
If MsgError = "" AndAlso Not ObjMov.ValidacionesPrePoliza(CvePrePolizaInsertada, UsuarioActual) Then
|
||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePolizaInsertada}", "LogPrePolizas")
|
||||
MsgError = ObjMov.MensajePolizaDescuadre
|
||||
|
||||
Reference in New Issue
Block a user