diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb
index 90c5be8f7..9319c5d1e 100644
--- a/App_Code/ClsGenerales.vb
+++ b/App_Code/ClsGenerales.vb
@@ -3984,7 +3984,7 @@ Public Class ClsGenerales
Return Retorno
End Function
- Public Function AsignaEntregaAlmacenRuta(CveCamion As Integer, CveChofer As Integer, FechaEntrega As Date, CveEntregaAlmacen As Integer, CveEmpresa As Integer) As Boolean
+ Public Function AsignaEntregaAlmacenRuta(CveCamion As Integer, CveChofer As Integer, FechaEntrega As Date, FechaLlegada As DateTime, CveEntregaAlmacen As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_EntregaAlmacenRutaAsignar")
@@ -3992,6 +3992,7 @@ Public Class ClsGenerales
.Add("@CveCamion", SqlDbType.Int).Value = CveCamion
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
.Add("@FechaEntrega", SqlDbType.DateTime).Value = FechaEntrega
+ .Add("@FechaLlegada", SqlDbType.DateTime).Value = FechaLlegada
.Add("@CveEntregaAlmacen", SqlDbType.Int).Value = CveEntregaAlmacen
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb
index 6eca35de7..b9ce81522 100644
--- a/App_Code/ClsNominas.vb
+++ b/App_Code/ClsNominas.vb
@@ -353,6 +353,14 @@ Public Class ClsNominas
Try
SqlAdapter.Fill(DTSet)
retorno = True
+
+ Catch Ex1 As SqlException
+ If Ex1.Message.Contains("x50102;") Then
+ Alert("No se puede eliminar el finiquito ya que se encuentra vinculado a un periodo autorizado.", TipoMensaje.MsgAdvertencia)
+ GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al eliminar finiquito ", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
+ Else
+ Me.OnError("Ocurrió un error al consultar las vacaciones.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End If
Catch ex As Exception
OnError("Ocurrió un error al eliminar el finiquito.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
@@ -2735,9 +2743,13 @@ Public Class ClsNominas
End With
SqlAdapter.Fill(Data)
retorno = True
- Catch sqEx As SqlException
- retorno = False
- OnError("Ocurrió un error al agregar las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ Catch Ex1 As SqlException
+ If Ex1.Message.Contains("x50102;") Then
+ Alert("No se pueden registrar las vacaciones en el periodo indicado ya que exixte un periodo autorizado.", TipoMensaje.MsgAdvertencia)
+ GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al consultar las vacacionesa ", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
+ Else
+ Me.OnError("Ocurrió un error al consultar las vacaciones.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End If
Catch ex As Exception
retorno = False
OnError("Ocurrió un error al agregar las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
@@ -2764,9 +2776,13 @@ Public Class ClsNominas
End With
SqlAdapter.Fill(Data)
retorno = True
- Catch sqEx As SqlException
- retorno = False
- OnError("Ocurrió un error al actualizar las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ Catch Ex1 As SqlException
+ If Ex1.Message.Contains("x50102;") Then
+ Alert("No se pueden registrar las vacaciones en el periodo indicado ya que exixte un periodo autorizado.", TipoMensaje.MsgAdvertencia)
+ GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al consultar las vacacionesa ", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
+ Else
+ Me.OnError("Ocurrió un error al consultar las vacaciones.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End If
Catch ex As Exception
retorno = False
OnError("Ocurrió un error al actualizar las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
@@ -2783,9 +2799,13 @@ Public Class ClsNominas
End With
SqlAdapter.Fill(Data)
retorno = True
- Catch sqEx As SqlException
- retorno = False
- OnError("Ocurrió un error al eliminar las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ Catch Ex1 As SqlException
+ If Ex1.Message.Contains("x50102;") Then
+ Alert("No se pueden registrar las vacaciones en el periodo indicado ya que exixte un periodo autorizado.", TipoMensaje.MsgAdvertencia)
+ GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al consultar las vacacionesa ", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
+ Else
+ Me.OnError("Ocurrió un error al consultar las vacaciones.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End If
Catch ex As Exception
retorno = False
OnError("Ocurrió un error al eliminar las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb
index c02d7b5e2..b0d5a6a97 100644
--- a/App_Code/ClsRH.vb
+++ b/App_Code/ClsRH.vb
@@ -2063,7 +2063,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
CveJornada As Integer, IdCtaContPersonal As Integer, CtaContPersonal As String, IdCtaContPrestamos As Integer, CtaContPrestamos As String, CveEmpresa As Integer, CveUsuarioNomina As Integer, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1,
Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveUsuarioModifico As Integer = -1,
Optional FechaActivo As Date = MinFecha, Optional FechaReingreso As Date = MinFecha, Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Integer = -1, Optional CvePais As Integer = -1, Optional Pensionado As Boolean = False, Optional CveRegistroPatronal As Integer = -1,
- Optional CveEmpresaAsignado As Integer = -1, Optional CveMedioTransporte As Integer = -1, Optional EsReserva As Integer = -1) As Boolean
+ Optional CveEmpresaAsignado As Integer = -1, Optional CveMedioTransporte As Integer = -1, Optional EsReserva As Integer = -1, Optional Fiscalizable As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -2155,9 +2155,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@CveEmpresaAsignado", SqlDbType.Int).Value = CveEmpresaAsignado
.Add("@CveMedioTransporte", SqlDbType.Int).Value = CveMedioTransporte
.Add("@EsReserva", SqlDbType.Int).Value = EsReserva
-
-
-
+ .Add("@Fiscalizable", SqlDbType.Int).Value = Fiscalizable
End With
@@ -2167,6 +2165,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Catch Ex1 As SqlException
If Ex1.Message.Contains("Número: 2627;") Then
Alert("El Personal no se guardó debido a que actualmente se encuentra registrado.", TipoMensaje.MsgAdvertencia)
+ ElseIf Ex1.Message.Contains("TR_RH_PersonalAltas000") Then
+ Alert("El personal no se guardó el periodo de inicio y fin laboral del empleado está en conflicto con los anteriores, si es un reingreso favor de ingresar una fecha inicio mayor a la última fecha baja registrada.", TipoMensaje.MsgAdvertencia)
+ GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al intentar guardar los cambios en el Personal.", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
Else
Me.OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If
@@ -2580,7 +2581,10 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Retorno = True
Catch Ex1 As SqlException
If Ex1.Message.Contains("Número: 2627;") Then
- Alert("Ya se registró la Asistencia del día " & Fecha & " para el empleado.", TipoMensaje.MsgAdvertencia)
+ Alert("Ya se registró la Asistencia del día " & Fecha & " para el empleado.", TipoMensaje.MsgAdvertencia)
+ ElseIf Ex1.Message.Contains("x50102;") Then
+ Alert("No se puede editar o agregar la asistencia ya que se encuentra vinculada a un periodo autorizado.", TipoMensaje.MsgAdvertencia)
+ GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al editar o agregar la asistencia ", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
Else
Me.OnError("Ocurrió un error al guardar la Asistencia.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If
@@ -5896,6 +5900,13 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Try
SqlAdapter.Fill(Data)
Retorno = True
+ Catch Ex1 As SqlException
+ If Ex1.Message.Contains("x50102;") Then
+ Alert("No se pueden registrar las vacaciones en el periodo indicado ya que exixte un periodo autorizado.", TipoMensaje.MsgAdvertencia)
+ GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al consultar las vacacionesa ", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
+ Else
+ Me.OnError("Ocurrió un error al consultar las vacaciones.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End If
Catch ex As Exception
OnError("Ocurrió un error al consultar las vacaciones", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
@@ -5917,6 +5928,13 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Try
SqlAdapter.Fill(Data)
Retorno = True
+ Catch Ex1 As SqlException
+ If Ex1.Message.Contains("x50102;") Then
+ Alert("No se pueden registrar las vacaciones en el periodo indicado ya que exixte un periodo autorizado.", TipoMensaje.MsgAdvertencia)
+ GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al consultar las vacacionesa ", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
+ Else
+ Me.OnError("Ocurrió un error al consultar las vacaciones.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End If
Catch ex As Exception
OnError("Ocurrió un error al consultar las vacaciones", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
@@ -5932,6 +5950,13 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Try
SqlAdapter.Fill(Data)
Retorno = True
+ Catch Ex1 As SqlException
+ If Ex1.Message.Contains("x50102;") Then
+ Alert("No se pueden registrar las vacaciones en el periodo indicado ya que exixte un periodo autorizado.", TipoMensaje.MsgAdvertencia)
+ GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al consultar las vacacionesa ", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
+ Else
+ Me.OnError("Ocurrió un error al consultar las vacaciones.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End If
Catch ex As Exception
OnError("Ocurrió un error al Eliminar vacaciones", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
@@ -5955,6 +5980,13 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Try
SqlAdapter.Fill(Data)
Retorno = True
+ Catch Ex1 As SqlException
+ If Ex1.Message.Contains("x50102;") Then
+ Alert("No se pueden registrar las vacaciones en el periodo indicado ya que exixte un periodo autorizado.", TipoMensaje.MsgAdvertencia)
+ GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al consultar las vacacionesa ", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
+ Else
+ Me.OnError("Ocurrió un error al consultar las vacaciones.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End If
Catch ex As Exception
OnError("Ocurrió un error al consultar las vacaciones", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb
index 8df3ed569..a7b7cb98b 100644
--- a/App_Code/LogicNominas.vb
+++ b/App_Code/LogicNominas.vb
@@ -28,7 +28,7 @@ Public Class LogicNominas
ObjFactura.Folio = cfdi.Comprobante.Folio.ToEntero()
ObjFactura.Serie = cfdi.Comprobante.Serie
ObjFactura.Timbre = cfdi
- If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC, False) Then
+ If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC) Then
Retorno = ObjTimbrado.MensajeErrorCFDI
End If
End If
@@ -175,7 +175,7 @@ Public Class LogicNominas
If continuar AndAlso objPersonal.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) AndAlso objPersonal.DtResultados.Rows.Count > 0 Then
RFC = objPersonal.RFC
cfdi.Emisor.RegistroPatronal = objPersonal.DtResultados.Rows(0)("RegistroPatronal").ToString()
- NombreCompleto = objPersonal.NombreCompleto
+ NombreCompleto = String.Format("{0} {1} {2}", objPersonal.Nombres, objPersonal.APaterno, objPersonal.AMaterno)
CodigoPostal = objPersonal.CP
Sindicalizado = objPersonal.DtResultados.Rows(0)("Sindicalizado").ToString().ToUpper().Contiene("TRUE", "1")
CURP = objPersonal.CURP
@@ -318,7 +318,8 @@ Public Class LogicNominas
cfdi.Emisor.CURP = UsuarioActual.Empresa.CURP
End If
cfdi.Nomina.CveNomina = CveNomina
- cfdi.Receptor.UsoCFDI = "P01"
+
+ cfdi.Receptor.UsoCFDI = If(UsuarioActual.Empresa.Funcionalidad(350).Contiene("1"), "CN01", "P01")
cfdi.Receptor.RFC = RFC
cfdi.Receptor.Nombre = NombreCompleto
@@ -426,7 +427,7 @@ Public Class LogicNominas
If ObjDeducciones IsNot Nothing AndAlso ObjDeducciones.Count > 0 Then cfdi.Nomina.Deducciones = ObjDeducciones
- cfdi.Comprobante.Version = "3.3"
+ cfdi.Comprobante.Version = If(UsuarioActual.Empresa.Funcionalidad(350).Contiene("1"), "4.0", "3.3")
cfdi.Comprobante.Serie = Serie
cfdi.Comprobante.Folio = Folio
cfdi.Comprobante.Fecha = Now
@@ -439,7 +440,7 @@ Public Class LogicNominas
cfdi.Comprobante.TipoDocto = "Egs"
cfdi.Comprobante.MetodoPago = "PUE"
cfdi.Comprobante.CondicionesdePago = "" '"CONTADO"
- cfdi.Comprobante.FormadePago = "99"
+ cfdi.Comprobante.FormadePago = If(UsuarioActual.Empresa.Funcionalidad(350).Contiene("1"), "", "99")
cfdi.Comprobante.LugarExpedicion = UsuarioActual.Empresa.CP.ToString() ' AHORITA SOLO SE REQUIERE ESPECIFICAR EL CODIGO POSTAL
cfdi.Comprobante.NumCuentaPago = "" 'objPersonal.BancoNumCuenta
'4.0
@@ -466,7 +467,7 @@ Public Class LogicNominas
cfdi.Nomina.Receptor.Sindicalizado = If(Sindicalizado, "Si", "No")
cfdi.Nomina.Receptor.CodigoEntidadFederativa = ClaveEstado
- cfdi.Conceptos.Add(New CFDIConceptos With {.Cantidad = 1, .ClaveUnidad = "ACT", .ClaveProdServ = "84111505", .Descripcion = "Pago de nómina", .ValorUnitario = cfdi.Comprobante.Subtotal, .Importe = cfdi.Comprobante.Subtotal, .Descuento = cfdi.Nomina.TotalDeducciones.ToString().ToDecimal()})
+ cfdi.Conceptos.Add(New CFDIConceptos With {.Cantidad = 1, .ClaveUnidad = "ACT", .ClaveProdServ = "84111505", .Descripcion = "Pago de nómina", .ValorUnitario = cfdi.Comprobante.SubTotal, .Importe = cfdi.Comprobante.SubTotal, .Descuento = cfdi.Nomina.TotalDeducciones.ToString().ToDecimal(), .ObjetoImpuesto = "01"})
If continuar Then
diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb
index fa00d566c..d8a5a9b9d 100644
--- a/App_Code/Timbrado.vb
+++ b/App_Code/Timbrado.vb
@@ -1192,7 +1192,7 @@ Public Class Timbrado
Return Timbre
End Function
- Public Function TimbrarFactura(UsuarioActual As Usuario, Ventas As Modelos.Factura, Optional CvePACEspecial As Integer = -1, Optional NomUsaPac4 As Boolean = True) As Boolean
+ Public Function TimbrarFactura(UsuarioActual As Usuario, Ventas As Modelos.Factura, Optional CvePACEspecial As Integer = -1) As Boolean
Dim Retorno As Boolean = False
Dim tCvePAC As Integer = UsuarioActual.Empresa.CvePAC
@@ -1228,15 +1228,15 @@ Public Class Timbrado
Retorno = If(Ret = "", True, False)
Case 3
- If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso NomUsaPac4 Then
- Retorno = TimbrarFacturaProFactV40(UsuarioActual, Ventas)
+ If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
+ Retorno = TimbrarFacturaProFactv40(UsuarioActual, Ventas)
Else
Retorno = TimbrarFacturaProFact(UsuarioActual, Ventas)
End If
'Retorno = TimbrarFacturaProFact(UsuarioActual, Ventas, TmpDTConceptos, TmpDTImpuestos, TmpDTComplementos, Ruta, LstFordASN, FordGSDBM, ObjV)
Case 4
- If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso NomUsaPac4 Then
+ If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
Dim Ret As String = TimbrarFacturaGoCFDIv40(Ventas, UsuarioActual, CvePACEspecial)
If Ret <> "" Then MensajeErrorCFDI = Ret
Retorno = If(Ret = "", True, False)
@@ -1248,7 +1248,7 @@ Public Class Timbrado
Case 5
- If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso NomUsaPac4 Then
+ If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
Dim Ret As String = TimbrarFacturaPADEv40(Ventas, UsuarioActual, CvePACEspecial)
If Ret <> "" Then MensajeErrorCFDI = Ret
Retorno = If(Ret = "", True, False)
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb
index eafc5dd0b..c01afa5e1 100644
--- a/Contabilidad/RegPrePolizaS.aspx.vb
+++ b/Contabilidad/RegPrePolizaS.aspx.vb
@@ -817,6 +817,8 @@ Partial Class ContabilidadC_RegPrePolizaS
GvMov.DataSource = DtMovimientos
GvMov.DataBind()
+ GvPrePoliza.DataBind() ''limpio el grid
+ UpPrePoliza.Update()
UPMovs.Update()
End Sub
@@ -982,9 +984,12 @@ Partial Class ContabilidadC_RegPrePolizaS
FolioPoliza = ObjMov.FolioPoliza
Dim Gv As GridView = GvMov
- If DdlPlantilla.SelectedValue = "53" Then
- Gv = GvPrePoliza
- TipoGrid = 1
+ If DdlPlantilla.SelectedValue = "53" OrElse GvPrePoliza.Visible = True Then
+ If GvPrePoliza.Rows.Count > 0 Then
+ Gv = GvPrePoliza
+ TipoGrid = 1
+ End If
+
End If
'inserto las compras que voy a pagarDdlSaldos
@@ -994,7 +999,7 @@ Partial Class ContabilidadC_RegPrePolizaS
'End If
'Registra movimieno bancario
- If gvr.DataKey("CveConceptoContable").ToEntero = 30 AndAlso gvr.DataKey("ContadoImporte").ToDecimal <> 0 Then
+ If gvr.DataKey("CveConceptoContable").ToEntero = 30 AndAlso (gvr.DataKey("ContadoImporte").ToDecimal <> 0 OrElse TipoGrid = 1) Then
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, gvr.DataKey("ContadoNumeroFolio"),
gvr.DataKey("ContadoBeneficiario"), gvr.DataKey("ContadoImporte").ToDecimal, CveMoneda, 0, gvr.DataKey("ContadoObservaciones"), "",
@@ -1058,7 +1063,7 @@ Partial Class ContabilidadC_RegPrePolizaS
If idCuentaContabilizacion = 1 AndAlso (IdCtaContable = 0) Then
idCuentaContabilizacion = 0
End If
- If Importe <> 0 Then
+ If Importe <> 0 OrElse TipoGrid = 1 Then 'si es diferente de cero o si viene de grid prepolizas, que registre todo
Dim tCveCuenta As Integer = gvr.DataKey("CveCuenta").ToEntero
Dim tReferencia, tConcepto As String
Dim tCveSubProyecto, tCveTipoGasto As Integer
@@ -1164,10 +1169,6 @@ Partial Class ContabilidadC_RegPrePolizaS
If row.FCCheckBox("chkModificado").Checked Then
contador = contador + 1
-
-
-
-
Dim ImporteIE As Decimal = If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal)
If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then
@@ -1182,9 +1183,6 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
End If
-
-
-
If Not ObjContabilidad.UpdatePrePolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCLiteral("TxtConcepto").Text, row.DataKey("CveSubProyecto").ToEntero,
row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
@@ -1242,7 +1240,7 @@ Partial Class ContabilidadC_RegPrePolizaS
If Not OcurrioError Then
If IdPoliza > 0 AndAlso contador Then
- ' BtnContabilizar_Click(Nothing, Nothing)
+ Contabilizar()
End If
End If
@@ -2304,7 +2302,6 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlPlantilla.SelectedValue = DdlPlantilla2.SelectedValue
dt = ReadExcelFile(Ruta + FileName, True)
-
If Not ErrorArchivo Then
If Not dt.Columns(0).ColumnName.ToUpper = "CONCEPTOADMINISTRATIVO" Then
@@ -2512,6 +2509,8 @@ Partial Class ContabilidadC_RegPrePolizaS
ContadorRegistros = ContadorRegistros + 1
Next
+ GvMov.DataBind()
+ divMovtos.Visible = False
GvPrePoliza.DataSource = DtMovimientos
GvPrePoliza.DataBind()
UpPrePoliza.Update()
@@ -2599,8 +2598,6 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim FolioManual As Integer = If(TxtFolio.Text.ToEntero > 0, TxtFolio.Text.ToEntero, -1)
-
-
If ObjConta.ContabilizaDesContabilizaPrePoliza(CvePrePoliza, True, UsuarioActual.CveEmpresa, Folio:=FolioManual) Then
Alert($"Contabilizado Correctamente Folio { ObjConta.ContaFolio.ToString()}.", TipoMensaje.MsgInformacion)
@@ -2618,7 +2615,6 @@ Partial Class ContabilidadC_RegPrePolizaS
Else
-
If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero
ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False)
End If
@@ -2637,10 +2633,6 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
-
-
-
-
ObjConta.Dispose()
End Sub
diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx
index 1ce8ec81e..a53253db2 100644
--- a/Inventarios/EntradasSalidas.aspx
+++ b/Inventarios/EntradasSalidas.aspx
@@ -1717,9 +1717,6 @@