-- validacion y mensaje en la balanza para que estén cuadradas
This commit is contained in:
@@ -182,6 +182,15 @@ Partial Class Contabilidad_ContabilidadElectronica
|
|||||||
DtCuentas = objconta.DtResultados
|
DtCuentas = objconta.DtResultados
|
||||||
End If
|
End If
|
||||||
objconta.Dispose()
|
objconta.Dispose()
|
||||||
|
|
||||||
|
If DtCuentas IsNot Nothing Then
|
||||||
|
Dim Deudor As Decimal = DtCuentas.SUM("SaldoAD")
|
||||||
|
Dim Acreedor As Decimal = DtCuentas.SUM("SaldoAA")
|
||||||
|
If Deudor <> Acreedor Then
|
||||||
|
Alert("los Saldos Actuales no cuadran.", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
Dim ObjConpaq As New ClsContPAQi(UsuarioActual.Empresa)
|
Dim ObjConpaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
If ObjConpaq.GetBalanzaElectronica(FechaI, FechaF) Then
|
If ObjConpaq.GetBalanzaElectronica(FechaI, FechaF) Then
|
||||||
@@ -236,10 +245,12 @@ Partial Class Contabilidad_ContabilidadElectronica
|
|||||||
'GUARDA ARHIVO
|
'GUARDA ARHIVO
|
||||||
ArchivoBalanza = Server.MapPath(String.Format("~/Empresas/{0}/ContabilidadElectronica/{1}{2}{3}BN.xml", UsuarioActual.CveEmpresa, UsuarioActual.Empresa.RFC, DdlEjercicio.SelectedValue, DdlPeriodo.SelectedValue.PadLeft(2, "0"c)))
|
ArchivoBalanza = Server.MapPath(String.Format("~/Empresas/{0}/ContabilidadElectronica/{1}{2}{3}BN.xml", UsuarioActual.CveEmpresa, UsuarioActual.Empresa.RFC, DdlEjercicio.SelectedValue, DdlPeriodo.SelectedValue.PadLeft(2, "0"c)))
|
||||||
|
|
||||||
|
Dim tDir As String = Server.MapPath(String.Format("~/Empresas/{0}/ContabilidadElectronica", UsuarioActual.CveEmpresa, UsuarioActual.Empresa.RFC))
|
||||||
'SOBREESCRIBE
|
'SOBREESCRIBE
|
||||||
If System.IO.File.Exists(ArchivoBalanza) Then
|
If Not System.IO.Directory.Exists(tDir) Then System.IO.Directory.CreateDirectory(tDir)
|
||||||
System.IO.File.Delete(ArchivoBalanza)
|
|
||||||
End If
|
'SOBREESCRIBE
|
||||||
|
If System.IO.File.Exists(ArchivoBalanza) Then System.IO.File.Delete(ArchivoBalanza)
|
||||||
|
|
||||||
Dim fs As FileStream = File.Create(ArchivoBalanza)
|
Dim fs As FileStream = File.Create(ArchivoBalanza)
|
||||||
Dim info As Byte() = New UTF8Encoding(True).GetBytes(Str.ToString)
|
Dim info As Byte() = New UTF8Encoding(True).GetBytes(Str.ToString)
|
||||||
|
|||||||
Reference in New Issue
Block a user