-- option explicit
-- repie, filtro por usuario
This commit is contained in:
@@ -792,7 +792,7 @@ Public Class ClsBancos
|
||||
Public Function GetBancosRepIE(CveBanco As Integer, CveCuenta As Integer, TipoMovimiento As String, CveTipoTransaccion As Integer, Folio As String, PagueseA As String, Importe As Double,
|
||||
CveMoneda As Integer, EsAbonoEnCuenta As Integer, FueConciliado As Integer, CveEstatusIE As Integer,
|
||||
FechaInicio As Date, FechaFin As Date, FechaAplicacionInicio As Date, FechaAplicacionFin As Date,
|
||||
FechaConciliadoInicio As Date, FechaConciliadoFin As Date, CveUsuarioConcilio As Integer, TImporte As Double, CveEmpresa As Integer,
|
||||
FechaConciliadoInicio As Date, FechaConciliadoFin As Date, CveUsuarioConcilio As Integer, CveUsuarioRegistro As Integer, TImporte As Double, CveEmpresa As Integer,
|
||||
Optional CveEstatusNotificacion As Integer = -1, Optional CveCuentaTarjeta As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -821,6 +821,7 @@ Public Class ClsBancos
|
||||
.Add("@CveEstatusNotificacion", SqlDbType.Int).Value = CveEstatusNotificacion
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveCuentaTarjeta", SqlDbType.Int).Value = CveCuentaTarjeta
|
||||
.Add("@CveUsuarioRegistro", SqlDbType.Int).Value = CveUsuarioRegistro
|
||||
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
|
||||
|
||||
End With
|
||||
@@ -2708,19 +2709,22 @@ Public Class ClsBancos
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function RemoveCreditos(CveCredito As Integer) As Boolean
|
||||
Public Function RemoveCreditos(CveCredito As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Banc_CreditosRemove")
|
||||
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@CveCredito", SqlDbType.Int).Value = CveCredito
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCredito", SqlDbType.Int).Value = CveCredito
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 547;") Then
|
||||
Alert("El registro no se pudo eliminar porque está siendo usado.", TipoMensaje.MsgAdvertencia)
|
||||
Alert("El registro no se pudo eliminar porque está siendo utilizado.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al eliminar el registro.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
|
||||
@@ -6047,36 +6047,36 @@ Public Class ClsContabilidad
|
||||
#End Region
|
||||
|
||||
#Region "VALIDACION POLIZA DESCUADRADA"
|
||||
Public Function ValidacionPrePolizaCuadre(CvePrePoliza As Integer, Opcion As Integer, Optional CveVenta As Integer = -1, Optional AutoConta As Boolean = True) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
'Public Function ValidacionPrePolizaCuadre(CvePrePoliza As Integer, Opcion As Integer, Optional CveVenta As Integer = -1, Optional AutoConta As Boolean = True) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta_PrePolizasValidacion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@AutoConta", SqlDbType.Int).Value = If(AutoConta, 1, 0)
|
||||
.Add("@Valor", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output
|
||||
.Add("@MsgPrePolizaSalida", SqlDbType.VarChar, 8000).Direction = ParameterDirection.Output
|
||||
.Add("@Diferencia", SqlDbType.Float).Direction = ParameterDirection.Output
|
||||
End With
|
||||
' DataAdapter("PA_Conta_PrePolizasValidacion")
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||
' .Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
' ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
' .Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
' .Add("@AutoConta", SqlDbType.Int).Value = If(AutoConta, 1, 0)
|
||||
' .Add("@Valor", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
' .Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output
|
||||
' .Add("@MsgPrePolizaSalida", SqlDbType.VarChar, 8000).Direction = ParameterDirection.Output
|
||||
' .Add("@Diferencia", SqlDbType.Float).Direction = ParameterDirection.Output
|
||||
' End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
ValorPolizaDescuadre = SqlAdapter.SelectCommand.Parameters("@Valor").Value.ToString.ToEntero
|
||||
MensajePolizaDescuadre = SqlAdapter.SelectCommand.Parameters("@MsgSalida").Value.ToString
|
||||
ValorDiferencia = SqlAdapter.SelectCommand.Parameters("@Diferencia").Value.ToString
|
||||
Dim MsgPrePoliza As String = SqlAdapter.SelectCommand.Parameters("@MsgPrePolizaSalida").Value.ToString
|
||||
If MsgPrePoliza <> "" Then MsgPrePoliza.GuardaLogAD("LogPrePoliza")
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al validar la PrePoliza.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' Retorno = True
|
||||
' ValorPolizaDescuadre = SqlAdapter.SelectCommand.Parameters("@Valor").Value.ToString.ToEntero
|
||||
' MensajePolizaDescuadre = SqlAdapter.SelectCommand.Parameters("@MsgSalida").Value.ToString
|
||||
' ValorDiferencia = SqlAdapter.SelectCommand.Parameters("@Diferencia").Value.ToString
|
||||
' Dim MsgPrePoliza As String = SqlAdapter.SelectCommand.Parameters("@MsgPrePolizaSalida").Value.ToString
|
||||
' If MsgPrePoliza <> "" Then MsgPrePoliza.GuardaLogAD("LogPrePoliza")
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al validar la PrePoliza.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
' End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
Public Function ValidacionesPrePoliza(CvePrePoliza As Integer, ByRef UsuarioActual As Usuario, Optional Opcion As Integer = 1,
|
||||
Optional CveVenta As Integer = -1, Optional AutoConta As Boolean = True,
|
||||
|
||||
@@ -131,7 +131,7 @@ Public Class ClsPaginas
|
||||
End If
|
||||
ObjGral.Dispose()
|
||||
End If
|
||||
Dim fluctuacion = New MTipoCambioFluctuacion() With {
|
||||
Dim fluctuacion As MTipoCambioFluctuacion = New MTipoCambioFluctuacion() With {
|
||||
.TCFluctuacion = 0,
|
||||
.FechaFluctuacion = MinFecha
|
||||
}
|
||||
@@ -139,7 +139,7 @@ Public Class ClsPaginas
|
||||
If Fecha = MinFecha Then Fecha = Now
|
||||
If HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") IsNot Nothing Then
|
||||
|
||||
Dim dr = DirectCast(HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion"), DataTable).FiltroPrimero(String.Format("Fecha < '{0}'", Fecha), Orderby:="Fecha DESC")
|
||||
Dim dr As DataRow = DirectCast(HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion"), DataTable).FiltroPrimero(String.Format("Fecha < '{0}'", Fecha), Orderby:="Fecha DESC")
|
||||
If dr IsNot Nothing Then
|
||||
fluctuacion.TCFluctuacion = dr("TCFluctuacion").ToString().ToDecimal()
|
||||
fluctuacion.FechaFluctuacion = dr("FechaFluctuacion").ToString().ToDateTime()
|
||||
@@ -6559,9 +6559,9 @@ Public Class ClsPaginas
|
||||
ObjEmpresa.Dispose()
|
||||
'----------------------- COTIZACIONES --------------------------
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim NumCotizaciones = 0
|
||||
Dim NumCotizaciones As Integer = 0
|
||||
Dim DtCotizaciones As New DataTable
|
||||
Dim ProveedoresCotizacion = New ArrayList
|
||||
Dim ProveedoresCotizacion As ArrayList = New ArrayList
|
||||
Dim Ds As DataSet = ObjOC.GetCotizacionesTabla(tCveOrdenCompra)
|
||||
If Ds IsNot Nothing AndAlso Ds.Tables.Count = 2 Then
|
||||
For Each Dr2 As DataRow In Ds.Tables(1).Rows
|
||||
@@ -6576,7 +6576,7 @@ Public Class ClsPaginas
|
||||
If Not DtCotizaciones.Columns.Contains("PU5") Then DtCotizaciones.Columns.Add("PU5", GetType(String))
|
||||
End If
|
||||
'COTIZACION
|
||||
For Index = 1 To 5
|
||||
For Index As Integer = 1 To 5
|
||||
Try
|
||||
params.Add(New ReportParameter($"Cotizacion{Index.ToString}", ProveedoresCotizacion(Index - 1).ToString))
|
||||
Catch ex As Exception
|
||||
@@ -6913,7 +6913,7 @@ Public Class ClsPaginas
|
||||
|
||||
Dim LSRds As New List(Of ReportDataSource)
|
||||
|
||||
Dim rds2 = New ReportDataSource()
|
||||
Dim rds2 As ReportDataSource = New ReportDataSource()
|
||||
Dim dtqr As New DataTable
|
||||
Dim column As DataColumn = New DataColumn("ImagenByte")
|
||||
column.DataType = System.Type.[GetType]("System.Byte[]")
|
||||
@@ -6929,13 +6929,13 @@ Public Class ClsPaginas
|
||||
Dim numnewfiles As Integer = 0
|
||||
If DTPercepciones.Rows.Count > DTDeducciones2.Rows.Count Then
|
||||
numnewfiles = DTPercepciones.Rows.Count - DTDeducciones2.Rows.Count
|
||||
For index = 1 To numnewfiles
|
||||
For index As Integer = 1 To numnewfiles
|
||||
DTDeducciones2.Rows.Add(DTDeducciones2.NewRow)
|
||||
Next
|
||||
Else
|
||||
If DTDeducciones2.Rows.Count > DTPercepciones.Rows.Count Then
|
||||
numnewfiles = DTDeducciones2.Rows.Count - DTPercepciones.Rows.Count
|
||||
For index = 1 To numnewfiles
|
||||
For index As Integer = 1 To numnewfiles
|
||||
DTPercepciones.Rows.Add(DTPercepciones.NewRow)
|
||||
Next
|
||||
End If
|
||||
|
||||
@@ -3096,14 +3096,14 @@ Namespace Modelos
|
||||
Dim FechaMovimiento As Date = ObjFactura.Fecha
|
||||
Dim Concepto As String = ObjFactura.SerieFolio
|
||||
Dim Referencia As String = ObjFactura.SerieFolio
|
||||
Dim Fecha = ObjFactura.Fecha
|
||||
Dim Fecha As Date = ObjFactura.Fecha
|
||||
|
||||
Dim importeMX As Decimal
|
||||
Dim Multiplicador As Integer
|
||||
Dim CveIEPago As Integer
|
||||
Dim FolioIE As Long
|
||||
Dim CveIEAnticipo As Integer
|
||||
Dim CveSubProyectoVenta = ObjFactura.CveSubProyecto
|
||||
Dim CveSubProyectoVenta As Integer = ObjFactura.CveSubProyecto
|
||||
Dim CveSubProyectoContabilizar As Integer
|
||||
Dim SeContabiliza As Boolean = True
|
||||
Dim DtPrePolizasAFCancelar As DataTable = Nothing
|
||||
@@ -3262,7 +3262,7 @@ Namespace Modelos
|
||||
'VERIFICA SI TIENE MOVIMIENTO DE ENTRADA DE USADO
|
||||
If CveMovimiento > 0 AndAlso CveAlmacen > 0 Then
|
||||
Dim CveMovimientoReferencia As Integer = -1
|
||||
Dim TipoMovto68 = TipoMovimiento
|
||||
Dim TipoMovto68 As Boolean = TipoMovimiento
|
||||
'SI ES CANCELACION DEBE GENERAR EL MOVIMIENTO DE SALIDA DE USADOS
|
||||
If ValorMultiplicador = -1 Then
|
||||
CveMovimientoReferencia = CancelarInventarioUsado(ObjFactura, CveAlmacen, CveMovimiento, ObjInventario, ObjConta, GenerarPrePoliza:=False)
|
||||
@@ -3431,7 +3431,7 @@ Namespace Modelos
|
||||
ErrorPrepoliza = ClsPaginas.AplicaPrePolizaPagoVenta(ventaRef, Pago, ObjFactura.CvePrePoliza, ObjConta)
|
||||
Next
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 5) Then
|
||||
If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=5) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
ErrorPrepoliza = True
|
||||
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
|
||||
@@ -3450,11 +3450,11 @@ Namespace Modelos
|
||||
|
||||
'APLICA DEVOLUCION SALDOS DIRECTOS
|
||||
If ObjFactura.AplicaDevolucion Then
|
||||
Dim TipoCambioFactura = ObjFactura.TipoCambio
|
||||
Dim importeMovimientoDev = ObjFactura.Total
|
||||
Dim TipoCambioFactura As Decimal = ObjFactura.TipoCambio
|
||||
Dim importeMovimientoDev As Decimal = ObjFactura.Total
|
||||
importeMovimientoDev = If(ObjFactura.SaldoVentaDevolucion < importeMovimientoDev, ObjFactura.SaldoVentaDevolucion, importeMovimientoDev)
|
||||
If importeMovimientoDev > 0 Then
|
||||
Dim importeMXDev = importeMovimientoDev * tipoCambio * Multiplicador
|
||||
Dim importeMXDev As Decimal = importeMovimientoDev * tipoCambio * Multiplicador
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimientoDev.FormatoNumero(2)}"
|
||||
|
||||
If UsaComplementariaClientes AndAlso tipoCambio > 1 Then
|
||||
@@ -3505,7 +3505,7 @@ Namespace Modelos
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 5) Then
|
||||
If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=5) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
ErrorPrepoliza = True
|
||||
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
|
||||
@@ -4152,8 +4152,7 @@ Namespace Modelos
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 2) Then
|
||||
If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=2) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
If ObjConta.ValorPolizaDescuadre = 2 Then
|
||||
ErrorList.Add(ObjConta.MensajePolizaDescuadre)
|
||||
@@ -5885,8 +5884,7 @@ Namespace Modelos
|
||||
AutoConta = False
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorCancelar AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePolizaDev, -1) Then
|
||||
If Not ErrorCancelar AndAlso ObjConta.ValidacionesPrePoliza(CvePrePolizaDev, UsuarioActual) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Modelos/RecepcionEntrega | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
ErrorCancelar = True
|
||||
@@ -5900,7 +5898,7 @@ Namespace Modelos
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
ErrorCancelar = True
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un Error al ingresar las prepolizas"
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -28,7 +28,7 @@ Public Class Timbrado
|
||||
Public Property CancelacionState As Integer
|
||||
Public Property CancelacionMensaje As String
|
||||
Public Property CancelacionFecha As Date
|
||||
Public Const LigaVerificacionSAT = "https://verificacfdi.facturaelectronica.sat.gob.mx/default.aspx"
|
||||
Public Const LigaVerificacionSAT As String = "https://verificacfdi.facturaelectronica.sat.gob.mx/default.aspx"
|
||||
|
||||
Public Class AcuseCancelacionSAT
|
||||
Public Property CodigoEstatus As String
|
||||
@@ -63,7 +63,7 @@ Public Class Timbrado
|
||||
Dim Retorno As Boolean = False
|
||||
Try
|
||||
Dim RowVentas As DataRow = Nothing
|
||||
Dim RFCEmisor = UsuarioActual.Empresa.RFC
|
||||
Dim RFCEmisor As String = UsuarioActual.Empresa.RFC
|
||||
Dim RFCReceptor As String = ""
|
||||
Dim FolioFiscal As String = ""
|
||||
Dim FolioSustitucion As String = ""
|
||||
@@ -104,7 +104,7 @@ Public Class Timbrado
|
||||
Dim xmlDoc As New System.Xml.XmlDocument()
|
||||
xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.CfdiB64)))
|
||||
Dim xpath As String = "Acuse/Folios"
|
||||
Dim nodes = xmlDoc.SelectNodes(xpath)
|
||||
Dim nodes As XmlNodeList = xmlDoc.SelectNodes(xpath)
|
||||
CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero
|
||||
|
||||
xpath = "Acuse/Signature"
|
||||
@@ -171,7 +171,7 @@ Public Class Timbrado
|
||||
End Function
|
||||
|
||||
Public Shared Function ConsultarUUIDRelacionados(Empresa As Empresa, FolioFiscal As String, Optional Produccion As Boolean = True) As MRespUUIDRelacionados
|
||||
Dim Retorno = New MRespUUIDRelacionados()
|
||||
Dim Retorno As MRespUUIDRelacionados = New MRespUUIDRelacionados()
|
||||
Dim resp As Cancelacion2022.StructRelations = New Cancelacion2022.StructRelations()
|
||||
|
||||
Using ws As Cancelacion2022.CancelacionSoapClient = New Cancelacion2022.CancelacionSoapClient
|
||||
@@ -219,18 +219,14 @@ Public Class Timbrado
|
||||
Dim Retorno As New RespuestaCancelacionSAT
|
||||
Dim MsgCancelacion As New StringBuilder
|
||||
'dim Error
|
||||
If CvePACCancelacion = 3 Then
|
||||
ValidaFactura = False
|
||||
End If
|
||||
If CvePACCancelacion = 3 Then ValidaFactura = False
|
||||
|
||||
'TEMPORAL. PARCHE PARA CANCELAR DOCUMENTOS EMITIDOS CON EL PAC 5
|
||||
If CvePACCancelacion = 5 Then
|
||||
CvePACCancelacion = 4
|
||||
End If
|
||||
If CvePACCancelacion = 5 Then CvePACCancelacion = 4
|
||||
|
||||
If Not (Empresa.Funcionalidad(529) = "1") Then
|
||||
If ValidaFactura Then
|
||||
Dim Vigencia = VerificarVigenciaSAT(FolioFiscal, RFCEmisor, RFCReceptor, Total.ToString(), True)
|
||||
Dim Vigencia As AcuseCancelacionSAT = VerificarVigenciaSAT(FolioFiscal, RFCEmisor, RFCReceptor, Total.ToString(), True)
|
||||
If Vigencia IsNot Nothing Then
|
||||
If Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then
|
||||
Retorno.Estado = "NO CANCELABLE"
|
||||
@@ -442,7 +438,7 @@ Public Class Timbrado
|
||||
Dim xmlDoc As New System.Xml.XmlDocument()
|
||||
xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml)))
|
||||
Dim xpath As String = "Acuse/Folios"
|
||||
Dim nodes = xmlDoc.SelectNodes(xpath)
|
||||
Dim nodes As XmlNodeList = xmlDoc.SelectNodes(xpath)
|
||||
CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero
|
||||
|
||||
xpath = "Acuse/Signature"
|
||||
@@ -472,7 +468,7 @@ Public Class Timbrado
|
||||
Dim xmlDoc As New System.Xml.XmlDocument()
|
||||
xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.CfdiB64)))
|
||||
Dim xpath As String = "Acuse/Folios"
|
||||
Dim nodes = xmlDoc.SelectNodes(xpath)
|
||||
Dim nodes As XmlNodeList = xmlDoc.SelectNodes(xpath)
|
||||
CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero
|
||||
|
||||
xpath = "Acuse/Signature"
|
||||
@@ -561,6 +557,8 @@ Public Class Timbrado
|
||||
If resultadoCancelacion.Exitoso OrElse resultadoCancelacion.NumeroError.Contiene("202", "330279") Then
|
||||
MsgCancelacion.AppendFormat("-3.4")
|
||||
CancelacionMensaje = resultadoCancelacion.Descripcion
|
||||
Retorno.CancelacionFecha = CancelacionFecha
|
||||
Retorno.Verificado = True
|
||||
Dim xmlDoc As New System.Xml.XmlDocument()
|
||||
|
||||
MsgCancelacion.AppendFormat("-3.4.1")
|
||||
@@ -580,11 +578,11 @@ Public Class Timbrado
|
||||
|
||||
If xmlDoc.HasChildNodes Then
|
||||
Dim xpath As String = "Acuse/Folios"
|
||||
Dim nodes = xmlDoc.SelectNodes(xpath)
|
||||
'Dim nodes = xmlDoc.SelectNodes(xpath)
|
||||
CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero
|
||||
MsgCancelacion.AppendFormat("-3.4.2")
|
||||
xpath = "Acuse/Signature"
|
||||
nodes = xmlDoc.SelectNodes(xpath)
|
||||
'nodes = xmlDoc.SelectNodes(xpath)
|
||||
MsgCancelacion.AppendFormat("-3.4.3")
|
||||
CancelacionAcuse = xmlDoc.GetElementsByTagName("SignatureValue")(0).InnerText
|
||||
CancelacionFecha = xmlDoc.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate
|
||||
@@ -683,7 +681,7 @@ Public Class Timbrado
|
||||
Dim xmlDoc As New System.Xml.XmlDocument()
|
||||
xmlDoc.LoadXml(objCan.Xml)
|
||||
Dim xpath As String = "Acuse/Folios"
|
||||
Dim nodes = xmlDoc.SelectNodes(xpath)
|
||||
Dim nodes As XmlNodeList = xmlDoc.SelectNodes(xpath)
|
||||
|
||||
xpath = "Acuse/Signature"
|
||||
nodes = xmlDoc.SelectNodes(xpath)
|
||||
@@ -791,7 +789,7 @@ Public Class Timbrado
|
||||
'valida que si se halla cancelado
|
||||
|
||||
If Retorno.Verificado Then
|
||||
Dim VigenciaExtra = VerificarVigenciaSAT(FolioFiscal, RFCEmisor, RFCReceptor, Total.ToString(), True)
|
||||
Dim VigenciaExtra As AcuseCancelacionSAT = VerificarVigenciaSAT(FolioFiscal, RFCEmisor, RFCReceptor, Total.ToString(), True)
|
||||
If VigenciaExtra IsNot Nothing Then
|
||||
If VigenciaExtra.Estado.ToUpper = "VIGENTE" AndAlso VigenciaExtra.EstatusCancelacion.ToUpper.Contiene("EN PROCESO") Then
|
||||
Retorno.Estado = "EN PROCESO"
|
||||
@@ -1821,7 +1819,7 @@ Public Class Timbrado
|
||||
Totales.TotalRetencionesIEPSSpecified = False
|
||||
End If
|
||||
|
||||
Dim ComPag = New Profact.TimbraCFDI40.Complementos.Pagos20.Pagos()
|
||||
Dim ComPag As Profact.TimbraCFDI40.Complementos.Pagos20.Pagos = New Profact.TimbraCFDI40.Complementos.Pagos20.Pagos()
|
||||
|
||||
ComPag.Totales = Totales
|
||||
ComPag.Pago = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPago(ObjCFDITimbre.ComplementoPagos20.ComplementoPagos.Count - 1) {}
|
||||
@@ -1978,7 +1976,7 @@ Public Class Timbrado
|
||||
|
||||
''DATOS GENERALES
|
||||
Dim Carta As CFDICartaPorte = ObjCFDITimbre.Complementos.CartaPorte
|
||||
Dim ComCartaPorte = New ProfactCartaPorte.CartaPorte()
|
||||
Dim ComCartaPorte As ProfactCartaPorte.CartaPorte = New ProfactCartaPorte.CartaPorte()
|
||||
ComCartaPorte.TranspInternac = CType([Enum].Parse(GetType(ProfactCartaPorte.CartaPorteTranspInternac), Carta.TranspInternac), ProfactCartaPorte.CartaPorteTranspInternac)
|
||||
ComCartaPorte.EntradaSalidaMercSpecified = False
|
||||
ComCartaPorte.ViaEntradaSalidaSpecified = False
|
||||
@@ -2178,7 +2176,7 @@ Public Class Timbrado
|
||||
|
||||
#Region " Nomina12"
|
||||
If ObjCFDITimbre.Comprobante.TipoComprobante = "N" Then
|
||||
Dim Nom = New Profact.TimbraCFDI33.Complementos.Nomina12.Nomina()
|
||||
Dim Nom As Nomina12.Nomina = New Profact.TimbraCFDI33.Complementos.Nomina12.Nomina()
|
||||
'cfdi.Esquema.AgregarEsquema("http://www.sat.gob.mx/nomina12 http://www.sat.gob.mx/sitio_internet/cfd/nomina/nomina12.xsd")
|
||||
Nom.Version = ObjCFDITimbre.Nomina.Version
|
||||
Nom.TipoNomina = ObjCFDITimbre.Nomina.TipoNomina
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
<li>
|
||||
<asp:HyperLink ID="HLAplicarSaldo" data-toggle="modal" data-target="#ModalAplicarPrePoliza" runat="server" Visible="false"><i class="fa fa-exchange"></i> Aplicar Saldo</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="HplAplicarDeposito" data-toggle="modal" data-target="#ModalAplicarDeposito" runat="server" Visible="false"><i class="fa fa-exchange"></i> Aplicar Depósito</asp:HyperLink>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -66,7 +69,7 @@
|
||||
<ContentTemplate>
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -466,7 +469,7 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpEntidadFinanciera" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -527,7 +530,7 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -601,7 +604,7 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -654,7 +657,7 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -742,7 +745,7 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -853,7 +856,7 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -933,7 +936,7 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpFacturaCompra" UpdateMode="Conditional" Visible="false">
|
||||
<ContentTemplate>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -984,7 +987,7 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpSaldo" UpdateMode="Conditional" Visible="false">
|
||||
<ContentTemplate>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -1032,7 +1035,7 @@
|
||||
<%--ACCIONES--%>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -1079,7 +1082,7 @@
|
||||
<ContentTemplate>
|
||||
<div class="row" id="RowTA" runat="server" visible="false">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
|
||||
@@ -312,7 +312,7 @@ Partial Class Bancos_Creditos
|
||||
'CARGA CREDITO DETALLE
|
||||
If ObjCreditos.GetCreditosDetalle(dr("CveCredito").ToString.ToEntero, -1) Then
|
||||
If ObjCreditos.DtResultados.Rows.Count = 1 Then
|
||||
Dim DT = ObjCreditos.DtResultados.Rows(0)
|
||||
Dim DT As DataRow = ObjCreditos.DtResultados.Rows(0)
|
||||
|
||||
If DT("Estatus").ToString.Contiene("1", "101", "102") Then
|
||||
trPagar.Visible = True
|
||||
@@ -320,11 +320,11 @@ Partial Class Bancos_Creditos
|
||||
End If
|
||||
|
||||
If CveTipoCredito = 2 Then
|
||||
Dim TotalCredi = 0
|
||||
Dim TotalCredi As Decimal = 0
|
||||
'TxtCSPeriodos.Text = ObjCreditos.DtResultados.Rows.Count.ToString
|
||||
'TxtCSFechaInicio.Text = ObjCreditos.DtResultados.FiltraParametros("Periodo = 1").Rows(0)("Fecha").ToString
|
||||
|
||||
For index = 1 To ObjCreditos.DtResultados.Rows.Count
|
||||
For index As Integer = 1 To ObjCreditos.DtResultados.Rows.Count
|
||||
TotalCredi += ObjCreditos.DtResultados.Rows(index - 1)("Capital").ToString.ToEntero
|
||||
Next
|
||||
TxtCSTotalCredito.Text = TotalCredi.ToString.FormatoNumero
|
||||
@@ -671,33 +671,33 @@ Partial Class Bancos_Creditos
|
||||
|
||||
Dim ObjCredito As New ClsBancos
|
||||
Dim ObjMov As New ClsContabilidad(ObjCredito.IniciaTransacSQL())
|
||||
Dim ErrorCredito = False
|
||||
Dim ErrorCredito As Boolean = False
|
||||
Dim Folio As String = ""
|
||||
Dim CvePrePoliza As Integer = 0
|
||||
|
||||
If CveCredito = -1 Then
|
||||
Dim TipoCreditoTemp = DdlTipoCredito.SelectedValue.ToEntero
|
||||
Dim TipoCreditoTemp As Integer = DdlTipoCredito.SelectedValue.ToEntero
|
||||
|
||||
'Credito Revolvente -- ADD IE
|
||||
If TipoCreditoTemp = 2 AndAlso DdlCuentaDeposito.SelectedValue.ToEntero > 0 Then
|
||||
Folio = ObjCredito.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToString.ToEntero, 8).ToString
|
||||
If Folio <> "" Then
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Creditos", 2, 0, 0, 1, TxtFechaDeposito.Text.ToDate, TxtCSReferencia.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
'If TipoCreditoTemp = 2 AndAlso DdlCuentaDeposito.SelectedValue.ToEntero > 0 Then
|
||||
' Folio = ObjCredito.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToString.ToEntero, 8).ToString
|
||||
' If Folio <> "" Then
|
||||
' CvePrePoliza = ObjMov.AddPrePolizas("Creditos", 2, 0, 0, 1, TxtFechaDeposito.Text.ToDate, TxtCSReferencia.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
CveIE = ObjCredito.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToString.ToEntero, 8, TxtFechaDeposito.Text.ToDate, Folio, LtBancoDeposito.Text, TxtCSTotalCredito.Text.ToString.ToDouble, 1, 1, "Credito Revolvente", "", True, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CveIE < 0 Then
|
||||
ErrorCredito = True
|
||||
End If
|
||||
'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtCSTotalCredito.Text.ToString.ToDouble, "Crédito", 50, "", Now, 0, -1, CveIE, ImporteMX:=TxtCSTotalCredito.Text.ToString.ToDouble) Then
|
||||
' ErrorCredito = True
|
||||
'End If
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtCSTotalCredito.Text.ToDecimal, TxtCSTotalCredito.Text.ToDecimal, 30, "Crédito", "", CveIE:=CveIE) Then
|
||||
ErrorCredito = True
|
||||
End If
|
||||
Else
|
||||
ErrorCredito = True
|
||||
End If
|
||||
End If
|
||||
' CveIE = ObjCredito.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToString.ToEntero, 8, TxtFechaDeposito.Text.ToDate, Folio, LtBancoDeposito.Text, TxtCSTotalCredito.Text.ToString.ToDouble, 1, 1, "Credito Revolvente", "", True, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
' If CveIE < 0 Then
|
||||
' ErrorCredito = True
|
||||
' End If
|
||||
' 'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtCSTotalCredito.Text.ToString.ToDouble, "Crédito", 50, "", Now, 0, -1, CveIE, ImporteMX:=TxtCSTotalCredito.Text.ToString.ToDouble) Then
|
||||
' ' ErrorCredito = True
|
||||
' 'End If
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtCSTotalCredito.Text.ToDecimal, TxtCSTotalCredito.Text.ToDecimal, 30, "Crédito", "", CveIE:=CveIE) Then
|
||||
' ErrorCredito = True
|
||||
' End If
|
||||
' Else
|
||||
' ErrorCredito = True
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'Credito Generico
|
||||
If Not ErrorCredito Then
|
||||
@@ -707,13 +707,13 @@ Partial Class Bancos_Creditos
|
||||
CveProveedor = HdnCveProveedor.Value.ToEntero
|
||||
End If
|
||||
|
||||
CveIE = ObjCredito.AddBancos_IE(DdlCuentaCredito.SelectedValue.ToString.ToEntero, 2, TxtFechaDeposito.Text.ToDate, Folio, LtBancoDeposito.Text, TxtCSTotalCredito.Text.ToString.ToDouble, 1, 1, "Credito Revolvente", "", True, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CveIE < 0 Then
|
||||
ErrorCredito = True
|
||||
End If
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtCSTotalCredito.Text.ToDecimal, TxtCSTotalCredito.Text.ToDecimal, 30, "Crédito", "Crédito") Then
|
||||
ErrorCredito = True
|
||||
End If
|
||||
'CveIE = ObjCredito.AddBancos_IE(DdlCuentaCredito.SelectedValue.ToString.ToEntero, 2, TxtFechaDeposito.Text.ToDate, Folio, LtBancoDeposito.Text, TxtCSTotalCredito.Text.ToString.ToDouble, 1, 1, "Credito Revolvente", "", True, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
'If CveIE < 0 Then
|
||||
' ErrorCredito = True
|
||||
'End If
|
||||
'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtCSTotalCredito.Text.ToDecimal, TxtCSTotalCredito.Text.ToDecimal, 30, "Crédito", "Crédito") Then
|
||||
' ErrorCredito = True
|
||||
'End If
|
||||
|
||||
If ObjCredito.AddCreditos(TipoCreditoTemp, TxtCSReferencia.Text, TxtCSObservaciones.Text, DdlCuentaCredito.SelectedValue.ToEntero, HdnCveCompra.Value.ToEntero, -1, DdlCSTipoMoneda.SelectedValue.ToEntero, TxtCSFechaInicio.Text.Trim.ToDate,
|
||||
TxtCSFechaVencimiento.Text.Trim.ToDate, TxtCSTasa.Text.Trim.ToDouble, TxtCSSobreTasa.Text.Trim.ToDouble, -1, TxtCSPlazo.Text.ToEntero, CveIE, If(TipoCreditoTemp = 2, TxtCSTotalCredito.Text.ToEntero, TotalCompra),
|
||||
@@ -755,10 +755,10 @@ Partial Class Bancos_Creditos
|
||||
|
||||
Dim ObjCredito As New ClsBancos
|
||||
ObjCredito.IniciaTransacSQL()
|
||||
Dim ErrorCredito = False
|
||||
Dim ErrorCredito As Boolean = False
|
||||
|
||||
If CveCredito > 0 Then
|
||||
Dim TipoCreditoTemp = DdlTipoCredito.SelectedValue.ToEntero
|
||||
Dim TipoCreditoTemp As Integer = DdlTipoCredito.SelectedValue.ToEntero
|
||||
|
||||
If ObjCredito.UpdateCreditos(CveCredito, TipoCreditoTemp, TxtCSReferencia.Text, TxtCSObservaciones.Text, DdlCuentaCredito.SelectedValue.ToEntero, HdnCveCompra.Value.ToEntero, -1, DdlCSTipoMoneda.SelectedValue.ToEntero, TxtCSFechaInicio.Text.Trim.ToDate,
|
||||
TxtCSFechaVencimiento.Text.Trim.ToDate, TxtCSTasa.Text.Trim.ToDouble, TxtCSSobreTasa.Text.Trim.ToDouble, -1, TxtCSPlazo.Text.ToEntero, CveIE, If(TipoCreditoTemp = 2, TxtCSTotalCredito.Text.ToEntero, TotalCompra),
|
||||
@@ -783,7 +783,7 @@ Partial Class Bancos_Creditos
|
||||
End Sub
|
||||
|
||||
Private Sub GuardaCreditoComplejo()
|
||||
Dim TotalAnticipo = TxtVehiculoAnticipo.Text.ToDouble + TxtComisionAnticipo.Text.ToDouble + TxtSeguroAnticipo.Text.ToDouble
|
||||
Dim TotalAnticipo As Double = TxtVehiculoAnticipo.Text.ToDouble + TxtComisionAnticipo.Text.ToDouble + TxtSeguroAnticipo.Text.ToDouble
|
||||
|
||||
If TxtTotalCredito.Text.ToString.ToDouble <= 0 Then
|
||||
Alert("El total del credito debe ser mayor a 0", TipoMensaje.MsgAdvertencia)
|
||||
@@ -795,12 +795,12 @@ Partial Class Bancos_Creditos
|
||||
|
||||
Dim ObjCredito As New ClsBancos
|
||||
Dim ObjMov As New ClsContabilidad(ObjCredito.IniciaTransacSQL())
|
||||
Dim ErrorCredito = False
|
||||
Dim folio = ""
|
||||
Dim CveIE = -1
|
||||
Dim CvePrePoliza = 0
|
||||
Dim ErrorCredito As Boolean = False
|
||||
Dim folio As String = ""
|
||||
Dim CveIE As Integer = -1
|
||||
Dim CvePrePoliza As Integer = 0
|
||||
Dim CveMoneda As Integer = 1
|
||||
Dim FechaVencimiento = DateAdd("m", TxtPlazo.Text.ToDouble, TxtFechaInicio.Text.ToDate)
|
||||
Dim FechaVencimiento As Date = DateAdd("m", TxtPlazo.Text.ToDouble, TxtFechaInicio.Text.ToDate)
|
||||
FechaVencimiento = DateSerial(Year(FechaVencimiento), Month(FechaVencimiento) + 1, 0)
|
||||
|
||||
'If (DdlTipoCredito.SelectedValue.ToEntero = 3 Or DdlTipoCredito.SelectedValue.ToEntero = 5) AndAlso HdnCveAF.Value.ToEntero > -1 Then
|
||||
@@ -923,8 +923,8 @@ Partial Class Bancos_Creditos
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateCreditoComplejo()
|
||||
Dim TotalAnticipo = TxtVehiculoAnticipo.Text.ToDouble + TxtComisionAnticipo.Text.ToDouble + TxtSeguroAnticipo.Text.ToDouble
|
||||
Dim TotalAnticipoVinculado = 0.0
|
||||
Dim TotalAnticipo As Double = TxtVehiculoAnticipo.Text.ToDouble + TxtComisionAnticipo.Text.ToDouble + TxtSeguroAnticipo.Text.ToDouble
|
||||
Dim TotalAnticipoVinculado As Double = 0.0
|
||||
|
||||
If TxtTotalCredito.Text.ToString.ToDouble <= 0 Then
|
||||
Alert("El total del credito debe ser mayor a 0", TipoMensaje.MsgAdvertencia)
|
||||
@@ -956,10 +956,10 @@ Partial Class Bancos_Creditos
|
||||
|
||||
Dim ObjCredito As New ClsBancos
|
||||
ObjCredito.IniciaTransacSQL()
|
||||
Dim ErrorCredito = False
|
||||
Dim ErrorCredito As Boolean = False
|
||||
'Dim CveIE = -1
|
||||
Dim CveMoneda As Integer = 1
|
||||
Dim FechaVencimiento = DateAdd("m", TxtPlazo.Text.ToDouble, TxtFechaInicio.Text.ToDate)
|
||||
Dim FechaVencimiento As Date = DateAdd("m", TxtPlazo.Text.ToDouble, TxtFechaInicio.Text.ToDate)
|
||||
FechaVencimiento = DateSerial(Year(FechaVencimiento), Month(FechaVencimiento) + 1, 0)
|
||||
|
||||
If CveCredito > 0 Then
|
||||
@@ -1049,7 +1049,7 @@ Partial Class Bancos_Creditos
|
||||
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
|
||||
Dim Cred As New ClsBancos
|
||||
|
||||
If Cred.RemoveCreditos(CveCredito) Then
|
||||
If Cred.RemoveCreditos(CveCredito, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Movimiento Eliminado", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
Cred.Dispose()
|
||||
@@ -1099,7 +1099,7 @@ Partial Class Bancos_Creditos
|
||||
Dim Tasa As Double = 0
|
||||
|
||||
If TxtMensualidad.Text.ToDouble <= 0 Then
|
||||
Dim Mensualidad = Pmt((TxtTasa.Text.ToDouble / 100) / 12, TxtPlazo.Text.ToDouble, TxtTotalCredito.Text.ToDouble) * -1
|
||||
Dim Mensualidad As Double = Pmt((TxtTasa.Text.ToDouble / 100) / 12, TxtPlazo.Text.ToDouble, TxtTotalCredito.Text.ToDouble) * -1
|
||||
TxtMensualidad.Text = Mensualidad.ToString.FormatoNumero
|
||||
End If
|
||||
|
||||
@@ -1120,7 +1120,7 @@ Partial Class Bancos_Creditos
|
||||
|
||||
Dim MensajeImportesIncorrectos As Boolean = False
|
||||
|
||||
For i = 1 To TxtPlazo.Text.ToEntero
|
||||
For i As Integer = 1 To TxtPlazo.Text.ToEntero
|
||||
Row = DTAmortizacion.NewRow()
|
||||
|
||||
'Datos en comun
|
||||
@@ -1267,7 +1267,7 @@ Partial Class Bancos_Creditos
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
Dim Repetido = False
|
||||
Dim Repetido As Boolean = False
|
||||
|
||||
'Valida si ya esta vinculado el AF
|
||||
For Each dr As DataRow In DtAF.Rows
|
||||
@@ -1364,7 +1364,7 @@ Partial Class Bancos_Creditos
|
||||
DtIE = ObjBancosIE.DtResultados.Clone
|
||||
End If
|
||||
|
||||
Dim RowIE = ObjBancosIE.DtResultados.Rows(0)
|
||||
Dim RowIE As DataRow = ObjBancosIE.DtResultados.Rows(0)
|
||||
|
||||
LtBancoIE.Text = RowIE("Banco").ToString
|
||||
LtCuentaIE.Text = RowIE("NumCuenta").ToString
|
||||
@@ -1391,10 +1391,10 @@ Partial Class Bancos_Creditos
|
||||
End If
|
||||
ObjBancosIE.Dispose()
|
||||
|
||||
Dim Repetido = False
|
||||
Dim Repetido As Boolean = False
|
||||
|
||||
Dim TotalAnticipoVinculado = 0.0
|
||||
Dim TotalAnticipo = TxtVehiculoAnticipo.Text.ToDouble + TxtComisionAnticipo.Text.ToDouble + TxtSeguroAnticipo.Text.ToDouble
|
||||
Dim TotalAnticipoVinculado As Double = 0.0
|
||||
Dim TotalAnticipo As Double = TxtVehiculoAnticipo.Text.ToDouble + TxtComisionAnticipo.Text.ToDouble + TxtSeguroAnticipo.Text.ToDouble
|
||||
|
||||
For Each dr As DataRow In DtIE.FiltraParametros("Estatus IN (0,1) OR Estatus is null").Rows
|
||||
TotalAnticipoVinculado += dr("Importe").ToString.ToDouble
|
||||
@@ -1512,7 +1512,7 @@ Partial Class Bancos_Creditos
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub BtnAplicarGarantia_Click(sender As Object, e As EventArgs)
|
||||
Dim ImporteVinculado = 0.0
|
||||
Dim ImporteVinculado As Double = 0.0
|
||||
|
||||
For Each Gvr As GridViewRow In GvAplicarGarantia.Rows
|
||||
If Gvr.FCTextBox("TxtPago").Text.ToDecimal > 0 Then
|
||||
@@ -1527,7 +1527,7 @@ Partial Class Bancos_Creditos
|
||||
|
||||
Dim ObjBancos As New ClsBancos
|
||||
ObjBancos.IniciaTransacSQL()
|
||||
Dim TieneError = False
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
For Each Gvr As GridViewRow In GvAplicarGarantia.Rows
|
||||
If Gvr.FCTextBox("TxtPago").Text.ToDecimal > 0 Then
|
||||
@@ -1562,24 +1562,24 @@ Partial Class Bancos_Creditos
|
||||
Dim ObjContabilidad As New ClsContabilidad()
|
||||
Dim ObjProveedor As New ClsCompProveedores(ObjContabilidad.IniciaTransacSQL())
|
||||
Dim ObjBancos As New ClsBancos(ObjContabilidad.IniciaTransacSQL())
|
||||
Dim ErrorPrePoliza = False
|
||||
Dim CvePrePoliza = 0
|
||||
Dim ErrorPrePoliza As Boolean = False
|
||||
Dim CvePrePoliza As Integer = 0
|
||||
|
||||
'GENERA PREPOLIZA
|
||||
|
||||
|
||||
Dim importeMovimiento = 0.0D
|
||||
Dim ConceptoContable = 0
|
||||
Dim TipoMovimiento = False
|
||||
Dim Concepto = ""
|
||||
Dim Referencia = $"Crédito: {TxtReferencia.Text}"
|
||||
Dim FechaMovimiento = Now.ToDate
|
||||
Dim importeMovimiento As Decimal = 0.0D
|
||||
Dim ConceptoContable As Integer = 0
|
||||
Dim TipoMovimiento As Boolean = False
|
||||
Dim Concepto As String = ""
|
||||
Dim Referencia As String = $"Crédito: {TxtReferencia.Text}"
|
||||
Dim FechaMovimiento As Date = Now.ToDate
|
||||
Dim MsgError As String = ""
|
||||
|
||||
CvePrePoliza = ObjContabilidad.AddPrePolizas("Creditos/RegistrodeRegistro", 69, TxtCSTotalCredito.Text.ToDouble, TxtCSTotalCredito.Text.ToDouble, DdlCSTipoMoneda.SelectedValue.ToEntero, FechaMovimiento, $"Crédito: {TxtReferencia.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim ImporteDocXPagar = TxtTotalCredito.Text.ToDecimal
|
||||
Dim CveProveedor = -1
|
||||
Dim CveCreditoPrePoliza = -1
|
||||
Dim ImporteDocXPagar As Decimal = TxtTotalCredito.Text.ToDecimal
|
||||
Dim CveProveedor As Integer = -1
|
||||
Dim CveCreditoPrePoliza As Integer = -1
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
importeMovimiento = TxtVehiculoValor.Text.ToDecimal - TxtVehiculoAnticipo.Text.ToDecimal 'importe financiado
|
||||
|
||||
@@ -114,10 +114,10 @@ Partial Class Bancos_DepositosCaja
|
||||
GvFacturas.DataSource = ObjBancos.DtResultados
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
|
||||
lblValorTotal.Text = ObjBancos.DtResultados.SUM("Importe").ToString("###,###,###.00")
|
||||
RegistraScript($" ValorTotalSeleccionado = {ObjBancos.DtResultados.SUM("Importe")};")
|
||||
|
||||
If ObjBancos.DtResultados IsNot Nothing AndAlso ObjBancos.DtResultados.Rows.Count > 0 Then
|
||||
lblValorTotal.Text = ObjBancos.DtResultados.SUM("Importe").ToString("###,###,###.00")
|
||||
RegistraScript($" ValorTotalSeleccionado = {ObjBancos.DtResultados.SUM("Importe")};")
|
||||
End If
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
|
||||
|
||||
@@ -1765,8 +1765,8 @@ Partial Class Bancos_IE
|
||||
|
||||
#Region " GUARDAR - ACTUALIZAR "
|
||||
Private Function ValidaGuardar() As Boolean
|
||||
Dim EsValido = True
|
||||
Dim PagueseA = ""
|
||||
Dim EsValido As Boolean = True
|
||||
Dim PagueseA As String = ""
|
||||
If HdnCveCliente.Value.ToEntero > 0 Then
|
||||
PagueseA = DdlCliente.SelectedText.ToString()
|
||||
ElseIf HdnCveProveedor.Value.ToEntero > 0 Then
|
||||
@@ -1798,7 +1798,7 @@ Partial Class Bancos_IE
|
||||
|
||||
Dim Dep As New ClsGenerales
|
||||
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor) Then
|
||||
Dim Row = Dep.DtResultados.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
|
||||
Dim Row As DataRow = Dep.DtResultados.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
|
||||
If Row IsNot Nothing AndAlso Row("Estatus").ToString = "False" Then
|
||||
Alert("La cuenta depósito del proveedor esta inactiva.", TipoMensaje.MsgAdvertencia)
|
||||
EsValido = False
|
||||
@@ -2019,7 +2019,6 @@ Partial Class Bancos_IE
|
||||
|
||||
'*****-_- TERMINA: CONFIGURACION REGISTRO -_-*****
|
||||
|
||||
|
||||
Dim FolioFijo As Integer = 0
|
||||
Dim tCveMoneda As Integer = CveMoneda
|
||||
Dim tImporteMonedaExtranjera As Decimal = TxtImporte.Text.ToDecimal
|
||||
@@ -2028,7 +2027,7 @@ Partial Class Bancos_IE
|
||||
tImporteMonedaExtranjera = (TxtImporte.Text.ToDecimal * GlobalTipoCambio(TxtFechaDocumento.Text.Trim.ToDate).ToString.ToDecimal).RoundSQL
|
||||
tImporteMonedaME = TxtImporte.Text.ToDecimal
|
||||
End If
|
||||
Dim PagueseA = ""
|
||||
Dim PagueseA As String = ""
|
||||
|
||||
If HdnCveCliente.Value.ToEntero > 0 Then
|
||||
PagueseA = DdlCliente.SelectedText.ToString()
|
||||
@@ -2123,7 +2122,7 @@ Partial Class Bancos_IE
|
||||
ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(TxtImporte.Text.ToDecimal - TxtIvaIxC.Text.ToDecimal), -(TxtImporte.Text.ToDecimal - TxtIvaIxC.Text.ToDecimal), 66, Ref, Conc, CveIE:=CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteME:=tImporteMonedaExtranjera)
|
||||
|
||||
If TxtIvaIxC.Text.ToDouble > 0 Then
|
||||
Dim PorcentajeIVA = (TxtIvaIxC.Text.ToDecimal() / (TxtImporte.Text.ToDecimal() - TxtIvaIxC.Text.ToDecimal())).RoundSQL(2)
|
||||
Dim PorcentajeIVA As Decimal = (TxtIvaIxC.Text.ToDecimal() / (TxtImporte.Text.ToDecimal() - TxtIvaIxC.Text.ToDecimal())).RoundSQL(2)
|
||||
'Iva
|
||||
ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -TxtIvaIxC.Text.ToDecimal, -TxtIvaIxC.Text.ToDecimal, 61, Ref, Conc, CveIE:=CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteME:=tImporteMonedaExtranjera, PorcentajeImpuesto:=If(PorcentajeIVA.ToString().Contiene("0.08", "0.16"), PorcentajeIVA, 0))
|
||||
End If
|
||||
@@ -2215,8 +2214,6 @@ Partial Class Bancos_IE
|
||||
importeMX = importeMovimiento
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Case 50
|
||||
If RBL.SelectedValue = "DP" AndAlso CveProveedor > 0 Then
|
||||
importeMovimiento = TxtImporte.Text.ToDecimal
|
||||
@@ -2232,7 +2229,7 @@ Partial Class Bancos_IE
|
||||
If DivIvaIxC.Visible AndAlso TxtIvaIxC.Text.ToDecimal <> 0 Then
|
||||
Dim CveConIVA As Integer = 61
|
||||
If UsuarioActual.CveEmpresa = 70 Then CveConIVA = 299
|
||||
Dim PorcentajeIVA = (TxtIvaIxC.Text.ToDecimal() / (TxtImporte.Text.ToDecimal() - TxtIvaIxC.Text.ToDecimal())).RoundSQL(2)
|
||||
Dim PorcentajeIVA As Decimal = (TxtIvaIxC.Text.ToDecimal() / (TxtImporte.Text.ToDecimal() - TxtIvaIxC.Text.ToDecimal())).RoundSQL(2)
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, TxtIvaIxC.Text.ToDecimal, CveConIVA, Concepto, Concepto, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteME:=tImporteMonedaExtranjera, PorcentajeImpuesto:=PorcentajeIVA) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
||||
End If
|
||||
@@ -2244,9 +2241,7 @@ Partial Class Bancos_IE
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, (importeMovimiento * TC - importeMovimiento).RoundSQL, 226, Concepto, Concepto, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteME:=importeMovimiento, TipoCambio:=TC) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Case 30
|
||||
@@ -2274,18 +2269,16 @@ Partial Class Bancos_IE
|
||||
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Case "DevDinV"
|
||||
Dim ImporteAplicar = 0.0D
|
||||
Dim ImporteAplicarMN = 0.0D
|
||||
Dim ImporteAplicarME = 0.0D
|
||||
Dim ReferenciaAplicar = ObjIE.Folio
|
||||
Dim ConceptoAplicar = $"Devolución al cliente {PagueseA} {TxtImporte.Text} NC:{SerieFolioDevDin}"
|
||||
Dim ImporteAplicar As Decimal = 0.0D
|
||||
Dim ImporteAplicarMN As Decimal = 0.0D
|
||||
Dim ImporteAplicarME As Decimal = 0.0D
|
||||
Dim ReferenciaAplicar As String = ObjIE.Folio
|
||||
Dim ConceptoAplicar As String = $"Devolución al cliente {PagueseA} {TxtImporte.Text} NC:{SerieFolioDevDin}"
|
||||
|
||||
ImporteAplicar = TxtImporte.Text.ToDecimal
|
||||
ImporteAplicarME = ImporteAplicar
|
||||
@@ -2343,9 +2336,9 @@ Partial Class Bancos_IE
|
||||
|
||||
'IMPUESTOS
|
||||
If ObjMov.GetPrePolizasDetalle(CvePrePolizaDevDin, UsuarioActual.CveEmpresa) Then
|
||||
Dim PorcentajePagoDevDin = (TxtImporte.Text.ToDecimal / ImporteOriginalDevDin).RoundSQL(6)
|
||||
Dim CveConceptoContableAplicar = -1
|
||||
Dim TipoMovtoAplicar = False
|
||||
Dim PorcentajePagoDevDin As Decimal = (TxtImporte.Text.ToDecimal / ImporteOriginalDevDin).RoundSQL(6)
|
||||
Dim CveConceptoContableAplicar As Integer = -1
|
||||
Dim TipoMovtoAplicar As Boolean = False
|
||||
|
||||
For Each Dr As DataRow In ObjMov.DtResultados.FiltraParametros("CveConceptoContable IN (13,8,9,38)").Rows
|
||||
Dim PorcentajeImpuesto As Decimal = Dr("PorcentajeImpuesto").ToString.ToDecimal()
|
||||
@@ -2379,13 +2372,13 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
Case "DevDinC"
|
||||
Dim ImporteAplicar = 0.0D
|
||||
Dim ImporteAplicarMN = 0.0D
|
||||
Dim ImporteAplicarME = 0.0D
|
||||
Dim ReferenciaAplicar = ObjIE.Folio
|
||||
Dim ImporteAplicar As Decimal = 0.0D
|
||||
Dim ImporteAplicarMN As Decimal = 0.0D
|
||||
Dim ImporteAplicarME As Decimal = 0.0D
|
||||
Dim ReferenciaAplicar As String = ObjIE.Folio
|
||||
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||
|
||||
Dim ConceptoAplicar = $"Devolución de Proveedor {PagueseA} {TxtImporte.Text} NC:{SerieFolioDeCDin}"
|
||||
Dim ConceptoAplicar As String = $"Devolución de Proveedor {PagueseA} {TxtImporte.Text} NC:{SerieFolioDeCDin}"
|
||||
|
||||
ImporteAplicar = TxtImporte.Text.ToDecimal
|
||||
ImporteAplicarME = ImporteAplicar
|
||||
@@ -2502,17 +2495,13 @@ Partial Class Bancos_IE
|
||||
MsgError = "Ocurrió un error al registrar el asiento de perdidada cfambiaria"
|
||||
Exit Select
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'IMPUESTOS
|
||||
|
||||
Dim PorcentajePagoDevDin = (ImporteAplicar / ImporteAplicar).RoundSQL(6)
|
||||
Dim CveConceptoContableAplciar = -1
|
||||
Dim PorcentajePagoDevDin As Decimal = (ImporteAplicar / ImporteAplicar).RoundSQL(6)
|
||||
Dim CveConceptoContableAplciar As Integer = -1
|
||||
'Dim TipoMovtoAplicar = False
|
||||
|
||||
|
||||
@@ -2799,7 +2788,7 @@ Partial Class Bancos_IE
|
||||
'BANCOS COMPLEMENTARIA
|
||||
If tCveMoneda > 1 And UsaComplementariaBancos Then
|
||||
Dim ImporteAplicar As Decimal = TxtImporte.Text.ToDecimal
|
||||
Dim ImporteAplicarMN = (ImporteAplicar * TxtTipoCambio.Text.ToDecimal - ImporteAplicar).RoundSQL()
|
||||
Dim ImporteAplicarMN As Decimal = (ImporteAplicar * TxtTipoCambio.Text.ToDecimal - ImporteAplicar).RoundSQL()
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAplicar, ImporteAplicarMN, 204, Ref, Conc, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=tImporteMonedaME, TipoCambio:=TxtTipoCambio.Text.ToDecimal) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
|
||||
End If
|
||||
@@ -2907,7 +2896,7 @@ Partial Class Bancos_IE
|
||||
'End If
|
||||
|
||||
If MsgError = "" Then
|
||||
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
||||
If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
|
||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
' MsgError = ObjMov.MensajePolizaDescuadre
|
||||
GuardaLogAD($"Bancos/IE | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
@@ -2989,12 +2978,12 @@ Partial Class Bancos_IE
|
||||
Alert("El Documento se guardo correctamente", TipoMensaje.MsgInformacion, "document.location.href=""../Inicio.aspx""")
|
||||
Else
|
||||
If ChkAplicaViatico.Checked Then
|
||||
Dim SerieFolio = $"VIA-{Folio}"
|
||||
Dim SerieFolio As String = $"VIA-{Folio}"
|
||||
Msg.Clear()
|
||||
Msg.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=DesXmlVIA&SERIEFOLIO={0}&TIPO={1}", SerieFolio, "Viaticos")))
|
||||
End If
|
||||
|
||||
Dim AccionJS = ""
|
||||
Dim AccionJS As String = ""
|
||||
|
||||
If Opcion = "DevDinV" Then
|
||||
AccionJS = $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}"";"
|
||||
@@ -3346,10 +3335,10 @@ Partial Class Bancos_IE
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ErrorCancelar = False
|
||||
Dim MensajeError = ""
|
||||
Dim IdPolizaNueva = -1
|
||||
Dim FolioPolizaNueva = -1
|
||||
Dim ErrorCancelar As Boolean = False
|
||||
Dim MensajeError As String = ""
|
||||
Dim IdPolizaNueva As Integer = -1
|
||||
Dim FolioPolizaNueva As Integer = -1
|
||||
Dim MensajeLog As String = ""
|
||||
|
||||
Dim Banc As New ClsBancos
|
||||
@@ -3523,7 +3512,7 @@ Partial Class Bancos_IE
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Error al cancelar complemento de pago"
|
||||
Else
|
||||
Dim FolioCancelado = $"{TxtFolio.Text}_C_{Banc.DtResultados(0)("Cantidad").ToString().ToEntero + 1}"
|
||||
Dim FolioCancelado As String = $"{TxtFolio.Text}_C_{Banc.DtResultados(0)("Cantidad").ToString().ToEntero + 1}"
|
||||
If Not Banc.UpdateFolioCancelado(CveIE.ToEntero, Folio:=FolioCancelado) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Error al actualizar complemento de pago"
|
||||
|
||||
@@ -272,12 +272,18 @@
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox runat="server" ID="TxtImporteFiltro" CssClass="form-control input-sm" Width="100%" onkeyup="FormatoMoneda(this);" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-1" data-toggle="tooltip" data-placement="left" title="Usuario Registró">U. Registro</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
Abono en Cuenta:
|
||||
<asp:CheckBox ID="ChkEsAbonoEnCuenta" runat="server" />
|
||||
<asp:DropDownList ID="DdlUsuarioRegistro" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveUsuario" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
Abono en Cuenta:
|
||||
<asp:CheckBox ID="ChkEsAbonoEnCuenta" runat="server" />
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
Totalizar:
|
||||
<asp:CheckBox ID="ChkTotalizar" runat="server" />
|
||||
|
||||
@@ -97,6 +97,8 @@ Partial Class Bancos_RepIE
|
||||
CargaMoneda()
|
||||
CargaTipoTransaccion("-1")
|
||||
CargaUsuarioConcilio()
|
||||
DdlUsuarioRegistro.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", DistinctColumns:={"Nombre", "CveUsuario"})
|
||||
DdlUsuarioRegistro.databind
|
||||
txtFechaI.Text = Now.ToShortDateString
|
||||
|
||||
DivDdlTarjeta.Visible = False
|
||||
@@ -139,9 +141,9 @@ Partial Class Bancos_RepIE
|
||||
FechaConciliadoI = If(IsDate(TxtFechaConciliadoI.Text.Trim()), TxtFechaConciliadoI.Text.ToDate, MinFecha)
|
||||
FechaConciliadoF = If(IsDate(TxtFechaConciliadoF.Text.Trim()), TxtFechaConciliadoF.Text.ToDate, MaxFecha)
|
||||
|
||||
Dim Importe = If(TxtImporteFiltro.Text = "", -1, TxtImporteFiltro.Text.ToDouble)
|
||||
Dim Tipo = If(DdlTipo.SelectedItem.ToString = "Todos", "-1", DdlTipo.SelectedItem.ToString)
|
||||
Dim Cuenta = If(DdlCuenta.SelectedValue.ToEntero = 0, -1, DdlCuenta.SelectedValue.ToEntero)
|
||||
Dim Importe As Double = If(TxtImporteFiltro.Text = "", -1, TxtImporteFiltro.Text.ToDouble)
|
||||
Dim Tipo As String = If(DdlTipo.SelectedItem.ToString = "Todos", "-1", DdlTipo.SelectedItem.ToString)
|
||||
Dim Cuenta As Integer = If(DdlCuenta.SelectedValue.ToEntero = 0, -1, DdlCuenta.SelectedValue.ToEntero)
|
||||
|
||||
If TxtPagueseA.Text <> "" Then PagueseA = String.Format("%{0}%", TxtPagueseA.Text) Else PagueseA = "-1"
|
||||
If TxtFolio.Text.Trim = "" Then Folio = "-1" Else Folio = String.Format("%{0}%", TxtFolio.Text.Trim)
|
||||
@@ -151,13 +153,13 @@ Partial Class Bancos_RepIE
|
||||
If ObjBancosIE.GetBancosRepIE(-1, Cuenta, DdlTipo.SelectedValue, DdlTipoTransaccion.SelectedValue.ToEntero, Folio, PagueseA, -1, DdlMoneda.SelectedValue.ToEntero,
|
||||
If(ChkEsAbonoEnCuenta.Checked.ToEntero = 0, -1, 1),
|
||||
DdlConciliado.SelectedValue.ToEntero, DdlEstatusIE.SelectedValue.ToEntero, FechaI, FechaF, FechaAplicacionI, FechaAplicacionF,
|
||||
FechaConciliadoI, FechaConciliadoF, DdlUsuarioConcilio.SelectedValue.ToEntero, Importe, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=DdlTarjeta.SelectedValue.ToEntero) Then
|
||||
FechaConciliadoI, FechaConciliadoF, DdlUsuarioConcilio.SelectedValue.ToEntero, DdlUsuarioregistro.SelectedValue.ToEntero, Importe, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=DdlTarjeta.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjBancosIE.DtResultados
|
||||
DtDatos = ObjBancosIE.DtResultados
|
||||
End If
|
||||
|
||||
If ChkTotalizar.Checked Then
|
||||
Dim SaldoDolares = DtDatos.SUM("Importe", "CveMoneda = 2") * GlobalTipoCambio(Now)
|
||||
Dim SaldoDolares As Decimal = DtDatos.SUMD("Importe", "CveMoneda = 2") * GlobalTipoCambio(Now).ToDecimal
|
||||
SaldoTotal.Text = DtDatos.SUM("ImporteMN").ToString.FormatoNumero '(DtDatos.SUM("Importe") + SaldoDolares).ToString.FormatoNumero
|
||||
LtlSaldo.Text = DtDatos.SUM("Importe", "CveMoneda = 1").ToString.FormatoNumero
|
||||
LtlSaldoDolares.Text = DtDatos.SUM("Importe", "CveMoneda = 2").ToString.FormatoNumero
|
||||
@@ -198,7 +200,7 @@ Partial Class Bancos_RepIE
|
||||
ObjIE.IniciaTransacSQL()
|
||||
|
||||
Dim OcurrioError As Boolean = False
|
||||
Dim ErrorFecha = False
|
||||
Dim ErrorFecha As Boolean = False
|
||||
Dim Fecha As Date
|
||||
Dim FolioError As String = ""
|
||||
Dim OtrosIngresos As Double = 0
|
||||
@@ -264,8 +266,8 @@ Partial Class Bancos_RepIE
|
||||
Dim DtConciliaciones As DataTable
|
||||
Dim ObjBancos As New ClsBancos
|
||||
|
||||
Dim FechaI = txtFechaI.Text.ToDate
|
||||
Dim FechaF = txtFechaF.Text.ToDate
|
||||
Dim FechaI As Date = txtFechaI.Text.ToDate
|
||||
Dim FechaF As Date = txtFechaF.Text.ToDate
|
||||
|
||||
If ObjBancos.GetConciliacionesReporte(DdlCuenta.SelectedValue.ToEntero, FechaI, FechaF, UsuarioActual.CveEmpresa) Then
|
||||
DtConciliaciones = ObjBancos.DtResultados
|
||||
@@ -336,7 +338,7 @@ Partial Class Bancos_RepIE
|
||||
End If
|
||||
|
||||
If TipoPagina = "Conciliaciones" Then
|
||||
Dim TipoTrasaccion = If(e.Row.DBCampo("CveTipoTransaccion").ToEntero = 2 Or e.Row.DBCampo("CveTipoTransaccion").ToEntero = 8, True, False)
|
||||
Dim TipoTrasaccion As Boolean = If(e.Row.DBCampo("CveTipoTransaccion").ToEntero = 2 Or e.Row.DBCampo("CveTipoTransaccion").ToEntero = 8, True, False)
|
||||
'si no esta contabilizada le habilita la opcion, una vez contabilizada no se permite ajustar los movimientos
|
||||
Dim StrTxtObr As String = If(AceptaOtrosIngresos AndAlso e.Row.DBCampo("IdPoliza").ToEntero <= 0, e.Row.FCTextBox("TxtOtIng").ClientID, "null")
|
||||
e.Row.Cells(12).Visible = True
|
||||
|
||||
@@ -387,7 +387,7 @@ Partial Class Bancos_Transferencias
|
||||
|
||||
|
||||
If MsgError = "" Then
|
||||
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
||||
If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
|
||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
MsgError = ObjMov.MensajePolizaDescuadre
|
||||
GuardaLogAD($"Bancos/Transferencias | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
|
||||
@@ -952,6 +952,10 @@ Partial Class Compras_Proveedores
|
||||
If drr("IdCtaContExtranjera").ToString <> "" Then DdlCtaContExtranjera.Items.Add(New ListItem(drr("CtaContExtranjera").ToString, drr("IdCtaContExtranjera").ToString)) : DdlCtaContExtranjera.SelectedValue = drr("IdCtaContExtranjera").ToString
|
||||
If drr("IdCtaContComplementaria").ToString <> "" Then DdlCtaContComplementaria.Items.Add(New ListItem(drr("CtaContComplementaria").ToString, drr("IdCtaContComplementaria").ToString)) : DdlCtaContComplementaria.SelectedValue = drr("IdCtaContComplementaria").ToString
|
||||
|
||||
If drr("IdCtaContAnticipos").ToString <> "" Then DdlCtaContAnticipos.Items.Add(New ListItem(drr("CtaContAnticipos").ToString, drr("IdCtaContAnticipos").ToString)) : DdlCtaContAnticipos.SelectedValueExist(drr("IdCtaContAnticipos").ToString)
|
||||
If drr("IdCtaContAnticiposExtranjera").ToString <> "" Then DdlCtaContAnticiposExtranjera.Items.Add(New ListItem(drr("CtaContAnticiposExtranjera").ToString, drr("IdCtaContAnticiposExtranjera").ToString)) : DdlCtaContAnticiposExtranjera.SelectedValue = drr("IdCtaContAnticiposExtranjera").ToString
|
||||
If drr("IdCtaContAnticiposComplementaria").ToString <> "" Then DdlCtaContAnticiposComplementaria.Items.Add(New ListItem(drr("CtaContAnticiposComplementaria").ToString, drr("IdCtaContAnticiposComplementaria").ToString)) : DdlCtaContAnticiposComplementaria.SelectedValue = drr("IdCtaContAnticiposComplementaria").ToString
|
||||
|
||||
DdlCtaContProveedores.Attributes.Add("onclick", "CargaCuentas(1);")
|
||||
DdlCtaContAcreedores.Attributes.Add("onclick", "CargaCuentas(6);")
|
||||
DdlCtaContAnticipos.Attributes.Add("onclick", "CargaCuentas(2);")
|
||||
@@ -1857,7 +1861,10 @@ Partial Class Compras_Proveedores
|
||||
CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero,
|
||||
IdCtaContProveedores:=DdlCtaContProveedores.SelectedValue.ToEntero, CtaContProveedores:=DdlCtaContProveedores.SelectedItem.Text,
|
||||
IdCtaContExtranjera:=DdlCtaContExtranjera.SelectedValue.ToEntero, CtaContExtranjera:=DdlCtaContExtranjera.SelectedItem.Text,
|
||||
IdCtaContComplementaria:=DdlCtaContComplementaria.SelectedValue.ToEntero, CtaContComplementaria:=DdlCtaContComplementaria.SelectedItem.Text) Then
|
||||
IdCtaContComplementaria:=DdlCtaContComplementaria.SelectedValue.ToEntero, CtaContComplementaria:=DdlCtaContComplementaria.SelectedItem.Text,
|
||||
IdCtaContAnticipos:=DdlCtaContAnticipos.SelectedValue.ToEntero, CtaContAnticipos:=DdlCtaContAnticipos.SelectedItem.Text,
|
||||
IdCtaContAnticiposExtranjera:=DdlCtaContAnticiposExtranjera.SelectedValue.ToEntero, CtaContAnticiposExtranjera:=DdlCtaContAnticiposExtranjera.SelectedItem.Text,
|
||||
IdCtaContAnticiposComplementaria:=DdlCtaContAnticiposComplementaria.SelectedValue.ToEntero, CtaContAnticiposComplementaria:=DdlCtaContAnticiposComplementaria.SelectedItem.Text) Then
|
||||
|
||||
GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
|
||||
@@ -424,12 +424,10 @@
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UpChequesFYE" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
@@ -244,6 +244,7 @@
|
||||
<asp:ListItem Text="Factura" Value="Fac"></asp:ListItem>
|
||||
<asp:ListItem Text="Nota de Crédito" Value="NC"></asp:ListItem>
|
||||
<asp:ListItem Text="Anticipo" Value="Ant" ></asp:ListItem>
|
||||
<asp:ListItem Text="Devolución" Value="DEV" ></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -235,6 +235,7 @@
|
||||
<asp:ListItem Text="Factura" Value="Fac"></asp:ListItem>
|
||||
<asp:ListItem Text="Nota de Crédito" Value="NC"></asp:ListItem>
|
||||
<asp:ListItem Text="Anticipo" Value="Ant" ></asp:ListItem>
|
||||
<asp:ListItem Text="Devolución" Value="DEV" ></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -298,8 +298,8 @@ Partial Class Compras_RepProductosServiciosDetalle
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjCompras As New ClsCompras()
|
||||
|
||||
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
||||
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha)
|
||||
Dim FechaI As Date = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
||||
Dim FechaF As Date = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha)
|
||||
TCEspecifico = If(TxtEspecifico.Text.Trim = "", -1, TxtEspecifico.Text.ToEntero)
|
||||
|
||||
Dim TipoGasto As String = IIf(DdlTipoGasto.GetSelectedValuesM = "", "-1", DdlTipoGasto.GetSelectedValuesM).ToString
|
||||
@@ -331,8 +331,8 @@ Partial Class Compras_RepProductosServiciosDetalle
|
||||
Private Sub CargaDatos(Proyecto As Integer, SubProyecto As String, Categoria As String, Clasificacion As Integer, PS As Integer, Proveedor As Integer, Usuario As Integer, Estatus As Integer, Grupo As Integer, Familia As Integer, SubFamilia As Integer, TipoActivoFijo As String, SubTipoActivoFijo As String, ActivoFijo As Integer, TipoGasto As String, CveCultivo As String)
|
||||
Dim ObjCompras As New ClsCompras()
|
||||
|
||||
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
||||
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha)
|
||||
Dim FechaI As Date = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
||||
Dim FechaF As Date = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha)
|
||||
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then TCEspecifico = TxtEspecifico.Text.ToDouble Else TCEspecifico = -1
|
||||
|
||||
If ObjCompras.GetRepProductosServiciosDetalle(Proyecto, SubProyecto, Categoria, Clasificacion, PS, FechaI, FechaF, Proveedor, Usuario, Estatus, UsuarioActual.CveEmpresa, Grupo,
|
||||
@@ -487,32 +487,30 @@ Partial Class Compras_RepProductosServiciosDetalle
|
||||
|
||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||
|
||||
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
||||
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha)
|
||||
Dim FechaI As Date = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
||||
Dim FechaF As Date = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha)
|
||||
If txtFechaI.Text = "" Then FechaI = "-1".ToDate
|
||||
If txtFechaF.Text = "" Then FechaF = "-1".ToDate
|
||||
Dim Grupo = If(DdlGrupo.SelectedValue = "-1", "", $" <b>Grupo:</b> {DdlGrupo.SelectedItem.Text}")
|
||||
Dim Proyecto = If(DdlProyecto.SelectedValue = "-1", "", $" <b>Proyecto:</b> {DdlProyecto.SelectedItem.Text}")
|
||||
Dim Grupo As String = If(DdlGrupo.SelectedValue = "-1", "", $" <b>Grupo:</b> {DdlGrupo.SelectedItem.Text}")
|
||||
Dim Proyecto As String = If(DdlProyecto.SelectedValue = "-1", "", $" <b>Proyecto:</b> {DdlProyecto.SelectedItem.Text}")
|
||||
'Dim SubProyecto = If(DdlSubProyecto.SelectedValue = "-1", "", $" <b>SubProyecto:</b> {DdlSubProyecto.SelectedItem.Text}")
|
||||
'Dim Categoria = If(DdlCategoria.SelectedValue = "-1", "", $" <b>Categoria:</b> {DdlCategoria.SelectedItem.Text}")
|
||||
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificación:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S:</b> {DdlPS.SelectedText}")
|
||||
Dim Proveedor = If(DdlProveedor.SelectedValue = "-1", "", $" <b>Proveedor:</b> {DdlProveedor.SelectedText}")
|
||||
Dim Estatus = If(DdlEstatus.SelectedValue = "-1", "", $" <b>Estatus:</b> {DdlEstatus.SelectedItem.Text}")
|
||||
Dim Clasificacion As String = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificación:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||
Dim PS As String = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S:</b> {DdlPS.SelectedText}")
|
||||
Dim Proveedor As String = If(DdlProveedor.SelectedValue = "-1", "", $" <b>Proveedor:</b> {DdlProveedor.SelectedText}")
|
||||
Dim Estatus As String = If(DdlEstatus.SelectedValue = "-1", "", $" <b>Estatus:</b> {DdlEstatus.SelectedItem.Text}")
|
||||
'Dim TipoAF = If(DdlTipoAF.SelectedValue = "-1", "", $" <b>Tipo AF:</b> {DdlTipoAF.SelectedItem.Text}")
|
||||
Dim FechaIn As String = $" <b>Fecha Inicio:</b> {txtFechaI.Text}"
|
||||
Dim FechaFn As String = $" <b>Fecha Fin:</b> {txtFechaF.Text}"
|
||||
If txtFechaI.Text = "" Then FechaIn = ""
|
||||
If txtFechaF.Text = "" Then FechaFn = ""
|
||||
|
||||
Dim TCEspecifico = If(TxtEspecifico.Text.Trim = "", -1, TxtEspecifico.Text.ToEntero)
|
||||
|
||||
'PARAMETROS EN LISTBOXs
|
||||
Dim SubProyecto = If(DdlSubProyecto.GetSelectedText = "", "", $" <b>SubProyecto:</b> {DdlSubProyecto.GetSelectedText}")
|
||||
Dim Categoria = If(DdlCategoria.GetSelectedText = "", "", $" <b>Categoria:</b> {DdlCategoria.GetSelectedText}")
|
||||
Dim TipoGasto = If(DdlTipoGasto.GetSelectedText = "", "", $" <b>Tipo Gasto:</b> {DdlTipoGasto.GetSelectedText}")
|
||||
Dim TipoAF = If(DdlTipoAF.GetSelectedText = "", "", $" <b>Tipo AF:</b> {DdlTipoAF.GetSelectedText}")
|
||||
Dim SubTipoAF = If(DdlSubTipoAF.GetSelectedText = "", "", $" <b>SubTipo AF:</b> {DdlSubTipoAF.GetSelectedText}")
|
||||
Dim SubProyecto As String = If(DdlSubProyecto.GetSelectedText = "", "", $" <b>SubProyecto:</b> {DdlSubProyecto.GetSelectedText}")
|
||||
Dim Categoria As String = If(DdlCategoria.GetSelectedText = "", "", $" <b>Categoria:</b> {DdlCategoria.GetSelectedText}")
|
||||
Dim TipoGasto As String = If(DdlTipoGasto.GetSelectedText = "", "", $" <b>Tipo Gasto:</b> {DdlTipoGasto.GetSelectedText}")
|
||||
Dim TipoAF As String = If(DdlTipoAF.GetSelectedText = "", "", $" <b>Tipo AF:</b> {DdlTipoAF.GetSelectedText}")
|
||||
Dim SubTipoAF As String = If(DdlSubTipoAF.GetSelectedText = "", "", $" <b>SubTipo AF:</b> {DdlSubTipoAF.GetSelectedText}")
|
||||
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
|
||||
@@ -4328,7 +4328,7 @@ Partial Class Compras_eFacturas
|
||||
|
||||
Dim XmlRutaArchivo As String = File.ReadAllText(String.Format("{0}{1}\{2}", Destino, gvrow.DataKey("RFCDe"), gvrow.DataKey("XML")))
|
||||
Dim PDFRutaArchivo As String = String.Format("{0}{1}\{2}", Destino, gvrow.DataKey("RFCDe"), gvrow.DataKey("PDF"))
|
||||
Dim RutaRDLC = String.Format("{0}{1}", DirectorioBaseEmpresas, "Empresas\Grales\Formatos\ReciboDePagoGOPDF.rdlc")
|
||||
Dim RutaRDLC As String = String.Format("{0}{1}", DirectorioBaseEmpresas, "Empresas\Grales\Formatos\ReciboDePagoGOPDF.rdlc")
|
||||
|
||||
|
||||
|
||||
@@ -4790,11 +4790,9 @@ Partial Class Compras_eFacturas
|
||||
|
||||
ObjCompras.Dispose()
|
||||
|
||||
|
||||
|
||||
If VinculacionValida Then
|
||||
|
||||
Dim TieneError = False
|
||||
Dim TieneError As Boolean = False
|
||||
Dim ObjCompra As New ClsCompras
|
||||
ObjCompra.IniciaTransacSQL()
|
||||
|
||||
@@ -5942,7 +5940,7 @@ Public Class Compra2
|
||||
End Function
|
||||
|
||||
Private Function AjustesValidacion() As Boolean
|
||||
Dim respuesta = True
|
||||
Dim respuesta As Boolean = True
|
||||
'VALIDA IMPORTES
|
||||
If Not ValidaTotalesGuardar() Then
|
||||
respuesta = False
|
||||
@@ -5969,7 +5967,7 @@ Public Class Compra2
|
||||
End Function
|
||||
|
||||
Private Function ValidaTotalesGuardar() As Boolean
|
||||
Dim EsValido = True
|
||||
Dim EsValido As Boolean = True
|
||||
|
||||
'VALIDA IMPORTES
|
||||
'VALIDA TOTAL CON LOS IMPORTES TOTALES
|
||||
@@ -6003,7 +6001,7 @@ Public Class Compra2
|
||||
TempRetISR = RetISR
|
||||
TempTotal = Math.Round(TempSubTotal2 + TempIVA + TempIEPS - TempRetIVA - TempRetISR + OtrosImpuestos - Amortizacion, 2)
|
||||
DifTotales = Total - TempTotal
|
||||
Dim DiferenciaPermitida = 0.6
|
||||
Dim DiferenciaPermitida As Decimal = 0.6D
|
||||
|
||||
If Math.Abs(DifTotales) > DiferenciaPermitida Then
|
||||
Errores.AppendLine($"Los importes de los conceptos (Productos/Servicios) no cuadran con el total. Por favor verifique y vuelva a intentar.[{Math.Abs(DifTotales) - DiferenciaPermitida}]")
|
||||
@@ -6015,7 +6013,7 @@ Public Class Compra2
|
||||
SubTotal2Original = SubTotal2
|
||||
End If
|
||||
|
||||
Dim DiferenciaSubtotales = 0.0D
|
||||
Dim DiferenciaSubtotales As Decimal = 0
|
||||
If CveCompra > 0 Or CveFactura > 0 Or OCVinculada Then
|
||||
|
||||
If SubTotalOriginal = Nothing Then
|
||||
@@ -6528,7 +6526,7 @@ Public Class Compra2
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim SubTotalIEPS = TmpDT.SUM("Total").ToString.ToDecimal
|
||||
Dim SubTotalIEPS As Decimal = TmpDT.SUMD("Total")
|
||||
|
||||
Me.SubTotal = Math.Round(SubTotalIEPS, 2)
|
||||
Me.SubTotalConceptos = Math.Round(SubTotalIEPS, 2)
|
||||
@@ -6548,8 +6546,8 @@ Public Class Compra2
|
||||
|
||||
Row = TmpDT.NewRow()
|
||||
Dim Retorno As Integer = 0
|
||||
Dim CveContrato = -1
|
||||
Dim CveSubProyecto = -1
|
||||
Dim CveContrato As Integer = -1
|
||||
Dim CveSubProyecto As Integer = -1
|
||||
Dim Valores As String()
|
||||
|
||||
''CONTRATOS
|
||||
@@ -6612,7 +6610,7 @@ Public Class Compra2
|
||||
|
||||
End Try
|
||||
|
||||
Dim DecimalesPermitidos = 6
|
||||
Dim DecimalesPermitidos As Integer = 6
|
||||
|
||||
Row("CveConcepto") = TmpDT.Rows.Count + 1
|
||||
Row("Cantidad") = Math.Round(Cantidad, DecimalesPermitidos)
|
||||
@@ -6808,10 +6806,10 @@ Public Class Compra2
|
||||
DrPS("CveContratoDetalle") = -1
|
||||
|
||||
'IMPORTES - [CANTIDAD Y PRECIO]
|
||||
Dim Cantidad = DrPS("Cantidad").ToString.ToDouble
|
||||
Dim PU = DrPS("PU").ToString.ToDouble
|
||||
Dim Descuento = DrPS("Descuento").ToString.ToDouble
|
||||
Dim Total = (Cantidad * PU) - Descuento
|
||||
Dim Cantidad As Double = DrPS("Cantidad").ToString.ToDouble
|
||||
Dim PU As Double = DrPS("PU").ToString.ToDouble
|
||||
Dim Descuento As Double = DrPS("Descuento").ToString.ToDouble
|
||||
Dim Total As Double = (Cantidad * PU) - Descuento
|
||||
DrPS("NoDeducible") = NoDeducible
|
||||
|
||||
Dim PSRow As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
@@ -7032,10 +7030,10 @@ Public Class Compra2
|
||||
For Each Row As DataRow In Me.TmpDT.Rows
|
||||
|
||||
Dim TipoRecepcion As Integer = -1
|
||||
Dim Referencia = ""
|
||||
Dim Referencia As String = ""
|
||||
Dim EsNoDeducible As Boolean = False
|
||||
Dim CveAF = If(Row("CveActivoFijo").ToString.ToEntero > 0 AndAlso Row("TipoAF").ToString.ToEntero = 1, Row("CveActivoFijo").ToString.ToEntero, -1)
|
||||
Dim CveAFC = If(Row("CveActivoFijo").ToString.ToEntero > 0 AndAlso Row("TipoAF").ToString.ToEntero = 2, Row("CveActivoFijo").ToString.ToEntero, -1)
|
||||
Dim CveAF As Integer = If(Row("CveActivoFijo").ToString.ToEntero > 0 AndAlso Row("TipoAF").ToString.ToEntero = 1, Row("CveActivoFijo").ToString.ToEntero, -1)
|
||||
Dim CveAFC As Integer = If(Row("CveActivoFijo").ToString.ToEntero > 0 AndAlso Row("TipoAF").ToString.ToEntero = 2, Row("CveActivoFijo").ToString.ToEntero, -1)
|
||||
|
||||
If Not ObjCompras.AddCompraDetalle(Me.CveCompra, Row("CveUM").ToString.ToEntero, Row("CvePS").ToString.ToEntero, Row("CveSubProyecto").ToString.ToEntero, -1, CveAF,
|
||||
Row("Cantidad").ToString.ToDecimal, Row("PU").ToString.ToDecimal, Row("IVA").ToString.ToDecimal, Row("Total").ToString.ToDecimal, Row("Descuento").ToString.ToDecimal,
|
||||
|
||||
@@ -175,14 +175,12 @@ Partial Class Contabilidad_DiarioPagos
|
||||
|
||||
If TxtTC.Text.ToDouble > 0 Then TxtTC.Enabled = False Else TxtTC.Text = ""
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
'------------------------------------------ consulto F y E
|
||||
If CargaOpcion.Contiene(-1, 1) Then
|
||||
|
||||
|
||||
ds = Conta.GetDiarioPagosCompras(DdlProveedores.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, 2, DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||
If ds IsNot Nothing AndAlso ds.Tables.Count = 2 Then
|
||||
|
||||
@@ -197,7 +195,6 @@ Partial Class Contabilidad_DiarioPagos
|
||||
' '------------------------------------------ consulto Transferencias
|
||||
If CargaOpcion.Contiene(-1, 2) Then
|
||||
|
||||
|
||||
ds = Conta.GetDiarioPagosCompras(DdlProveedores.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, 3, DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||
If ds IsNot Nothing AndAlso ds.Tables.Count = 1 Then
|
||||
DtDatosTransf = ds.Tables(0)
|
||||
@@ -211,8 +208,6 @@ Partial Class Contabilidad_DiarioPagos
|
||||
' '------------------------------------------ consulto anticipos
|
||||
|
||||
If CargaOpcion.Contiene(-1, 3) Then
|
||||
|
||||
|
||||
ds = Conta.GetDiarioPagosCompras(DdlProveedores.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, 4, DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||
|
||||
If ds IsNot Nothing AndAlso ds.Tables.Count = 2 Then
|
||||
@@ -1605,15 +1600,12 @@ Partial Class Contabilidad_DiarioPagos
|
||||
|
||||
If e.Row.DBCampo("ValidoCuenta") = "1" Then
|
||||
e.Row.FCCheckBox("Chk").Visible = True
|
||||
|
||||
''pero si hay compras sin contabilizar, y la factura no tenga completa las clasificaciones
|
||||
If tDtCompras IsNot Nothing AndAlso tDtCompras.Rows.Count > 0 Then
|
||||
'
|
||||
If tDtCompras.MIN("Valido") = "0" Then
|
||||
e.Row.FCCheckBox("Chk").Visible = False
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
'sino tiene cuenta
|
||||
|
||||
@@ -944,7 +944,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If CvePrePoliza > 0 Then
|
||||
ActualizarPrePoliza()
|
||||
Else
|
||||
Dim MensajeAlert = New StringBuilder
|
||||
Dim MensajeAlert As StringBuilder = New StringBuilder
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
Dim IDPoliza As Integer = 0
|
||||
@@ -1164,10 +1164,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ObjContabilidad.UpdatePrePolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCLiteral("TxtConcepto").Text, row.DataKey("CveSubProyecto").ToEntero,
|
||||
-1, 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),
|
||||
-1, If(row.DataKey("Cargo").ToDecimal <> 0, False, True),
|
||||
If(row.DataKey("Cargo").ToDecimal <> 0, row.DataKey("Cargo").ToDecimal, row.DataKey("Abono").ToDecimal),
|
||||
CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
|
||||
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
|
||||
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
|
||||
@@ -1180,7 +1179,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
contador = contador + 1
|
||||
|
||||
|
||||
Dim ImporteIE As Decimal = If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal)
|
||||
Dim ImporteIE As Decimal = If(row.DataKey("Cargo").ToDecimal <> 0, row.DataKey("Cargo").ToDecimal, row.DataKey("Abono").ToDecimal)
|
||||
|
||||
If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then
|
||||
Dim ObjIE As New ClsBancos(ObjContabilidad.IniciaTransacSQL)
|
||||
@@ -1569,8 +1568,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If CveCliente <= 0 Then Exit Sub
|
||||
|
||||
If DrConceptoContable IsNot Nothing Then
|
||||
Dim AplicaME = Boolean.Parse(DrConceptoContable("EsMonedaExtranjera").ToString)
|
||||
Dim AplicaVenta = Boolean.Parse(DrConceptoContable("AplicaVenta").ToString)
|
||||
Dim AplicaME As Boolean = Boolean.Parse(DrConceptoContable("EsMonedaExtranjera").ToString)
|
||||
Dim AplicaVenta As Boolean = Boolean.Parse(DrConceptoContable("AplicaVenta").ToString)
|
||||
If AplicaME Then
|
||||
CveMoneda = 2
|
||||
End If
|
||||
@@ -1626,8 +1625,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
|
||||
If DrConceptoContable IsNot Nothing Then
|
||||
Dim AplicaComplementaria = Boolean.Parse(DrConceptoContable("EsComplementaria").ToString)
|
||||
Dim AplicaBancos = Boolean.Parse(DrConceptoContable("AplicaBancos").ToString)
|
||||
Dim AplicaComplementaria As Boolean = Boolean.Parse(DrConceptoContable("EsComplementaria").ToString)
|
||||
Dim AplicaBancos As Boolean = Boolean.Parse(DrConceptoContable("AplicaBancos").ToString)
|
||||
|
||||
If AplicaComplementaria Then
|
||||
Dim Importe As Decimal = If(TxtCargoE.Text.ToDecimal <> 0, TxtCargoE.Text.ToDecimal, TxtAbonoE.Text.ToDecimal)
|
||||
@@ -2223,7 +2222,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If NombreHoja.Length > 30 Then
|
||||
NombreHoja = NombreHoja.Substring(0, 29)
|
||||
End If
|
||||
Dim worksheet = workbook.Worksheets.Add(NombreHoja)
|
||||
Dim worksheet As ExcelWorksheet = workbook.Worksheets.Add(NombreHoja)
|
||||
|
||||
Dim CvePlantilla As Integer = DdlPlantilla2.SelectedValue.ToEntero
|
||||
'Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla, UsuarioActual.CveEmpresa)
|
||||
@@ -2255,8 +2254,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
.StartColumn = 0
|
||||
})
|
||||
|
||||
Dim columnCount = worksheet.CalculateMaxUsedColumns()
|
||||
For i = 0 To columnCount
|
||||
Dim columnCount As Integer = worksheet.CalculateMaxUsedColumns()
|
||||
For i As Integer = 0 To columnCount
|
||||
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
|
||||
Next
|
||||
worksheet.Columns("K").Hidden = True
|
||||
@@ -2286,8 +2285,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
||||
Dim dt As New DataTable
|
||||
' Conexion As Odbc.OdbcConnection = Nothing
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorExcel = False
|
||||
Dim ErrorArchivo As Boolean = False
|
||||
Dim ErrorExcel As Boolean = False
|
||||
DdlPlantilla.SelectedValue = DdlPlantilla2.SelectedValue
|
||||
dt = ReadExcelFile(Ruta + FileName, True, 0)
|
||||
|
||||
@@ -2528,7 +2527,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Get
|
||||
|
||||
If ViewState("ArregloCuentasFolios") Is Nothing Then
|
||||
Dim dt = New DataTable("CuentasBancos")
|
||||
Dim dt As DataTable = New DataTable("CuentasBancos")
|
||||
With dt.Columns
|
||||
.Add("CveCuenta", Type.GetType("System.Int32"))
|
||||
.Add("CveTipoTransaccion", Type.GetType("System.Int32"))
|
||||
@@ -2811,7 +2810,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If CvePrePoliza > 0 Then
|
||||
ActualizarPrePoliza()
|
||||
Else
|
||||
Dim MensajeAlert = New StringBuilder
|
||||
Dim MensajeAlert As StringBuilder = New StringBuilder
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
Dim IDPoliza As Integer = 0
|
||||
|
||||
@@ -166,8 +166,6 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
if (e.Row.DBCampo("CveCompra").ToEntero() < 1)
|
||||
{
|
||||
e.Row.CssClass = "Totales";
|
||||
|
||||
|
||||
}
|
||||
if (e.Row.DBCampo("PorcentajeIVA").ToDecimal() > 0)
|
||||
{
|
||||
@@ -301,8 +299,6 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
{
|
||||
System.Text.StringBuilder Respuesta = new System.Text.StringBuilder();
|
||||
|
||||
|
||||
|
||||
return Respuesta.ToString();
|
||||
}
|
||||
|
||||
@@ -380,8 +376,6 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
Response.End();
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void LnkModalCompara_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -399,8 +393,6 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
RegistraScript("$('#ModalCompara').modal('show')");
|
||||
UpCompara.Update();
|
||||
}
|
||||
|
||||
|
||||
protected string LV(string Valor)
|
||||
{
|
||||
return (Valor.ToDecimal() > 0) ? Valor.ToDecimal().ToString().FormatoNumero(0).Replace(",", string.Empty) : "";
|
||||
@@ -547,37 +539,30 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
//}
|
||||
|
||||
|
||||
|
||||
protected void GvIEPSA_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if(e.Row.RowType == DataControlRowType.DataRow && e.Row.DataKey("PorcentajeIEPS").Trim() == "")
|
||||
{
|
||||
e.Row.Cells[0].Text = "Total";
|
||||
e.Row.Font.Bold = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void GvIVAA_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow && e.Row.DataKey("PorcentajeIVA").Trim() == "")
|
||||
{
|
||||
e.Row.Cells[0].Text = "Total";
|
||||
e.Row.Font.Bold = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void GvIVA2_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow && e.Row.DataKey("PorcentajeIVA").Trim() == "")
|
||||
{
|
||||
e.Row.Cells[0].Text = "Total";
|
||||
e.Row.Font.Bold = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void GvRetIVA_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow && e.Row.DataKey("TipoRetIVA").Trim() == "")
|
||||
@@ -585,7 +570,6 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
e.Row.Cells[0].Text = "Total";
|
||||
e.Row.Font.Bold = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
204
OC/OC.aspx.vb
204
OC/OC.aspx.vb
@@ -671,10 +671,6 @@ Partial Class OC_OC
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -981,16 +977,16 @@ Partial Class OC_OC
|
||||
|
||||
Dim Total As Decimal = 0
|
||||
For Each Dr As DataRow In DtDetalle.Rows
|
||||
Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=Dr("CvePS").ToString.ToEntero).FiltroPrimero("")
|
||||
Dim DrPS As DataRow = GlobalDTPS(CveEmpresaActual, CvePS:=Dr("CvePS").ToString.ToEntero).FiltroPrimero("")
|
||||
If DrPS IsNot Nothing AndAlso DrPS("IVA").ToString.ToEntero = -1 Then
|
||||
Total += Dr("Total").ToString.ToDecimal
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim Porcentaje = TxtIVA.Text.ToDecimal / Total
|
||||
Dim Porcentaje As Decimal = TxtIVA.Text.ToDecimal / Total
|
||||
Dim LastDr As DataRow = Nothing
|
||||
For Each Dr As DataRow In DtDetalle.Rows
|
||||
Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=Dr("CvePS").ToString.ToEntero).FiltroPrimero("")
|
||||
Dim DrPS As DataRow = GlobalDTPS(CveEmpresaActual, CvePS:=Dr("CvePS").ToString.ToEntero).FiltroPrimero("")
|
||||
If DrPS IsNot Nothing AndAlso DrPS("IVA").ToString.ToEntero = -1 Then
|
||||
Dr("IVA") = Math.Round(Dr("Total").ToString.ToDecimal * Porcentaje, 6)
|
||||
Dr("IVAPorcentaje") = Math.Round(Porcentaje, 2)
|
||||
@@ -1020,7 +1016,7 @@ Partial Class OC_OC
|
||||
|
||||
#Region " FUNCIONALIDAD 105-141 "
|
||||
Private Sub CargaFuncionalidad105()
|
||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
|
||||
DdlP2.setEsWebService(EsWS)
|
||||
|
||||
@@ -1182,7 +1178,7 @@ Partial Class OC_OC
|
||||
For Each RowV As DataRow In ObjVentas.DtResultados.Rows
|
||||
'If Not IsNothing(RowV) Then
|
||||
Dim dr As DataRow = DtDetalle.NewRow
|
||||
Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=RowV("CvePS").ToString.ToEntero).FiltroPrimero("")
|
||||
Dim DrPS As DataRow = GlobalDTPS(CveEmpresaActual, CvePS:=RowV("CvePS").ToString.ToEntero).FiltroPrimero("")
|
||||
If DrPS Is Nothing Then
|
||||
Alert("Ocurrió un error al cargar la información de los productos. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -1874,10 +1870,9 @@ Partial Class OC_OC
|
||||
TotalCotizacionesGanadoras = 0
|
||||
|
||||
Dim objCotizaciones As New ClsOC
|
||||
|
||||
'------------------------------------------------------------------------
|
||||
Dim Ds As DataSet = objCotizaciones.GetCotizacionesTabla(CveOrdenCompra)
|
||||
For i = 1 To 10
|
||||
For i As Integer = 1 To 10
|
||||
gvCotizaciones.Columns(i + 2).Visible = False
|
||||
Next
|
||||
|
||||
@@ -1891,7 +1886,7 @@ Partial Class OC_OC
|
||||
|
||||
NumCotizaciones = DtCotizaciones.Rows.Count
|
||||
|
||||
For i = 1 To NumCotizaciones
|
||||
For i As Integer = 1 To NumCotizaciones
|
||||
gvCotizaciones.Columns(i + 2).Visible = True
|
||||
Next
|
||||
|
||||
@@ -2176,7 +2171,6 @@ Partial Class OC_OC
|
||||
End If
|
||||
|
||||
'Valida cantidad en contrato
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
Dim dttemp As New DataTable ' GlobalDTContratos().FiltraParametros(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue.ToString))
|
||||
dttemp.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
@@ -2184,7 +2178,7 @@ Partial Class OC_OC
|
||||
dttemp.Columns.Add("Cantidad", GetType(Decimal))
|
||||
dttemp.Columns.Add("PU", GetType(Decimal))
|
||||
|
||||
Dim DrPSValidar = dttemp.NewRow
|
||||
Dim DrPSValidar As DataRow = dttemp.NewRow
|
||||
DrPSValidar("CveSubProyecto") = DdlSubProyecto.SelectedValue.ToString.ToEntero
|
||||
DrPSValidar("CvePS") = DdlP2.SelectedValue.ToString.ToEntero
|
||||
DrPSValidar("Cantidad") = TxtCant.Text.Trim.ToDecimal
|
||||
@@ -2198,10 +2192,8 @@ Partial Class OC_OC
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If DtDetalle IsNot Nothing Then
|
||||
Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=DdlP2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
Dim DrPS As DataRow = GlobalDTPS(CveEmpresaActual, CvePS:=DdlP2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If DrPS Is Nothing Then
|
||||
Alert("Ocurrió un error al cargar la información del producto. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -2383,7 +2375,7 @@ Partial Class OC_OC
|
||||
|
||||
#Region " GUARDAR "
|
||||
Private Function ValidaGuardar() As Boolean
|
||||
Dim TieneError = False
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
If CboE.SelectedValue.ToEntero = 0 AndAlso TipoOC = "OC" Then
|
||||
Alert("Las ordenes de compra no puede tener el estatus 'Pre Solicitud'. Debe ser una requisición", TipoMensaje.MsgAdvertencia)
|
||||
@@ -2622,11 +2614,11 @@ Partial Class OC_OC
|
||||
Dim CveProveedorContacto As Integer = -1
|
||||
Dim TieneError As Boolean = False
|
||||
Dim CveProveedor As Integer = -1
|
||||
Dim GeneraReq = False
|
||||
Dim GeneraReq As Boolean = False
|
||||
Dim IDPoliza As Integer = 0
|
||||
Dim IVA = If(TxtIVA.Visible, TxtIVA.Text.ToDecimal, LblIVA.Text.ToDecimal)
|
||||
Dim IVA As Decimal = If(TxtIVA.Visible, TxtIVA.Text.ToDecimal, LblIVA.Text.ToDecimal)
|
||||
If TxtFechaEstimadaEntrega.Text.Trim = "__/__/____" Then TxtFechaEstimadaEntrega.Text = ""
|
||||
Dim Promocion = TxtPromocion.Text.Trim
|
||||
Dim Promocion As String = TxtPromocion.Text.Trim
|
||||
|
||||
|
||||
'EMPIEZA OBJETOS Y TRASACCIONES
|
||||
@@ -2643,7 +2635,7 @@ Partial Class OC_OC
|
||||
End If
|
||||
|
||||
'LUGAR ENTREGA
|
||||
Dim LugarEntrega = If(txtLugarEntrega.Text.Trim = "", "-1", txtLugarEntrega.Text.Trim)
|
||||
Dim LugarEntrega As String = If(txtLugarEntrega.Text.Trim = "", "-1", txtLugarEntrega.Text.Trim)
|
||||
LugarEntrega = If(DivLugarEntrega1.Visible, LugarEntrega, If(TxtLugarEntregaDirecta.Visible, TxtLugarEntregaDirecta.Text.Trim, ""))
|
||||
|
||||
'GUARDA'
|
||||
@@ -2834,7 +2826,7 @@ Partial Class OC_OC
|
||||
ViewState("LigaOCs") = If(CveEstatusNuevo <> CboE.SelectedValue.ToEntero, String.Format("<a href='/OC/OC.aspx?OC={0}'>{1}</a>", CveOrdenCompra, Folio), "")
|
||||
|
||||
If CveOrdenCompra > 0 Then
|
||||
Dim ImprimirOC = String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Orden de Compra</a> ", Encripta(String.Format("OP=OC&CVEOC={0}", CveOrdenCompra)))
|
||||
Dim ImprimirOC As String = String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Orden de Compra</a> ", Encripta(String.Format("OP=OC&CVEOC={0}", CveOrdenCompra)))
|
||||
Dim Msg As New StringBuilder
|
||||
|
||||
'Cuando Estatus = "Autorizada"
|
||||
@@ -2858,7 +2850,7 @@ Partial Class OC_OC
|
||||
'IMPRIME LIGA A POLIZAS
|
||||
If IDPolizasGeneradas.Count > 0 Then
|
||||
Msg.Append("<br/><br/> <b>Polizas generadas:</b>")
|
||||
For i = 0 To IDPolizasGeneradas.Count - 1
|
||||
For i As Integer = 0 To IDPolizasGeneradas.Count - 1
|
||||
Msg.AppendFormat("<br/> Poliza: <b><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">{1}</a></b>", IDPolizasGeneradas(i), FoliosPolizas(i))
|
||||
Next
|
||||
End If
|
||||
@@ -2987,22 +2979,22 @@ Partial Class OC_OC
|
||||
If DtInvOCDiferencias.Rows.Count > 0 And TipoOC = "OC" Then
|
||||
|
||||
'VARIABLES
|
||||
Dim DiferenciaInvOC = 0.0D
|
||||
Dim CveMovimientoAlmacen = -1
|
||||
Dim CveOCDetalle = -1
|
||||
Dim CveAlmacen = -1
|
||||
Dim DiferenciaInvOC As Decimal = 0.0D
|
||||
Dim CveMovimientoAlmacen As Integer = -1
|
||||
Dim CveOCDetalle As Integer = -1
|
||||
Dim CveAlmacen As Integer = -1
|
||||
Dim Fecha As Date = Now
|
||||
Dim CveProveedorInvOC As Integer = -1
|
||||
Dim ProveedorNombre As String = ""
|
||||
Dim SerieFolio As String = ""
|
||||
Dim CvePrePoliza As Integer = -1
|
||||
Dim ConceptoSalida = -1
|
||||
Dim TCInvOC = 0.0D
|
||||
Dim ImporteME = 0.0D
|
||||
Dim ImporteMEComp = 0.0D
|
||||
Dim SumatoriaMN = 0.0D
|
||||
Dim SumatoriaME = 0.0D
|
||||
Dim SumatoriaMEComp = 0.0D
|
||||
Dim ConceptoSalida As Integer = -1
|
||||
Dim TCInvOC As Decimal = 0.0D
|
||||
Dim ImporteME As Decimal = 0.0D
|
||||
Dim ImporteMEComp As Decimal = 0.0D
|
||||
Dim SumatoriaMN As Decimal = 0.0D
|
||||
Dim SumatoriaME As Decimal = 0.0D
|
||||
Dim SumatoriaMEComp As Decimal = 0.0D
|
||||
Dim PS As String = ""
|
||||
|
||||
If Not TieneError Then
|
||||
@@ -3218,7 +3210,7 @@ Partial Class OC_OC
|
||||
Alert(String.Format("La {0} se guardó correctamente", TipoLargo), TipoMensaje.MsgDosBotones, Liga1, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Reporte", JSBtn2:=Liga2)
|
||||
|
||||
Else
|
||||
Dim ImprimirOC = ""
|
||||
Dim ImprimirOC As String = ""
|
||||
Dim Msg As New StringBuilder
|
||||
|
||||
If CveOCGeneradas.Count = 1 Then
|
||||
@@ -3231,34 +3223,25 @@ Partial Class OC_OC
|
||||
'IMPRIME LIGA A POLIZAS
|
||||
If IDPolizasGeneradas.Count > 0 Then
|
||||
Msg.Append("<br/><br/> <b>Polizas generadas:</b>")
|
||||
For i = 0 To IDPolizasGeneradas.Count - 1
|
||||
For i As Integer = 0 To IDPolizasGeneradas.Count - 1
|
||||
Msg.AppendFormat("<br/> Poliza: <b><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">{1}</a></b>", IDPolizasGeneradas(i), FoliosPolizas(i))
|
||||
Next
|
||||
End If
|
||||
|
||||
'Alert(Msg.ToString, TipoMensaje.MsgInformacion, $"document.location.href=""/OC/OC.aspx?Tipo={TipoOC}""")
|
||||
|
||||
|
||||
'Edicion
|
||||
Dim Liga1 As String = $"document.location.href=""/OC/OC.aspx?Tipo={TipoOC}"""
|
||||
Dim Liga2 As String = $"document.location.href=""/OC/RepOC.aspx"""
|
||||
Alert(Msg.ToString(), TipoMensaje.MsgDosBotones, Liga1, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Reporte", JSBtn2:=Liga2)
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
DrEliminados.Clear()
|
||||
Else
|
||||
OC.RollBack()
|
||||
If Conta IsNot Nothing Then Conta.RollBack()
|
||||
Alert(MsgError, TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'TERMINA TODO POR SI OCURRIÓ ALGO RARO
|
||||
If TieneError Then
|
||||
If OC IsNot Nothing Then OC.RollBack()
|
||||
@@ -3291,7 +3274,6 @@ Partial Class OC_OC
|
||||
End Sub
|
||||
Protected Function GeneraOrdenes(ByRef objOrdenCompra As ClsOC, Conta As ClsContPAQi, ByRef ObjInventarios As ClsInventarios) As Boolean
|
||||
|
||||
|
||||
'If Ddlcliente.txtValue.Value.ToEntero > 0 And DdlVendedor.SelectedValue.ToEntero <= 0 Then
|
||||
' Alert("Debe de seleccionar Un vendedor ", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Function
|
||||
@@ -3302,26 +3284,25 @@ Partial Class OC_OC
|
||||
Dim CveCotizacion As Integer = 0
|
||||
Dim CveColectiva As Integer = 0
|
||||
Dim HuboError As Boolean = False
|
||||
Dim IVA = If(TxtIVA.Visible, TxtIVA.Text.ToDecimal, LblIVA.Text.ToDecimal)
|
||||
Dim IVA As Decimal = If(TxtIVA.Visible, TxtIVA.Text.ToDecimal, LblIVA.Text.ToDecimal)
|
||||
|
||||
Dim LigaOcsTemp = ""
|
||||
Dim CveOCGeneradasTemp = New List(Of Integer)
|
||||
Dim FolioOCGeneradasTemp = New List(Of Integer)
|
||||
Dim LigaOcsTemp As String = ""
|
||||
Dim CveOCGeneradasTemp As List(Of Integer) = New List(Of Integer)
|
||||
Dim FolioOCGeneradasTemp As List(Of Integer) = New List(Of Integer)
|
||||
|
||||
|
||||
Dim LugarEntrega = If(txtLugarEntrega.Text.Trim = "", "-1", txtLugarEntrega.Text.Trim)
|
||||
Dim LugarEntrega As String = If(txtLugarEntrega.Text.Trim = "", "-1", txtLugarEntrega.Text.Trim)
|
||||
LugarEntrega = If(DivLugarEntrega1.Visible, LugarEntrega, If(TxtLugarEntregaDirecta.Visible, TxtLugarEntregaDirecta.Text.Trim, ""))
|
||||
Dim Promocion = "-1"
|
||||
Dim Promocion As String = "-1"
|
||||
Promocion = TxtPromocion.Text.Trim
|
||||
|
||||
Try
|
||||
Dim NoProveedoresCot As Integer = DtDetalle.COUNT("CveProveedor", "CveProveedor > 0")
|
||||
|
||||
If ChkCotizacion.Checked AndAlso NoProveedoresCot > 0 AndAlso (NumCotizacionesGanadoras > 0 OrElse Not (NumCotizacionesGanadoras <= 0 AndAlso CveConfianzaProveedor = 1)) Then
|
||||
Dim CveProveedor = -1
|
||||
Dim TotalCot = 0.0, IVACot = 0D, RetIVA = 0.0, RetISR = 0.0
|
||||
Dim CveProveedor As Integer = -1
|
||||
Dim TotalCot As Decimal = 0, IVACot As Decimal = 0D, RetIVA As Decimal = 0, RetISR As Decimal = 0
|
||||
Dim PorIVA As Decimal = 0
|
||||
Dim IdPoliza = -1
|
||||
Dim IdPoliza As Integer = -1
|
||||
|
||||
|
||||
For Each dr As DataRow In DtDetalle.FiltraParametros("CveProveedor > 0", "CveProveedor").Rows
|
||||
@@ -3398,7 +3379,7 @@ Partial Class OC_OC
|
||||
'SI NO HUBO ERROR AGREGA LAS LIGAS OC DE TODAS LAS OC GENERADAS
|
||||
If Not HuboError Then
|
||||
ViewState("LigaOCs") = String.Format("{0}{1}", LigaOCs, LigaOcsTemp)
|
||||
Dim Index = 0
|
||||
Dim Index As Integer = 0
|
||||
For Each CveOC As Integer In CveOCGeneradasTemp
|
||||
CveOCGeneradas.Add(CveOC)
|
||||
FolioOCGeneradas.Add(FolioOCGeneradasTemp(Index))
|
||||
@@ -3471,10 +3452,9 @@ Partial Class OC_OC
|
||||
Return HuboError
|
||||
End Function
|
||||
Private Function GuardaAC(Conta As ClsContPAQi, OC As ClsOC, CveOC As Integer, FolioOC As Integer, Optional CveProveedor As Integer = -1) As Integer
|
||||
Dim TieneError = False
|
||||
Dim IDPoliza = -1
|
||||
Dim Folio = -1
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
Dim IDPoliza As Integer = -1
|
||||
Dim Folio As Integer = -1
|
||||
|
||||
'SI TIENE POLIZA ANTERIOR LA ELIMINA
|
||||
If IDPolizaPresupuestal > 0 Then
|
||||
@@ -3507,7 +3487,7 @@ Partial Class OC_OC
|
||||
Dim IdCuentaComprometido, IdCuentaPorEjercer As Integer
|
||||
|
||||
'SI VIENE CON PROVEEDOR FILTRA SOLO LOS CONCEPTOS DEL PROVEEDOR
|
||||
Dim DT = If(CveProveedor = -1, DtDetalle.Copy, DtDetalle.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)).Copy)
|
||||
Dim DT As DataTable = If(CveProveedor = -1, DtDetalle.Copy, DtDetalle.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)).Copy)
|
||||
|
||||
Dim Presup = From gvr As DataRow In DT.Rows.Cast(Of DataRow)()
|
||||
Group gvr By Grp = New With {
|
||||
@@ -3517,7 +3497,7 @@ Partial Class OC_OC
|
||||
TotalImporte = Group.Sum(Function(r) r("Total").ToString.ToDecimal)
|
||||
|
||||
Dim tTotalIVA, tTotalGral, tIVA, tDiferenciaIVA, Importe, TotalDetalle As Decimal
|
||||
Dim tPorIVA = 0D, tAjusteTotal = 0D, ipresup = 0
|
||||
Dim tPorIVA As Decimal = 0D, tAjusteTotal As Decimal = 0D, ipresup As Decimal = 0
|
||||
|
||||
If CveProveedor > 0 Then
|
||||
'CUANDO VIENE DE COTIZACION
|
||||
@@ -3871,7 +3851,7 @@ Partial Class OC_OC
|
||||
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
e.Row.FCTextBox("TxtObsPS").Attributes.Add("maxlength", "750")
|
||||
Dim FiltroClasificacion = ""
|
||||
Dim FiltroClasificacion As String = ""
|
||||
'DDL CLASIFICACION
|
||||
If isWithFamily() Then
|
||||
e.Row.FCDropDownList("DdlClasificacion").DataSource = GlobalDTSubFamilias(CveEmpresaActual) 'GlobalDTClasificaciones(CveEmpresaActual).FiltraParametros("Codigo is null OR Codigo = ''")
|
||||
@@ -4031,26 +4011,26 @@ Partial Class OC_OC
|
||||
Clasificacion = gvr.FCDropDownList("DdlClasificacion").SelectedItem.Text
|
||||
|
||||
'SE TOMAN VALORES EN CASO DE QUE LA CvePS SEA DIFERENTE DE LA ANTERIOR
|
||||
Dim CvePSAnterior = gvr.DataKey("CvePS").ToEntero
|
||||
Dim CvePSAnterior As Integer = gvr.DataKey("CvePS").ToEntero
|
||||
PS = gvr.DataKey("PS").ToString
|
||||
Dim RetISR = gvr.DataKey("RetISRPorcentaje").ToDecimal
|
||||
Dim RetIVA = gvr.DataKey("RetIVAPorcentaje").ToDecimal
|
||||
Dim RetISR As Decimal = gvr.DataKey("RetISRPorcentaje").ToDecimal
|
||||
Dim RetIVA As Decimal = gvr.DataKey("RetIVAPorcentaje").ToDecimal
|
||||
'Dim IvaPS = gvr.DataKey("IVAPorcentaje").ToDecimal
|
||||
Dim IEPSPS = gvr.DataKey("IEPSPSPorcentaje").ToDecimal
|
||||
Dim IEPSPSIVA = gvr.DataKey("IEPSPSIVAPorcentaje").ToDecimal
|
||||
Dim Total = Importe * Cantidad - Descuento
|
||||
Dim IEPSPS As Decimal = gvr.DataKey("IEPSPSPorcentaje").ToDecimal
|
||||
Dim IEPSPSIVA As Decimal = gvr.DataKey("IEPSPSIVAPorcentaje").ToDecimal
|
||||
Dim Total As Decimal = Importe * Cantidad - Descuento
|
||||
|
||||
|
||||
'VALORES DEL PS
|
||||
CvePS = gvr.FCDropDownList("DdlPS").SelectedValue.ToEntero
|
||||
|
||||
PS = gvr.FCDropDownList("DdlPS").SelectedItem.Text
|
||||
Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=CvePS).FiltroPrimero("")
|
||||
Dim DrPS As DataRow = GlobalDTPS(CveEmpresaActual, CvePS:=CvePS).FiltroPrimero("")
|
||||
If DrPS Is Nothing Then
|
||||
Alert("Ocurrió un error al cargar la información del producto para actualizar. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Dim IvaPS = DrPS("IVA").ToString.ToDecimal
|
||||
Dim IvaPS As Decimal = DrPS("IVA").ToString.ToDecimal
|
||||
IEPSPS = DrPS("IEPSPorcentaje").ToString.ToDecimal
|
||||
IEPSPSIVA = If(DrPS("IEPSGrabaIVA").ToString = "True", DrPS("IEPSPorcentaje").ToString.ToDecimal, 0)
|
||||
|
||||
@@ -4314,15 +4294,15 @@ Partial Class OC_OC
|
||||
Protected Sub SeleccionarPOA_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim gvr As GridViewRow = CType(CType(sender, LinkButton).BindingContainer, GridViewRow)
|
||||
Dim Clave As String = gvr.DataKey("CvePresupuestoEgreso")
|
||||
Dim CuentaporEjercer = gvr.DataKey("IdCuentaPorEjercer")
|
||||
Dim CuentaComprometido = gvr.DataKey("IdCuentaComprometido")
|
||||
Dim CuentaporEjercer As String = gvr.DataKey("IdCuentaPorEjercer")
|
||||
Dim CuentaComprometido As String = gvr.DataKey("IdCuentaComprometido")
|
||||
Dim Presupuesto As String = gvr.DataKey("Total")
|
||||
|
||||
If Presupuesto.ToEntero < TxtImporte.Text.ToEntero Then
|
||||
Alert("El Presupuesto seleccionado no cubre el gasto. Favor de seleccionar otro.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
LblCvePOA.Text = Clave.ToString
|
||||
HdnCveCuentaPorEjercer.Value = CuentaporEjercer.ToString
|
||||
HdnCveCuentaPorEjercer.Value = CuentaporEjercer
|
||||
HdnCveCuentaComprometido.Value = CuentaComprometido.ToString
|
||||
LbAgregar.Enabled = True
|
||||
UpPoaClave.Update()
|
||||
@@ -4368,7 +4348,7 @@ Partial Class OC_OC
|
||||
End Sub
|
||||
Private Sub CargaPresupuesto()
|
||||
Dim AC As New ClsAC
|
||||
Dim Ejercicio = If(IsDate(TxtFecha.Text), Year(TxtFecha.Text.ToDate), UsuarioActual.Empresa.EjercicioActual)
|
||||
Dim Ejercicio As Integer = If(IsDate(TxtFecha.Text), Year(TxtFecha.Text.ToDate), UsuarioActual.Empresa.EjercicioActual)
|
||||
|
||||
If AC.GetPresupuestoEgresos(-1, True, Ejercicio, CveEmpresaActual, True) Then
|
||||
DtPresupuestos = AC.DtResultados.Copy
|
||||
@@ -4382,11 +4362,6 @@ Partial Class OC_OC
|
||||
UpPresupuestosAC.Update()
|
||||
End Sub
|
||||
Private Sub MuestraPresupuestosEgresos()
|
||||
|
||||
Dim Width = GvD.Width
|
||||
Dim Width2 = DivConceptosContenido.Style("Width")
|
||||
|
||||
|
||||
'Seccion Grid
|
||||
If VerificaPresupuesto Then
|
||||
GvD.Width = 1750
|
||||
@@ -4445,7 +4420,7 @@ Partial Class OC_OC
|
||||
CambiaEjercicioAC()
|
||||
End Sub
|
||||
Private Sub CambiaEjercicioAC(Optional CargaTodo As Boolean = True)
|
||||
Dim Ejercicio = If(IsDate(TxtFecha.Text), Year(TxtFecha.Text.ToDate), UsuarioActual.Empresa.EjercicioActual)
|
||||
Dim Ejercicio As Integer = If(IsDate(TxtFecha.Text), Year(TxtFecha.Text.ToDate), UsuarioActual.Empresa.EjercicioActual)
|
||||
|
||||
If Ejercicio = EjercicioAC Then
|
||||
Exit Sub
|
||||
@@ -4502,7 +4477,7 @@ Partial Class OC_OC
|
||||
|
||||
Private Sub ConservaAC()
|
||||
'Guarda valores AC en TmpDT
|
||||
Dim Index = 0
|
||||
Dim Index As Integer = 0
|
||||
For Each gvr As GridViewRow In GvD.Rows
|
||||
DtDetalle.Rows(Index)("CveProgramaOperativo") = gvr.FCDropDownList("DdlAC1").SelectedValue.ToEntero
|
||||
DtDetalle.Rows(Index)("CveUnidadAdministrativa") = gvr.FCDropDownList("DdlAC2").SelectedValue.ToEntero
|
||||
@@ -4552,7 +4527,7 @@ Partial Class OC_OC
|
||||
End Sub
|
||||
Private Sub CalculaSaldoACGeneral()
|
||||
Dim ContPaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim DtPresupuestosTemp = DtPresupuestos.FiltraParametros(String.Format("CveProgramaOperativo = {0} and CveUnidadAdministrativa = {1} and CveFuenteFinanciamiento = {2} and CveTipoGasto= {3} and CveClasificacion = {4}", DdlACGeneral1.SelectedValue.ToString, DdlACGeneral2.SelectedValue.ToString, DdlACGeneral3.SelectedValue.ToString, DdlACGeneral4.SelectedValue.ToString, DdlACGeneral5.SelectedValue.ToString))
|
||||
Dim DtPresupuestosTemp As DataTable = DtPresupuestos.FiltraParametros(String.Format("CveProgramaOperativo = {0} and CveUnidadAdministrativa = {1} and CveFuenteFinanciamiento = {2} and CveTipoGasto= {3} and CveClasificacion = {4}", DdlACGeneral1.SelectedValue.ToString, DdlACGeneral2.SelectedValue.ToString, DdlACGeneral3.SelectedValue.ToString, DdlACGeneral4.SelectedValue.ToString, DdlACGeneral5.SelectedValue.ToString))
|
||||
If DtPresupuestosTemp IsNot Nothing AndAlso DtPresupuestosTemp.Rows.Count > 0 Then
|
||||
LbACGeneralSaldo.Text = ContPaq.GetSaldoCuenta(DtPresupuestosTemp.Rows(0)("IdCuentaPorEjercer").ToString.ToEntero, 0, TxtFecha.Text.ToDate.Year).ToString.FormatoNumero
|
||||
Else
|
||||
@@ -4568,7 +4543,7 @@ Partial Class OC_OC
|
||||
|
||||
Dim ContPaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim disponible As Decimal
|
||||
Dim ErrorPresupuesto = False
|
||||
Dim ErrorPresupuesto As Boolean = False
|
||||
|
||||
Dim Ddl1 As DropDownList
|
||||
Dim Ddl2 As DropDownList
|
||||
@@ -5335,13 +5310,9 @@ Partial Class OC_OC
|
||||
|
||||
Protected Sub BtnSolicitarAnticipo_Click(sender As Object, e As EventArgs) Handles BtnSolicitarAnticipo.Click
|
||||
|
||||
|
||||
|
||||
If TxtSAImporte.Text.ToDecimal > SaldoOCAnticipo Then
|
||||
|
||||
Alert("El importe solicitado supera el saldo de la orden de compra", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
|
||||
End If
|
||||
|
||||
Dim Descripcion As New StringBuilder
|
||||
@@ -5349,10 +5320,10 @@ Partial Class OC_OC
|
||||
Descripcion.AppendFormat("Orden de compra : {0} - <a target=""_blank"" href=""/OC/OC.aspx?OC={1}"">Ir a la orden de compra</a> - <a target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?P={2}"">Imprimir OC</a>", Folio, CveOrdenCompra, Encripta(String.Format("OP=OC&CVEOC={0}", CveOrdenCompra)))
|
||||
|
||||
'Dim Descripcion = $"Importe anticipo : ${TxtSAImporte.Text.FormatoNumero} ({TxtSAImPorcentaje.Text}%) - <a target=""_blank"" href=""/Bancos/IE.aspx?Opcion=EGSSINFACT&CveOC={CveOrdenCompra}"">Pagar anticipo</a> - <b>Observacion:</b> {TxtSAObservaciones.Text} "
|
||||
Dim Asunto = $"{lblFolio.Text} - Solicitud de anticipo "
|
||||
Dim Asunto As String = $"{lblFolio.Text} - Solicitud de anticipo "
|
||||
Dim ObjOC As New ClsOC
|
||||
Dim ObjOI As New ClsOIEventos(ObjOC.IniciaTransacSQL)
|
||||
Dim TieneError = False
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
If ObjOI.AddEventoTarea(Asunto, Descripcion.ToString, 1, UsuarioActual.CveUsuario, DdlSAUsuario.SelectedValue.ToString.ToEntero, DateTime.Now, DateTime.Now.AddMinutes(15), -1, 1, -1, "-1", -1, -1, -1, -1, -1, CveOrdenCompra.ToEntero, -1, -1, UsuarioActual.CveUsuario, -1, CveEmpresaActual) Then
|
||||
If Not ObjOC.AddSolicitudAnticipo(CveOrdenCompra, TxtSAImporte.Text.ToDecimal, CveEmpresaActual) Then
|
||||
@@ -5362,27 +5333,21 @@ Partial Class OC_OC
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
|
||||
If Not ObjOI.AddEventoBitacora($"Solicitud de anticipo de orden de compra por ${TxtSAImporte.Text.FormatoNumero}", "-1", UsuarioActual.CveUsuario, CveEmpresaActual, CveOC:=CveOrdenCompra) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
|
||||
If Not TieneError Then
|
||||
RegistraScript("$('#ModalSolicitarAnticipo').modal('hide');", "ModalSolicitarAnticipoHide")
|
||||
ObjOC.Commit()
|
||||
EnviaCorreoSolicitudAnticipo(ObjOI.CveEvento)
|
||||
|
||||
'LIMPIA
|
||||
BtnSolicitudAnticipo.Visible = False
|
||||
DdlSAUsuario.SelectedValue = "-1"
|
||||
TxtSAImporte.Text = ""
|
||||
TxtSAObservaciones.Text = ""
|
||||
TxtSAImPorcentaje.Text = ""
|
||||
|
||||
Alert("La solicitud de anticipo ha sido enviada correctamente.", TipoMensaje.MsgInformacion)
|
||||
|
||||
|
||||
Else
|
||||
ObjOC.RollBack()
|
||||
Alert("Ocurrió un error al hacer la solicitud de anticipo.", TipoMensaje.MsgError)
|
||||
@@ -5579,14 +5544,14 @@ Partial Class OC_OC
|
||||
Dim PorcentajeGanancia As Decimal = 0.3D
|
||||
For Each Row As DataRow In DtDetalle.Rows
|
||||
Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
|
||||
Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=CvePS).FiltroPrimero("")
|
||||
Dim DrPS As DataRow = GlobalDTPS(CveEmpresaActual, CvePS:=CvePS).FiltroPrimero("")
|
||||
|
||||
Dim Cantidad As Decimal = Row("Cantidad").ToString.ToDecimal
|
||||
Dim PU As Decimal = Row("Importe").ToString.ToDecimal() + (Row("Importe").ToString.ToDecimal() * PorcentajeGanancia)
|
||||
|
||||
|
||||
Dim TotalCalculableImpuestos = (Cantidad * (PU))
|
||||
Dim TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
|
||||
Dim TotalCalculableImpuestos As Decimal = (Cantidad * (PU))
|
||||
Dim TotalCalculableImpuestosIVA As Decimal = TotalCalculableImpuestos * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
|
||||
|
||||
Dim PorcentajeIEPS As Decimal = DrPS("IEPSPorcentaje").ToString.ToDecimal
|
||||
|
||||
@@ -5617,7 +5582,7 @@ Partial Class OC_OC
|
||||
#End Region
|
||||
|
||||
Private Function notienepresupuesto() As Boolean
|
||||
Dim notienerecursos = False
|
||||
Dim notienerecursos As Boolean = False
|
||||
Dim SinRecursos As New StringBuilder
|
||||
SinRecursos.AppendFormat("No se cuenta con los Recursos Suficientes en los siguientes subproyectos ")
|
||||
Dim subproyectosSr As New List(Of Integer)
|
||||
@@ -7278,7 +7243,7 @@ Partial Class OC_OC
|
||||
'SE ACTUALIZA EL IVA DEL DtDetalle SI ES QUE AHORA SE VA A TOMAR EN CUENTA EL IVA
|
||||
For Each Row As DataRow In DtDetalle.Rows
|
||||
If Not Math.Round(DdlIVA.SelectedValue.ToDecimal, 2) = 1 Then
|
||||
Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=Row("CvePS").ToString.ToEntero).FiltroPrimero("")
|
||||
Dim DrPS As DataRow = GlobalDTPS(CveEmpresaActual, CvePS:=Row("CvePS").ToString.ToEntero).FiltroPrimero("")
|
||||
If DrPS IsNot Nothing Then
|
||||
Row("IVAPorcentaje") = If(DrPS("IVA").ToString.ToEntero = -1, Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), 0)
|
||||
Row("IVA") = Row("IVAPorcentaje").ToString.ToDecimal * Row("Total").ToString.ToDecimal
|
||||
@@ -7413,12 +7378,12 @@ Partial Class OC_OC
|
||||
TxtDescuento.Text = TxtDescuento.Text.FormatoNumero
|
||||
HdnDescuento.Value = TxtDescuento.Text
|
||||
|
||||
Dim Total = 0.0D
|
||||
Dim Descuento = 0.0D
|
||||
Dim Porcentaje = TxtDescuento.Text.ToDecimal / DtDetalle.SUM("Total")
|
||||
Dim Total As Decimal = 0.0D
|
||||
Dim Descuento As Decimal = 0.0D
|
||||
Dim Porcentaje As Decimal = TxtDescuento.Text.ToDecimal / DtDetalle.SUMD("Total")
|
||||
Dim LastDr As DataRow = Nothing
|
||||
For Each Dr As DataRow In DtDetalle.Rows
|
||||
Descuento = ((Math.Truncate((Dr("Total").ToString.ToDecimal * Porcentaje) * 100)) / 100).ToDecimal
|
||||
Descuento = ((Math.Truncate((Dr("Total").ToString.ToDecimal * Porcentaje) * 100.0)) / 100.0).ToDecimal
|
||||
Dr("Descuento") = Descuento
|
||||
Total = (Dr("Cantidad").ToString.ToDecimal * Dr("Importe").ToString.ToDecimal) - Descuento
|
||||
Dr("Total") = Math.Round(Total, 2)
|
||||
@@ -7461,10 +7426,10 @@ Partial Class OC_OC
|
||||
UPPDetalle.Update()
|
||||
End Sub
|
||||
Private Function ValidarDescuentos() As Boolean
|
||||
Dim Retorno = True
|
||||
Dim Retorno As Boolean = True
|
||||
|
||||
Dim DescuentoConceptos = DtDetalle.SUM("Descuento")
|
||||
Dim DescuentoGeneral = TxtDescuento.Text.ToDecimal
|
||||
Dim DescuentoConceptos As Decimal = DtDetalle.SUMD("Descuento")
|
||||
Dim DescuentoGeneral As Decimal = TxtDescuento.Text.ToDecimal
|
||||
|
||||
If DescuentoConceptos <> DescuentoGeneral Then
|
||||
Alert(String.Format("Los descuentos no cuadran. Por favor de verificar.({0}-{1})", DescuentoConceptos, DescuentoGeneral), TipoMensaje.MsgAdvertencia)
|
||||
@@ -7580,7 +7545,7 @@ Partial Class OC_OC
|
||||
TxtRetISR.Text = TxtRetISR.Text.FormatoNumero
|
||||
HdnRetISR.Value = TxtRetISR.Text
|
||||
|
||||
Dim Porcentaje = TxtRetISR.Text.ToDecimal / DtDetalle.SUM("Total")
|
||||
Dim Porcentaje As Decimal = TxtRetISR.Text.ToDecimal / DtDetalle.SUMD("Total")
|
||||
Dim LastDr As DataRow = Nothing
|
||||
For Each Dr As DataRow In DtDetalle.Rows
|
||||
Dr("RetISR") = (Math.Truncate((Dr("Total").ToString.ToDecimal * Porcentaje) * 100)) / 100
|
||||
@@ -7686,7 +7651,7 @@ Partial Class OC_OC
|
||||
Dim Cantidad As Decimal = row.FCTextBox("TxtCantContrato").Text.Trim.ToDecimal
|
||||
Dim Importe As Decimal = row.FCTextBox("TxtPrecioContrato").Text.Trim.ToDecimal
|
||||
|
||||
Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=row.DataKey("CvePS").ToEntero).FiltroPrimero("")
|
||||
Dim DrPS As DataRow = GlobalDTPS(CveEmpresaActual, CvePS:=row.DataKey("CvePS").ToEntero).FiltroPrimero("")
|
||||
If DrPS Is Nothing Then
|
||||
Alert("Ocurrió un error al cargar la información del producto. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -7754,7 +7719,6 @@ Partial Class OC_OC
|
||||
#End Region
|
||||
|
||||
#Region "DIRECCION ENVIO"
|
||||
|
||||
Protected Sub CargaDdlSucursalCliente()
|
||||
Dim ObjCliente As New ClsClientes
|
||||
|
||||
@@ -7796,8 +7760,8 @@ Partial Class OC_OC
|
||||
End If
|
||||
|
||||
Dim ObjClientes As New ClsClientes
|
||||
Dim TieneError = False
|
||||
Dim Estatus = If(ChkEstatus.Checked, 1, 0)
|
||||
Dim TieneError As Boolean = False
|
||||
Dim Estatus As Integer = If(ChkEstatus.Checked, 1, 0)
|
||||
|
||||
CveDireccionEnvio = ObjClientes.DireccionEnvioAdd(Ddlcliente.txtValue.Value.ToEntero, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text, TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero, EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""))
|
||||
|
||||
@@ -7805,8 +7769,6 @@ Partial Class OC_OC
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If TieneError Then
|
||||
Alert("Ocurrio un error al agregar/actualizar la dirección de envío", TipoMensaje.MsgError)
|
||||
Else
|
||||
@@ -7954,7 +7916,7 @@ Partial Class OC_OC
|
||||
|
||||
Dim FileExcel As New ExcelFile()
|
||||
|
||||
Dim worksheet = FileExcel.Worksheets.Add(DtExcel.TableName)
|
||||
Dim worksheet As ExcelWorksheet = FileExcel.Worksheets.Add(DtExcel.TableName)
|
||||
worksheet.InsertDataTable(DtExcel, New InsertDataTableOptions() With
|
||||
{
|
||||
.ColumnHeaders = True,
|
||||
@@ -7964,7 +7926,7 @@ Partial Class OC_OC
|
||||
worksheet.Rows(0).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(75, 119, 190), SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
worksheet.Rows(0).Style.Font.Color = SpreadsheetColor.FromArgb(255, 255, 255)
|
||||
|
||||
Dim columnCount = worksheet.CalculateMaxUsedColumns()
|
||||
Dim columnCount As Integer = worksheet.CalculateMaxUsedColumns()
|
||||
For i = 0 To columnCount
|
||||
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
|
||||
Next
|
||||
@@ -7976,7 +7938,7 @@ Partial Class OC_OC
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
|
||||
Dim dt As DataTable = Nothing
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorArchivo As Boolean = False
|
||||
|
||||
Try
|
||||
dt = ReadExcelFile(Ruta + FileName, True)
|
||||
@@ -8047,7 +8009,7 @@ Partial Class OC_OC
|
||||
If CveProveedor > 0 Then
|
||||
If objCotizacion.AddCotizacion(CveOrdenCompra, CveProveedor, -1, Folio, TxtFecha.Text, "", DdlMoneda.SelectedValue.ToEntero, 0, UsuarioActual.CveUsuario) Then
|
||||
For Each dr As DataRow In dt.Rows
|
||||
Dim RowPS = DtOCDetalle.FiltroPrimero(String.Format("Codigo='{0}'", dr("Codigo").ToString()))
|
||||
Dim RowPS As DataRow = DtOCDetalle.FiltroPrimero(String.Format("Codigo='{0}'", dr("Codigo").ToString()))
|
||||
|
||||
Dim CveOrdenCompraDetalle As Integer = RowPS("CveOrdenCompraDetalle").ToString().ToEntero()
|
||||
Dim CvePS As Integer = RowPS("CvePS").ToString().ToEntero()
|
||||
|
||||
@@ -2098,7 +2098,7 @@ Partial Class Clientes
|
||||
|
||||
Dim Cuerpo As String = TxtBody.Text
|
||||
Dim Asunto As String = ""
|
||||
Dim TipoComprobante = ""
|
||||
Dim TipoComprobante As String = ""
|
||||
Dim Adjunto As String = ""
|
||||
|
||||
If HdnTipoDocto.Value.ToString() = "Ing" Then TipoComprobante = "Factura"
|
||||
@@ -6901,6 +6901,7 @@ Partial Class Clientes
|
||||
DdlClavePedimento.Items.Clear()
|
||||
DdlClavePedimento.DataSource = GlobalDTClavePedimento()
|
||||
DdlClavePedimento.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlClavePedimento.DataBind()
|
||||
|
||||
DdlMotivoTraslado.Items.Clear()
|
||||
DdlMotivoTraslado.DataSource = GlobalDTSATMotivoTraslado()
|
||||
@@ -9863,9 +9864,8 @@ Partial Class Clientes
|
||||
)
|
||||
System.Net.ServicePointManager.SecurityProtocol = DirectCast(3072, SecurityProtocolType)
|
||||
|
||||
Dim Url = New Uri(String.Format("{0}api/cliente/GetHistorialVentas", "http://localhost:5000/"))
|
||||
|
||||
Dim response = cliente.PostAsync(Url, New StringContent(Parametros.ToString(), Encoding.UTF8, "application/json")).Result
|
||||
Dim Url As Uri = New Uri(String.Format("{0}api/cliente/GetHistorialVentas", "http://localhost:5000/"))
|
||||
Dim response As HttpResponseMessage = cliente.PostAsync(Url, New StringContent(Parametros.ToString(), Encoding.UTF8, "application/json")).Result
|
||||
|
||||
If response.StatusCode = 200 Then
|
||||
Dim json = response.Content.ReadAsStringAsync().Result
|
||||
@@ -9917,10 +9917,8 @@ Partial Class Clientes
|
||||
cliente.DefaultRequestHeaders.Add("Accept", "text/json")
|
||||
|
||||
Try
|
||||
Dim Url = New Uri(String.Format("{0}ashx/SIGWeb.ashx?metodo=GetTokenAngular", "http://localhost:85/"))
|
||||
|
||||
Dim Url As Uri = New Uri(String.Format("{0}ashx/SIGWeb.ashx?metodo=GetTokenAngular", "http://localhost:85/"))
|
||||
Dim response = cliente.GetAsync(Url).Result
|
||||
|
||||
If response.StatusCode = 200 Then
|
||||
retorno = response.Content.ReadAsStringAsync().Result
|
||||
End If
|
||||
@@ -10289,7 +10287,7 @@ Partial Class Clientes
|
||||
|
||||
Protected Sub LnkEliminarLineaAdicional_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim CveLineaAdicionalEliminar = GvRow.DataKey("CveLineaAdicional").ToEntero
|
||||
Dim CveLineaAdicionalEliminar As Integer = GvRow.DataKey("CveLineaAdicional").ToEntero
|
||||
Dim ErrorEliminacion As Boolean = False
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
Reference in New Issue
Block a user