- filtro empresa
This commit is contained in:
@@ -7809,8 +7809,6 @@ Partial Class Compras_Compras
|
|||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyectoInsertar, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyectoInsertar, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
Exit For
|
Exit For
|
||||||
|
|||||||
@@ -1095,7 +1095,7 @@ Partial Class Compras_eFacturas
|
|||||||
Dim ObjDatos As New ClsCompras
|
Dim ObjDatos As New ClsCompras
|
||||||
Dim FueValidado As Integer = 0
|
Dim FueValidado As Integer = 0
|
||||||
If GvD.Rows(e.RowIndex).FCCheckBox("ChkFueValidado").Checked Then FueValidado = 1
|
If GvD.Rows(e.RowIndex).FCCheckBox("ChkFueValidado").Checked Then FueValidado = 1
|
||||||
If ObjDatos.UpdateEstatus(FueValidado, GvD.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
If ObjDatos.UpdateEstatus(FueValidado, GvD.DataKeys(e.RowIndex).Value.ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
GvD.EditIndex = -1
|
GvD.EditIndex = -1
|
||||||
BtnConsultar_Click(sender, e)
|
BtnConsultar_Click(sender, e)
|
||||||
End If
|
End If
|
||||||
@@ -1138,16 +1138,16 @@ Partial Class Compras_eFacturas
|
|||||||
If ObjValidacion.EsValida = 2 Then
|
If ObjValidacion.EsValida = 2 Then
|
||||||
Alert("La factura está cancelada ante el SAT.", TipoMensaje.MsgInformacion)
|
Alert("La factura está cancelada ante el SAT.", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
Correcto = ObjDatos.UpdateEstatus(ObjValidacion.EsValida, GvRow.DataKey("CveFactura").ToEntero)
|
Correcto = ObjDatos.UpdateEstatus(ObjValidacion.EsValida, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa)
|
||||||
Else
|
Else
|
||||||
Alert("La Factura no se pudo validar.", TipoMensaje.MsgAdvertencia)
|
Alert("La Factura no se pudo validar.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
ObjValidacion.Dispose()
|
ObjValidacion.Dispose()
|
||||||
Case "ValidarCFD"
|
Case "ValidarCFD"
|
||||||
Correcto = ObjDatos.UpdateEstatus(1, GvRow.DataKey("CveFactura").ToEntero)
|
Correcto = ObjDatos.UpdateEstatus(1, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
Case "Omitir"
|
Case "Omitir"
|
||||||
Correcto = ObjDatos.UpdateEstatus(3, GvRow.DataKey("CveFactura").ToEntero)
|
Correcto = ObjDatos.UpdateEstatus(3, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa)
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
ObjDatos.Dispose()
|
ObjDatos.Dispose()
|
||||||
@@ -1261,7 +1261,7 @@ Partial Class Compras_eFacturas
|
|||||||
Dim ObjDatos As New ClsCompras
|
Dim ObjDatos As New ClsCompras
|
||||||
Dim FueValidado As Integer = 0
|
Dim FueValidado As Integer = 0
|
||||||
If GvPagos.Rows(e.RowIndex).FCCheckBox("ChkFueValidado").Checked Then FueValidado = 1
|
If GvPagos.Rows(e.RowIndex).FCCheckBox("ChkFueValidado").Checked Then FueValidado = 1
|
||||||
If ObjDatos.UpdateEstatus(FueValidado, GvD.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
If ObjDatos.UpdateEstatus(FueValidado, GvD.DataKeys(e.RowIndex).Value.ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
GvPagos.EditIndex = -1
|
GvPagos.EditIndex = -1
|
||||||
End If
|
End If
|
||||||
ObjDatos.Dispose()
|
ObjDatos.Dispose()
|
||||||
@@ -1298,16 +1298,16 @@ Partial Class Compras_eFacturas
|
|||||||
If ObjValidacion.EsValida = 2 Then
|
If ObjValidacion.EsValida = 2 Then
|
||||||
Alert("La factura está cancelada ante el SAT.", TipoMensaje.MsgInformacion)
|
Alert("La factura está cancelada ante el SAT.", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
Correcto = ObjDatos.UpdateEstatus(ObjValidacion.EsValida, GvRow.DataKey("CveFactura").ToEntero)
|
Correcto = ObjDatos.UpdateEstatus(ObjValidacion.EsValida, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa)
|
||||||
Else
|
Else
|
||||||
Alert("La Factura no se pudo validar.", TipoMensaje.MsgAdvertencia)
|
Alert("La Factura no se pudo validar.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
ObjValidacion.Dispose()
|
ObjValidacion.Dispose()
|
||||||
Case "ValidarCFD"
|
Case "ValidarCFD"
|
||||||
Correcto = ObjDatos.UpdateEstatus(1, GvRow.DataKey("CveFactura").ToEntero)
|
Correcto = ObjDatos.UpdateEstatus(1, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
Case "Omitir"
|
Case "Omitir"
|
||||||
Correcto = ObjDatos.UpdateEstatus(3, GvRow.DataKey("CveFactura").ToEntero)
|
Correcto = ObjDatos.UpdateEstatus(3, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa)
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
ObjDatos.Dispose()
|
ObjDatos.Dispose()
|
||||||
@@ -1317,15 +1317,15 @@ Partial Class Compras_eFacturas
|
|||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
Protected Sub ImgCFDiMasivo_Click(sender As Object, e As EventArgs) Handles LnkCFDiMasivo.Click
|
Protected Sub ImgCFDiMasivo_Click(sender As Object, e As EventArgs) Handles LnkCFDiMasivo.Click
|
||||||
Dim ObjDatos As New ClsCompras
|
|
||||||
ObjDatos.IniciaTransacSQL()
|
|
||||||
Dim ErrorTrans As Boolean = False
|
Dim ErrorTrans As Boolean = False
|
||||||
If Tab.ActiveTabIndex = 0 Then
|
If Tab.ActiveTabIndex = 0 Then
|
||||||
For Each GvRow As GridViewRow In GvD.Rows
|
For Each GvRow As GridViewRow In GvD.Rows
|
||||||
If GvRow.DataKey("TipoFactura") = "CFDi" AndAlso GvRow.DataKey("FueValidado").Contiene("0", "1") Then
|
If GvRow.DataKey("TipoFactura") = "CFDi" AndAlso GvRow.DataKey("FueValidado").Contiene("0", "1") Then
|
||||||
Dim ObjValidacion As New ClsValidaCFDi(GvRow.DataKey("UUID"), GvRow.DataKey("RFCDe"), GvRow.DataKey("RFCPara"), GvRow.DataKey("Total").ToDecimal)
|
Dim ObjValidacion As New ClsValidaCFDi(GvRow.DataKey("UUID"), GvRow.DataKey("RFCDe"), GvRow.DataKey("RFCPara"), GvRow.DataKey("Total").ToDecimal)
|
||||||
If ObjValidacion.EsValida > 0 Then
|
If ObjValidacion.EsValida > 0 Then
|
||||||
If Not ObjDatos.UpdateEstatus(ObjValidacion.EsValida, GvRow.DataKey("CveFactura").ToEntero) Then
|
Dim ObjDatos As New ClsCompras
|
||||||
|
If Not ObjDatos.UpdateEstatus(ObjValidacion.EsValida, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
ErrorTrans = True
|
ErrorTrans = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -1337,22 +1337,23 @@ Partial Class Compras_eFacturas
|
|||||||
If GvRow.DataKey("TipoFactura") = "CFDi" AndAlso GvRow.DataKey("FueValidado").Contiene("0", "1") Then
|
If GvRow.DataKey("TipoFactura") = "CFDi" AndAlso GvRow.DataKey("FueValidado").Contiene("0", "1") Then
|
||||||
Dim ObjValidacion As New ClsValidaCFDi(GvRow.DataKey("UUID"), GvRow.DataKey("RFCDe"), GvRow.DataKey("RFCPara"), 0)
|
Dim ObjValidacion As New ClsValidaCFDi(GvRow.DataKey("UUID"), GvRow.DataKey("RFCDe"), GvRow.DataKey("RFCPara"), 0)
|
||||||
If ObjValidacion.EsValida > 0 Then
|
If ObjValidacion.EsValida > 0 Then
|
||||||
If Not ObjDatos.UpdateEstatus(ObjValidacion.EsValida, GvRow.DataKey("CveFactura").ToEntero) Then
|
Dim ObjDatos As New ClsCompras
|
||||||
|
If Not ObjDatos.UpdateEstatus(ObjValidacion.EsValida, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
ErrorTrans = True
|
ErrorTrans = True
|
||||||
End If
|
End If
|
||||||
|
ObjDatos.Dispose()
|
||||||
End If
|
End If
|
||||||
ObjValidacion.Dispose()
|
ObjValidacion.Dispose()
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
If Not ErrorTrans Then
|
If Not ErrorTrans Then
|
||||||
ObjDatos.Commit()
|
|
||||||
Alert("La verificación masiva ha terminado", TipoMensaje.MsgInformacion)
|
Alert("La verificación masiva ha terminado", TipoMensaje.MsgInformacion)
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
Else
|
|
||||||
ObjDatos.RollBack()
|
|
||||||
End If
|
End If
|
||||||
ObjDatos.Dispose()
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub LnkNoRecibidas_Click(sender As Object, e As EventArgs, Optional ValidaRowCount As Boolean = False) Handles LnkNoRecibias.Click
|
Protected Sub LnkNoRecibidas_Click(sender As Object, e As EventArgs, Optional ValidaRowCount As Boolean = False) Handles LnkNoRecibias.Click
|
||||||
Dim DtNoRecibidas As New DataTable
|
Dim DtNoRecibidas As New DataTable
|
||||||
@@ -2656,7 +2657,7 @@ Partial Class Compras_eFacturas
|
|||||||
ObjGral.Dispose()
|
ObjGral.Dispose()
|
||||||
If Borrar = True Then
|
If Borrar = True Then
|
||||||
Dim ObjCompras As New ClsCompras
|
Dim ObjCompras As New ClsCompras
|
||||||
If ObjCompras.DeleteFactura(CveFactura) Then
|
If ObjCompras.DeleteFactura(CveFactura, UsuarioActual.CveEmpresa) Then
|
||||||
GvD.EditIndex = -1
|
GvD.EditIndex = -1
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divDescripcion"))
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "divDescripcion"))
|
||||||
Alert("La factura se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La factura se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
@@ -2681,7 +2682,7 @@ Partial Class Compras_eFacturas
|
|||||||
ObjGral.Dispose()
|
ObjGral.Dispose()
|
||||||
If Borrar = True Then
|
If Borrar = True Then
|
||||||
Dim ObjCompras As New ClsCompras
|
Dim ObjCompras As New ClsCompras
|
||||||
If ObjCompras.DeleteFactura(CveFactura) Then
|
If ObjCompras.DeleteFactura(CveFactura, UsuarioActual.CveEmpresa) Then
|
||||||
GvPagos.EditIndex = -1
|
GvPagos.EditIndex = -1
|
||||||
RegistraScript("$('#divDescripcionPago').modal('hide');")
|
RegistraScript("$('#divDescripcionPago').modal('hide');")
|
||||||
Alert("La factura se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La factura se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
@@ -3966,7 +3967,7 @@ Partial Class Compras_eFacturas
|
|||||||
ValidadoSAT = False
|
ValidadoSAT = False
|
||||||
Else
|
Else
|
||||||
Dim ObjDatos As New ClsCompras
|
Dim ObjDatos As New ClsCompras
|
||||||
ValidadoSAT = ObjDatos.UpdateEstatus(ObjValidacion.EsValida, gvRow.DataKey("CveFactura").ToEntero)
|
ValidadoSAT = ObjDatos.UpdateEstatus(ObjValidacion.EsValida, gvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa)
|
||||||
ObjDatos.Dispose()
|
ObjDatos.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user