diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 59017b394..353146e49 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -1592,7 +1592,41 @@ Public Class ClsGenerales End Try Return Retorno - End Function + End Function + + Public Function UpdateCuentasDepositosPersonal(CveCuentaDeposito As Integer, BancoNombre As String, Cuenta As String, CLABE As String, CveMoneda As Integer, CveUsuarioModifico As Integer, EstatusPagoElectronico As Boolean, Estatus As Boolean, CveSATBanco As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Gral_CuentasDepositosPersonalUpdate") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito + .Add("@BancoNombre", SqlDbType.VarChar).Value = BancoNombre + .Add("@Cuenta", SqlDbType.VarChar).Value = Cuenta + .Add("@CLABE", SqlDbType.VarChar).Value = CLABE + .Add("@Estatus", SqlDbType.VarChar).Value = Estatus + .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda + .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico + .Add("@Correo", SqlDbType.VarChar).Value = Correo + .Add("@EstatusPagoElectronico", SqlDbType.Bit).Value = EstatusPagoElectronico + .Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch Ex1 As SqlException + If Ex1.Message.Contains("Número: 2627;") Then + Alert("Ya existe un registro con el mismo nombre", TipoMensaje.MsgAdvertencia) + Else + Me.OnError("Ocurrió un error al guardar los cambios", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If + Catch ex As Exception + OnError("Ocurrió un error al guardar los cambios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function Public Function UpdateCuentasDepositos(CveCuentaDeposito As Integer, BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String, RefCrediProveedor As String, Predeterminada As Boolean, Estatus As Boolean, CveMoneda As Integer, Optional CveUsuarioModifico As Integer = -1, Optional Correo As String = "", diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 32d650303..308ebb7ed 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -198,6 +198,41 @@ Public Class ClsNominas End Function + Public Function ReportedeincidenciasGET(cveEmpresa As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveTipoPeriodo As Integer) As Boolean + Dim retorno As Boolean = False + DTSet = New DataSet() + DataAdapter("PA_RH_ReportedeincidenciasGET", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio + .Add("@FechaFin", SqlDbType.Date).Value = FechaFin + .Add("@TipoPeriodo", SqlDbType.Int).Value = CveTipoPeriodo + End With + Try + SqlAdapter.Fill(DTSet) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el reporte de incidencias.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function ReportedeAcumuladosGET(cveEmpresa As Integer, Periodo As Integer, CveTipoPeriodo As Integer) As Boolean + Dim retorno As Boolean = False + DTSet = New DataSet() + DataAdapter("PA_RH_ReportedeAcumuladosGET", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@Periodo", SqlDbType.Int).Value = Periodo + .Add("@TipoPeriodo", SqlDbType.Int).Value = CveTipoPeriodo + End With + Try + SqlAdapter.Fill(DTSet) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el reporte de acumulados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function Public Function GetCalculoAguinaldo(ejercicio As Int32, cveEmpresa As Int32, importe As Double, CveTipoPeriodo As Integer, CvePeriodo As Integer) As Boolean Dim retorno As Boolean = False DataAdapter("PA_NomCalcularAguinaldo", CommandType.StoredProcedure) @@ -479,6 +514,23 @@ Public Class ClsNominas Return Retorno End Function + Public Function DeleteNom_NominasDetalles(CveConcepto As Integer, CvePersonal As Integer, CvePeriodo As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Nom_NominasDetallesDelete") + SqlAdapter.SelectCommand.Parameters.Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto + SqlAdapter.SelectCommand.Parameters.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + SqlAdapter.SelectCommand.Parameters.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function Public Function RemoveNom_NominasDetalles(CveNominaDetalle As Integer) As Boolean Dim Retorno As Boolean = False @@ -2073,13 +2125,14 @@ Public Class ClsNominas Return retorno End Function - Public Function GetCalculoSBC(CveEmpresa As Integer, FechaCalculo As String) As Boolean + Public Function GetCalculoSBC(CveEmpresa As Integer, Tipo As Integer, FechaCalculo As String) As Boolean Dim retorno As Boolean = False Try DTSet = New DataSet() DataAdapter("PA_GetCalculoSBC", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Tipo", SqlDbType.Int).Value = Tipo .Add("@Fecha", SqlDbType.Date).Value = FechaCalculo End With @@ -2479,6 +2532,97 @@ Public Class ClsNominas End Function #End Region + +#Region "CRUD_RH_TablasValores" + Public Function RH_TablasValoresGet(cveEmpresa As Int32, tipo As Int32) As Boolean + Dim retorno As Boolean = False + Try + DataAdapter("PA_RH_TablasValoresGet", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@Tipo", SqlDbType.Int).Value = tipo + End With + SqlAdapter.Fill(Data) + + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function RH_TablasValoresAdd(cveEmpresa As Int32, fecha As DateTime, tipo As Int32, valor As Decimal) As Boolean + Dim retorno As Boolean = False + + Try + DataAdapter("PA_RH_TablasValoresAdd", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@Tipo", SqlDbType.Int).Value = tipo + .Add("@fecha", SqlDbType.DateTime).Value = fecha + .Add("@valor", SqlDbType.Money).Value = valor + End With + SqlAdapter.Fill(Data) + + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function RH_TablasValoresUp(cveEmpresa As Int32, fecha As DateTime, tipo As Int32, valor As Decimal) As Boolean + Dim retorno As Boolean = False + + Try + DataAdapter("PA_RH_TablasValoresUp", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@Tipo", SqlDbType.Int).Value = tipo + .Add("@fecha", SqlDbType.DateTime).Value = fecha + .Add("@valor", SqlDbType.Money).Value = valor + End With + SqlAdapter.Fill(Data) + + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function RH_TablasValoresRemove(cveEmpresa As Int32, fecha As DateTime, tipo As Int32) As Boolean + Dim retorno As Boolean = False + Try + DataAdapter("PA_RH_TablasValoresRemove", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@Tipo", SqlDbType.Int).Value = tipo + .Add("@fecha", SqlDbType.DateTime).Value = fecha + End With + SqlAdapter.Fill(Data) + + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function +#End Region + #Region "IDisposable Support" ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index fbe97480e..95db7694d 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -577,8 +577,8 @@ Namespace Extensiones Else Return CDbl(Obj(key)) End If - End Function - + End Function + Public Function ToEntero(Obj As Object) As Integer diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 668920538..20e230d4d 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -10,7 +10,7 @@ -   +   @@ -32,9 +32,9 @@
- +
- +
@@ -77,7 +77,7 @@ - +
@@ -85,7 +85,14 @@ @@ -97,13 +104,13 @@
-
- +
+
- +
@@ -118,41 +125,63 @@
-
- - +
Seleccionado: $ - 00.00 + 0.00
- -
- - +
+ +
+ - - +
+
+ +
+ + + + + + + +
+
- + @@ -193,7 +222,7 @@ - +
@@ -208,7 +237,7 @@

- +
@@ -222,57 +251,89 @@ var ValorTotalSeleccionado = 0 var comision = 0; + var descuento = 0; + var saldo = 0; function FnSuma(chk, cantidad) { - debugger; - var saldo = ToDouble($('#C_lblValorTotal').text()); - debugger; + var saldoInicial = ToDouble($('#C_lblValorTotal').text()); if (chk.checked == false) { cantidad = cantidad * -1; - debugger; } - saldo = saldo + cantidad; - debugger; - $('#C_lblValorTotal').text(FormatoNumero(saldo, 2)); - $('#C_lblValorTotalSeleccionado').text(FormatoNumero(saldo, 2)); - ValorTotalSeleccionado = saldo + saldoInicial = saldoInicial + cantidad; + $('#C_lblValorTotal').text(FormatoNumero(saldoInicial, 2)); + $('#C_lblValorTotalSeleccionado').text(FormatoNumero(saldoInicial, 2)); + ValorTotalSeleccionado = saldoInicial - debugger; } function txtSuma(txt) { - var saldo = ToDouble($('#C_lblValorTotal').text()); var comision2 = ToDouble($('#C_TxtComision').val()); - if (comision2 < ValorTotalSeleccionado) { - comision2 = comision2 - comision - saldo = saldo - comision2; - $('#C_lblValorTotal').text(FormatoNumero(saldo, 2)); - comision = ToDouble($('#C_TxtComision').val()) - } else { + var comisionNegativa = 0; + if (comision2 < 0) { + comisionNegativa = comision2 * -1 + } + if (comisionNegativa > ValorTotalSeleccionado) { $('#C_TxtComision').val(comision) alert("No es posible poner una comision superior a lo seleccionado") - } - - if (comision > 0) { - $('#LblSubproyecto').css("display", "block"); - $('#divSubProyecton').css("display", "block"); - $('#LblClasificacion').css("display", "block"); - $('#divClasificacion').css("display", "block"); - - debugger; - } else { - $('#LblSubproyecto').css("display", "none"); - $('#divSubProyecton').css("display", "none"); - $('#LblClasificacion').css("display", "none"); - $('#divClasificacion').css("display", "none"); + saldo = ValorTotalSeleccionado + comision2 + descuento; + $('#C_lblValorTotal').text(FormatoNumero(saldo, 2)); + comision = ToDouble($('#C_TxtComision').val()) debugger; } - } + function txtSumaDescuento(txt) { + var comision2 = ToDouble($('#C_TxtDescuento').val()); + var comisionNegativa = 0; + if (comision2 < 0) { + comisionNegativa = comision2 * -1 + } + if (comisionNegativa > ValorTotalSeleccionado) { + $('#C_TxtDescuento').val(descuento) + alert("No es posible poner una comision superior a lo seleccionado") + } else { + saldo = ValorTotalSeleccionado + comision2 + comision; + $('#C_lblValorTotal').text(FormatoNumero(saldo, 2)); + descuento = ToDouble($('#C_TxtDescuento').val()) + debugger; + } + } + + function CheckFaltante(chk) { + if (chk.checked == true) { + $('#DivComision').css("display", "block"); + $('#LblSubproyecto').css("display", "block"); + $('#divSubProyecto').css("display", "block"); + $('#LblClasificacion').css("display", "block"); + $('#divClasificacion').css("display", "block"); + } else { + $('#DivComision').css("display", "none"); + $('#divSubProyecto').css("display", "none"); + $('#divSubProyecto').css("display", "none"); + $('#LblClasificacion').css("display", "none"); + $('#divClasificacion').css("display", "none"); + } + } + + function CheckDescuento(chk) { + if (chk.checked == true) { + $('#DivDescuento').css("display", "block"); + $('#LblSubproyectoDescuento').css("display", "block"); + $('#divSubProyectoDescuento').css("display", "block"); + $('#LblClasificacionDescuento').css("display", "block"); + $('#divClasificacionDescuento').css("display", "block"); + } else { + + $('#DivDescuento').css("display", "none"); + $('#LblSubproyectoDescuento').css("display", "none"); + $('#divSubProyectoDescuento').css("display", "none"); + $('#LblClasificacionDescuento').css("display", "none"); + $('#divClasificacionDescuento').css("display", "none"); + } + } diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 6d2911286..9274e79ab 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -22,8 +22,12 @@ Partial Class Bancos_DepositosCaja txtFechaI.Text = Now.AddDays(-1).ToShortDateString txtFechaF.Text = Now.ToShortDateString TxtComision.Attributes.Add("onKeyUp", "txtSuma(event);") + TxtDescuento.Attributes.Add("onKeyUp", "txtSumaDescuento(event);") CargaCuentas() + ChkFaltante.Attributes.Add("onclick", "CheckFaltante(this);") + ChkDescuento.Attributes.Add("onclick", "CheckDescuento(this);") + End If End Sub @@ -38,9 +42,22 @@ Partial Class Bancos_DepositosCaja DdlSubProyectos.DataBind() DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1")) - DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) + DdlSubProyectoDeposito.DataSource = DdlSubProyectos.DataSource + DdlSubProyectoDeposito.DataBind() + DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1")) + + DdlSubProyectoDescuento.DataSource = DdlSubProyectos.DataSource + DdlSubProyectoDescuento.DataBind() + DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1")) + + DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=2) DdlClasificacion.DataBind() - DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1")) + DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1")) + + DdlClasificacionDescuento.DataSource = DdlClasificacion.DataSource + DdlClasificacionDescuento.DataBind() + DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1")) + End Sub Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click @@ -60,29 +77,34 @@ Partial Class Bancos_DepositosCaja UpGvFacturas.Update() GvFacturas.DataBind() - lblValorTotal.Text = "00.00" + lblValorTotal.Text = "0.00" + TxtComision.text = "" divLabelTotal.Visible = True - DivComision.Visible = True End Sub Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click Dim TotalImporte As Decimal = 0 Dim TotalImportePrePoliza As Decimal + Dim Comision As Decimal = TxtComision.Text.ToDecimal + Dim Descuento As Decimal = TxtDescuento.Text.ToDecimal + For Each Gvr As GridViewRow In GvFacturas.Rows If Gvr.FCCheckBox("ChkFactura").Checked Then TotalImporte += Gvr.DataKey("Importe").ToDecimal Next If TotalImporte = 0 Then - Alert("Seleccion una factura para realizar el deposito", TipoMensaje.MsgAdvertencia) + Alert("Seleccion una factura para realizar el depósito", TipoMensaje.MsgAdvertencia) Exit Sub End If TotalImportePrePoliza = TotalImporte - If TxtComision.Text.ToEntero > 0 Then - TotalImporte = TotalImporte - TxtComision.Text.ToEntero - If DdlSubProyectos.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then + If Comision <> 0 Then + TotalImporte = TotalImporte + Comision + Descuento + 'Comision = -(Comision) ' se inverte el valor, va cargada + 'Descuento = -(Descuento) ' se inverte el valor, va cargada + If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then Alert("Debes Seleccionar un Subproyecto y una Clasificación", TipoMensaje.MsgAdvertencia) Exit Sub End If @@ -105,8 +127,10 @@ Partial Class Bancos_DepositosCaja Dim CveCuentaBancariaDestino As Integer = 0 Dim drOrigen As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("") Dim drDestino As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuentaDeposito.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("") - Dim CveSubProyecto As Integer = 0 - Dim CveClasificacion As Integer = 0 + Dim CveSubProyecto As Integer = -1 + Dim CveSubProyectoDescuento As Integer = -1 + Dim CveClasificacion As Integer = -1 + Dim CveClasificacionDescuento As Integer = -1 Dim documentos As String = "Los Depósitos se realizaron exitósamente

" Dim imprimirFolios As String = "" If drOrigen IsNot Nothing Then @@ -123,28 +147,37 @@ Partial Class Bancos_DepositosCaja NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("Vta", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - - - 'Salida de Caja Chica - FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2) + 'Entrada a bancos + FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 8) If Not FolioIE > 0 Then OcurrioError = True End If - CveIEOrigen = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 8, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If TxtComision.Text.ToEntero > 0 Then - CveSubProyecto = DdlSubProyectos.SelectedValue.ToEntero - CveClasificacion = DdlClasificacion.SelectedValue.ToEntero - If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TxtComision.Text.ToEntero, "Comisión", 78, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=TxtComision.Text.ToEntero * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then + documentos += String.Format("Depósito: {1}    
", CveIEOrigen, FolioIE) + + + If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then + + If ChkFaltante.Checked Then + CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero + CveClasificacion = DdlClasificacion.SelectedValue.ToEntero + + If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 51, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then + OcurrioError = True + End If + End If + + If ChkDescuento.Checked Then + CveSubProyectoDescuento = DdlSubProyectoDescuento.SelectedValue.ToEntero + CveClasificacionDescuento = DdlClasificacionDescuento.SelectedValue.ToEntero + + If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, DdlClasificacionDescuento.SelectedItem.Text, 51, DdlClasificacionDescuento.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then OcurrioError = True End If - Else OcurrioError = True End If Else - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then - OcurrioError = True - End If + OcurrioError = True End If For Each Gvr As GridViewRow In GvFacturas.Rows @@ -153,7 +186,7 @@ Partial Class Bancos_DepositosCaja 'Datos de las Nuevas PrePolizas 'Entrada a Bancos - Dim Importe As Double = Gvr.DataKey("Importe").ToDouble + Dim Importe As Decimal = Gvr.DataKey("Importe").ToDecimal Dim SerieFolio As String = Gvr.DataKey("SerieFolio").ToString 'Datos de las Prepolizas A Cancelar @@ -161,14 +194,14 @@ Partial Class Bancos_DepositosCaja Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero Dim CvePrePoliza As Integer = Gvr.DataKey("CvePrePoliza").ToEntero - FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 8) + FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2) If Not FolioIE > 0 Then OcurrioError = True End If - CveIEDestino = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 8, Fecha, FolioIE.ToString, "Depósito Bancario", Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Importe.ToDecimal, SerieFolio, 30, "Depósito Bancario", Fecha, IdCuentaBancariaDestino, -1, CveIE:=CveIEDestino, ImporteMX:=Importe.ToDecimal * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then + If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then OcurrioError = True End If @@ -177,15 +210,13 @@ Partial Class Bancos_DepositosCaja OcurrioError = True End If Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEDestino}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}") - documentos += String.Format("Documento {1}     ", CveIEDestino.ToString, SerieFolio) - documentos += String.Format("Imprimir {1}

", StrEncript, SerieFolio) + + 'documentos += String.Format("Imprimir {1}

", StrEncript, SerieFolio) End If - Next - If OcurrioError Then ObjContabilidad.RollBack() Alert("Ocurrio un error al realizar los depositos", TipoMensaje.MsgError) @@ -193,8 +224,11 @@ Partial Class Bancos_DepositosCaja ObjContabilidad.Commit() CargaDatos() + documentos += String.Format("Prepóliza

", NuevaCvePrePoliza) + Alert(documentos.ToString) + End If ObjContabilidad.Dispose() diff --git a/Bancos/ProveedoresAbonar.aspx b/Bancos/ProveedoresAbonar.aspx index 768463a0b..01b768cda 100644 --- a/Bancos/ProveedoresAbonar.aspx +++ b/Bancos/ProveedoresAbonar.aspx @@ -122,6 +122,8 @@ + + diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 6f9274c1e..c11b25731 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -389,7 +389,7 @@ Partial Class Bancos_ProveedoresAbonar If UsuarioActual.TienePermisoProceso(98) Then PermiteModificarImporte = False End If - Calendario.StartDate = Now.AddMonths(-2) + Calendario.StartDate = Now.AddMonths(-4) 'proceso que restringue solo el pago de apartir del dia de hoy y como limite fin de mes If UsuarioActual.TienePermisoProceso(105) Then Calendario.StartDate = Now @@ -732,14 +732,15 @@ Partial Class Bancos_ProveedoresAbonar Dim AnioDocumento As Integer = FechaDocumento.Year Dim MesDocumento As Integer = FechaDocumento.Month - If AnioFactura > AnioDocumento Then - FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
") - ValFechaDocumento = True - ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then - FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
") - ValFechaDocumento = True + If UsuarioActual.Empresa.UsaAC = False Then + If AnioFactura > AnioDocumento Then + FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
") + ValFechaDocumento = True + ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then + FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
") + ValFechaDocumento = True + End If End If - End If Next @@ -782,7 +783,7 @@ Partial Class Bancos_ProveedoresAbonar Exit Sub End If - Dim ImporteSeleccionado As Decimal = 0 + Dim ImporteSeleccionado As Decimal = 0 If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then Dim Validada As Boolean = False Dim MsgValidadas As New StringBuilder @@ -3390,6 +3391,7 @@ Partial Class Bancos_ProveedoresAbonar Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString + RVTxtFechaDocumentoMenor.MinimumValue = DateTime.Now.AddMonths(-4).ToShortDateString Calendario.EndDate = DateTime.Now End Sub diff --git a/CRM/Acercamiento.aspx.cs b/CRM/Acercamiento.aspx.cs index 30c7a064f..8a7c0fff3 100644 --- a/CRM/Acercamiento.aspx.cs +++ b/CRM/Acercamiento.aspx.cs @@ -1068,10 +1068,10 @@ public partial class CRM_Acercamiento : ClsPaginas ClsOIEventos ObjEventos = new ClsOIEventos(); DateTime FechaInicio = TxtFechaInicioAgenda.Text.ToDateTime(); int CveContactoAgendar = DdlContactoAgenda.SelectedValue.ToEntero(); - + int CveEmpresaCRM = DdlEmpresaCRM.SelectedValue.ToEntero(); int CveEtapa = HdfEtapaSeleccionada.Value.ToEntero() == -1 ? CveEtapaActual : HdfEtapaSeleccionada.Value.ToEntero(); - if (ObjEventos.AddEventoAgenda(DdlTipoAgenda.SelectedValue.ToEntero(), TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text, DdlPrioridadAgenda.SelectedValue.ToEntero(), FechaInicio, FechaInicio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoProcesoCRM: CveTipoProceso, CveAcercamientoCRM: CveAcercamiento, CveContactoCRM: CveContactoAgendar, CveEtapaProcesoCRM: CveEtapa)) + if (ObjEventos.AddEventoAgenda(DdlTipoAgenda.SelectedValue.ToEntero(), TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text, DdlPrioridadAgenda.SelectedValue.ToEntero(), FechaInicio, FechaInicio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoProcesoCRM: CveTipoProceso, CveAcercamientoCRM: CveAcercamiento, CveContactoCRM: CveContactoAgendar, CveEtapaProcesoCRM: CveEtapa, CveEmpresaCRM:CveEmpresaCRM)) { limpiarModalAgendar(); RegistraScript("$('#ModalAgenda').modal('hide')"); diff --git a/CRM/CatEmpresasCRM.aspx.cs b/CRM/CatEmpresasCRM.aspx.cs index 61451a357..3f91131e8 100644 --- a/CRM/CatEmpresasCRM.aspx.cs +++ b/CRM/CatEmpresasCRM.aspx.cs @@ -64,6 +64,7 @@ public partial class CRM_CatEmpresasCRM : ClsPaginas { DdlMedioCaptacion.DataSource = ObjCRM.DtResultados.FiltraParametros(String.Format("CveTipoProceso = {0}",DdlTipoProceso.SelectedValue)); DdlMedioCaptacion.DataBind(); + DdlMedioCaptacion.Items.Insert(0, new ListItem("Todos", "-1")); } ObjCRM.Dispose(); } diff --git a/CRM/RepAcercamientosProcesos.aspx b/CRM/RepAcercamientosProcesos.aspx index 66fc1bcdf..dd7c0f1fb 100644 --- a/CRM/RepAcercamientosProcesos.aspx +++ b/CRM/RepAcercamientosProcesos.aspx @@ -103,8 +103,8 @@ - -
+ + + DataKeyNames="CveGrupo1,Grupo1,CveGrupo2,Grupo2" ShowHeaderWhenEmpty="true" OnRowDataBound="GVRepAcercamientosEtapas_RowDataBound"> diff --git a/CRM/RepAcercamientosProcesos.aspx.cs b/CRM/RepAcercamientosProcesos.aspx.cs index 241ff91d7..f906397ca 100644 --- a/CRM/RepAcercamientosProcesos.aspx.cs +++ b/CRM/RepAcercamientosProcesos.aspx.cs @@ -165,7 +165,7 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas hypt.HeaderText = $"Total"; hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2", "Grupo1" }; string strfilstros =string.Format("&cveVendedor={0}&cveMedioCaptacion={1}&cveProbabilidadAcercamiento={2}", cveVendedor, cveMedioCaptacion, cveProbabilidadAcercamiento); - hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={DdlGrupo1.SelectedValue}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}{strfilstros}"; + hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.aspx?CveTipoProceso={DdlTipoProceso.SelectedValue}&CveGrupo1={DdlGrupo1.SelectedValue}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}{strfilstros}"; switch (idgrupo1) { case 1: @@ -183,7 +183,7 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas case 4: test.HeaderText = "Fecha"; Agrupador = "Fecha"; - hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={DdlGrupo1.SelectedValue}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={{2}}&FechaFin={{2}}{strfilstros}"; + hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.aspx?CveTipoProceso={DdlGrupo1.SelectedValue}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={{2}}&FechaFin={{2}}{strfilstros}"; break; case 6: test.HeaderText = "Giro"; @@ -203,7 +203,7 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas hyp.DataTextField = $"C_{row["CveEtapaProceso"]}"; hyp.HeaderText = $"{row["EtapaProceso"]}"; hyp.DataNavigateUrlFields = new string[]{ "CveGrupo1","CveGrupo2"}; - hyp.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={DdlGrupo1.SelectedValue}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}&cveEtapaProceso={row["CveEtapaProceso"]}"; + hyp.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.aspx?CveTipoProceso={DdlGrupo1.SelectedValue}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}&cveEtapaProceso={row["CveEtapaProceso"]}"; GVRepAcercamientosEtapas.Columns.Add(hyp); } } @@ -603,4 +603,17 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas { } + + protected void GVRepAcercamientosEtapas_RowDataBound(object sender, GridViewRowEventArgs e) + { + if (e.Row.RowType == DataControlRowType.DataRow) + { + if (e.Row.DataKey("Grupo1") == "Total") + { + e.Row.CssClass = "Totales"; + + } + } + } + } \ No newline at end of file diff --git a/CRM/RepAcercamientosProcesosDetalle.aspx b/CRM/RepAcercamientosProcesosDetalle.aspx index 5559826fa..aaff7e62b 100644 --- a/CRM/RepAcercamientosProcesosDetalle.aspx +++ b/CRM/RepAcercamientosProcesosDetalle.aspx @@ -29,28 +29,11 @@ height: 500px; } - .GVRepAcercamientosDetalle a { - -webkit-transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, -webkit-box-shadow 0.15s ease; - transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, -webkit-box-shadow 0.15s ease; - transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; - transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, -webkit-box-shadow 0.15s ease; - color: #3699FF !important; - text-decoration: none; - font-weight: 700; - width: 100%; + .chkChoice input + { + margin-right: 5px; } - .GVRepAcercamientosDetalle a:hover { - -webkit-transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, -webkit-box-shadow 0.15s ease; - transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, -webkit-box-shadow 0.15s ease; - transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; - transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, -webkit-box-shadow 0.15s ease; - } - .chkChoice input - { - margin-right: 5px; - } - cc @@ -64,13 +47,17 @@
  • Personalizar Columnas
  • -<%--
  • - PDF +
  • + PDF
  • - Excel -
  • --%> + Excel + + + + +
    @@ -174,54 +161,54 @@
    --%> -
    -
    -
    -
    - - -
    +
    +
    +
    + +
    -
    -
    - - +
    +
    + + + + +
    + +
    + + +
    + +
    + + +
    + +
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - Consultar -
    -
    - - +
    + +
    @@ -989,7 +1008,6 @@
    -
    -
    @@ -1087,9 +1104,8 @@
    -
    - Agregar + Guardar Actualizar
    @@ -1107,7 +1123,7 @@
    -
    +
    @@ -1120,10 +1136,49 @@
    + + + + + + + + <%----%> + + <%----%> + + +
    + + + + + +
    +
    +
    +
    +
    +
    + + + <%----%> + <%-- + --%> + +
    +
    -
    +
    @@ -1141,60 +1196,51 @@
    + Días feriados - Días feriados
    -
    -
    + Fecha pago - - Fecha pago -
    -
    -
    + Fecha Inicio - - Fecha Inicio -
    + Fecha Fin - - Fecha Fin -
    +
    + Actualizar + Guardar +
    +
    -
    - Actualizar - Agregar -
    @@ -1219,6 +1265,11 @@
    +
    +
    + Agregar +
    +
    -
    -
    - Agregar -
    -
    @@ -1357,12 +1403,13 @@ Descripción
    +
    + Actualizar + Guardar +
    +
    -
    - Actualizar - Agregar -
    @@ -1391,7 +1438,7 @@ @@ -1563,7 +1610,49 @@ - +
    + +
    +
    + + Fecha Inicio + + + + +
    +
    +
    +
    + + + +
    +
    +
    + Guardar +
    +
    + + + + + + + + + + + + + + + + + + +
    @@ -1917,7 +2006,80 @@ + +