parametro movto permanente
This commit is contained in:
@@ -2603,8 +2603,8 @@ Public Class ClsNominas
|
|||||||
End Try
|
End Try
|
||||||
Return retorno
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function AddMovtoPermanente(cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean, CveCuenta As Integer) As Boolean
|
Public Function AddMovtoPermanente(cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean, CveCuenta As Integer) As Integer
|
||||||
Dim retorno As Boolean = False
|
Dim retorno As Integer = 0
|
||||||
DataAdapter("PA_AddMovtoPermanente", CommandType.StoredProcedure)
|
DataAdapter("PA_AddMovtoPermanente", CommandType.StoredProcedure)
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -2618,15 +2618,16 @@ Public Class ClsNominas
|
|||||||
.Add("@fechaInicioAplicacion", SqlDbType.VarChar).Value = (fechaInicioAplicacion)
|
.Add("@fechaInicioAplicacion", SqlDbType.VarChar).Value = (fechaInicioAplicacion)
|
||||||
.Add("@estatus", SqlDbType.Bit).Value = (estatus)
|
.Add("@estatus", SqlDbType.Bit).Value = (estatus)
|
||||||
.Add("@CveCuenta", SqlDbType.Int).Value = (CveCuenta)
|
.Add("@CveCuenta", SqlDbType.Int).Value = (CveCuenta)
|
||||||
|
.Add("@CveMovtoPermanente", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
retorno = True
|
retorno = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
|
||||||
Catch sqEx As SqlException
|
Catch sqEx As SqlException
|
||||||
retorno = False
|
retorno = -1
|
||||||
OnError("Ocurrió un error al agregar los movimientos permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un error al agregar los movimientos permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
retorno = False
|
retorno = -1
|
||||||
OnError("Ocurrió un error al agregar los movimientos permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un error al agregar los movimientos permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
End Try
|
||||||
Return retorno
|
Return retorno
|
||||||
|
|||||||
@@ -112,8 +112,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void TipoDevolucion_SelectedIndexChanged(object sender, EventArgs e)
|
protected void TipoDevolucion_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string tipo = "";
|
|
||||||
switch (TipoDevolucion.SelectedValue)
|
switch (TipoDevolucion.SelectedValue)
|
||||||
{
|
{
|
||||||
case "1":
|
case "1":
|
||||||
@@ -160,7 +159,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
|||||||
}
|
}
|
||||||
protected void CargaPersonal()
|
protected void CargaPersonal()
|
||||||
{
|
{
|
||||||
DdlPersonal.DataSource = get_GlobalDTRHPersonal(UsuarioActual.CveEmpresa);
|
DdlPersonal.DataSource = get_GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto");
|
||||||
DdlPersonal.DataBind();
|
DdlPersonal.DataBind();
|
||||||
DdlPersonal.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
DdlPersonal.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
}
|
}
|
||||||
@@ -417,25 +416,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
|||||||
|
|
||||||
if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2)
|
if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2)
|
||||||
{
|
{
|
||||||
foreach (GridViewRow gvr in GvDevoluciones.Rows)
|
|
||||||
{
|
|
||||||
if (gvr.FCCheckBox("Chk").Checked)
|
|
||||||
{
|
|
||||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovoDevolucion, gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), Ref, CveConceptoContableDevolucion, Conc, DateTime.Now, 0, -1, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), CveIEDevolucion: CveIE))
|
|
||||||
{
|
|
||||||
MsgError = "No se pudo insertar concepto de Devolución";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//GUARDA PREPOLIZAS DETALLE Bancos
|
|
||||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, !TipoMovoDevolucion, TxtImporte.Text.ToDecimal(), Ref, 174, Conc, DateTime.Now, 0, -1, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: cveCliente, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: TxtImporte.Text.ToDecimal()))
|
|
||||||
{
|
|
||||||
MsgError = "No se pudo insertar concepto de Devolución";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (MsgError.Equals(""))
|
|
||||||
{
|
|
||||||
|
|
||||||
int cveConcepto = DdlConcepto.SelectedValue.ToEntero();
|
int cveConcepto = DdlConcepto.SelectedValue.ToEntero();
|
||||||
string descripcion = TxtDescripcion.Text;
|
string descripcion = TxtDescripcion.Text;
|
||||||
@@ -448,11 +429,36 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
|||||||
bool estatus = true;
|
bool estatus = true;
|
||||||
int CveCuenta = -1;
|
int CveCuenta = -1;
|
||||||
|
|
||||||
if (!ObjNom.AddMovtoPermanente(cveConcepto, cvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta))
|
if (ObjNom.AddMovtoPermanente(cveConcepto, cvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta) < 0)
|
||||||
{
|
{
|
||||||
MsgError = "No se pudo insertar movimiento permanente";
|
MsgError = "No se pudo insertar movimiento permanente";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
foreach (GridViewRow gvr in GvDevoluciones.Rows)
|
||||||
|
{
|
||||||
|
if (gvr.FCCheckBox("Chk").Checked)
|
||||||
|
{
|
||||||
|
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovoDevolucion, gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), Ref, CveConceptoContableDevolucion, Conc, DateTime.Now, 0, -1, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), CveIEDevolucion: CveIE))
|
||||||
|
{
|
||||||
|
MsgError = "No se pudo insertar concepto de Devolución";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Decimal tTotal = (TxtValor.Text.ToDecimal() * TxtVecesAplicar.Text.ToDecimal()).RoundSQL();
|
||||||
|
Decimal tTotal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal();
|
||||||
|
//GUARDA PREPOLIZAS DETALLE Via Nómina
|
||||||
|
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, !TipoMovoDevolucion, tTotal, Ref, 174, Conc, DateTime.Now, 0, -1, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: cveCliente, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: tTotal))
|
||||||
|
{
|
||||||
|
MsgError = "No se pudo insertar concepto de Devolución";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -612,17 +618,20 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
|||||||
Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza);
|
Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza);
|
||||||
}
|
}
|
||||||
ObjIE.Commit();
|
ObjIE.Commit();
|
||||||
|
|
||||||
|
if (!Msg.ToString().Equals(""))
|
||||||
|
{
|
||||||
|
string AccionJS = String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery);
|
||||||
|
Alert(Msg.ToString(), TipoMensaje.MsgInformacion, String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ObjIE.RollBack();
|
ObjIE.RollBack();
|
||||||
|
Msg.Clear();
|
||||||
|
Alert(Msg.ToString(), TipoMensaje.MsgError);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Msg.ToString().Equals(""))
|
|
||||||
{
|
|
||||||
string AccionJS = String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery);
|
|
||||||
Alert(Msg.ToString(), TipoMensaje.MsgInformacion, String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery));
|
|
||||||
}
|
|
||||||
|
|
||||||
ObjIE.Dispose();
|
ObjIE.Dispose();
|
||||||
ObjMov.Dispose();
|
ObjMov.Dispose();
|
||||||
|
|||||||
@@ -1395,7 +1395,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
Archivo fileItem = continuar ? Filesgral[0] : null;
|
Archivo fileItem = continuar ? Filesgral[0] : null;
|
||||||
if (continuar)
|
if (continuar)
|
||||||
{
|
{
|
||||||
string FileExtension = fileItem.Extencion.ToUpper();
|
string FileExtension = fileItem.Extension.ToUpper();
|
||||||
if (FileExtension == "XLS" | FileExtension == "XLSX" | FileExtension == "CSV")
|
if (FileExtension == "XLS" | FileExtension == "XLSX" | FileExtension == "CSV")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -4586,8 +4586,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
bool Continuar;
|
bool Continuar;
|
||||||
using (ClsNominas ObjMovt = new ClsNominas())
|
using (ClsNominas ObjMovt = new ClsNominas())
|
||||||
{
|
{
|
||||||
Continuar = ObjMovt.AddMovtoPermanente(cveConcepto, SRCvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta);
|
Continuar = ObjMovt.AddMovtoPermanente(cveConcepto, SRCvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta) > 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (Continuar)
|
if (Continuar)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user