-cleanup
This commit is contained in:
@@ -1,13 +1,10 @@
|
||||
using System;
|
||||
using Extensiones;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using static Extensiones.ModExtensiones;
|
||||
|
||||
public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
@@ -115,7 +112,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
if (!IsPostBack)
|
||||
{
|
||||
UsaComplementaria = true;
|
||||
CveMonedaCuentaPago = 0;
|
||||
CveMonedaCuentaPago = 0;
|
||||
rowComisiones.Visible = UsuarioActual.CveEmpresa.Contiene(1, 4, 5, 7, 11, 12, 72, 80, 126, 119, 122);
|
||||
|
||||
CargaTipoTransaccion();
|
||||
@@ -303,7 +300,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
AsignaCuentaProveedor(DdlProveedores.SelectedValue.ToEntero());
|
||||
|
||||
// DATOS PREPOLIZA
|
||||
if ( DdlTipoTransaccion.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119) FolioFijo = TxtFolio.Text.ToEntero();
|
||||
if (DdlTipoTransaccion.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119) FolioFijo = TxtFolio.Text.ToEntero();
|
||||
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE PAGO ACRREDORES", CvePlantillaPoliza, TxtImporte.Text.Trim().ToDouble(), TxtImporte.Text.Trim().ToDouble(), CveMonedaPago, TxtFechaDocumento.Text.ToDate(), DdlProveedores.SelectedText.ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa));
|
||||
|
||||
@@ -319,14 +316,14 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero(), DdlTipoTransaccion.SelectedValue.ToEntero(), TxtFechaDocumento.Text.Trim().ToDate(), TxtFolio.Text.Trim(), DdlProveedores.SelectedText.ToString(), ImporteBanco.ToString().ToDouble(), CveMonedaPago,
|
||||
TCPago.ToString().ToDouble(), TxtObservaciones.Text.Trim(), "", ChkAbonoCuenta.Checked, false, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
|
||||
|
||||
|
||||
|
||||
if (CveIE > 0)
|
||||
{
|
||||
//GUARDA COMPROBANTE
|
||||
if (!filemove.Equals(""))
|
||||
{
|
||||
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:false);
|
||||
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
|
||||
}
|
||||
decimal Importe;
|
||||
decimal ImporteMN;
|
||||
@@ -402,7 +399,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
{
|
||||
ImporteMN = Importe;
|
||||
ImporteComplementaria = (Importe * TC - Importe).RoundSQL();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ImporteMN = (Importe * TC).RoundSQL();
|
||||
@@ -419,7 +416,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
if (tCveMoneda != 1)
|
||||
{
|
||||
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, Ref, CveConceptoContablePago, Conc, DateTime.Now, IDCtaContableAcreedorExtranjera, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto:DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, Ref, CveConceptoContablePago, Conc, DateTime.Now, IDCtaContableAcreedorExtranjera, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de pago acreedor";
|
||||
break;
|
||||
@@ -493,7 +490,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
{
|
||||
ImporteMNBanco = (ImporteBanco * TCPago).RoundSQL();
|
||||
ImporteComplementaria = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -508,7 +505,8 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de bancos complementaria";
|
||||
}
|
||||
if (AcumImporteMN!=(ImporteBanco + ImporteComplementaria)) {
|
||||
if (AcumImporteMN != (ImporteBanco + ImporteComplementaria))
|
||||
{
|
||||
int tCveConceptoOtIngresos = 0;
|
||||
bool TipoMovtoOt = false;
|
||||
decimal Dif = AcumImporteMN - (ImporteBanco + ImporteComplementaria);
|
||||
@@ -520,7 +518,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
{
|
||||
tCveConceptoOtIngresos = 64; TipoMovtoOt = true;
|
||||
}
|
||||
|
||||
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOt, Dif.Abs(), Ref, tCveConceptoOtIngresos, Conc, DateTime.Now, 0, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: Dif.Abs(), ImporteME: Dif.Abs(), TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de ajuste en redondeo";
|
||||
@@ -769,7 +767,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
//GUARDA COMPROBANTE
|
||||
if (!filemove.Equals(""))
|
||||
{
|
||||
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
|
||||
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
|
||||
}
|
||||
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, Ref, CveConceptoContableBanco, Conc, DateTime.Now, IDCtaContableBancos, -1, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: ImporteMN, TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
@@ -825,7 +823,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
}
|
||||
|
||||
//CONTABILIZA
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") )
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals(""))
|
||||
{
|
||||
if (IDCtaContableAcreedor > 0 && IDCtaContableBancos > 0)
|
||||
{
|
||||
@@ -959,12 +957,12 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
DateTime FInicio = MinFecha;
|
||||
DateTime FFin = MaxFecha;
|
||||
|
||||
if(TxtFechaInicio.Text.Length == 10)
|
||||
if (TxtFechaInicio.Text.Length == 10)
|
||||
{
|
||||
FInicio = TxtFechaInicio.Text.ToDate();
|
||||
}
|
||||
|
||||
if(TxtFechaFin.Text.Length == 10)
|
||||
if (TxtFechaFin.Text.Length == 10)
|
||||
{
|
||||
FFin = TxtFechaFin.Text.ToDate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user