-- option explicit

-- repie, filtro por usuario
This commit is contained in:
2023-08-31 21:54:13 -07:00
parent 3c3268bef1
commit f4d4d5f264
23 changed files with 356 additions and 418 deletions

View File

@@ -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>

View File

@@ -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

View File

@@ -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()

View File

@@ -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"

View File

@@ -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" />

View File

@@ -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

View File

@@ -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")