-- carga excel
This commit is contained in:
@@ -2185,6 +2185,8 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
Dim YaExiste As Boolean = False
|
Dim YaExiste As Boolean = False
|
||||||
Dim CveConceptoContable As Integer = Row("CveConceptoContable").ToString.ToEntero
|
Dim CveConceptoContable As Integer = Row("CveConceptoContable").ToString.ToEntero
|
||||||
Dim IdCtaContable As Integer = Row("IdCtaContable").ToString.ToEntero
|
Dim IdCtaContable As Integer = Row("IdCtaContable").ToString.ToEntero
|
||||||
|
'sino viene el cveconcepto, busca por le nombre del concepto
|
||||||
|
If CveConceptoContable = 0 Then CveConceptoContable = GlobalDTContaConceptosContables(-1).FiltroPrimeroValor("CveConceptoContable", String.Format("ConceptoContable = '{0}'", Row("ConceptoContable"))).ToEntero
|
||||||
|
|
||||||
If ObjConta.GetCuentas(-1, Cuenta.Replace("-", ""), 1, UsuarioActual.CveEmpresa) Then
|
If ObjConta.GetCuentas(-1, Cuenta.Replace("-", ""), 1, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||||
|
|||||||
@@ -1944,19 +1944,29 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Dim Importe As Decimal = If(Row("Cargo").ToString.ToDecimal <> 0, Row("Cargo").ToString.ToDecimal, Row("Abono").ToString.ToDecimal)
|
Dim Importe As Decimal = If(Row("Cargo").ToString.ToDecimal <> 0, Row("Cargo").ToString.ToDecimal, Row("Abono").ToString.ToDecimal)
|
||||||
Dim Concepto As String = Row("Concepto").ToString
|
Dim Concepto As String = Row("Concepto").ToString
|
||||||
Dim Referencia As String = Row("Referencia").ToString
|
Dim Referencia As String = Row("Referencia").ToString
|
||||||
Dim IdCuenta As Integer = -1
|
Dim CveCuenta As Integer = -1
|
||||||
Dim CveSubProyecto As Integer = Row("CveSubProyecto").ToString.ToEntero
|
Dim CveSubProyecto As Integer = Row("CveSubProyecto").ToString.ToEntero
|
||||||
Dim TipoMovto As Boolean = If(Row("Cargo").ToString.ToDecimal <> 0, False, True)
|
Dim TipoMovto As Boolean = If(Row("Cargo").ToString.ToDecimal <> 0, False, True)
|
||||||
Dim YaExiste As Boolean = False
|
Dim YaExiste As Boolean = False
|
||||||
Dim CveConceptoContable As Integer = Row("CveConceptoContable").ToString.ToEntero
|
Dim CveConceptoContable As Integer = Row("CveConceptoContable").ToString.ToEntero
|
||||||
Dim IdCtaContable As Integer = Row("IdCtaContable").ToString.ToEntero
|
Dim IdCtaContable As Integer = Row("IdCtaContable").ToString.ToEntero
|
||||||
|
Dim CveClasificacion As Integer = -1
|
||||||
|
'sino viene el cveconcepto, busca por le nombre del concepto
|
||||||
|
If CveConceptoContable = 0 Then CveConceptoContable = GlobalDTContaConceptosContables(-1).FiltroPrimeroValor("CveConceptoContable", String.Format("ConceptoContable = '{0}'", Row("ConceptoAdministrativo"))).ToEntero
|
||||||
|
|
||||||
|
If CveConceptoContable = 69 Then
|
||||||
|
CveClasificacion = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", "").ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveSubProyecto = 0 Then CveSubProyecto = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", String.Format("SubProyecto = '{0}'", Row("SubProyecto"))).ToEntero
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Importe <> 0 Then
|
If Importe <> 0 Then
|
||||||
|
|
||||||
If ObjConta.GetCuentas(-1, Cuenta.Replace("-", ""), 1, UsuarioActual.CveEmpresa) Then
|
If ObjConta.GetCuentas(-1, Cuenta.Replace("-", ""), 1, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||||
IdCuenta = ObjConta.DtResultados().FiltroPrimeroValor("CveCuenta").ToEntero
|
CveCuenta = ObjConta.DtResultados().FiltroPrimeroValor("CveCuenta").ToEntero
|
||||||
'TipoCuenta = ObjConta.DtResultados().FiltroPrimeroValor("Tipo")
|
'TipoCuenta = ObjConta.DtResultados().FiltroPrimeroValor("Tipo")
|
||||||
Else
|
Else
|
||||||
Reporte.AppendLine($"{Cuenta} - {NombreCuenta} - {Importe} </br>")
|
Reporte.AppendLine($"{Cuenta} - {NombreCuenta} - {Importe} </br>")
|
||||||
@@ -1970,13 +1980,13 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
|
|
||||||
If YaExiste = False Then
|
If YaExiste = False Then
|
||||||
If IdCuenta > 0 Then
|
If CveCuenta > 0 Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", CveConceptoContable, Concepto, Now.ToDate, IdCtaContable, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", CveConceptoContable, Concepto, Now.ToDate, IdCtaContable, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveClasificacion:=CveClasificacion, CveCuenta:=CveCuenta) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
IdCuenta = -2
|
CveCuenta = -2
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user