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..fa2e30bf1 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) 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 73efc4f02..dbbec3d15 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -137,13 +137,15 @@
- -
- +
+ +
+ - +
+
+
+
+ +
+ + + + +
+
@@ -243,49 +262,56 @@ function txtSuma(txt) { var saldo = ToDouble($('#C_lblValorTotal').text()); var comision2 = ToDouble($('#C_TxtComision').val()); + var comisionNegativa = 0; if (comision2 < 0) { - comision2 = comision2 * -1; - debugger; + comisionNegativa = comision2 * -1 } - if (comision2 < ValorTotalSeleccionado) { - comision2 = comision2 - comision - saldo = saldo - comision2; + if (comisionNegativa > ValorTotalSeleccionado) { + $('#C_TxtComision').val(comision) + alert("No es posible poner una comision superior a lo seleccionado") + } else { + saldo = ValorTotalSeleccionado + comision2; $('#C_lblValorTotal').text(FormatoNumero(saldo, 2)); comision = ToDouble($('#C_TxtComision').val()) - if (comision < 0) { - comision = comision * -1; - debugger; - } - } else { - var comisionNegativo = ToDouble($('#C_TxtComision').val()); - if (comisionNegativo < 0) { - $('#C_TxtComision').val(comision*-1) - debugger; - } else { - $('#C_TxtComision').val(comision) - - } - alert("No es posible poner una comision superior a lo seleccionado") } + + } - if (comision != 0) { + 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"); + debugger; } else { + $('#DivComision').css("display", "none"); $('#LblSubproyecto').css("display", "none"); $('#divSubProyecto').css("display", "none"); $('#LblClasificacion').css("display", "none"); $('#divClasificacion').css("display", "none"); + debugger; } - - } + function CheckDescuento(chk) { + if (chk.checked == true) { + $('#DivDescuento').css("display", "block"); + $('#LblClasificacionDescuento').css("display", "block"); + $('#divClasificacionDescuento').css("display", "block"); + debugger; + + } else { + $('#DivDescuento').css("display", "none"); + $('#LblClasificacionDescuento').css("display", "none"); + $('#divClasificacionDescuento').css("display", "none"); + debugger; + } + } diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index d04585cfc..cd06f1e44 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -24,6 +24,9 @@ Partial Class Bancos_DepositosCaja TxtComision.Attributes.Add("onKeyUp", "txtSuma(event);") CargaCuentas() + ChkFaltante.Attributes.Add("onclick", "CheckFaltante(this);") + ChkDescuento.Attributes.Add("onclick", "CheckDescuento(this);") + End If End Sub @@ -40,9 +43,13 @@ Partial Class Bancos_DepositosCaja DdlSubProyectoDeposito.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) DdlSubProyectoDeposito.DataBind() + DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=2) DdlClasificacion.DataBind() + DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1")) + End Sub Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click @@ -63,15 +70,17 @@ Partial Class Bancos_DepositosCaja UpGvFacturas.Update() GvFacturas.DataBind() 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 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 @@ -84,8 +93,9 @@ Partial Class Bancos_DepositosCaja TotalImportePrePoliza = TotalImporte If Comision <> 0 Then - TotalImporte = TotalImporte + Comision - Comision = -(Comision) ' se inverte el valor, va cargada + 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 @@ -111,6 +121,7 @@ Partial Class Bancos_DepositosCaja 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 CveClasificacionDescuento As Integer = 0 Dim documentos As String = "Los Depósitos se realizaron exitósamente

" Dim imprimirFolios As String = "" If drOrigen IsNot Nothing Then @@ -137,13 +148,22 @@ Partial Class Bancos_DepositosCaja documentos += String.Format("Depósito: {1}    
", CveIEOrigen, FolioIE) - If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then + 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 Comision <> 0 Then + If ChkFaltante.Checked Then CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero CveClasificacion = DdlClasificacion.SelectedValue.ToEntero - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Comision, "Comisión", 51, "Depósito Bancario ", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then + If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, 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 + CveSubProyecto = DdlSubProyectoDeposito.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 End If @@ -172,7 +192,7 @@ Partial Class Bancos_DepositosCaja 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, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveIE:=CveIEDestino, ImporteMX:=Importe * 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 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 3dd2dfad1..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 @@ -3391,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/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/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc b/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc index 90d52fea7..8ff03877a 100644 --- a/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc +++ b/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc @@ -80,31 +80,34 @@ - 1.23101cm + 0.96643cm - 1.98488cm + 1.69333cm + + + 1.74675cm 1.51446cm - 3.83319cm + 3.74919cm - 6.041cm + 6.22158cm - 2.20896cm + 1.57859cm - 2.31165cm + 2.32298cm - 2.50891cm + 2.21787cm - 2.5778cm + 2.36613cm @@ -122,7 +125,7 @@ Folio @@ -167,6 +170,62 @@ + + + + true + true + + + + + Fecha Mov + + + + + + + Textbox6 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + @@ -178,7 +237,7 @@ Disponible @@ -234,7 +293,7 @@ Unidad @@ -290,7 +349,7 @@ Código @@ -346,7 +405,7 @@ Producto @@ -402,7 +461,7 @@ Valor @@ -458,7 +517,7 @@ Alm. Origen @@ -514,7 +573,7 @@ Alm. Destino @@ -570,7 +629,7 @@ Responsable @@ -654,6 +713,43 @@ + + + + true + true + + + + + =IIf(CStr(Fields!FechaMovto.Value) = "" , "", FormatDateTime(CDate(Fields!FechaMovto.Value), DateFormat.ShortDate)) + + + + + + + FechaMovto + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + true + + @@ -953,6 +1049,7 @@ + @@ -971,9 +1068,8 @@ true DataSet1 0.17639cm - 0.24474cm 1.0148cm - 24.21186cm + 24.37731cm @@ -984,7 +1080,7 @@ 0.67394in @@ -1059,7 +1155,7 @@ Textbox2 1.07625cm 0.52945cm - 24.4566cm + 24.62205cm 1