-- mejora
This commit is contained in:
@@ -219,8 +219,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
}
|
||||
protected void CargaDevolucionesProveedor(int CveProveedor)
|
||||
{
|
||||
ClsMovimientos ObjMov = new ClsMovimientos();
|
||||
ClsCompProveedores clsCompProveedores = new ClsCompProveedores();
|
||||
ClsMovimientos ObjMov = new ClsMovimientos();
|
||||
|
||||
if (ObjMov.GetEgresosSinComprobar("-1", "-1", CveProveedor, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
@@ -228,8 +227,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
GvDevoluciones.DataSource = ObjMov.DtResultados.FiltraParametros("CveIE > 0 AND Saldo > 0 AND CveConceptoContable in (10,48,338)", "", columnas);
|
||||
GvDevoluciones.DataBind();
|
||||
}
|
||||
ObjMov.Dispose();
|
||||
clsCompProveedores.Dispose();
|
||||
ObjMov.Dispose();
|
||||
UpDevoluciones.Update();
|
||||
}
|
||||
#endregion
|
||||
@@ -249,7 +247,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
case "3":
|
||||
if (ObjMov.GetEgresosSinComprobar("-1", "-1", -1, CvePersonal, -1, -1, -1, 1, -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
string[] columnas = new string[7] { "CveIE", "IEDevolucion", "Saldo", "Importe", "Pagado", "Folio", "FechaDocumento" };
|
||||
string[] columnas = new string[10] { "CveIE", "IEDevolucion", "Saldo", "Importe", "Pagado", "Folio", "FechaDocumento", "Abreviatura", "CveMoneda", "TipoCambio" };
|
||||
GvDevoluciones.DataSource = ObjMov.DtResultados.FiltraParametros("CveIE > 0 AND Saldo > 0 ", "", columnas);
|
||||
GvDevoluciones.DataBind();
|
||||
}
|
||||
@@ -257,7 +255,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
case "4":
|
||||
if (ObjMov.GetPrestamosPersonalXSaldar(CvePersonal, -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
string[] columnas = new string[7] { "CveIE", "IEDevolucion", "Saldo", "Importe", "Pagado", "Folio", "FechaDocumento" };
|
||||
string[] columnas = new string[10] { "CveIE", "IEDevolucion", "Saldo", "Importe", "Pagado", "Folio", "FechaDocumento", "Abreviatura", "CveMoneda", "TipoCambio" };
|
||||
GvDevoluciones.DataSource = ObjMov.DtResultados.FiltraParametros("CveIE > 0 AND Saldo > 0 ", "", columnas);
|
||||
GvDevoluciones.DataBind();
|
||||
}
|
||||
@@ -335,9 +333,6 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
}
|
||||
//terminan validaciones
|
||||
|
||||
|
||||
|
||||
|
||||
List<Archivo> filesgral = Anexo.getfiles().Archivos;
|
||||
string filemove = "";
|
||||
string Comprobante = "";
|
||||
@@ -347,8 +342,6 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
filemove = fileItem.filename;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ClsBancos ObjIE = new ClsBancos();
|
||||
ClsContabilidad ObjMov = new ClsContabilidad(ObjIE.IniciaTransacSQL());
|
||||
ClsCompras ObjComp = new ClsCompras(ObjIE.IniciaTransacSQL());
|
||||
@@ -622,9 +615,9 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
archivo = new System.IO.FileInfo(String.Format("{0}Formatos/ComprobanteEgreso.rdlc", UsuarioActual.Empresa.Ruta, DdlCuenta.SelectedValue.ToEntero()));
|
||||
}
|
||||
|
||||
if (IDPoliza > 0)
|
||||
if (CvePrePoliza > 0)
|
||||
{
|
||||
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/RegPrePolizaS.aspx?CvePrePoliza={0}"">Ver Póliza</a>", CvePrePoliza);
|
||||
}
|
||||
ObjIE.Commit();
|
||||
|
||||
@@ -633,7 +626,6 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
filemove.FilesMove(CveIE.ToString(), String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
|
||||
}
|
||||
|
||||
|
||||
if (!Msg.ToString().Equals(""))
|
||||
{
|
||||
string AccionJS = String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery);
|
||||
@@ -661,20 +653,22 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
{
|
||||
ClsNominas onom = new ClsNominas();
|
||||
|
||||
onom.GetConceptos(UsuarioActual.CveEmpresa);
|
||||
DataTable dt = onom.DtResultados.FiltraParametros(" FormulaTotal = 'FNC.[MovimientosPermanentes]'");
|
||||
DdlConcepto.Items.Clear();
|
||||
|
||||
DdlConcepto.DataSource = dt.FiltraParametros("Tipo ='D'");
|
||||
|
||||
DataRow drow = dt.NewRow();
|
||||
drow["CveConcepto"] = "-1";
|
||||
drow["Concepto"] = "Seleccione";
|
||||
dt.Rows.InsertAt(drow, 0);
|
||||
DdlConcepto.DataSource = dt;
|
||||
DdlConcepto.SelectedValueExist("-1");
|
||||
DdlConcepto.DataBind();
|
||||
if (onom.GetConceptos(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DataTable dt = onom.DtResultados.FiltraParametros(" FormulaTotal = 'FNC.[MovimientosPermanentes]'");
|
||||
DdlConcepto.Items.Clear();
|
||||
DdlConcepto.DataSource = dt.FiltraParametros("Tipo ='D'");
|
||||
|
||||
DataRow drow = dt.NewRow();
|
||||
drow["CveConcepto"] = "-1";
|
||||
drow["Concepto"] = "Seleccione";
|
||||
dt.Rows.InsertAt(drow, 0);
|
||||
DdlConcepto.DataSource = dt;
|
||||
DdlConcepto.SelectedValueExist("-1");
|
||||
|
||||
//DdlConcepto.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
}
|
||||
onom.Dispose();
|
||||
//DdlConcepto.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlConcepto.DataBind();
|
||||
}
|
||||
}
|
||||
@@ -3225,9 +3225,8 @@ Partial Class Bancos_IE
|
||||
' 'MOVIMIENTOS CHEQUE
|
||||
' 'If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
' ' Dim Textov33 As String = ""
|
||||
' ' If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
|
||||
'
|
||||
' ' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
|
||||
' ' End If
|
||||
|
||||
' ' strBody.AppendFormat("<div style='width: 1000px'>")
|
||||
' ' strBody.AppendFormat(" <table style='width:1000px'>")
|
||||
|
||||
@@ -213,18 +213,18 @@ Partial Class Bancos_OtrosIE
|
||||
Cuenta = DRt("ConceptoContable").ToString
|
||||
|
||||
'SACO LA CLAVE DE LA CUENTA BANCARIA SELECCIONADO
|
||||
If DdlCuenta.SelectedValue.ToEntero > 0 And DRt("CveConcepto").ToString = "30" Then 'DTCuentasContables
|
||||
' Dim DRr As DataRow = DTCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCuentaBancos(DdlCuenta.SelectedValue.ToEntero)))
|
||||
If DRr IsNot Nothing Then
|
||||
CodigoCuenta = DRr("CuentaFormato").ToString()
|
||||
EsComodin = 1
|
||||
Else
|
||||
Alert("La Cuenta Bancaria no se ha vinculado a la cuenta contable", TipoMensaje.MsgAdvertencia)
|
||||
GvMov.DataBind()
|
||||
UPMovs.Update()
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
'If DdlCuenta.SelectedValue.ToEntero > 0 And DRt("CveConcepto").ToString = "30" Then 'DTCuentasContables
|
||||
'Dim DRr As DataRow = DTCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCuentaBancos(DdlCuenta.SelectedValue.ToEntero)))
|
||||
'If DRr IsNot Nothing Then
|
||||
' CodigoCuenta = DRr("CuentaFormato").ToString()
|
||||
' EsComodin = 1
|
||||
'Else
|
||||
' Alert("La Cuenta Bancaria no se ha vinculado a la cuenta contable", TipoMensaje.MsgAdvertencia)
|
||||
' GvMov.DataBind()
|
||||
' UPMovs.Update()
|
||||
' Exit Sub
|
||||
' End If
|
||||
'End If
|
||||
|
||||
Dim DR As DataRow = DTMovimientos.NewRow
|
||||
DR("IdCuenta") = 0
|
||||
|
||||
@@ -2678,9 +2678,9 @@ Partial Class Bancos_PagoElectronico
|
||||
' 'MOVIMIENTOS CHEQUE
|
||||
' If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
' Dim Textov33 As String = ""
|
||||
' If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
|
||||
|
||||
' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
|
||||
' End If
|
||||
|
||||
|
||||
' strBody.AppendFormat("<div style='width: 1000px'>")
|
||||
' strBody.AppendFormat(" <table style='width:1000px'>")
|
||||
|
||||
@@ -3264,9 +3264,9 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
' 'MOVIMIENTOS CHEQUE
|
||||
' If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
' Dim Textov33 As String = ""
|
||||
' If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
|
||||
|
||||
' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
|
||||
' End If
|
||||
|
||||
|
||||
' strBody.AppendFormat("<div style='width: 1000px'>")
|
||||
' strBody.AppendFormat(" <table style='width:1000px'>")
|
||||
|
||||
@@ -365,7 +365,7 @@ Partial Class Bancos_PolizaCheque
|
||||
|
||||
Cuenta = drt("ConceptoContable").ToString
|
||||
IdCuenta = drt("IdCtaContable").ToString.ToEntero
|
||||
CveCuenta = 0
|
||||
CveCuenta = drt("CveCuenta").ToString.ToEntero
|
||||
CodigoCuenta = drt("Codigo").ToString
|
||||
NombreCuenta = drt("Nombre").ToString
|
||||
|
||||
@@ -717,8 +717,6 @@ Partial Class Bancos_PolizaCheque
|
||||
CveProveedorSeleccionado = DdlProveedores.txtValue.Value.ToEntero
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If DdlCuenta.SelectedValue.ToEntero <= 0 Then
|
||||
If UsuarioActual.CveEmpresa <> 126 Then
|
||||
Alert("Seleccione la Cuenta Bancaria", TipoMensaje.MsgAdvertencia)
|
||||
@@ -726,15 +724,12 @@ Partial Class Bancos_PolizaCheque
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
For Each Gvr As GridViewRow In GvMov.Rows
|
||||
|
||||
TotalCargos += Gvr.FCTextBox("TxtCargo").Text.ToDecimal
|
||||
TotalAbonos += Gvr.FCTextBox("TxtAbono").Text.ToDecimal
|
||||
|
||||
Next
|
||||
|
||||
For Each Gvr As GridViewRow In GvMov.Rows
|
||||
|
||||
If Gvr.DataKey("CveConcepto").ToEntero = 30 Then
|
||||
@@ -749,8 +744,7 @@ Partial Class Bancos_PolizaCheque
|
||||
If Not ValidaConcepto30 Then
|
||||
Alert("El importe no coincide con el concepto de bancos.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Dim filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
||||
Dim filemove As String = ""
|
||||
@@ -763,14 +757,10 @@ Partial Class Bancos_PolizaCheque
|
||||
If TotalCargos = TotalAbonos Then
|
||||
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
Dim ObjNom As New ClsNominas(ObjIE.IniciaTransacSQL)
|
||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
Dim IDPoliza As Integer = 0
|
||||
Dim CveIE As Integer
|
||||
Dim MsgError As String = ""
|
||||
Dim idCuentaContabilizacion As Long = 1
|
||||
|
||||
|
||||
|
||||
If MsgError = "" Then
|
||||
|
||||
@@ -794,8 +784,6 @@ Partial Class Bancos_PolizaCheque
|
||||
If CveIE > 0 Then
|
||||
|
||||
'inserto los movimientos de la conta para abonar al saldo
|
||||
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
||||
|
||||
@@ -831,10 +819,13 @@ Partial Class Bancos_PolizaCheque
|
||||
Importe = Importe * TC
|
||||
End If
|
||||
|
||||
'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Referencia, gvr.DataKey("CveConcepto").ToEntero, TxtObservaciones.Text, Now, gvr.DataKey("IDCuenta").ToEntero, -1, CveIE, CveProveedor:=CveProveedorSeleccionado, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CvePersonal:=CvePersonalSeleccionado, ImporteMX:=Importe, TipoCambio:=TC, CveCuenta:=gvr.DataKey("CveCuenta").ToEntero) Then
|
||||
' MsgError = "no se pudo insertar el detalle de la póliza2"
|
||||
'End If
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Importe, gvr.DataKey("CveConcepto").ToEntero, Referencia, TxtObservaciones.Text, CveIE:=CveIE, CveProveedor:=CveProveedorSeleccionado, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CvePersonal:=CvePersonalSeleccionado, TipoCambio:=TC, CveCuenta:=gvr.DataKey("CveCuenta").ToEntero) Then
|
||||
MsgError = "no se pudo insertar el detalle de la póliza2"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If gvr.DataKey("CveConcepto").ToEntero = 30 Then
|
||||
If CveMoneda > 1 AndAlso UsuarioActual.CveEmpresa = 119 Then
|
||||
'Agregamos complementaria
|
||||
@@ -843,31 +834,18 @@ Partial Class Bancos_PolizaCheque
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
If TxtAjuste.Text.ToDecimal <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtAjuste.Text.ToDecimal, TxtAjuste.Text.ToDecimal, 44, "", TxtObservaciones.Text, CveIE:=CveIE, TipoCambio:=TC) Then
|
||||
MsgError = "no se pudo insertar el detalle de la póliza2"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If CvePeriodo > 0 Then
|
||||
If Not ObjNom.UpdatePagoNomina(CvePeriodo, CveIE, CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
MsgError = "No se pudo actualizar el periodo de la nómina"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
|
||||
Else
|
||||
MsgError = "No se insertó el encabezado"
|
||||
End If
|
||||
@@ -929,21 +907,17 @@ Partial Class Bancos_PolizaCheque
|
||||
Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "window.location.reload();")
|
||||
Else
|
||||
Alert(MsgError.ToString, TipoMensaje.MsgError)
|
||||
ObjIE.RollBack()
|
||||
|
||||
ObjIE.RollBack()
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Debe de llevar un importe", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjIE.Dispose()
|
||||
ObjMov.Dispose()
|
||||
ObjNom.Dispose()
|
||||
ObjMov.Dispose()
|
||||
|
||||
Else
|
||||
Alert("La suma de los movimientos no son iguales", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
Reference in New Issue
Block a user