FiltraPolizas, RegPoliza unificadas y RegPrePoliza validaciones de naturaleza de cargo abono.
This commit is contained in:
@@ -2390,6 +2390,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
ObjConta.IniciaTransacSQL()
|
||||
Try
|
||||
|
||||
Dim ContadorRegistros As Integer = 2
|
||||
|
||||
For Each Row As DataRow In dt.FiltraParametros("ConceptoAdministrativo <> ''").Rows
|
||||
|
||||
@@ -2406,6 +2407,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Dim ObjConta2 As New ClsContabilidad
|
||||
Dim FolioExcel As Long = -1
|
||||
Dim TipoMov As Integer = -1
|
||||
Dim TipoNaturalesa As String = ""
|
||||
Dim CveBancoCuenta As Integer = -1
|
||||
If ObjConta2.GetCuentas(-1, Row("Cuenta").ToString.Replace("-", "").Trim, 1, UsuarioActual.CveEmpresa) Then
|
||||
CveCuentaExcel = ObjConta2.DtResultados.FiltroPrimeroValor("CveCuenta", "").ToEntero
|
||||
@@ -2438,6 +2440,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
|
||||
TipoMov = GlobalDTTipoTransacciones.FiltroPrimeroValor("CveTipoTransaccion", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia"))).ToEntero
|
||||
TipoNaturalesa = GlobalDTTipoTransacciones.FiltroPrimeroValor("Tipo", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia"))).ToEntero
|
||||
|
||||
FolioExcel = Row("Folio").ToString.ToEntero
|
||||
CveTipoTransaccion = TipoMov
|
||||
CveCuenta = CveBancoCuenta
|
||||
@@ -2451,13 +2455,29 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
ImporteDocumento = IIf(Row("Abono").ToString.ToDecimal > 0, Row("Abono").ToString.ToDecimal, Row("Cargo").ToString.ToDecimal)
|
||||
Observaciones = Row("Referencia").ToString
|
||||
Beneficiario = Row("Concepto").ToString
|
||||
|
||||
If Not TipoMov > 0 Then
|
||||
Alert(String.Format("El Tipo de Transferencia no fue encontrado: <br/> <b>Tipo Transferencia: <b/> {0} <br/> <b>Folio: <b/> {1} <br/> <b>Importe: <b/> {2} ", Row("TipoTransferencia").ToString(), FolioExcel, ImporteDocumento), TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If Row("Abono").ToString.ToDecimal > 0 And TipoNaturalesa = "Ing" Then
|
||||
Alert($"El movimiento con cuenta: {NombreCuenta} , importe: {ImporteDocumento.ToString("###,###,###.00")} (registro {ContadorRegistros}), no tiene la naturaleza correcta", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If CveConceptoContable = 30 AndAlso Row("TipoTransferencia").ToString = "" Then
|
||||
Alert($" El registro {ContadorRegistros} es movimiento bancario y no se especifica el tipo de transferencia , importe: {ImporteDocumento.ToString("###,###,###.00")}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
'sino viene el cveconcepto, busca por le nombre del concepto
|
||||
If CveConceptoContable = 0 Then
|
||||
Alert(String.Format("El concepto <b>{0}</b> no se reconoció, favor de verificar el archivo.", Row("ConceptoAdministrativo")))
|
||||
@@ -2515,6 +2535,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DtMovimientos.Rows.Add(dr)
|
||||
DtMovimientos.AcceptChanges()
|
||||
End If
|
||||
|
||||
ContadorRegistros = ContadorRegistros + 1
|
||||
|
||||
Next
|
||||
|
||||
TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero
|
||||
|
||||
Reference in New Issue
Block a user