log contabilidad
This commit is contained in:
@@ -1142,7 +1142,7 @@ Public Class ClsContabilidad
|
||||
Dim Retorno As Boolean = False
|
||||
Dim OcurrioError As Boolean = False
|
||||
|
||||
StrLog.AppendFormat("CvePrep:{0} - Inicio", CvePrePoliza)
|
||||
StrLog.AppendFormat("CvePrep:{0} - Inicio -", CvePrePoliza)
|
||||
|
||||
If Empresa.TipoContabilizacion = 1 Then ' contabilidad en SIG
|
||||
|
||||
@@ -1265,6 +1265,7 @@ Public Class ClsContabilidad
|
||||
If Not ObjConta.AddMovimiento(tIdPoliza, dr("IdCtaContable").ToString.ToEntero, tipoMovimiento,
|
||||
dr("ImporteMN").ToString.ToDecimal, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegmentoNegocio").ToString.ToEntero, Fecha, SigReferencia, dr("CvePrePolizaDetalle").ToString.ToEntero, ImporteMonedaExtranjera:=dr("ImporteME").ToString.ToDecimal) Then
|
||||
OcurrioError = True
|
||||
StrLog.AppendFormat(" Error 1.1 - ")
|
||||
Exit For
|
||||
End If
|
||||
|
||||
@@ -1273,6 +1274,7 @@ Public Class ClsContabilidad
|
||||
If Not ObjConta.AddMovimiento(tIdPoliza, dr("IdCtaContable").ToString.ToEntero, tipoMovimiento,
|
||||
dr("Importe").ToString.ToDecimal, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegmentoNegocio").ToString.ToEntero, Fecha, SigReferencia, dr("CvePrePolizaDetalle").ToString.ToEntero, ImporteMonedaExtranjera:=dr("ImporteME").ToString.ToDecimal) Then
|
||||
OcurrioError = True
|
||||
StrLog.AppendFormat(" Error 1.2 - ")
|
||||
Exit For
|
||||
End If
|
||||
|
||||
@@ -1281,6 +1283,7 @@ Public Class ClsContabilidad
|
||||
End If
|
||||
Else
|
||||
OcurrioError = True
|
||||
StrLog.AppendFormat(" Error 1.3 - ")
|
||||
Mensaje.Append(String.Format("<br> La cuenta contable {0} es invalida", dr("ConceptoContable")))
|
||||
Exit For
|
||||
End If
|
||||
@@ -1300,6 +1303,7 @@ Public Class ClsContabilidad
|
||||
dr("ISRRetenido").ToString.ToDecimal,
|
||||
dr("IVARetenido").ToString.ToDecimal, False) Then
|
||||
OcurrioError = True
|
||||
StrLog.AppendFormat(" Error 1.4 - ")
|
||||
|
||||
End If
|
||||
End If
|
||||
@@ -1349,6 +1353,7 @@ Public Class ClsContabilidad
|
||||
IdProveedor = ObjConta.AddProveedor(IdCtaContProveedores, RFC, RazonSocial, "")
|
||||
If IdProveedor <= 0 Then
|
||||
OcurrioError = True
|
||||
StrLog.AppendFormat(" Error 1.5 - ")
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -1366,6 +1371,7 @@ Public Class ClsContabilidad
|
||||
dr("Serie").ToString.ToString,
|
||||
dr("Folio").ToString.StrToNum, dr("FolioFiscal").ToString, Empresa.CveEmpresa) Then
|
||||
OcurrioError = True
|
||||
StrLog.AppendFormat(" Error 1.6 - ")
|
||||
Mensaje.Append("La Poliza o la Cuenta no son válidas ")
|
||||
End If
|
||||
|
||||
@@ -1379,12 +1385,14 @@ Public Class ClsContabilidad
|
||||
|
||||
If Not OcurrioError Then
|
||||
If Not UpdatePrePolizasDetalleBloquear(CvePrePoliza, True) Then
|
||||
StrLog.AppendFormat(" Error 2.1 - ")
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not OcurrioError Then
|
||||
If Not UpdatePrePoliza(Fecha, ObjConta.Folio, CveTipoPoliza, tIdPoliza, CvePrePoliza, Empresa.CveEmpresa, CveUsuarioModifico:=CveUsuario) Then
|
||||
StrLog.AppendFormat(" Error 2.2 - ")
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
@@ -1406,11 +1414,13 @@ Public Class ClsContabilidad
|
||||
|
||||
Else
|
||||
OcurrioError = True
|
||||
StrLog.AppendFormat(" Error 3.1 - ")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
StrLog.AppendFormat(" Error 4.1 - ")
|
||||
If Not ContaCompartida Then ObjConta.RollBack()
|
||||
OnError("Ocurrió un error al intentar contabilizar la PrePoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
'Alert("Ocurrió un error al guardar la póliza", TipoMensaje.MsgAdvertencia)
|
||||
@@ -1419,7 +1429,7 @@ Public Class ClsContabilidad
|
||||
|
||||
If Not ContaCompartida Then ObjConta.Dispose()
|
||||
End If
|
||||
StrLog.AppendFormat(" - Con Retorno ({0}) - OcurrioError ({1} - Mensaje: {2}: ", Retorno, OcurrioError, Mensaje)
|
||||
StrLog.AppendFormat(" - Con Retorno ({0}) - OcurrioError ({1} ", Retorno, OcurrioError)
|
||||
StrLog.AppendFormat(" - Fin")
|
||||
StrLog.ToString.GuardaLogAD("LogContabilizacion")
|
||||
Return Retorno
|
||||
|
||||
Reference in New Issue
Block a user