From 49f00832c087d881965bf45f8a6c54c4ba3bdc67 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 16 Jun 2022 14:35:42 -0700 Subject: [PATCH 01/15] =?UTF-8?q?--=20mejora=20contabilizaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contabilidad/DiarioPagos.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Contabilidad/DiarioPagos.aspx.vb b/Contabilidad/DiarioPagos.aspx.vb index 08f6e4059..93f2cebb5 100644 --- a/Contabilidad/DiarioPagos.aspx.vb +++ b/Contabilidad/DiarioPagos.aspx.vb @@ -927,7 +927,7 @@ Partial Class Contabilidad_DiarioPagos If SimplificaRetIVA = False Then CompraRetIVA = CompraPagadoRetIVA 'no registra la retencion de iva al pagar - If UsuarioActual.CveEmpresa = 13 Then IdCuentaRetIVA = 0 : IdCuentaRetIVACirculacion = 0 + If UsuarioActual.CveEmpresa = 13 Then IdCuentaRetIVACirculacion = 0 ConceptoTmp = If(CveMoneda = 2, String.Format("{0} TC {1}", ConceptoDetalle, TipoCambioFechaCompra), ConceptoDetalle) From 65da5a2b582c8cae5c512b1499a64b4e5cd68285 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 16 Jun 2022 17:20:09 -0700 Subject: [PATCH 02/15] -- mejoras para consumo interno --- Inventarios/EntradasSalidas.aspx.vb | 30 ++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index e268312f5..82020769f 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -1805,6 +1805,7 @@ Partial Class Inventarios_EntradasSalidas Case 30 CveConceptoContable = 181 TipoMovtoOtro = False + tCveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero If UsuarioActual.Empresa.Funcionalidad(342).ToEntero > 0 Then IdCtaContableOtro = UsuarioActual.Empresa.Funcionalidad(342).ToEntero End If @@ -1826,21 +1827,24 @@ Partial Class Inventarios_EntradasSalidas Else 'Select Case DdlConcepto.SelectedValue.ToEntero ' Case 30 - 'Dim Dt As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}).Copy - 'Dim IdCuentaGasto As Integer = 0 - 'Dim Total As Decimal = 0 - 'For Each Dr As DataRow In Dt.Rows - ' Total = ObjInventario.DtResultados.FiltraParametros($"CveClasificacion = {Dr("CveClasificacion").ToString}").SUM("Total").ToDecimal.RoundSQL() - ' IdCuentaGasto = ObjInventario.DtResultados.FiltraParametros($"CveClasificacion = {Dr("CveClasificacion").ToString}").Rows(0)("IdCuentaGasto").ToString.ToEntero - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoAlmacen, Total, TxtObservaciones.Text.Trim, CveConceptoContable, TxtObservaciones.Text.Trim, TxtFecha.Text.ToDate, IdCuentaGasto, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=Total, CveClasificacion:=Dr("CveClasificacion").ToString.ToEntero, CveSubProyecto:=tCveSubProyecto) Then - ' ErrorMovInv = True - ' End If - 'Next - 'Case Else - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtro, tValorOtro, TxtObservaciones.Text.Trim, CveConceptoContable, TxtObservaciones.Text.Trim, TxtFecha.Text.ToDate, IdCtaContableOtro, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=tValorOtro, CveSubProyecto:=tCveSubProyecto, CveClasificacion:=CveClasificacion, Contabilizable:=EsContabilizable) Then - ErrorMovInv = True + 'Dim Total As Decimal = 0 + If CveConceptoContable = 181 Then + Dim Dt As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}).Copy + 'Dim IdCuentaGasto As Integer = 0 + For Each Dr As DataRow In Dt.Rows + Dim Total As Decimal = ObjInventario.DtResultados.FiltraParametros($"CveClasificacion = {Dr("CveClasificacion").ToString}").SUM("Total").ToDecimal.RoundSQL() + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoAlmacen, Total, TxtObservaciones.Text.Trim, CveConceptoContable, TxtObservaciones.Text.Trim, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=Total, CveClasificacion:=Dr("CveClasificacion").ToString.ToEntero, CveSubProyecto:=tCveSubProyecto) Then + ErrorMovInv = True + End If + Next + Else + End If + + 'Case Else + 'End Select End If Else From e2a51ea3360732bced603d45a8b475591b84cccf Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 16 Jun 2022 17:20:35 -0700 Subject: [PATCH 03/15] -- contador de personal --- Nomina/Nomina.aspx.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 2c4f4ffae..a4bf5d15c 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -434,7 +434,7 @@ public partial class Nomina_Nomina2 : ClsPaginas FiltAgrupador = 1; HypPDFSTimbrados.Attributes.Add("onclick", string.Format("GETPDF({0},{1})", -1, FiltCvePeriodo)); cargaDatos(); - LtlPeriodoseleccionado.Text = string.Format("{0} ({1} Empleados)", DdlPeriodo.SelectedItem.Text, dtempleados.Rows.Count - 1); + LtlPeriodoseleccionado.Text = string.Format("{0} ({1} Empleados)", DdlPeriodo.SelectedItem.Text, dtempleados.COUNT("CvePersonal", " CvePersonal >0 ")); LtlPeriodoseleccionadoASis.Text = LtlPeriodoseleccionado.Text; } From 913344bc4ce380af867842699a2ec80daa242d21 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 17 Jun 2022 10:43:54 -0700 Subject: [PATCH 04/15] -- cleanup --- Ventas/ClientesAbonar.aspx.vb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index ffc8b2843..4dd44cf41 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -1,6 +1,5 @@ -Imports Extensiones -Imports System.Data -Imports System.Linq +Imports System.Data +Imports Extensiones Partial Class Ventas_ClientesAbonar Inherits ClsPaginas From 2c5572069ac667e85ab87bb01f7a34bd696c0b46 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 17 Jun 2022 10:45:01 -0700 Subject: [PATCH 05/15] -- REtIVA - General/adicional --- Compras/Compras.aspx.vb | 202 ++++++++++++++++++---------------------- 1 file changed, 91 insertions(+), 111 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index d024dcd69..e58542663 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1,12 +1,9 @@ Option Explicit On Option Strict On - -Imports System Imports System.Data Imports System.Diagnostics Imports System.Globalization Imports System.IO -Imports System.Text.RegularExpressions Imports System.Threading.Tasks Imports System.Xml Imports Extensiones @@ -2209,6 +2206,7 @@ Partial Class Compras_Compras DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.F.", "2")) + DdlRetIVAConcepto.Items.Add(New ListItem("General", "6")) End If @@ -2225,6 +2223,7 @@ Partial Class Compras_Compras DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.F.", "2")) + DdlRetIVAConcepto.Items.Add(New ListItem("General.", "6")) End If @@ -3449,20 +3448,6 @@ Partial Class Compras_Compras CargaRetIVAConcepto(True, ObjProveedor.DIOTCveTipoOperacion) CargaRetISRConcepto(True, ObjProveedor.DIOTCveTipoOperacion) - 'If ObjProveedor.DIOTCveTipoOperacion = 1 Then '03 - Prestación de Servicios Profesionales - ' DdlRetIVAConcepto.SelectedValueExist("1") - ' DdlRetISRConcepto.SelectedValueExist("1") ' honorarios - 'ElseIf ObjProveedor.DIOTCveTipoOperacion = 2 Then ' 06 - Arrendamiento de inmuebles - ' DdlRetIVAConcepto.SelectedValueExist("4") - ' DdlRetISRConcepto.SelectedValueExist("2") ' arrendamiento - 'ElseIf ObjProveedor.DIOTCveTipoOperacion = 3 Then ' 85 - Otros - ' DdlRetIVAConcepto.SelectedValueExist("2") ' flete pf - ' DdlRetIVAConcepto.SelectedValueExist("3") ' fletes pm - ' DdlRetISRConcepto.SelectedValueExist("1") ' honorarios - ' 'ElseIf ObjProveedor.DIOTCveTipoOperacion = 0 Then - - 'End If - If CveFactura > 0 Then If RetIVAOriginal > 0 Then @@ -5592,7 +5577,6 @@ Partial Class Compras_Compras 'Afectable con el tabpanel Contable Dim CveProveedorLocal As Integer Dim CveProveedorConcepto As Integer - Dim CveAcreedor As Integer Dim CveColectiva As Integer = -1 Dim TipoCreditoInteres As Boolean = False @@ -5603,8 +5587,6 @@ Partial Class Compras_Compras 'Credito Proveedor CveProveedorLocal = CveProveedor CveProveedorConcepto = CveProveedor - CveAcreedor = -1 - Else 'cuando es contado @@ -5612,11 +5594,9 @@ Partial Class Compras_Compras Case "1", "6" 'Proveedores CveProveedorLocal = CveProveedor CveProveedorConcepto = CveProveedor - CveAcreedor = -1 Case "2" ' F y E CveProveedorLocal = CveProveedor CveProveedorConcepto = CveProveedor - CveAcreedor = -1 CveIE = DDlCheques.SelectedValue.ToEntero Case "3" ' Doctos @@ -5625,7 +5605,6 @@ Partial Class Compras_Compras If DdlTipoCredito.SelectedValue.ToEntero = 2 Then CveProveedorLocal = CveProveedor CveProveedorConcepto = CveProveedor - CveAcreedor = -1 CveColectiva = -1 ' CveConceptoAfectacionContado = 55 CveConceptoAfectacion = 59 @@ -5641,14 +5620,13 @@ Partial Class Compras_Compras Exit For End If Next - CveAcreedor = -1 + CveColectiva = -1 ' CveConceptoAfectacionContado = 55 CveConceptoAfectacion = 37 Case "5" ' Acreedores CveProveedorLocal = CveProveedor CveProveedorConcepto = DdlAcreedor.SelectedValue.ToEntero - CveAcreedor = -1 CveColectiva = -1 CveConceptoAfectacion = 41 @@ -6026,12 +6004,12 @@ Partial Class Compras_Compras Dim ImporteSubCre As Decimal = TxtSubTotal.Text.ToDecimal Dim ImporteSubCreMN As Decimal = TxtSubTotal.Text.ToDecimal * tipoCambioActual - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteSubCre, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteMX:=ImporteSubCreMN, ImporteME:=If(tipoCambioActual = 1, 0, ImporteSubCre), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteSubCre, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteMX:=ImporteSubCreMN, ImporteME:=If(tipoCambioActual = 1, 0, ImporteSubCre), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 41, Concepto, FechaMovimiento, CtaProveedorAcreedores, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 41, Concepto, FechaMovimiento, CtaProveedorAcreedores, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If @@ -6042,10 +6020,10 @@ Partial Class Compras_Compras Dim importeMNIn As Decimal = importeMovimientoIn * tipoCambioActual * Multiplicador - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoIn, Referencia, 41, Concepto, FechaMovimiento, CtaProveedorAcreedores, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteMX:=importeMNIn, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoIn), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoIn, Referencia, 41, Concepto, FechaMovimiento, CtaProveedorAcreedores, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteMX:=importeMNIn, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoIn), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoIn, Referencia, 50, Concepto, FechaMovimiento, ViewState("IdCtaContDocsXPagar").ToString.ToEntero(), IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteMX:=importeMNIn, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoIn), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoIn, Referencia, 50, Concepto, FechaMovimiento, ViewState("IdCtaContDocsXPagar").ToString.ToEntero(), IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteMX:=importeMNIn, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoIn), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If @@ -6138,7 +6116,7 @@ Partial Class Compras_Compras ttConceptoContable = 287 End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, ttConceptoContable, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaIva, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, ttConceptoContable, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaIva, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then ErrorPrepoliza = True End If End If @@ -6237,7 +6215,7 @@ Partial Class Compras_Compras End If End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 25, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaIEPS, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 25, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaIEPS, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then ErrorPrepoliza = True End If End If @@ -6274,7 +6252,10 @@ Partial Class Compras_Compras Funcionalidad = 578 ConceptoContable = 286 ConceptoContableContra = 285 - + ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 6 Then + Funcionalidad = 578 + ConceptoContable = 333 + ConceptoContableContra = 334 End If importeMovimiento = importeRetIVAAcreditable @@ -6301,7 +6282,7 @@ Partial Class Compras_Compras 'Agregamos el Opuesto del 22 -> 15 If importeMovimiento <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, ConceptoContableContra, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, ConceptoContableContra, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then ErrorPrepoliza = True End If End If @@ -6330,6 +6311,8 @@ Partial Class Compras_Compras ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then Funcionalidad = 578 ConceptoContable = 285 + ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 6 Then + ConceptoContable = 333 End If importeMovimiento = importeRetIVAxAcreditar @@ -6351,9 +6334,6 @@ Partial Class Compras_Compras End If End If - - - End If End If @@ -6398,7 +6378,7 @@ Partial Class Compras_Compras 'Agregamos el Opuesto del 23 -> 16 If importeMovimiento <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, ConceptoContableContra, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, ConceptoContableContra, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If End If @@ -6526,7 +6506,7 @@ Partial Class Compras_Compras idCuentaContabilizacion = 0 End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Row2("CodAF").ToString, 49, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveActivoFijo:=Row2("CveActivoFijo").ToString.ToEntero, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Row2("CodAF").ToString, 49, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveActivoFijo:=Row2("CveActivoFijo").ToString.ToEntero, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If End If @@ -6572,7 +6552,7 @@ Partial Class Compras_Compras If importeMN <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If @@ -6602,13 +6582,13 @@ Partial Class Compras_Compras End If 'SI ES GASTO CON ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68 - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=If(DdlTipoCompra.SelectedValue = "10", False, SeContabiliza)) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=If(DdlTipoCompra.SelectedValue = "10", False, SeContabiliza)) Then ErrorPrepoliza = True End If 'SI ES GASTO CON ALMACEN REGISTRA EL CONCEPTO 95 If DdlTipoCompra.SelectedValue = "10" Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMN, Referencia, 95, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=False) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMN, Referencia, 95, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=False) Then ErrorPrepoliza = True End If End If @@ -6803,7 +6783,7 @@ Partial Class Compras_Compras End If If importeMN <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If @@ -7123,7 +7103,7 @@ Partial Class Compras_Compras Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}" importeMN = tipoCambioActual * importeMovimiento - importeMovimiento - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tTipoMovimiento, importeMovimiento, Referencia, 266, Concepto, FechaMovimiento, tidctacon, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=importeMovimiento, CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tTipoMovimiento, importeMovimiento, Referencia, 266, Concepto, FechaMovimiento, tidctacon, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=importeMovimiento, CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If importeMN = importeMovimiento @@ -7133,7 +7113,7 @@ Partial Class Compras_Compras If Not Insertado205 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tTipoMovimiento, importeMovimiento, Referencia, tcvecon, Concepto, FechaMovimiento, tidctacon, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tTipoMovimiento, importeMovimiento, Referencia, tcvecon, Concepto, FechaMovimiento, tidctacon, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If @@ -7210,7 +7190,7 @@ Partial Class Compras_Compras idCuentaContabilizacion = 0 End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If End If @@ -7258,9 +7238,9 @@ Partial Class Compras_Compras 'PROVISION IdCtaContable = CtaProveedorExtranjera - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza) Then IdCtaContable = CtaProveedorComplementaria - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMN - importeMovimiento, Referencia, 234, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN - importeMovimiento, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMN - importeMovimiento, Referencia, 234, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN - importeMovimiento, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then ErrorPrepoliza = True Exit Select End If @@ -7278,13 +7258,13 @@ Partial Class Compras_Compras Dim importeMNNC = importeMovimientoNC * TipoCambioFactura * Multiplicador IdCtaContable = CtaProveedorExtranjera - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then Dim CveConceptoContableComplementaria As Integer = 206 If Gvr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContableComplementaria = 310 'cuando es acreedor IdCtaContable = CtaProveedorComplementaria - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMNNC - importeMovimientoNC, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMNNC - importeMovimientoNC, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then ErrorPrepoliza = True Exit For End If @@ -7296,9 +7276,9 @@ Partial Class Compras_Compras importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador IdCtaContable = CtaProveedorExtranjera - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then IdCtaContable = CtaProveedorComplementaria - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMNNC - importeMovimientoNC, Referencia, 235, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMNNC - importeMovimientoNC, Referencia, 235, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True Exit For End If @@ -7346,14 +7326,14 @@ Partial Class Compras_Compras Else IdCtaContable = CtaProveedor - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then For Each Gvr As GridViewRow In GvFacturaNC.Rows If Gvr.FCCheckBox("ChkFacturaNC").Checked Then 'Dim CvePrePolizaTemp = ObjConta.AddPrePolizas("Compras/Registrar", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa)) Dim importeMovimientoNC = Gvr.FCTextBox("TxtImporte").Text.ToDecimal Dim importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), CveCompraAmortizacion:=CveCompra, Contabilizable:=SeContabiliza) Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), Contabilizable:=SeContabiliza) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), CveCompraAmortizacion:=CveCompra, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If Else @@ -7452,9 +7432,9 @@ Partial Class Compras_Compras importeMNNC = importeMovimientoNC * TipoCambioNC * Multiplicador IdCtaContable = CtaProveedorExtranjera - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Ant.CveCompra, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioNC, Contabilizable:=SeContabiliza) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Ant.CveCompra, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioNC, Contabilizable:=SeContabiliza) Then IdCtaContable = CtaProveedorComplementaria - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMNNC - importeMovimientoNC, Referencia, 235, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Ant.CveCompra, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioNC, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMNNC - importeMovimientoNC, Referencia, 235, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Ant.CveCompra, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioNC, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True Exit For End If @@ -7465,13 +7445,13 @@ Partial Class Compras_Compras importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador IdCtaContable = CtaProveedorExtranjera - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Ant.CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Ant.CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then Dim CveConceptoContableComplementaria As Integer = 206 If CveTipoConcepto = 2 Then CveConceptoContableComplementaria = 310 'cuando es acreedor IdCtaContable = CtaProveedorComplementaria - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMNNC - importeMovimientoNC, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMNNC - importeMovimientoNC, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True Exit For End If @@ -7513,9 +7493,9 @@ Partial Class Compras_Compras importeMNNC = importeMovimientoNC * TipoCambioNC * Multiplicador IdCtaContable = CtaProveedorAnticiposExtranjera - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 265, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Ant.CveCompra, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioNC, Contabilizable:=SeContabiliza) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 265, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Ant.CveCompra, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioNC, Contabilizable:=SeContabiliza) Then IdCtaContable = CtaProveedorAnticiposComplementaria - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMNNC - importeMovimientoNC, Referencia, 266, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Ant.CveCompra, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioNC, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMNNC - importeMovimientoNC, Referencia, 266, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Ant.CveCompra, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioNC, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True Exit For End If @@ -7527,13 +7507,13 @@ Partial Class Compras_Compras If TxtTotal.Text.ToDouble > 0 AndAlso TieneAnticiposXML = False Then importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador IdCtaContable = CtaProveedorExtranjera ' CtaProveedorAnticiposExtranjera - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, CveCompraAmortizacion:=CveCompraNC, Contabilizable:=SeContabiliza) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, CveCompraAmortizacion:=CveCompraNC, Contabilizable:=SeContabiliza) Then Dim CveConceptoContableComplementaria As Integer = 206 If CveTipoConcepto = 2 Then CveConceptoContableComplementaria = 310 'cuando es acreedor IdCtaContable = CtaProveedorExtranjera 'CtaProveedorAnticiposComplementaria - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMNNC - importeMovimientoNC, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMNNC - importeMovimientoNC, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True Exit For End If @@ -7547,24 +7527,24 @@ Partial Class Compras_Compras Dim ImporteIVA As Decimal = Math.Round(PorcentajePagoAnt * TxtIVA.Text.ToDecimal, 2) 'Agregamos el 14 - If ImporteIVA > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIVA, Referencia, 14, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then + If ImporteIVA > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIVA, Referencia, 14, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If 'Agregamos el 19 - If ImporteIVA > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteIVA, Referencia, 19, Concepto, FechaMovimiento, CtaIvaAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then + If ImporteIVA > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteIVA, Referencia, 19, Concepto, FechaMovimiento, CtaIvaAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If Dim ImporteIEPS As Decimal = Math.Round(PorcentajePagoAnt * TxtIEPS.Text.ToDecimal, 2) 'Agregamos el 25 - If ImporteIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIEPS, Referencia, 25, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then + If ImporteIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIEPS, Referencia, 25, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If 'Agregamos el 26 - If ImporteIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteIEPS, Referencia, 26, Concepto, FechaMovimiento, CtaIvaAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then + If ImporteIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteIEPS, Referencia, 26, Concepto, FechaMovimiento, CtaIvaAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If End If @@ -7610,7 +7590,7 @@ Partial Class Compras_Compras If usacomplementariaAnticipo Then IdCtaContable = CtaProveedorAnticiposComplementaria ImporteAntMN = TipoCambioAnt * ImporteAnt - ImporteAnt - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAnt, Referencia, 266, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=ImporteAntMN, ImporteME:=ImporteAnt, TipoCambio:=TipoCambioAnt, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAnt, Referencia, 266, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=ImporteAntMN, ImporteME:=ImporteAnt, TipoCambio:=TipoCambioAnt, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True Exit For End If @@ -7622,7 +7602,7 @@ Partial Class Compras_Compras End If 'Agregamos el 21/37/60 - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAnt, Referencia, ConceptoContableAnticipo, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteAntMN, ImporteME:=If(tipoCambioActual = 1, 0, ImporteAnt), TipoCambio:=TipoCambioAnt, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAnt, Referencia, ConceptoContableAnticipo, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteAntMN, ImporteME:=If(tipoCambioActual = 1, 0, ImporteAnt), TipoCambio:=TipoCambioAnt, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If @@ -7635,7 +7615,7 @@ Partial Class Compras_Compras If usacomplementariaProveedor Then Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}" importeMN = tipoCambioActual * importeMovimiento - importeMovimiento - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, CtaProveedorComplementaria, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, CtaProveedorComplementaria, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If importeMN = importeMovimiento @@ -7658,7 +7638,7 @@ Partial Class Compras_Compras End If 'Agregamos el 17 - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, CveConceptoContablePago, Concepto, FechaMovimiento, IdCtaContablePago, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, CveConceptoContablePago, Concepto, FechaMovimiento, IdCtaContablePago, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If @@ -7702,7 +7682,7 @@ Partial Class Compras_Compras If chkImportacion.Checked Then tConceptoContable = 287 End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIVA, Referencia, tConceptoContable, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIVA, Referencia, tConceptoContable, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If @@ -7711,7 +7691,7 @@ Partial Class Compras_Compras If chkImportacion.Checked Then tConceptoContable = 288 End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteIVA, Referencia, tConceptoContable, Concepto, FechaMovimiento, CtaIvaAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteIVA, Referencia, tConceptoContable, Concepto, FechaMovimiento, CtaIvaAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If End If @@ -7754,7 +7734,7 @@ Partial Class Compras_Compras 'Case 205 ' If TxtTotal.Text.ToDecimal = 0 And DdlTipoComprobante.SelectedValue = "Fac" Then - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, Row("IdCtaContable").ToString.ToEntero, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=True) Then + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, Row("IdCtaContable").ToString.ToEntero, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=True) Then ' ErrorPrepoliza = True ' Exit For ' End If @@ -7774,7 +7754,7 @@ Partial Class Compras_Compras idCuentaContabilizacion = 0 End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyectoInsertar, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyectoInsertar, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True Exit For End If @@ -7910,32 +7890,32 @@ Partial Class Compras_Compras 'inserto los movimientos de la conta para abonar al saldo 'Se agregamovimiento de pago de proveedor - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteCompra, " ", CveConceptoAfectacionContado, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteCompra, " ", CveConceptoAfectacionContado, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle) Then ErrorMovtosCxP = True End If 'Compra - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtSubTotal2.Text.ToDecimal, " ", 30, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtSubTotal2.Text.ToDecimal, " ", 30, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle) Then ErrorMovtosCxP = True End If 'IVA por Acreditar . siempre se registra aunque sea cero If Not ErrorMovtosCxP Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TxtIVA.Text.ToDecimal, " ", 19, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TxtIVA.Text.ToDecimal, " ", 19, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle) Then ErrorMovtosCxP = True End If End If If Not ErrorMovtosCxP AndAlso TxtRetIVA.Text.ToDouble > 0 Then 'Agrego el RetIVA - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetIVA.Text.ToDecimal, " ", 22, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetIVA.Text.ToDecimal, " ", 22, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle) Then ErrorMovtosCxP = True End If End If If Not ErrorMovtosCxP AndAlso TxtRetISR.Text.ToDouble > 0 Then 'Agrego el RetIVA - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetISR.Text.ToDecimal, " ", 23, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetISR.Text.ToDecimal, " ", 23, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva) Then ErrorMovtosCxP = True End If End If @@ -7950,7 +7930,7 @@ Partial Class Compras_Compras 'movimiento de compra '[IPP] PARCHE PROVISIONAL DE CLASIFICACION Y SUBPROYECTO [CveClasificacion:=TmpDT.FiltroPrimeroValor("CveClasificacion").ToString.ToEntero] [CveSubProyecto:=TmpDT.FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero] - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoCompra, TxtSubTotal2.Text.ToDecimal, " ", CveConceptoCompra, " ", TxtFechaPago.Text.ToDate, 0, -1, CveClasificacion:=TmpDT.FiltroPrimeroValor("CveClasificacion").ToString.ToEntero, CveSubProyecto:=TmpDT.FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtSubTotal2.Text.ToDecimal) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoCompra, TxtSubTotal2.Text.ToDecimal, " ", CveConceptoCompra, " ", TxtFechaPago.Text.ToDate, 0, -1, CveClasificacion:=TmpDT.FiltroPrimeroValor("CveClasificacion").ToString.ToEntero, CveSubProyecto:=TmpDT.FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtSubTotal2.Text.ToDecimal) Then ErrorMovtosCxP = True End If @@ -7958,13 +7938,13 @@ Partial Class Compras_Compras If CveConceptoAfectacion = 37 Then For Each rw As GridViewRow In GvDeudores.Rows If rw.FCCheckBox("Chk").Checked Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoCompra, rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal, " ", CveConceptoAfectacion, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoCompra, rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal, " ", CveConceptoAfectacion, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal) Then ErrorMovtosCxP = True End If End If Next Else - If ImporteCompra > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoCompra, ImporteCompra, " ", CveConceptoAfectacion, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=ImporteCompra) Then + If ImporteCompra > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoCompra, ImporteCompra, " ", CveConceptoAfectacion, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=ImporteCompra) Then ErrorMovtosCxP = True End If End If @@ -7974,33 +7954,33 @@ Partial Class Compras_Compras 'Siempre: Se agrega IVA aunque sea cero ' If TxtIVA.Text.Replace(", ", "").Trim.ToDouble <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoImpuestos, TxtIVA.Text.ToDecimal, " ", CveConceptoIVA, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtIVA.Text.ToDecimal) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoImpuestos, TxtIVA.Text.ToDecimal, " ", CveConceptoIVA, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtIVA.Text.ToDecimal) Then ErrorMovtosIVA = True End If 'End If 'Se agregan las Ret IVA If TxtRetIVA.Text.ToDouble <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoImpuestos, TxtRetIVA.Text.ToDecimal, " ", CveConceptoRetIVA, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtRetIVA.Text.ToDecimal) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoImpuestos, TxtRetIVA.Text.ToDecimal, " ", CveConceptoRetIVA, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtRetIVA.Text.ToDecimal) Then ErrorMovtosRetIVA = True End If End If 'Se agregan las Ret ISR If TxtRetISR.Text.ToDouble > 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoImpuestos, TxtRetISR.Text.ToDecimal, " ", CveConceptoRetISR, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtRetISR.Text.ToDecimal) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoImpuestos, TxtRetISR.Text.ToDecimal, " ", CveConceptoRetISR, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtRetISR.Text.ToDecimal) Then ErrorMovtosRetISR = True End If End If If TxtIEPS.Text.ToDouble > 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoImpuestos, TxtIEPS.Text.ToDecimal, " ", CveConceptoRetIEPS, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtIEPS.Text.ToDecimal) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoImpuestos, TxtIEPS.Text.ToDecimal, " ", CveConceptoRetIEPS, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtIEPS.Text.ToDecimal) Then ErrorMovtosRetISR = True End If End If If TxtOtrosImpuestos.Text.ToDouble <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoImpuestos, TxtOtrosImpuestos.Text.ToDecimal, " ", CveConceptoRetOtrosImpuestos, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtOtrosImpuestos.Text.ToDecimal) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoImpuestos, TxtOtrosImpuestos.Text.ToDecimal, " ", CveConceptoRetOtrosImpuestos, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtOtrosImpuestos.Text.ToDecimal) Then ErrorMovtosRetISR = True End If End If @@ -8047,28 +8027,28 @@ Partial Class Compras_Compras End Select - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Ant.Importe, " ", CveConceptoAnt, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=Ant.Importe) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Ant.Importe, " ", CveConceptoAnt, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=Ant.Importe) Then ' ImporteAnticipo += Ant.Importe ' RESTO DEL IMPORTE POR SI QUEDA DIFERENCIA DE LA SUMA DE LOS ANTICIPOS Y EL PROVEEDOR TIENE QUE PAGAR 'movimiento de pago proveedor, --no se regisra porque no se registra el total de la compra como deuda del proveedor, solo lo que queda a deber 'si es l moviemiento es de amortizacion con descuento, no registra el pago, ya esta descontado - If TieneAnticiposXML = False AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoCompra, Ant.Importe, " ", CveConceptoPago, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=Ant.Importe, CveCompraAmortizacion:=CveCompraNC) Then + If TieneAnticiposXML = False AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoCompra, Ant.Importe, " ", CveConceptoPago, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=Ant.Importe, CveCompraAmortizacion:=CveCompraNC) Then ErrorMovtosCxP = True End If PorcentajePago = (Ant.Importe) / TxtTotal.Text.ToDecimal 'IVA por Acreditar . siempre se registra aunque sea cero If Not ErrorMovtosCxP Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TxtIVA.Text.ToDecimal * PorcentajePago, " ", 19, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtIVA.Text.ToDecimal * PorcentajePago) Then ErrorMovtosCxP = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TxtIVA.Text.ToDecimal * PorcentajePago, " ", 19, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtIVA.Text.ToDecimal * PorcentajePago) Then ErrorMovtosCxP = True End If 'Agrego el RetIVA If Not ErrorMovtosCxP AndAlso TxtRetIVA.Text.ToDouble > 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetIVA.Text.ToDecimal * PorcentajePago, " ", 22, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtRetIVA.Text.ToDecimal * PorcentajePago) Then ErrorMovtosCxP = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetIVA.Text.ToDecimal * PorcentajePago, " ", 22, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtRetIVA.Text.ToDecimal * PorcentajePago) Then ErrorMovtosCxP = True End If 'Agrego el RetISR If Not ErrorMovtosCxP AndAlso TxtRetISR.Text.ToDouble > 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetISR.Text.ToDecimal * PorcentajePago, " ", 23, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, ImporteMX:=TxtRetISR.Text.ToDecimal * PorcentajePago) Then ErrorMovtosCxP = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetISR.Text.ToDecimal * PorcentajePago, " ", 23, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, ImporteMX:=TxtRetISR.Text.ToDecimal * PorcentajePago) Then ErrorMovtosCxP = True End If Else ErrorMovtosCxP = True @@ -8083,21 +8063,21 @@ Partial Class Compras_Compras PorcentajePago = (TxtTotal.Text.ToDecimal - ImporteAnticipo) / TxtTotal.Text.ToDecimal 'Siempre: Se agrega IVA aunque sea cero If TxtIVA.Text.ToDouble <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TxtIVA.Text.ToDecimal * PorcentajePago, " ", CveConceptoIVA, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtIVA.Text.ToDecimal * PorcentajePago) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TxtIVA.Text.ToDecimal * PorcentajePago, " ", CveConceptoIVA, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtIVA.Text.ToDecimal * PorcentajePago) Then ErrorMovtosIVA = True End If End If 'Se agregan las Ret IVA If TxtRetIVA.Text.ToDouble <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetIVA.Text.ToDecimal * PorcentajePago, " ", CveConceptoRetIVA, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtRetIVA.Text.ToDecimal * PorcentajePago) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetIVA.Text.ToDecimal * PorcentajePago, " ", CveConceptoRetIVA, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtRetIVA.Text.ToDecimal * PorcentajePago) Then ErrorMovtosRetIVA = True End If End If 'Se agregan las Ret ISR If TxtRetISR.Text.ToDouble > 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetISR.Text.ToDecimal * PorcentajePago, " ", CveConceptoRetISR, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtRetISR.Text.ToDecimal * PorcentajePago) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetISR.Text.ToDecimal * PorcentajePago, " ", CveConceptoRetISR, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtRetISR.Text.ToDecimal * PorcentajePago) Then ErrorMovtosRetISR = True End If End If @@ -8186,7 +8166,7 @@ Partial Class Compras_Compras 'CvePrePoliza = ObjConta.AddPrePolizas("Banc", 2, ImporteAPagarFE, ImporteAPagarFE, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CvePrePoliza > 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImportePagar, " ", 29, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CvePersonal:=DdlFuncionarioEmpleado.SelectedValue.ToEntero, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveColectiva:=CveColectiva, CveIE:=CveIE, ImporteMX:=ImportePagar) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImportePagar, " ", 29, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CvePersonal:=DdlFuncionarioEmpleado.SelectedValue.ToEntero, CveProveedor:=CveProveedorLocal, CveColectiva:=CveColectiva, CveIE:=CveIE, ImporteMX:=ImportePagar) Then ErrorMovtosCxP = True End If @@ -8201,7 +8181,7 @@ Partial Class Compras_Compras Case Else End Select End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImportePagar, " ", CveConceptoPago, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CvePersonal:=DdlFuncionarioEmpleado.SelectedValue.ToEntero, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveColectiva:=CveColectiva, CveIE:=CveIE, ImporteMX:=ImportePagar) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImportePagar, " ", CveConceptoPago, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CvePersonal:=DdlFuncionarioEmpleado.SelectedValue.ToEntero, CveProveedor:=CveProveedorLocal, CveColectiva:=CveColectiva, CveIE:=CveIE, ImporteMX:=ImportePagar) Then ErrorMovtosCxP = True End If @@ -8211,21 +8191,21 @@ Partial Class Compras_Compras 'IVA por Acreditar . siempre se registra aunque sea cero If Not ErrorMovtosCxP Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TxtIVA.Text.ToDecimal * PorcentajePago, " ", 19, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtIVA.Text.ToDecimal * PorcentajePago) Then ErrorMovtosCxP = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TxtIVA.Text.ToDecimal * PorcentajePago, " ", 19, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtIVA.Text.ToDecimal * PorcentajePago) Then ErrorMovtosCxP = True End If If Not ErrorMovtosCxP AndAlso TxtRetIVA.Text.ToDouble > 0 Then 'Agrego el RetIVA - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetIVA.Text.ToDecimal * PorcentajePago, " ", 22, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtRetIVA.Text.ToDecimal * PorcentajePago) Then ErrorMovtosCxP = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetIVA.Text.ToDecimal * PorcentajePago, " ", 22, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtRetIVA.Text.ToDecimal * PorcentajePago) Then ErrorMovtosCxP = True End If If Not ErrorMovtosCxP AndAlso TxtRetISR.Text.ToDouble > 0 Then 'Agrego el RetISR - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetISR.Text.ToDecimal * PorcentajePago, " ", 23, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, ImporteMX:=TxtRetISR.Text.ToDecimal * PorcentajePago) Then ErrorMovtosCxP = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetISR.Text.ToDecimal * PorcentajePago, " ", 23, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, ImporteMX:=TxtRetISR.Text.ToDecimal * PorcentajePago) Then ErrorMovtosCxP = True End If @@ -8234,26 +8214,26 @@ Partial Class Compras_Compras If TxtTotal.Text.ToDouble - ImportePagar > 0 Then PorcentajePago = (TxtTotal.Text.ToDecimal - ImportePagar) / TxtTotal.Text.ToDecimal 'Movimiento, se omite, porque se esta registrando la totalidad de la deuda - 'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtTotal.Text.ToDouble - ImporteAnticipo, " ", 5, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle) Then + 'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtTotal.Text.ToDouble - ImporteAnticipo, " ", 5, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle) Then ' ErrorMovtosCxP = True 'End If 'Siempre: Se agrega IVA aunque sea cero If TxtIVA.Text.ToDouble <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TxtIVA.Text.ToDecimal * PorcentajePago, " ", CveConceptoIVA, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtIVA.Text.ToDecimal * PorcentajePago) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TxtIVA.Text.ToDecimal * PorcentajePago, " ", CveConceptoIVA, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtIVA.Text.ToDecimal * PorcentajePago) Then ErrorMovtosIVA = True End If End If 'Se agregan las Ret IVA If TxtRetIVA.Text.ToDouble <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetIVA.Text.ToDecimal * PorcentajePago, " ", CveConceptoRetIVA, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtRetIVA.Text.ToDecimal * PorcentajePago) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetIVA.Text.ToDecimal * PorcentajePago, " ", CveConceptoRetIVA, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtRetIVA.Text.ToDecimal * PorcentajePago) Then ErrorMovtosRetIVA = True End If End If 'Se agregan las Ret ISR If TxtRetISR.Text.ToDouble > 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetISR.Text.ToDecimal * PorcentajePago, " ", CveConceptoRetISR, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtRetISR.Text.ToDecimal * PorcentajePago) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TxtRetISR.Text.ToDecimal * PorcentajePago, " ", CveConceptoRetISR, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtRetISR.Text.ToDecimal * PorcentajePago) Then ErrorMovtosRetISR = True End If End If @@ -9261,6 +9241,8 @@ Partial Class Compras_Compras ElseIf CveRetIVAConceptoOriginal = 5 Then Funcionalidad = 578 ConceptoContable = 285 + ElseIf CveRetIVAConceptoOriginal = 6 Then + ConceptoContable = 333 End If ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) @@ -9318,7 +9300,9 @@ Partial Class Compras_Compras Funcionalidad = 578 ConceptoContable = 286 ConceptoContableContra = 285 - + ElseIf CveRetIVAConceptoOriginal = 6 Then + ConceptoContable = 334 + ConceptoContableContra = 333 End If ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) @@ -9342,7 +9326,7 @@ Partial Class Compras_Compras If tipoCambio > 1 Then Concepto += $" TC{tipoCambio} ${ImporteMovimiento.FormatoNumero(2)}" 'Agregamos el Opuesto del 22 -> 15 If ImporteMovimiento <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContableContra, Concepto + If(tipoCambio > 1, $" TC {tipoCambio} ${ImporteMovimiento.FormatoNumero(2)}", ""), Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveAcreedor:=-1, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=-1, CveCreditoDetalle:=-1, ImporteMX:=ImporteMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), Contabilizable:=True, TipoCambio:=tipoCambio, CveSubProyecto:=CveSubProyectoAnticipo) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContableContra, Concepto + If(tipoCambio > 1, $" TC {tipoCambio} ${ImporteMovimiento.FormatoNumero(2)}", ""), Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=-1, CveCreditoDetalle:=-1, ImporteMX:=ImporteMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), Contabilizable:=True, TipoCambio:=tipoCambio, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 Exit For End If @@ -9441,7 +9425,7 @@ Partial Class Compras_Compras 'Agregamos el Opuesto del 23 -> 16 If ImporteMovimiento <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContableContra, Concepto + If(tipoCambio > 1, $" TC {tipoCambio} ${ImporteMovimiento.FormatoNumero(2)}", ""), Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=-1, CveAcreedor:=-1, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=-1, CveCreditoDetalle:=-1, ImporteMX:=ImporteMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), Contabilizable:=True, CveSubProyecto:=CveSubProyectoAnticipo) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContableContra, Concepto + If(tipoCambio > 1, $" TC {tipoCambio} ${ImporteMovimiento.FormatoNumero(2)}", ""), Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=-1, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=-1, CveCreditoDetalle:=-1, ImporteMX:=ImporteMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), Contabilizable:=True, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 Exit For End If @@ -9450,10 +9434,6 @@ Partial Class Compras_Compras End If End If - - - - Case 64 'GANANCIA If gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then 'SOLO SE IMPLEMENTÓ PARA NC If DdlMoneda.SelectedValue.ToEntero <> 1 Or gvr.DataKey("CveMoneda").ToEntero <> 1 Then From 344a486f5dd2817b6a7ca794fcbf9e2f54db09af Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 17 Jun 2022 10:47:04 -0700 Subject: [PATCH 06/15] -cleanup --- Nomina/Nomina.aspx.cs | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index a4bf5d15c..45361e8f5 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -1,19 +1,16 @@ -using System; +using Extensiones; +using iTextSharp.text.pdf; +using System; using System.Collections.Generic; +using System.Collections.Specialized; +using System.Data; +using System.Drawing; +using System.IO; using System.Linq; -using System.Web; +using System.Text; using System.Web.UI; using System.Web.UI.WebControls; -using Extensiones; -using System.Data; -using System.Text; using static Extensiones.ModExtensiones; -using System.Drawing; -using iTextSharp.text.pdf; -using System.IO; -using System.Data.SqlClient; -using System.Configuration; -using System.Collections.Specialized; public partial class Nomina_Nomina2 : ClsPaginas { @@ -253,7 +250,7 @@ public partial class Nomina_Nomina2 : ClsPaginas cargaEjercicios(); CargaTiposPeriodo(); cargaPeriodos(); - DdlTurno.DataSource = GlobalDTTurno.FiltraParametros($"CveEmpresa = { UsuarioActual.CveEmpresa}"); + DdlTurno.DataSource = GlobalDTTurno.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}"); DdlTurno.DataBind(); DdlMetodoPago.DataSource = GlobalDTMetodosPago; @@ -1137,7 +1134,7 @@ public partial class Nomina_Nomina2 : ClsPaginas CvePeriodo = gvRow.DataKey("CvePeriodo").ToEntero(); int CvePersonal = gvRow.DataKey("CvePersonal").ToEntero(); int CveNomina = gvRow.DataKey("CveNomina").ToEntero(); - int SeTimbro = (gvRow.DataKey("SeTimbro").ToUpper()=="TRUE" ?1:gvRow.DataKey("SeTimbro").ToEntero()); + int SeTimbro = (gvRow.DataKey("SeTimbro").ToUpper() == "TRUE" ? 1 : gvRow.DataKey("SeTimbro").ToEntero()); LinkButton LnkTimbrar = gvRow.FCLinkButton("LnkTimbrar"); string MaiReciboNomina = string.Empty; string NombreCompleto = string.Empty; @@ -1146,7 +1143,7 @@ public partial class Nomina_Nomina2 : ClsPaginas MaiReciboNomina = drow["MaiReciboNomina"].ToString(); NombreCompleto = drow["NombreCompleto"].ToString(); } - if (CvePersonal > 0 && SeTimbro==1) + if (CvePersonal > 0 && SeTimbro == 1) { if (MaiReciboNomina.Trim().Length > 0) @@ -1157,7 +1154,7 @@ public partial class Nomina_Nomina2 : ClsPaginas List objarch = new List(); objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = "Nomina.pdf" }); Mail.SendMail(ClsPaginas.EmpresaNotificaciones, MaiReciboNomina.Trim(), string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy}", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), "", "", objarch); - // Mail.SendMail(ClsPaginas.EmpresaNotificaciones, "caudillo.90d@gmail.com", string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy} ", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), MaiReciboNomina.Trim(), "", objarch); + // Mail.SendMail(ClsPaginas.EmpresaNotificaciones, "caudillo.90d@gmail.com", string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy} ", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), MaiReciboNomina.Trim(), "", objarch); } } @@ -8439,7 +8436,7 @@ public partial class Nomina_Nomina2 : ClsPaginas Response.AppendHeader("Content-Length", sb.ToString()); Response.ContentType = "text/plain"; //Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina{DateTime.Now.ToString("yyyyMMddhhmmss").ToString()}.txt\""); - Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina {DdlPeriodo.SelectedItem.Text }.txt\""); + Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina {DdlPeriodo.SelectedItem.Text}.txt\""); Response.Write(sb.ToString()); this.RegistraScript("$('#ModalLayoutBancos').modal('hide');"); Response.Flush(); From d7c340902c0ab9428869fd125c6af7e99f4543a3 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 17 Jun 2022 10:47:55 -0700 Subject: [PATCH 07/15] -cleanup --- App_Code/ClsContPAQi.vb | 2 -- 1 file changed, 2 deletions(-) diff --git a/App_Code/ClsContPAQi.vb b/App_Code/ClsContPAQi.vb index ca226a78c..2152d1431 100644 --- a/App_Code/ClsContPAQi.vb +++ b/App_Code/ClsContPAQi.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient -Imports System.IO -Imports System Imports Extensiones Public Class ClsContPAQi From 89538109c1b40d8029359811da032864fb81a2a6 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 18 Jun 2022 07:36:10 -0700 Subject: [PATCH 08/15] - opcion saldo --- App_Code/ClsMovimientos.vb | 120 ++++++++++++++++++------------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index 813d87af3..71422d3bb 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -7,11 +7,11 @@ Imports System.Data.SqlClient Imports Extensiones Public Class ClsMovimientos - Implements IDisposable - + Implements IDisposable + #Region "Campos" - - 'SQL + + 'SQL Private SqlConexion As SqlConnection Private SqlAdapter As SqlDataAdapter Private SqlTransacc As SqlTransaction @@ -21,10 +21,10 @@ Public Class ClsMovimientos 'Atributos de la clase Private disposedValue As Boolean = False ' Para detectar llamadas redundantes 'REGISTRAR CONEXIONES ABIERTAS - Private CveConexion As Integer = 0 - + Private CveConexion As Integer = 0 + #End Region - + #Region "Propiedades" Public ReadOnly Property DtResultados() As DataTable Get @@ -32,9 +32,9 @@ Public Class ClsMovimientos End Get End Property - Public Property AlertaMensaje As New StringBuilder + Public Property AlertaMensaje As New StringBuilder #End Region - + Sub New() SqlConexion = New SqlConnection SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString @@ -55,9 +55,9 @@ Public Class ClsMovimientos End With If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc Data = New DataTable - End Sub + End Sub #Region "Conexiones" - + Private Sub ConexionAdd() If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then Try @@ -90,9 +90,9 @@ Public Class ClsMovimientos CveConexion = 0 End If - End Sub + End Sub #End Region - + Public Sub IniciaTransacSQL() SqlTransacc = SqlConexion.BeginTransaction() End Sub @@ -103,27 +103,27 @@ Public Class ClsMovimientos Public Sub Commit() SqlTransacc.Commit() - End Sub - + End Sub + #Region "CxC" - 'Public Function GetCxCCliente(CveCliente As Integer) As Boolean - ' Dim Retorno As Boolean = False - ' 'Data = New DataTable - ' 'SqlAdapter = New SqlDataAdapter("PA_ClienteCxC", SqlConexion) - ' 'SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure - ' DataAdapter("PA_ClienteCxC") - ' SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente - - ' Try - ' SqlAdapter.Fill(Data) - ' Retorno = True - ' Catch ex As SqlException - ' OnError("Ocurrió un error al consultar las CxC del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - ' End Try - - ' Return Retorno - 'End Function - + 'Public Function GetCxCCliente(CveCliente As Integer) As Boolean + ' Dim Retorno As Boolean = False + ' 'Data = New DataTable + ' 'SqlAdapter = New SqlDataAdapter("PA_ClienteCxC", SqlConexion) + ' 'SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure + ' DataAdapter("PA_ClienteCxC") + ' SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente + + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As SqlException + ' OnError("Ocurrió un error al consultar las CxC del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + + ' Return Retorno + 'End Function + Public Function GetCxCClienteDetalle(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveClienteSucursal As Integer, Optional TipoDocto As String = "-1", Optional FechaCorte As Date = MaxFecha, Optional CveIESustitucion As Integer = -1, Optional FechaVencimientoI As Date = MinFecha, Optional FechaVencimientoF As Date = MaxFecha) As Boolean Dim Retorno As Boolean = False @@ -476,11 +476,11 @@ Public Class ClsMovimientos OnError("Ocurrió un error al descargar los segmentos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno - End Function - - + End Function + + #End Region - + #Region "Anticipos de Clientes" Public Function GetAnticiposCliente(CveCliente As Integer, Optional SelectTop As Integer = -1, Optional CveMoneda As Integer = 1) As Boolean Dim Retorno As Boolean = False @@ -558,12 +558,12 @@ Public Class ClsMovimientos End Try Return Retorno - End Function - + End Function + #End Region - + #Region "CxP" - + Public Function GetCxPEmpresa(CveProveedor As Integer, FechaVencimientoInicio As String, FechaVencimientoFin As String, CveSubProyecto As Integer, DiasVencidos As Integer, CveUsuarioRegistro As Integer, CveUsuarioProgramo As Integer, CveUsuarioResponsable As Integer, CveClasificacion As Integer, CveMoneda As Integer, CveTipoPagoProgramo As Integer, CveEstatusFactura As Integer, CveAplicaNC As Integer, CveEmpresa As Integer, Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional CodigoProgramacion As String = "-1", Optional CveTipoProveedor As Integer = 0, @@ -1375,7 +1375,7 @@ Public Class ClsMovimientos Return Retorno End Function - Public Function GetCxPPersonalCajaChica(CveEmpresa As Integer, CvePersonal As Integer, CveCajaChica As Integer, NumeroReembolso As String, Optional FechaI As DateTime = ModExtensiones.MinFecha, Optional FechaF As DateTime = ModExtensiones.MaxFecha) As Boolean + Public Function GetCxPPersonalCajaChica(CveEmpresa As Integer, CvePersonal As Integer, CveCajaChica As Integer, NumeroReembolso As String, Optional FechaI As DateTime = ModExtensiones.MinFecha, Optional FechaF As DateTime = ModExtensiones.MaxFecha, Optional OpcionSaldo As Integer = 1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CxPPersonalCajaChica") With SqlAdapter.SelectCommand.Parameters @@ -1385,7 +1385,7 @@ Public Class ClsMovimientos .Add("@NumeroReembolso", SqlDbType.VarChar).Value = NumeroReembolso .Add("@FechaI", SqlDbType.DateTime).Value = FechaI .Add("@FechaF", SqlDbType.DateTime).Value = FechaF - + .Add("@OpcionSaldo", SqlDbType.Int).Value = OpcionSaldo ' 1. solo con saldo, -1. todos End With Try SqlAdapter.Fill(Data) @@ -1447,9 +1447,9 @@ Public Class ClsMovimientos End Try Return Retorno - End Function + End Function #End Region - + #Region "Anticipos de Proveedores" Public Function GetAnticiposProveedor(CveProveedor As Integer, CveProveedorSucursal As Integer, Optional CveMoneda As Integer = -1, Optional SelectTop As Integer = -1, Optional FechaI As String = "-1", Optional FechaF As String = "-1", Optional TipoDocto As String = "-1") As Boolean Dim Retorno As Boolean = False @@ -1715,11 +1715,11 @@ Public Class ClsMovimientos End Try Return Retorno - End Function + End Function #End Region - + #Region "EDITAR FECHA DE MOVIMIENTO" - + Public Function UpdateMovimientoFecha(Fecha As DateTime, CveMovimiento As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Mov_MovimientoFechaUpdate") @@ -1734,12 +1734,12 @@ Public Class ClsMovimientos OnError("Ocurrió un error al actualizar la fecha del movimiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno - End Function + End Function #End Region - + #Region "Registros Contables" - - + + Public Function AddMovimiento(CveConcepto As Integer, Tipo As String, Referencia1 As String, Referencia2 As String, CveMoneda As Integer, Cargo As Double, Abono As Double, Fecha As Date, FechaVencimiento As Date, Folio As String, IdCtaContable As Integer, CveUsuario As Integer, CveEmprea As Integer) As Boolean Dim Retorno As Boolean = False @@ -1813,14 +1813,14 @@ Public Class ClsMovimientos End Try Return Retorno - End Function - + End Function + #End Region - + #Region "IDisposable Support" - - - ' IDisposable + + + ' IDisposable Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then If disposing Then @@ -1853,9 +1853,9 @@ Public Class ClsMovimientos ConexionClose() Dispose(True) GC.SuppressFinalize(Me) - End Sub + End Sub #End Region - + Public Function GetPersonalCajaChica(CveEmpresa As Integer, CveCompra As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_PersonalCajaChica") From 23ffe814e9766a6be3b3967233b9ce48a89b0136 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 18 Jun 2022 07:39:40 -0700 Subject: [PATCH 09/15] -- cleanup --- App_Code/ADSBase.vb | 1 - App_Code/BaseMasterPage.vb | 6 +- App_Code/BundleConfig.vb | 10 +- App_Code/CFDITimbre.vb | 1 - App_Code/CalendarEvent.vb | 5 - App_Code/ClsAC.vb | 2 - App_Code/ClsAC2.vb | 2 - App_Code/ClsAF.vb | 2 - App_Code/ClsAIMMGM.vb | 4 +- App_Code/ClsAcarreos.vb | 96 ++- App_Code/ClsAcumuladores.vb | 32 +- App_Code/ClsBancos.vb | 6 - App_Code/ClsBase.vb | 7 +- App_Code/ClsCGame.vb | 5 +- App_Code/ClsCRM.vb | 7 +- App_Code/ClsClasificaciones.vb | 94 ++- App_Code/ClsClientes.vb | 2 - App_Code/ClsCompEstatusFactura.vb | 2 +- App_Code/ClsConstancias.vb | 2 +- App_Code/ClsContabilidad.vb | 21 +- App_Code/ClsContratos.vb | 136 ++-- App_Code/ClsDG.vb | 4 +- App_Code/ClsDesarrollo.vb | 4 +- App_Code/ClsEdocumentacion.vb | 22 +- App_Code/ClsEdosFinancieros.vb | 2 +- App_Code/ClsEncuestas.vb | 3 +- App_Code/ClsEsquemasComisiones.vb | 1 - App_Code/ClsEstatusFactura.vb | 2 +- App_Code/ClsEventos.vb | 2 - App_Code/ClsFISConfiguracion.vb | 2 - App_Code/ClsFlotillas.vb | 2 - App_Code/ClsGPS.vb | 7 +- App_Code/ClsGPSHerramientas.vb | 2 - App_Code/ClsGenerales.vb | 2 - App_Code/ClsGralEncuestas.vb | 1 - App_Code/ClsGralFolios.vb | 2 - App_Code/ClsImpuestos.vb | 2 - App_Code/ClsInventarios.vb | 2 - App_Code/ClsLeyendasFiscales.vb | 2 - App_Code/ClsMF.vb | 5 +- App_Code/ClsMetodosPagos.vb | 2 - App_Code/ClsModulos.vb | 2 - App_Code/ClsNominas.vb | 2 +- App_Code/ClsOIEventos.vb | 222 +++--- App_Code/ClsPV.vb | 2 - App_Code/ClsPaginas.vb | 18 +- App_Code/ClsPresupuestos.vb | 4 +- App_Code/ClsProductosServicios.vb | 2 - App_Code/ClsProsEncuestas.vb | 2 +- App_Code/ClsProyectos.vb | 2 - App_Code/ClsPuntoVenta.vb | 4 +- App_Code/ClsRH.vb | 650 +++++++++--------- App_Code/ClsSAT.vb | 12 +- App_Code/ClsSisEmpresas.vb | 2 - App_Code/ClsSisNotificaciones.vb | 188 +++-- App_Code/ClsSisParametros.vb | 4 +- App_Code/ClsSisProcesos.vb | 2 - App_Code/ClsSisRoles.vb | 2 - App_Code/ClsSisUsuarios.vb | 206 +++--- App_Code/ClsSubProyectos.vb | 30 +- App_Code/ClsSucursales.vb | 2 - App_Code/ClsTSoft.vb | 18 +- App_Code/ClsTareasProgramadas.vb | 4 - App_Code/ClsTecnoMovil.vb | 66 +- App_Code/ClsTemporal.vb | 2 - App_Code/ClsTiposEventos.vb | 2 - App_Code/ClsUnidadesMedida.vb | 2 - App_Code/ClsValidaCFDi.vb | 25 +- App_Code/ClsVentas.vb | 2 - App_Code/ClsVtaPromociones.vb | 2 - App_Code/ClsVtaVendedores.vb | 70 +- App_Code/CrystalParametro.vb | 4 +- App_Code/Empresa.vb | 6 +- App_Code/EntityModel.vb | 7 +- App_Code/LogicNominas.vb | 3 +- App_Code/Modelos.vb | 14 +- App_Code/Models/Request/RequestLogin.vb | 4 +- .../Models/Response/ResponseGenericModel.vb | 4 +- App_Code/Models/Response/ResponseLogin.vb | 3 +- App_Code/MyGPSHub.vb | 6 +- App_Code/MyHub.vb | 6 +- App_Code/Notificaciones.vb | 5 +- App_Code/Startup.Auth.vb | 7 +- App_Code/Thalamus.vb | 6 +- App_Code/Timbrado.vb | 72 +- App_Code/TimbradoB.vb | 4 +- App_Code/Timbres.vb | 22 +- App_Code/Usuario.vb | 15 +- App_Code/UsuarioWs.vb | 2 +- App_Code/WS.vb | 8 +- App_Code/WS/WSApiController.vb | 1 - App_Code/WS/WSSIGVentas.vb | 3 +- App_Code/WS/WSUSer.vb | 4 +- App_Code/WS/WsUtility.vb | 6 +- App_Code/WSSIGApps.vb | 12 - App_Code/WS_PuntoVenta.vb | 4 +- App_Code/WsEcommerce.vb | 2 - App_Code/WsRespaldos.vb | 11 +- App_Code/WsSigfox.vb | 3 - App_Code/clsGemBoxDocument.vb | 5 +- App_Code/clsUtilerias.vb | 3 - App_Code/highchart.vb | 5 +- App_Code/modExtensiones.vb | 23 +- App_Code/wsOI.vb | 8 +- App_Code/wsRedes.vb | 8 +- App_Code/wsSIG.vb | 6 +- 106 files changed, 1077 insertions(+), 1290 deletions(-) diff --git a/App_Code/ADSBase.vb b/App_Code/ADSBase.vb index 708cac5cb..af0ae20bf 100644 --- a/App_Code/ADSBase.vb +++ b/App_Code/ADSBase.vb @@ -1,6 +1,5 @@ Imports System.Data Imports System.Data.SqlClient -Imports System.IO Imports Extensiones Public Class ADSBase diff --git a/App_Code/BaseMasterPage.vb b/App_Code/BaseMasterPage.vb index 802ae5285..5850da626 100644 --- a/App_Code/BaseMasterPage.vb +++ b/App_Code/BaseMasterPage.vb @@ -1,8 +1,4 @@ - -Imports System.Data -Imports System.Linq -Imports Extensiones -Public Class BaseMasterPage +Public Class BaseMasterPage Inherits MasterPage Public Overridable ReadOnly Property MyTitle() As String Get diff --git a/App_Code/BundleConfig.vb b/App_Code/BundleConfig.vb index 4331cdfa4..26201a87f 100644 --- a/App_Code/BundleConfig.vb +++ b/App_Code/BundleConfig.vb @@ -3,11 +3,11 @@ Public Class BundleConfig Public Shared Sub RegistrarBundles(bundles As BundleCollection) - + bundles.Add(New ScriptBundle("~/bundles/jquery").Include( "~/Metronic/assets/global/plugins/jquery.min.js" )) - ScriptManager.ScriptResourceMapping.AddDefinition("jquery", Nothing, New ScriptResourceDefinition with { .Path ="~/bundles/jquery"}) + ScriptManager.ScriptResourceMapping.AddDefinition("jquery", Nothing, New ScriptResourceDefinition with {.Path = "~/bundles/jquery"}) @@ -159,12 +159,12 @@ Public Class BundleConfig "~/Scripts/WebForms/WebForms.js", "~/Scripts/WebForms/WebUIValidation.js", "~/Scripts/WebForms/MenuStandards.js", - "~/Scripts/WebForms/Focus.js", "~/Scripts/WebForms/GridView.js", + "~/Scripts/WebForms/Focus.js", "~/Scripts/WebForms/GridView.js", "~/Scripts/WebForms/DetailsView.js", "~/Scripts/WebForms/TreeView.js", "~/Scripts/WebForms/WebParts.js")) - ScriptManager.ScriptResourceMapping.AddDefinition("WebFormsBundle", new ScriptResourceDefinition With { .Path = "~/bundles/WebFormsJs" }) + ScriptManager.ScriptResourceMapping.AddDefinition("WebFormsBundle", new ScriptResourceDefinition With {.Path = "~/bundles/WebFormsJs"}) ' Order is very important for these files to work, they have explicit dependencies bundles.Add(New ScriptBundle("~/bundles/MsAjaxJs").Include( @@ -173,7 +173,7 @@ Public Class BundleConfig "~/Scripts/WebForms/MsAjax/MicrosoftAjaxTimer.js", "~/Scripts/WebForms/MsAjax/MicrosoftAjaxWebForms.js")) - ' Use the Development version of Modernizr to develop with and learn from. Then, when you’re + ' Use the Development version of Modernizr to develop with and learn from. Then, when you’re ' ready for production, use the build tool at http://modernizr.com to pick only the tests you need bundles.Add(New ScriptBundle("~/bundles/modernizr").Include( "~/Scripts/modernizr-*")) diff --git a/App_Code/CFDITimbre.vb b/App_Code/CFDITimbre.vb index 111ecd684..5dc887e7c 100644 --- a/App_Code/CFDITimbre.vb +++ b/App_Code/CFDITimbre.vb @@ -1,7 +1,6 @@ Option Strict On Option Explicit On Imports Extensiones -Imports System.Linq Public Class CFDITimbre diff --git a/App_Code/CalendarEvent.vb b/App_Code/CalendarEvent.vb index 9a8729a1a..58abbdf3b 100644 --- a/App_Code/CalendarEvent.vb +++ b/App_Code/CalendarEvent.vb @@ -1,10 +1,5 @@ Option Explicit On Option Strict On - -Imports System -Imports System.Collections.Generic -Imports System.Linq -Imports System.Web Public Class CalendarEvent Public Property id As Integer diff --git a/App_Code/ClsAC.vb b/App_Code/ClsAC.vb index 45e0a37f1..a48e0b047 100644 --- a/App_Code/ClsAC.vb +++ b/App_Code/ClsAC.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsAC Implements IDisposable diff --git a/App_Code/ClsAC2.vb b/App_Code/ClsAC2.vb index 50fbb9284..a448c8dae 100644 --- a/App_Code/ClsAC2.vb +++ b/App_Code/ClsAC2.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsAC2 Implements IDisposable diff --git a/App_Code/ClsAF.vb b/App_Code/ClsAF.vb index fd6191f40..d06e61b3a 100644 --- a/App_Code/ClsAF.vb +++ b/App_Code/ClsAF.vb @@ -4,8 +4,6 @@ Option Explicit On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsAF Implements IDisposable diff --git a/App_Code/ClsAIMMGM.vb b/App_Code/ClsAIMMGM.vb index 58eb962a9..70a4b2ddb 100644 --- a/App_Code/ClsAIMMGM.vb +++ b/App_Code/ClsAIMMGM.vb @@ -12,7 +12,7 @@ Public Class ClsAIMMGM 'SQL Private SqlConexion As SqlConnection Private SqlAdapter As SqlDataAdapter - Private SqlCommand As SqlCommand + Private SqlCommand As SqlCommand Private SqlTransacc As SqlTransaction Private Data As DataTable Private disposedValue As Boolean = False ' Para detectar llamadas redundantes @@ -44,7 +44,7 @@ Public Class ClsAIMMGM Public Sub Commit() SqlTransacc.Commit() End Sub - + Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing) If TransaccionCompartida Is Nothing Then diff --git a/App_Code/ClsAcarreos.vb b/App_Code/ClsAcarreos.vb index b1d38972e..e192b5e48 100644 --- a/App_Code/ClsAcarreos.vb +++ b/App_Code/ClsAcarreos.vb @@ -1,15 +1,13 @@ Imports System.Data -Imports Microsoft.VisualBasic -Imports Extensiones Imports System.Data.SqlClient -Imports System Imports System.IO +Imports Extensiones Public Class ClsAcarreos - Implements IDisposable - + Implements IDisposable + #Region "Campos" - 'SQL + 'SQL Private SqlConexion As SqlConnection Private SqlAdapter As SqlDataAdapter Private SqlCommand As SqlCommand @@ -23,16 +21,16 @@ Public Class ClsAcarreos Get DtResultados = Data End Get - End Property - + End Property + #End Region - + #Region "Propiedades" Public Property _Folio As Integer Public Property _CveAcarreoProyecto As Integer - Public Property _CvePreEstimacion As Integer + Public Property _CvePreEstimacion As Integer #End Region - + Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing) If TransaccionCompartida Is Nothing Then @@ -59,9 +57,9 @@ Public Class ClsAcarreos End With If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc Data = New DataTable - End Sub + End Sub #Region "Conexiones" - + Private Sub ConexionAdd() If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then Try @@ -94,7 +92,7 @@ Public Class ClsAcarreos CveConexion = 0 End If - End Sub + End Sub #End Region Public Function IniciaTransacSQL() As SqlTransaction If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction() @@ -304,9 +302,9 @@ Public Class ClsAcarreos End Try Return Retorno - End Function + End Function #End Region - + #Region "Unidades" Public Function AddUnidad(UnidadCodigo As String, Unidad As String, CveUsuario As Integer, CveTransportista As Integer) As Boolean Dim Retorno As Boolean = False @@ -383,9 +381,9 @@ Public Class ClsAcarreos End Try Return Retorno - End Function + End Function #End Region - + #Region "Acarreos" Public Function AddAcarreo(CveUnidad As Integer, CveChofer As Integer, Folio As Integer, Fecha As Date, CveSubProyectoOrigen As Integer, Volumen As Double, CveEstatus As Integer, CveTipoAcarreo As Integer, CveEmpresa As Integer, CveSubProyectoDestino As Integer, CveMaterial As Integer, Km As Double, CveUsuario As Integer, ImagenRemision As String, ImagenTransporte As String, ImagenCarga As String, Latitud As String, Longitud As String, CveAcarreoProyecto As Integer) As Boolean @@ -557,9 +555,9 @@ Public Class ClsAcarreos End Try Return Retorno - End Function + End Function #End Region - + #Region "RepAcarreos" Public Function GetRepAcarreo(FInicio As Date, FFin As Date, CveSubProyectoOrigen As Integer, CveTransportista As Integer, CveChofer As Integer, CveUnidad As Integer, CveEmpresa As Integer, Gpo As Integer, CveSubProyectoDestino As Integer, CveMaterial As Integer, CveAcarreoProyecto As Integer) As Boolean Dim Retorno As Boolean = False @@ -585,9 +583,9 @@ Public Class ClsAcarreos End Try Return Retorno - End Function + End Function #End Region - + #Region "RepAcarreosDetalle" Public Function GetRepAcarreoDetalle(FInicio As Date, FFin As Date, CveSubProyectoOrigen As Integer, CveTransportista As Integer, CveChofer As Integer, CveUnidad As Integer, CveEmpresa As Integer, Gpo As String, Grupo As Integer, CveSubProyectoDestino As Integer, CveMaterial As Integer, CveAcarreoProyecto As Integer) As Boolean Dim Retorno As Boolean = False @@ -614,9 +612,9 @@ Public Class ClsAcarreos End Try Return Retorno - End Function + End Function #End Region - + #Region "Materiales" Public Function AddMaterial(Material As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -696,9 +694,9 @@ Public Class ClsAcarreos End Try Return Retorno - End Function + End Function #End Region - + #Region "Acarreos Concluidos" Public Function GetAcarreosConcluidosMatch(CveSubProyectoOrigen As Integer, CveSubProyectoDestino As Integer, FInicial As Date, FFinal As Date, CveEmpresa As Integer, CveTransportista As Integer, CveUnidad As Integer, CveChofer As Integer, CveMaterial As Integer, CveAcarreoProyecto As Integer) As Boolean Dim Retorno As Boolean = False @@ -811,15 +809,15 @@ Public Class ClsAcarreos End Try Return Retorno - End Function - - - - + End Function + + + + #End Region - + #Region "RepAcarreosUnidades" - + Public Function GetReporteAcarreosUnidades(CveUnidad As Integer, CveSubProyectoOrigen As Integer, CveSubProyectoDestino As Integer, CveTransportista As Integer, FInicio As Date, FFin As Date, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Acar_RepAcarreosUnidadesGet") @@ -841,11 +839,11 @@ Public Class ClsAcarreos End Try Return Retorno - End Function + End Function #End Region - + #Region "Estatus" - + Public Function AddEstatus(Estatus As String, CveEmpresa As Integer, CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Acar_EstatusAdd") @@ -925,9 +923,9 @@ Public Class ClsAcarreos End Try Return Retorno - End Function + End Function #End Region - + #Region "Acarreos Contratos" Public Function AddAcarreosProyectos(CveSubProyectoOrigen As Integer, CveSubProyectoDestino As Integer, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, NumContrato As String, Descripcion As String, CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False @@ -1200,10 +1198,10 @@ Public Class ClsAcarreos End Try Return Retorno - End Function - + End Function + #End Region - + #Region "PreEstimacion y PreEstimacionDetalle" Public Function AddPreEstimacion(CveAcarreoProyecto As Integer, CveTransportista As Integer, NumPreEstimacion As Integer, FechaPreEstimacion As Date, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -1284,10 +1282,10 @@ Public Class ClsAcarreos End Try Return Retorno - End Function - + End Function + #End Region - + #Region "RepContratosAcarreos" Public Function GetRepContratosAcarreos(CveEmpresa As Integer, FInicio As Date, FFin As Date, CveAcarreoProyecto As Integer, CveTransportista As Integer, CveSubProyectoOrigen As Integer, CveSubProyectoDestino As Integer, CveProveedor As Integer, CveMaterial As Integer, Gpo As Integer) As Boolean Dim Retorno As Boolean = False @@ -1313,11 +1311,11 @@ Public Class ClsAcarreos End Try Return Retorno - End Function - - + End Function + + #End Region - + #Region "RepContratosAcarreosDetalle" Public Function GetRepContratosAcarreosDetalle(CveAcarreoProyecto As Integer, CveMaterial As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -1379,6 +1377,6 @@ Public Class ClsAcarreos ConexionClose() Dispose(True) GC.SuppressFinalize(Me) - End Sub + End Sub #End Region End Class diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index 4b4ab26fd..85b31fb86 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -7,10 +7,10 @@ Imports Extensiones Public Class ClsAcumuladores - Implements IDisposable - + Implements IDisposable + #Region "Campos" - 'SQL + 'SQL Private SqlConexion As SqlConnection Private SqlAdapter As SqlDataAdapter Private SqlTransacc As SqlTransaction @@ -68,9 +68,9 @@ Public Class ClsAcumuladores SqlAdapter = New SqlDataAdapter("", SqlConexion) ConexionAdd() - End Sub + End Sub #Region "Conexiones" - + Private Sub ConexionAdd() If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then Try @@ -103,18 +103,18 @@ Public Class ClsAcumuladores CveConexion = 0 End If - End Sub + End Sub #End Region Public ReadOnly Property DtResultados() As DataTable Get DtResultados = Data End Get - End Property - + End Property + #End Region - + #Region " TAMAÑOS " - + Public Function TamañoGet(CveTamaño As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -375,12 +375,12 @@ Public Class ClsAcumuladores End Try Return Retorno - End Function - + End Function + #End Region - + #Region " TIPOS USO " - + Public Function TiposUsoGet(CveTipoUso As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -1334,7 +1334,7 @@ Public Class ClsAcumuladores ConexionClose() Dispose(True) GC.SuppressFinalize(Me) - End Sub + End Sub #End Region - + End Class diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 19070fdbf..179dee26f 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -4,12 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration -Imports Microsoft.Reporting.WebForms -Imports System.Xml -Imports System.IO -Imports System.Web Public Class ClsBancos Implements IDisposable diff --git a/App_Code/ClsBase.vb b/App_Code/ClsBase.vb index 77d090808..88069ab6c 100644 --- a/App_Code/ClsBase.vb +++ b/App_Code/ClsBase.vb @@ -1,11 +1,6 @@ -Imports Microsoft.VisualBasic -Imports System.Data +Imports System.Data Imports System.Data.SqlClient -Imports System.Configuration Imports Extensiones -Imports System.IO -Imports System.Xml -Imports System.Text Public Class ClsBase Implements IDisposable diff --git a/App_Code/ClsCGame.vb b/App_Code/ClsCGame.vb index dc66c337d..ce78e577c 100644 --- a/App_Code/ClsCGame.vb +++ b/App_Code/ClsCGame.vb @@ -1,9 +1,6 @@ Imports System.Data -Imports Microsoft.VisualBasic -Imports Extensiones Imports System.Data.SqlClient -Imports System -Imports System.IO +Imports Extensiones Public Class ClsCGame Implements IDisposable diff --git a/App_Code/ClsCRM.vb b/App_Code/ClsCRM.vb index b212c9403..1b845f870 100644 --- a/App_Code/ClsCRM.vb +++ b/App_Code/ClsCRM.vb @@ -1,11 +1,8 @@ Imports System.Data -Imports Microsoft.VisualBasic -Imports Extensiones Imports System.Data.SqlClient -Imports System -Imports System.IO +Imports Extensiones -Public Class ClsCRM +Public Class ClsCRM Implements IDisposable #Region "CAMPOS" diff --git a/App_Code/ClsClasificaciones.vb b/App_Code/ClsClasificaciones.vb index 7432b8d52..42d03da4b 100644 --- a/App_Code/ClsClasificaciones.vb +++ b/App_Code/ClsClasificaciones.vb @@ -4,15 +4,13 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Imports Modelos Public Class ClsClasificaciones - Implements IDisposable - + Implements IDisposable + #Region "Campos" - + Private SqlConexion As SqlConnection Private SqlAdapter As SqlDataAdapter Private SqlTransacc As SqlTransaction @@ -32,10 +30,10 @@ Public Class ClsClasificaciones Get DtResultados = Data End Get - End Property - + End Property + #End Region - + Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing) If TransaccionCompartida Is Nothing Then @@ -66,9 +64,9 @@ Public Class ClsClasificaciones End With If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc Data = New DataTable - End Sub + End Sub #Region "Conexiones" - + Private Sub ConexionAdd() If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then Try @@ -101,9 +99,9 @@ Public Class ClsClasificaciones CveConexion = 0 End If - End Sub + End Sub #End Region - + Public Function IniciaTransacSQL() As SqlTransaction If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction() Return SqlTransacc @@ -461,9 +459,9 @@ Public Class ClsClasificaciones End Try Return OnError - End Function + End Function #End Region - + #Region "Charlie Presupuestos" Public Function GetEmpresasPresupuestos(CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -543,11 +541,11 @@ Public Class ClsClasificaciones End Try Return Retorno - End Function + End Function #End Region - + #Region " C L A S I F I C A C I O N E S - P R O Y E C T O S " - + Public Function GetClasificacionesSubProyecto(Optional CveClasificacion As Integer = -1, Optional CveEmpresa As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ClasificacionesSubProyectoGet") @@ -595,37 +593,37 @@ Public Class ClsClasificaciones End Try Return Retorno - End Function - - 'Public Function RemoveClasificacionSubProyecto(CveClasificacionSubProyecto As Integer) As Boolean - ' Dim OnError As Boolean = False - ' SqlAdapter = New SqlDataAdapter("PA_ClasificacionesSubProyectoRemove", SqlConexion) - ' SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure - ' With SqlAdapter.SelectCommand.Parameters - ' .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacionSubProyecto - ' End With - ' Data = New DataTable() - ' Try - ' SqlAdapter.Fill(Data) - ' OnError = True - ' Catch Ex1 As SqlException - ' If Ex1.Message.Contains("Número: 547;") Then - ' Alert("La Clasificación no se pudo eliminar por que esta siendo usada por un registro.", TipoMensaje.MsgAdvertencia) - ' Else - ' Me.OnError("Ocurrió un error al eliminar la Clasificación.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - ' End If - ' Catch ex As Exception - ' Me.OnError("Ocurrió un error al eliminar la Clasificación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - ' End Try - ' SqlAdapter.Dispose() - ' Return OnError - 'End Function + End Function + + 'Public Function RemoveClasificacionSubProyecto(CveClasificacionSubProyecto As Integer) As Boolean + ' Dim OnError As Boolean = False + ' SqlAdapter = New SqlDataAdapter("PA_ClasificacionesSubProyectoRemove", SqlConexion) + ' SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacionSubProyecto + ' End With + ' Data = New DataTable() + ' Try + ' SqlAdapter.Fill(Data) + ' OnError = True + ' Catch Ex1 As SqlException + ' If Ex1.Message.Contains("Número: 547;") Then + ' Alert("La Clasificación no se pudo eliminar por que esta siendo usada por un registro.", TipoMensaje.MsgAdvertencia) + ' Else + ' Me.OnError("Ocurrió un error al eliminar la Clasificación.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' End If + ' Catch ex As Exception + ' Me.OnError("Ocurrió un error al eliminar la Clasificación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' End Try + ' SqlAdapter.Dispose() + ' Return OnError + 'End Function #End Region - + #Region "IDisposable Support" - - - ' IDisposable + + + ' IDisposable Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then If disposing Then @@ -658,7 +656,7 @@ Public Class ClsClasificaciones ConexionClose() Dispose(True) GC.SuppressFinalize(Me) - End Sub + End Sub #End Region - + End Class diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 5f3c30c86..3da855b93 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Imports Modelos Public Class ClsClientes diff --git a/App_Code/ClsCompEstatusFactura.vb b/App_Code/ClsCompEstatusFactura.vb index 7408fe201..1d25c41b5 100644 --- a/App_Code/ClsCompEstatusFactura.vb +++ b/App_Code/ClsCompEstatusFactura.vb @@ -118,7 +118,7 @@ Public Class ClsCompEstatusFactura Dim Retorno As Boolean = False DataAdapter("PA_Comp_EstatusFacturaAdd") - + With SqlAdapter.SelectCommand.Parameters .Add("@CveEstatusFactura", SqlDbType.VarChar).Value = CveEstatusFactura .Add("@EstatusFactura", SqlDbType.VarChar).Value = EstatusFactura diff --git a/App_Code/ClsConstancias.vb b/App_Code/ClsConstancias.vb index 8d38b1cf5..33558b4e1 100644 --- a/App_Code/ClsConstancias.vb +++ b/App_Code/ClsConstancias.vb @@ -1,8 +1,8 @@ Option Strict On Imports System.Data -Imports Extensiones Imports System.IO +Imports Extensiones Public Class ClsConstancias diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 254a7c886..d530802bc 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsContabilidad Implements IDisposable @@ -916,7 +914,7 @@ Public Class ClsContabilidad Public Function AddPrePolizasDetalle(CvePrePoliza As Integer, TipoMovimiento As Boolean, Importe As Decimal, Referencia As String, CveConceptoContable As Integer, Concepto As String, FechaVencimiento As Date, IdCtaContable As Integer, IdSegmentoNegocio As Integer, Optional CveIE As Integer = -1, Optional CveVenta As Integer = -1, Optional CveCompra As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1, - Optional CvePersonal As Integer = -1, Optional CveMovimientoAlmacen As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveAcreedor As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCreditoDetalle As Integer = -1, + Optional CvePersonal As Integer = -1, Optional CveMovimientoAlmacen As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCreditoDetalle As Integer = -1, Optional CveOC As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveVentaAmortizacion As Integer = -1, Optional CveCompraAmortizacion As Integer = -1, Optional ImporteMX As Decimal = 0, Optional ImporteME As Decimal = 0, Optional CvePrePolizaOriginal As Integer = -1, Optional CveIEDevolucion As Integer = -1, Optional CveCredito As Integer = -1, Optional CveCuenta As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional Contabilizable As Boolean = True, Optional TipoCambio As Decimal = 1, Optional CveOCDetalle As Integer = -1, Optional TipoCambioPago As Decimal = 1, Optional PorcentajeImpuesto As Decimal = 0, Optional CveNominaMovtoPermanente As Integer = -1) As Boolean @@ -968,8 +966,6 @@ Public Class ClsContabilidad .Add("@CveCredito", SqlDbType.Int).Value = CveCredito .Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto .Add("@Contabilizable", SqlDbType.Bit).Value = If(Contabilizable, 1, 0) - .Add("@CveAcreedor", SqlDbType.Int).Value = CveAcreedor - .Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva .Add("@CveCreditoDetalle", SqlDbType.Int).Value = CveCreditoDetalle .Add("@PorcentajeImpuesto", SqlDbType.Money).Value = PorcentajeImpuesto .Add("@CveNominaMovtoPermanente", SqlDbType.Money).Value = CveNominaMovtoPermanente @@ -1014,6 +1010,19 @@ Public Class ClsContabilidad Return Retorno End Function + Public Function AddPrePolizasDetalle(CvePrePoliza As Integer, TipoMovimiento As Boolean, Importe As Decimal, Referencia As String, CveConceptoContable As Integer, Concepto As String, IdCtaContable As Integer, + Optional CveIE As Integer = -1, Optional CveVenta As Integer = -1, Optional CveCompra As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1, + Optional CvePersonal As Integer = -1, Optional CveMovimientoAlmacen As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCreditoDetalle As Integer = -1, + Optional CveOC As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveVentaAmortizacion As Integer = -1, Optional CveCompraAmortizacion As Integer = -1, Optional ImporteMX As Decimal = 0, Optional ImporteME As Decimal = 0, + Optional CvePrePolizaOriginal As Integer = -1, Optional CveIEDevolucion As Integer = -1, Optional CveCredito As Integer = -1, Optional CveCuenta As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional Contabilizable As Boolean = True, + Optional TipoCambio As Decimal = 1, Optional CveOCDetalle As Integer = -1, Optional TipoCambioPago As Decimal = 1, Optional PorcentajeImpuesto As Decimal = 0, Optional CveNominaMovtoPermanente As Integer = -1) As Boolean + Dim Retorno As Boolean = False + Retorno = AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe, Referencia, CveConceptoContable, Concepto, New DateTime(1900, 1, 1), IdCtaContable, -1, CveIE, CveVenta, CveCompra, CveSubProyecto, CveCliente, CveProveedor, CvePersonal, + CveMovimientoAlmacen, CveActivoFijo, CveColectiva, CveCreditoDetalle, CveOC, CveClasificacion, CveVentaAmortizacion, CveCompraAmortizacion, ImporteMX, ImporteME, CvePrePoliza, CveIEDevolucion, CveCredito, CveCuenta, CveTipoGasto, Contabilizable, + TipoCambio, CveOCDetalle, TipoCambioPago, PorcentajeImpuesto, CveNominaMovtoPermanente) + Return Retorno + End Function + Public Function ObtenerConceptoEmpresa(CveEmpresa As Integer, CveConcepto As Integer, NombreComercial As String, SerieFolio As String, FolioBancario As String, Optional Adicional As String = "") As String Dim Concepto As String = "" @@ -1196,7 +1205,7 @@ Public Class ClsContabilidad ElseIf ex.Message.Contains("IDX_UN_ContaPrePolizasCveEmpresaCveTipoPolizaFoliosAnioMes") Then OnError($"El Folio {Folio} ya esta registrado.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) Else - OnError("Ocurrió un error al contabilizar las prepoliza detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al contabilizar las prepoliza detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End If End Try Return Retorno diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index 23bde4820..17a30f6bb 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -6,10 +6,10 @@ Imports System.Data.SqlClient Imports Extensiones Public Class ClsContratos - Implements IDisposable - + Implements IDisposable + #Region "Campos" - 'SQL + 'SQL Private SqlConexion As SqlConnection Private SqlAdapter As SqlDataAdapter Private Data As DataTable @@ -18,9 +18,9 @@ Public Class ClsContratos Private disposedValue As Boolean = False ' Para detectar llamadas redundantes 'REGISTRAR CONEXIONES ABIERTAS Private CveConexion As Integer = 0 - Private EsTransaccionCompartida As Boolean = False + Private EsTransaccionCompartida As Boolean = False #End Region - + #Region "Propiedades" Public ReadOnly Property DtResultados() As DataTable Get @@ -87,11 +87,11 @@ Public Class ClsContratos End With Data = New DataTable If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc - End Sub - + End Sub + #End Region #Region "Conexiones" - + Private Sub ConexionAdd() If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then Try @@ -124,9 +124,9 @@ Public Class ClsContratos CveConexion = 0 End If - End Sub + End Sub #End Region - + #Region "P R O P I E D A D E S - C O N T R A T O S" Public Property CveContrato As Integer Public Property NumeroContrato As String @@ -1659,9 +1659,9 @@ Public Class ClsContratos End Try Return Retorno - End Function + End Function #End Region - + #Region " C O N T R A T O S - S E C C I O N E S" Public Function GetContratosSecciones(CveCliente As Integer, CveContrato As Integer, CveSeccion As Integer, CveClasificacion As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -1979,10 +1979,10 @@ Public Class ClsContratos End Try Return Retorno - End Function - + End Function + #End Region - + #Region "S U B - T O T A L E S - D E T A L L E S" Public Function GetSubTotalesDetalle(CveEmpresa As Integer) As Boolean @@ -2002,13 +2002,13 @@ Public Class ClsContratos Return Retorno - End Function - - + End Function + + #End Region - + #Region " E S T I M A C I O N E S " - + Public Function AddEstimaciones(CveContrato As Integer, FechaEstimacion As DateTime, CveCompra As Integer, CveVenta As Integer, CveContratosSecciones As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -2209,10 +2209,10 @@ Public Class ClsContratos End Try Return Retorno - End Function - + End Function + #End Region - + #Region "C O N C E P T O S " Public Function AddContratoConcepto(CveContrato As Integer, CveSubConcepto As Integer, Porcentaje As Double, Importe As Double) As Boolean @@ -2339,12 +2339,12 @@ Public Class ClsContratos OnError("Ocurrió un error al eliminar un Tipo de Contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno - End Function - - + End Function + + #End Region - - + + #Region "T I P O S C O N T R A T O S" Public Function GetContratosTipos(CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -2411,12 +2411,12 @@ Public Class ClsContratos OnError("Ocurrió un error al eliminar un Tipo de Contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno - End Function - + End Function + #End Region - + #Region "T I P O S C O N T R A T O S" - + Public Function UpdateMovimientoContrato(CveContrato As Integer, CveMovimiento As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Con_MovimientosContratosUpdate") @@ -2447,11 +2447,11 @@ Public Class ClsContratos OnError("Ocurrió un error al Actualizar un Tipo de Contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno - End Function - + End Function + #End Region - - + + Public Function AddContratosAceptados(CveVenta As Integer, Concepto As String, CveProyecto As Integer, CveEmpresa As Integer, CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Contratos_Aceptado") @@ -2663,11 +2663,11 @@ Public Class ClsContratos End Try Return Retorno - End Function - + End Function + #End Region - - + + #Region " REPORTE BUSQUEDA" Public Function GetContratosBusquedaRep(TipoVenta As Integer, CveContratoTipo As Integer, NumeroContrato As String, DescripcionContrato As String, Ubicacion As String, Responsable As String, EstatusContrato As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveCliente As Integer, CveProveedor As Integer, @@ -2702,12 +2702,12 @@ Public Class ClsContratos End Try Return Retorno - End Function + End Function #End Region - - - - + + + + #Region "Periodos Facturacion" Public Function AddPeriodosFacturacion(Nombre As String, Dias As Integer, CveEmpresa As Integer, CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False @@ -2785,11 +2785,11 @@ Public Class ClsContratos End Try Return Retorno - End Function - + End Function + #End Region - - + + #Region "Addendum" Public Function GetContratosAddendum(CveContrato As Integer) As Boolean Dim Retorno = False @@ -2854,7 +2854,7 @@ Public Class ClsContratos End Try Return Retorno - End Function + End Function #Region " PRESUPUESTOS " Public Function AddPresupuesto(Nombre As String, Observacion As String, CveSubProyecto As Integer, FechaInicio As Date, FechaFin As Date, Estatus As Integer, Archivo As String, FechaIng As DateTime, CveUsuario As Integer, CveEmpresa As Integer) As Integer @@ -3258,10 +3258,10 @@ Public Class ClsContratos End Try Return Retorno - End Function - + End Function + #End Region - + #Region "REFRENDOS" Public Function AddRefrendo(CveCliente As Integer, Descripcion As String, Fecha As DateTime, FechaVencimiento As DateTime, CveUsuarioCreo As Integer, CveEmpresa As Integer, ClienteEspecifico As String, Optional CodigoProveedor As String = "-1", Optional CveTipoDocto As Integer = -1, Optional CveEstatus As Integer = -1, Optional LigaDocto As String = "-1") As Boolean @@ -3379,10 +3379,10 @@ Public Class ClsContratos End Try Return Retorno - End Function - + End Function + #End Region - + #Region "FIANZAS" Public Function AddContratoFianza(CveContrato As Integer, Folio As String, CveEstatusFianza As Integer, FechaVencimiento As Date, Adjunto As String) As Boolean Dim Retorno As Boolean = False @@ -3463,9 +3463,9 @@ Public Class ClsContratos End Try Return Retorno - End Function + End Function #End Region - + #Region "NOTIFICACIONES EN LINEA" Public Function GetNotificacionesEnLinea(CveEmpresa As Integer, CveTipoNotificacion As Integer) As Boolean Dim Retorno As Boolean = False @@ -3484,10 +3484,10 @@ Public Class ClsContratos End Try Return Retorno - End Function - + End Function + #End Region - + #Region "NOMENCLATURA CONTRATO" Public Function GetContratoNomenclatura(Serie As String, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -3505,10 +3505,10 @@ Public Class ClsContratos End Try Return Retorno - End Function - + End Function + #End Region - + #Region "IMPUESTOS LOCALES" Public Function AddContratoImpuestosLocales(CveContrato As Integer, CveVentaDeduccion As Integer) As Boolean Dim Retorno As Boolean = False @@ -3561,9 +3561,9 @@ Public Class ClsContratos End Try Return Retorno - End Function + End Function #End Region - + Public Function GetRepDevolucionesPedidos(CveContrato As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveEstatus As Integer, Tipo As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False Dataset = New DataSet() @@ -3667,7 +3667,7 @@ Public Class ClsContratos ConexionClose() Dispose(True) GC.SuppressFinalize(Me) - End Sub + End Sub #End Region - + End Class diff --git a/App_Code/ClsDG.vb b/App_Code/ClsDG.vb index 1c44c0193..9a3f09070 100644 --- a/App_Code/ClsDG.vb +++ b/App_Code/ClsDG.vb @@ -3,9 +3,9 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient -Imports Extensiones -Imports System.Net Imports System.IO +Imports System.Net +Imports Extensiones Public Class ClsDG Implements IDisposable diff --git a/App_Code/ClsDesarrollo.vb b/App_Code/ClsDesarrollo.vb index c3694ced1..d796cb2cb 100644 --- a/App_Code/ClsDesarrollo.vb +++ b/App_Code/ClsDesarrollo.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsDesarrollo Implements IDisposable @@ -224,7 +222,7 @@ Public Class ClsDesarrollo Public Function DesarrolloDetalleAddUpdate(CveDesarrolloDetalle As Integer, CveDesarrollo As Integer, CveDesarrolloDetalleTipo As Integer, Descripcion As String, Comentario As String, - Estatus As Integer, CveUsuario As Integer, P1 As Integer, P2 As Integer, P3 As Integer, CvePrioridad as integer ) As Boolean + Estatus As Integer, CveUsuario As Integer, P1 As Integer, P2 As Integer, P3 As Integer, CvePrioridad as integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_DES_DesarrolloDetalleAddUpdate") diff --git a/App_Code/ClsEdocumentacion.vb b/App_Code/ClsEdocumentacion.vb index 3bce49ab7..d9ea682f3 100644 --- a/App_Code/ClsEdocumentacion.vb +++ b/App_Code/ClsEdocumentacion.vb @@ -7,10 +7,10 @@ Imports Extensiones Public Class ClsEdocumentacion - Implements IDisposable - + Implements IDisposable + #Region "Campos" - 'SQL + 'SQL Private SqlConexion As SqlConnection Private SqlAdapter As SqlDataAdapter Private SqlTransacc As SqlTransaction @@ -40,8 +40,8 @@ Public Class ClsEdocumentacion Get DSResultados = DSet End Get - End Property - + End Property + #End Region Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing) @@ -106,7 +106,7 @@ Public Class ClsEdocumentacion CveConexion = 0 End If - End Sub + End Sub #End Region Public Function IniciaTransacSQL() As SqlTransaction If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction() @@ -125,11 +125,11 @@ Public Class ClsEdocumentacion Get DtResultados = Data End Get - End Property - + End Property + #Region "D O C U M E N T A C I O N " - - + + Public Function DocumentacionGet(CveDocumentacion As Integer, CveDocumentacionTipo As Integer, Estatus As Integer, CveEmpresa As Integer, Optional Modulo As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -809,6 +809,6 @@ Public Class ClsEdocumentacion ConexionClose() Dispose(True) GC.SuppressFinalize(Me) - End Sub + End Sub #End Region End Class diff --git a/App_Code/ClsEdosFinancieros.vb b/App_Code/ClsEdosFinancieros.vb index 89b5ea2b1..e4de8be79 100644 --- a/App_Code/ClsEdosFinancieros.vb +++ b/App_Code/ClsEdosFinancieros.vb @@ -1,9 +1,9 @@ Option Strict On Option Explicit On -Imports Extensiones Imports System.Data Imports System.Data.SqlClient +Imports Extensiones Public Class ClsEdosFinancieros Implements IDisposable diff --git a/App_Code/ClsEncuestas.vb b/App_Code/ClsEncuestas.vb index a5848e63b..49e72f00e 100644 --- a/App_Code/ClsEncuestas.vb +++ b/App_Code/ClsEncuestas.vb @@ -1,7 +1,6 @@ Imports System.Data -Imports Extensiones Imports System.Data.SqlClient -Imports Microsoft.VisualBasic +Imports Extensiones Public Class ClsEncuestas Implements IDisposable diff --git a/App_Code/ClsEsquemasComisiones.vb b/App_Code/ClsEsquemasComisiones.vb index dc2e03932..c5343c3af 100644 --- a/App_Code/ClsEsquemasComisiones.vb +++ b/App_Code/ClsEsquemasComisiones.vb @@ -4,7 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports Microsoft.VisualBasic Public Class ClsEsquemasComisiones Implements IDisposable diff --git a/App_Code/ClsEstatusFactura.vb b/App_Code/ClsEstatusFactura.vb index 9cf75cf64..11c8ad64a 100644 --- a/App_Code/ClsEstatusFactura.vb +++ b/App_Code/ClsEstatusFactura.vb @@ -202,7 +202,7 @@ Public Class ClsEstatusFactura Dim Retorno As Boolean = False DataAdapter("PA_EstatusFacturaRemove") - + SqlAdapter.SelectCommand.Parameters.Add("@CveEstatusFactura", SqlDbType.Int).Value = CveEstatusFactura Try diff --git a/App_Code/ClsEventos.vb b/App_Code/ClsEventos.vb index e08351f16..02fccac02 100644 --- a/App_Code/ClsEventos.vb +++ b/App_Code/ClsEventos.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsEventos Implements IDisposable diff --git a/App_Code/ClsFISConfiguracion.vb b/App_Code/ClsFISConfiguracion.vb index 52d7365c5..3e694b8d1 100644 --- a/App_Code/ClsFISConfiguracion.vb +++ b/App_Code/ClsFISConfiguracion.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsFISConfiguracion Implements IDisposable diff --git a/App_Code/ClsFlotillas.vb b/App_Code/ClsFlotillas.vb index f9ff51f34..10ea41055 100644 --- a/App_Code/ClsFlotillas.vb +++ b/App_Code/ClsFlotillas.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsFlotillas Implements IDisposable diff --git a/App_Code/ClsGPS.vb b/App_Code/ClsGPS.vb index d67b7f3d8..f1f307ee8 100644 --- a/App_Code/ClsGPS.vb +++ b/App_Code/ClsGPS.vb @@ -1,11 +1,10 @@ Imports System.Data -Imports Microsoft.VisualBasic -Imports Extensiones Imports System.Data.SqlClient -Imports Newtonsoft.Json.Linq -Imports System.Net Imports System.IO +Imports System.Net +Imports Extensiones Imports Newtonsoft.Json +Imports Newtonsoft.Json.Linq Public Class ClsGPS Implements IDisposable diff --git a/App_Code/ClsGPSHerramientas.vb b/App_Code/ClsGPSHerramientas.vb index 2d0c6e456..f0a8eefc7 100644 --- a/App_Code/ClsGPSHerramientas.vb +++ b/App_Code/ClsGPSHerramientas.vb @@ -1,8 +1,6 @@ Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsGPSHerramientas Implements IDisposable diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 8a780eaf9..069d43b09 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -1,7 +1,5 @@ Option Strict On Option Explicit On - -Imports System Imports System.Data Imports System.Data.SqlClient Imports Extensiones diff --git a/App_Code/ClsGralEncuestas.vb b/App_Code/ClsGralEncuestas.vb index 497fcf74d..e45e268eb 100644 --- a/App_Code/ClsGralEncuestas.vb +++ b/App_Code/ClsGralEncuestas.vb @@ -1,6 +1,5 @@ Imports System.Data Imports Extensiones -Imports Microsoft.VisualBasic Public Class ClsGralEncuestas Inherits ClsBase diff --git a/App_Code/ClsGralFolios.vb b/App_Code/ClsGralFolios.vb index 6c5f231b4..44608558c 100644 --- a/App_Code/ClsGralFolios.vb +++ b/App_Code/ClsGralFolios.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsGralFolios Implements IDisposable diff --git a/App_Code/ClsImpuestos.vb b/App_Code/ClsImpuestos.vb index 28d2929e3..8f410fac2 100644 --- a/App_Code/ClsImpuestos.vb +++ b/App_Code/ClsImpuestos.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsImpuestos Implements IDisposable diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index e3f5320b7..318ff16ff 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1,7 +1,5 @@ Option Explicit On Option Strict On - -Imports System Imports System.Data Imports System.Data.SqlClient Imports Extensiones diff --git a/App_Code/ClsLeyendasFiscales.vb b/App_Code/ClsLeyendasFiscales.vb index 429a00b01..14da05f6f 100644 --- a/App_Code/ClsLeyendasFiscales.vb +++ b/App_Code/ClsLeyendasFiscales.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsLeyendasFiscales Implements IDisposable diff --git a/App_Code/ClsMF.vb b/App_Code/ClsMF.vb index e49c01e47..518bbc842 100644 --- a/App_Code/ClsMF.vb +++ b/App_Code/ClsMF.vb @@ -1,9 +1,6 @@ Imports System.Data -Imports Microsoft.VisualBasic -Imports Extensiones Imports System.Data.SqlClient -Imports System -Imports System.IO +Imports Extensiones Public Class ClsMF Implements IDisposable diff --git a/App_Code/ClsMetodosPagos.vb b/App_Code/ClsMetodosPagos.vb index e21006c56..fb55322f8 100644 --- a/App_Code/ClsMetodosPagos.vb +++ b/App_Code/ClsMetodosPagos.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsMetodosPagos Implements IDisposable diff --git a/App_Code/ClsModulos.vb b/App_Code/ClsModulos.vb index 7c8e84877..19610b9bd 100644 --- a/App_Code/ClsModulos.vb +++ b/App_Code/ClsModulos.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsModulos Implements IDisposable diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 2961cf3d4..552e8a6e6 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -3028,7 +3028,7 @@ Public Class ClsNominas 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()) + OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function diff --git a/App_Code/ClsOIEventos.vb b/App_Code/ClsOIEventos.vb index bc70c3569..41770f405 100644 --- a/App_Code/ClsOIEventos.vb +++ b/App_Code/ClsOIEventos.vb @@ -63,10 +63,10 @@ Public Class ObjEventosCorreo Public Property ListPara As List(Of String) End Class Public Class ClsOIEventos - Implements IDisposable - + Implements IDisposable + #Region "Campos" - 'SQL + 'SQL Private SqlConexion As SqlConnection Private SqlAdapter As SqlDataAdapter Private SqlTransacc As SqlTransaction @@ -75,16 +75,16 @@ Public Class ClsOIEventos Private disposedValue As Boolean = False ' Para detectar llamadas redundantes 'PARA REGISTRAR CONEXION Private CveConexion As Integer = 0 - Private EsTransaccionCompartida As Boolean = False - + Private EsTransaccionCompartida As Boolean = False + #End Region - + #Region "Propiedades" Public ReadOnly Property DtResultados() As DataTable Get DtResultados = Data End Get - End Property + End Property #Region "Propiedades de la tabla OI_Eventos" Public Property CveEvento As Integer Public Property CveTipoEvento As Integer @@ -147,11 +147,11 @@ Public Class ClsOIEventos Public Property EmpresaSop As String Public Property Modulo As String Public Property Datos As String - Public Property Importe As Double - - + Public Property Importe As Double + + #End Region - + #End Region Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing) @@ -182,9 +182,9 @@ Public Class ClsOIEventos objCorreo = Nothing Data = New DataTable If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc - End Sub + End Sub #Region "Conexiones" - + Private Sub ConexionAdd() If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then @@ -219,7 +219,7 @@ Public Class ClsOIEventos CveConexion = 0 End If - End Sub + End Sub #End Region Public Sub IniciaTransacSQL() SqlTransacc = SqlConexion.BeginTransaction() @@ -229,16 +229,16 @@ Public Class ClsOIEventos End Sub Public Sub Commit() SqlTransacc.Commit() - End Sub + End Sub #Region "Correo" Private Function GetDominio() As String Return HttpContext.Current.Request.Url.ToString().Replace(HttpContext.Current.Request.Url.PathAndQuery, "") End Function - Public Property objCorreo As ObjEventosCorreo - + Public Property objCorreo As ObjEventosCorreo + #End Region #Region "Cuestionario" - + Public Function GetUnoaUnoCuestionario_Usuarios(cveUnoaUnoCuestionario As Integer, cveUsuario As Integer, CveSeguir As Integer) As Boolean Dim retorno As Boolean = False DataAdapter("PA_OI_UnoaUnoCuestionario_UsuariosGet", CommandType.StoredProcedure) @@ -404,7 +404,7 @@ Public Class ClsOIEventos OnError("Ocurrió un error al agregar el cuestionario.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno - End Function + End Function #End Region #Region "uno a uno" Public Function GetUnoAUnoSiguiendoA(CveUsuario As Integer, CveUsuarioSeguidor As Integer, cveEmpresa As Integer, Optional Fechastr As String = "") As Boolean @@ -525,7 +525,7 @@ Public Class ClsOIEventos End Try Return retorno - End Function + End Function #End Region #Region "Trello" Public Function GetTablero(cveTablero As Int32, cveUsuario As Int32, cveEmpresa As Int32) As Boolean @@ -687,10 +687,10 @@ Public Class ClsOIEventos OnError("Ocurrió un error al eliminar la Lista.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno - End Function + End Function #End Region #Region "oieventos2.0" - + Public Function GetOiInicio(CveEmpresa As Integer, CveUsuario As Integer) As Boolean Dim retorno As Boolean = False DataAdapter("PA_OI_InicioReport", CommandType.StoredProcedure) @@ -1179,9 +1179,9 @@ Public Class ClsOIEventos 'EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC) End If Return Retorno - End Function - - + End Function + + #Region "CRUD_cheklist" Public Function Getcheklist(cveEvento As Int32) As Boolean Dim retorno As Boolean = False @@ -1281,9 +1281,9 @@ Public Class ClsOIEventos OnError("Ocurrió un error al eliminar el checklist.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return retorno - End Function + End Function #End Region - + Public Function AddUPEventoArchivo(CveEvento As Integer, Archivo As String, CveUsuario As Integer, cveEmpresa As Int32) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OI_EventosArchivoAddUP") @@ -1446,11 +1446,11 @@ Public Class ClsOIEventos 'EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC) End If Return Retorno - End Function + End Function #End Region - - - + + + #Region "E V E N T O S" Public Function GetEvento(CveEvento As Integer, CveUsuarioConsulta As Integer, CveEmpresa As Integer) As Boolean Dim Retorno = GetEventos(CveEvento, -1, -1, "-1", "-1", -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, CveUsuarioConsulta, CveEmpresa) @@ -1905,10 +1905,10 @@ Public Class ClsOIEventos End Try Return Retorno - End Function - + End Function + #End Region - + #Region "E V E N T O S - U S U A R I O S" Public Function GetEventosUsuario(CveEvento As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -2005,11 +2005,11 @@ Public Class ClsOIEventos End Try Return Retorno - End Function + End Function #End Region - + #Region "E V E N T O S - C O M E N T A R I O S " - + Public Function GetEventosComentarios(CveEvento As Integer, Optional CveEventoComentario As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OI_EventosComentariosGet") @@ -2067,10 +2067,10 @@ Public Class ClsOIEventos End Try Return Retorno - End Function - + End Function + #End Region - + #Region " Agregar Usuarios para" Public Function AddPara(ByVal CveEvento As Integer, ByVal CveUsuario As Integer) As Boolean @@ -2092,9 +2092,9 @@ Public Class ClsOIEventos End Try Return Retorno - End Function + End Function #End Region - + #Region "A C T U A L I Z A R - U S U A R I O P A R A " Public Function UpdateEventoPara(ByVal CveEvento As Integer, ByVal CveUsuario As Integer) As Boolean 'Dim Retorno As Boolean = False @@ -2114,9 +2114,9 @@ Public Class ClsOIEventos 'End Try Return True - End Function + End Function #End Region - + #Region "T I P O S E V E N T O S" Public Function GetTipoEventos(pCveTipoEvento As Integer) As Boolean Dim Retorno As Boolean = False @@ -2137,10 +2137,10 @@ Public Class ClsOIEventos End Try Return Retorno - End Function - + End Function + #End Region - + #Region "E S T A T U S E V E N T O S" Public Function GetEstatusEventos(CveEventoEstatus As Integer) As Boolean Dim Retorno As Boolean = False @@ -2187,13 +2187,13 @@ Public Class ClsOIEventos End Try Return Retorno - End Function + End Function #End Region - - - + + + #Region " R E V I S I O N E S" - + Public Function GetRevisionesEventos(CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OI_RevisionesGet") @@ -2251,11 +2251,11 @@ Public Class ClsOIEventos End Try Return Retorno - End Function + End Function #End Region - - - + + + #Region "T A R E A" Public Function AddEventoTarea(Asunto As String, Descripcion As String, Prioridad As Integer, CveUsuarioDe As Integer, CveUsuarioPara As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveEventoPadre As Integer, Orden As Double, CveRevision As Integer, Archivo As String, CveActivoFijo As Integer, CveIE As Integer, CveProspecto As Integer, CveCliente As Integer, @@ -2272,8 +2272,8 @@ Public Class ClsOIEventos Retorno = GetEventos(-1, 1, -1, "-1", "-1", -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, CveUsuario, -1, CveEmpresa) Return Retorno - End Function - + End Function + #Region "T A R E A S - EVENTOS - ASIGNARON - ASIGNADAS - CCP" Public Function GetEventosUsuarioCCP(CveUsuario As Integer, CveEmpresa As Integer, CveTipoEvento As Integer, CveRevision As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveEventoEstatus As Integer) As Boolean Dim Retorno As Boolean = False @@ -2422,10 +2422,10 @@ Public Class ClsOIEventos End Try Return Retorno - End Function + End Function #End Region #End Region - + #Region "A G E N D A" Public Function AddEventoAgenda(CveAgendaTipo As Integer, Asunto As String, Descripcion As String, Prioridad As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveUsuarioIng As Integer, CveEmpresa As Integer, Optional CveActivoFijo As Integer = -1, Optional CveIE As Integer = -1, Optional CveProspecto As Integer = -1, Optional CveCliente As Integer = -1, @@ -2447,10 +2447,10 @@ Public Class ClsOIEventos Retorno = GetEventos(-1, 2, -1, "-1", "-1", -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, CveUsuario, -1, CveEmpresa) Return Retorno - End Function - + End Function + #End Region - + #Region "A G E N D A - T I P O" Public Function GetAgendaTipo() As Boolean Dim Retorno As Boolean = False @@ -2465,9 +2465,9 @@ Public Class ClsOIEventos End Try Return Retorno - End Function + End Function #End Region - + #Region "P R O Y E C T O" Public Function AddEventoProyecto(Asunto As String, Descripcion As String, Prioridad As Integer, CveUsuarioDe As Integer, CveUsuarioPara As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveEventoPadre As Integer, CveRevision As Integer, Archivo As String, CveActivoFijo As Integer, CveIE As Integer, CveProspecto As Integer, CveCliente As Integer, @@ -2477,9 +2477,9 @@ Public Class ClsOIEventos Retorno = AddEvento(3, -1, Asunto, Descripcion, Prioridad, CveUsuarioDe, CveUsuarioPara, FechaInicio, FechaFin, -1, CveRevision, Archivo, CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, CvePersonal, CveProveedor, CveEventoPadre:=CveEventoPadre) Return Retorno - End Function + End Function #End Region - + #Region "C O N T R O L - V E R S I O N E S" Public Function AddEventoControlVersionesDoctos(Asunto As String, Descripcion As String, Archivo As String, CveUsuarioIng As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -2487,9 +2487,9 @@ Public Class ClsOIEventos Retorno = AddEvento(4, -1, Asunto, Descripcion, 1, -1, -1, ("01/01/1799").ToDate, ("01/01/1799").ToDate, -1, -1, "-1", CveUsuarioIng, CveEmpresa) Return Retorno - End Function + End Function #End Region - + #Region "M I N U T A" Public Function AddEventoMinuta(Asunto As String, Descripcion As String, Acuerdos As String, CveUsuarioDe As Integer, CveUsuarioPara As Integer, FechaInicio As DateTime, Archivo As String, CveUsuarioIng As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -2497,9 +2497,9 @@ Public Class ClsOIEventos Retorno = AddEvento(5, -1, Asunto, Descripcion, 1, -1, -1, FechaInicio, ("01/01/1799").ToDate, -1, -1, "-1", CveUsuarioIng, CveEmpresa, -1, -1, -1, -1, -1, -1, -1, -1) Return Retorno - End Function + End Function #End Region - + #Region "N O R M A T I V I D A D" Public Function GetEventoNormatividad(CveEmpresa As Integer) As Boolean Dim Retorno As Boolean @@ -2519,20 +2519,20 @@ Public Class ClsOIEventos Retorno = UpdateEvento(Titulo, Observaciones, 1, -1, -1, ("01/01/1799").ToDate, ("01/01/1799").ToDate, -1, tArchivo, CveEvento) Return Retorno - End Function - + End Function + #End Region - + #Region "B I T A C O R A" - 'Public Function AddEventoBitacora(Descripcion As String, tArchivo As String, CveActivoFijo As Integer, CveIE As Integer, CveProspecto As Integer, CveCliente As Integer, - ' CveOS As Integer, CveOC As Integer, CvePersonal As Integer, CveProveedor As Integer, CveCompra As Integer, CveUsuarioIng As Integer, CveEmpresa As Integer) As Boolean - ' Dim Retorno As Boolean = False - - ' Retorno = AddEvento(6, -1, "", Descripcion, 1, -1, -1, ("01/01/1799").ToDate, ("01/01/1799").ToDate, -1, tArchivo, CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, CvePersonal, CveProveedor, CveCompra) - - ' Return Retorno - 'End Function - + 'Public Function AddEventoBitacora(Descripcion As String, tArchivo As String, CveActivoFijo As Integer, CveIE As Integer, CveProspecto As Integer, CveCliente As Integer, + ' CveOS As Integer, CveOC As Integer, CvePersonal As Integer, CveProveedor As Integer, CveCompra As Integer, CveUsuarioIng As Integer, CveEmpresa As Integer) As Boolean + ' Dim Retorno As Boolean = False + + ' Retorno = AddEvento(6, -1, "", Descripcion, 1, -1, -1, ("01/01/1799").ToDate, ("01/01/1799").ToDate, -1, tArchivo, CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, CvePersonal, CveProveedor, CveCompra) + + ' Return Retorno + 'End Function + Public Function AddEventoBitacora(Descripcion As String, tArchivo As String, CveUsuarioIng As Integer, CveEmpresa As Integer, Optional CveActivoFijo As Integer = -1, Optional CveIE As Integer = -1, Optional CveProspecto As Integer = -1, Optional CveCliente As Integer = -1, Optional CveOS As Integer = -1, Optional CveOC As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, @@ -2614,11 +2614,11 @@ Public Class ClsOIEventos Retorno = RemoveEvento(CveEvento, CveEmpresa) Return Retorno - End Function - + End Function + #End Region - - + + #Region "SOPORTE " Public Function AddEventoSoporte(Asunto As String, Descripcion As String, Prioridad As Integer, CveUsuarioDe As Integer, CveUsuarioPara As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveEventoPadre As Integer, Orden As Double, CveRevision As Integer, Archivo As String, CveActivoFijo As Integer, CveIE As Integer, CveProspecto As Integer, CveCliente As Integer, @@ -2630,9 +2630,9 @@ Public Class ClsOIEventos CveUsuarioSop:=CveUsuarioSop, Persona:=Persona, Telefono:=Telefono, Extension:=Extension, Clasificacion:=Clasificacion, Desarrollo:=Desarrollo, CveEmpresaSop:=CveEmpresaSop, CveModulo:=CveModulo, Email:=Email, Datos:=Datos) Return Retorno - End Function + End Function #End Region - + #Region "R E P O R T E G A S T O S F I J O S" Public Function GetGastoMensual(FechaInicio As String, FechaFin As String, CveEmpresa As Integer, Prioridad As Integer, CveEventoEstatus As Integer, CveUsuarioIng As Integer) As Boolean @@ -2658,9 +2658,9 @@ Public Class ClsOIEventos End Try Return Retorno - End Function + End Function #End Region - + #Region "Circular" Public Function GetCircular(CveEmpresa As Integer, Optional CveCircular As Integer = -1, Optional FechaI As String = "-1", Optional FechaF As String = "-1", Optional CveUsuario As Integer = -1) As Boolean @@ -2765,13 +2765,13 @@ Public Class ClsOIEventos End Try Return Retorno - End Function - - + End Function + + #End Region - + #Region "OI_Documentos" - + #Region "OI_DocumentosCategorias" Public Function GetDocumentoCategoria(Optional CveCategoria As Integer = -1, Optional Categoria As String = "-1") As Boolean @@ -2855,9 +2855,9 @@ Public Class ClsOIEventos End Try Return Retorno - End Function + End Function #End Region - + #Region "OI_DocumentosSubCategoria" Public Function GetDocumentoSubCategoria(Optional CveSubCategoria As Integer = -1, Optional SubCategoria As String = "-1", Optional CveCategoria As Integer = -1) As Boolean @@ -2942,9 +2942,9 @@ Public Class ClsOIEventos End Try Return Retorno - End Function + End Function #End Region - + #Region "Documentos" Public Function ListadoDocumentos(CveEmpresa As Integer) As Boolean @@ -3068,9 +3068,9 @@ Public Class ClsOIEventos End Try Return Retorno - End Function + End Function #End Region - + #Region "OI_DocumentosAutorizacion" Public Function AddDocumentoAutorizacion(CveDocumento As Integer, CveUsuario As Integer, Adjunto As String) As Boolean @@ -3154,12 +3154,12 @@ Public Class ClsOIEventos End Try Return Retorno - End Function + End Function #End Region - + #End Region - - ' IDisposable + + ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) If Not disposedValue Then If disposing Then @@ -3177,16 +3177,16 @@ Public Class ClsOIEventos ' TODO: Establecer campos grandes como Null. End If disposedValue = True - End Sub - + End Sub + #Region " IDisposable Support " - ' Visual Basic agregó este código para implementar correctamente el modelo descartable. + ' Visual Basic agregó este código para implementar correctamente el modelo descartable. Public Sub Dispose() Implements IDisposable.Dispose ' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean). ConexionClose() Dispose(True) GC.SuppressFinalize(Me) - End Sub + End Sub #End Region - + End Class \ No newline at end of file diff --git a/App_Code/ClsPV.vb b/App_Code/ClsPV.vb index 62724f041..0e44deb77 100644 --- a/App_Code/ClsPV.vb +++ b/App_Code/ClsPV.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsPV Implements IDisposable diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index b9e31dd39..9a65e56ef 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1,22 +1,14 @@ Option Strict On Option Explicit On - -Imports System Imports System.Data -Imports Extensiones -Imports System.Web.Security -Imports System.Web Imports System.IO -Imports Microsoft.Reporting.WebForms -Imports iTextSharp.text.pdf +Imports System.Net.Http +Imports System.Xml Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared -Imports CrystalDecisions.ReportSource -Imports Stimulsoft.Report -Imports System.Xml -Imports System.Web.Http.ValueProviders -Imports ADServerControl -Imports System.Net.Http +Imports Extensiones +Imports iTextSharp.text.pdf +Imports Microsoft.Reporting.WebForms Imports Newtonsoft.Json Imports Newtonsoft.Json.Linq diff --git a/App_Code/ClsPresupuestos.vb b/App_Code/ClsPresupuestos.vb index 54c45a729..b920feb35 100644 --- a/App_Code/ClsPresupuestos.vb +++ b/App_Code/ClsPresupuestos.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsPresupuestos Implements IDisposable @@ -749,7 +747,7 @@ Public Class ClsPresupuestos End Function - + ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) If Not disposedValue Then diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 4363a44e2..3bc1b22f7 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Imports Modelos Public Class ClsProductosServicios diff --git a/App_Code/ClsProsEncuestas.vb b/App_Code/ClsProsEncuestas.vb index 7a74c21c6..f15472b0d 100644 --- a/App_Code/ClsProsEncuestas.vb +++ b/App_Code/ClsProsEncuestas.vb @@ -24,7 +24,7 @@ Public Class ClsProsEncuestas #Region "Propiedades" Public Property CveProspecto As Integer - + Public ReadOnly Property DtResultados() As DataTable Get diff --git a/App_Code/ClsProyectos.vb b/App_Code/ClsProyectos.vb index 030fc7686..38f6a15dd 100644 --- a/App_Code/ClsProyectos.vb +++ b/App_Code/ClsProyectos.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsProyectos Implements IDisposable diff --git a/App_Code/ClsPuntoVenta.vb b/App_Code/ClsPuntoVenta.vb index bd388c409..bae4421c5 100644 --- a/App_Code/ClsPuntoVenta.vb +++ b/App_Code/ClsPuntoVenta.vb @@ -142,7 +142,7 @@ Public Class ClsPuntoVenta DataAdapter("PA_Vta_CortesDetallesGet") SqlAdapter.SelectCommand.Parameters.Add("@CveCorte", SqlDbType.Int).Value = CveCorte - + Try SqlAdapter.Fill(Data) Retorno = True @@ -399,7 +399,7 @@ Public Class ClsPuntoVenta Try SqlAdapter.Fill(Data) Retorno = True - Catch ex As Exception + Catch ex As Exception OnError("Ocurrió un error al obtener los Movimientos de Caja del Cortes del Punto de Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index 3668afa90..685365dad 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -7,10 +7,10 @@ Imports Extensiones Public Class ClsRH - Implements IDisposable - + Implements IDisposable + #Region "Campos" - 'SQL + 'SQL Private SqlConexion As SqlConnection Private SqlAdapter As SqlDataAdapter Private SqlTransacc As SqlTransaction @@ -41,17 +41,17 @@ Public Class ClsRH Public Sub Commit() SqlTransacc.Commit() - End Sub - + End Sub + #End Region - + #Region "Propiedades" Public ReadOnly Property DSResultados() As DataSet Get DSResultados = DSet End Get - End Property - + End Property + #End Region Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing) @@ -81,11 +81,11 @@ Public Class ClsRH Data = New DataTable End Sub Private CveConexion As Integer = 0 - Private EsTransaccionCompartida As Boolean = False - - + Private EsTransaccionCompartida As Boolean = False + + #Region "Conexiones" - + Private Sub ConexionAdd() If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then @@ -437,9 +437,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function + End Function #End Region - + #Region "ClsRHDepartamentos" Public Function GetDepartamentos() As Boolean Dim Retorno As Boolean = False @@ -526,10 +526,10 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - + End Function + #End Region - + #Region "ClsRHDocumentos" Public Function GetDocumentos() As Boolean Dim Retorno As Boolean = False @@ -602,9 +602,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function + End Function #End Region - + #Region "ClsRHEscolaridad" Public Function GetEscolaridades() As Boolean Dim Retorno As Boolean = False @@ -694,10 +694,10 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - + End Function + #End Region - + #Region "ClsRHEstadoCivil" Public Function GetEstadoCivil() As Boolean Dim Retorno As Boolean = False @@ -788,10 +788,10 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - + End Function + #End Region - + #Region "ClsRHEstatusEmpleado" Public Function GetEstatusEmpleado() As Boolean Dim Retorno As Boolean = False @@ -809,9 +809,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function + End Function #End Region - + #Region "ClsRHEstatusPersonal" Public Function GetEstatusPersonal() As Boolean Dim Retorno As Boolean = False @@ -899,9 +899,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function + End Function #End Region - + #Region "ClsRHGenero" Public Function GetGeneros() As Boolean Dim Retorno As Boolean = False @@ -989,9 +989,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function + End Function #End Region - + #Region "ClsRHJornadas" Public Function GetJornadas() As Boolean Dim Retorno As Boolean = False @@ -1061,10 +1061,10 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - + End Function + #End Region - + #Region "ClsRHMotivoBaja" Public Function GetMotivoBaja() As Boolean Dim Retorno As Boolean = False @@ -1152,9 +1152,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function + End Function #End Region - + #Region "ClsRHMotivosHorasExtras" Public Function GetMotivoHorasExtras() As Boolean Dim Retorno As Boolean = False @@ -1240,9 +1240,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function + End Function #End Region - + #Region "ClsRHNominas" Public Function GetPreNomina(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -1419,13 +1419,13 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - + End Function + #End Region - + #Region "ClsRHPersonal" #Region "Propiedades" - 'Datos Personales + 'Datos Personales Public Property CvePersonal As Integer 'Public Property Nombre As String Public Property APaterno As String @@ -1547,11 +1547,11 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Get DtResultados = Data End Get - End Property + End Property #End Region - + #Region "Personal" - + Public Function GetPersonal(CvePersonal As Integer, Codigo As String, Nombre As String, NSS As String, RFC As String, CveTurno As Integer, CvePuesto As Integer, CveDepartamento As Integer, CveRuta As Integer, CveEscolaridad As Integer, CveEstadoCivil As Integer, CveGenero As Integer, CveEstatusPersonal As Integer, CveSubProyecto As Integer, CveClienteAsignado As Integer, HorarioTrabajo As String, CveSupervisor As Integer, @@ -2393,12 +2393,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - + End Function + #End Region - + #Region "Conceptos de Nómina" - + Public Function GetPersonalConceptos(CvePersonal As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -2470,11 +2470,11 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function + End Function #End Region - + #Region "Asistencias" - + Public Function GetAsistenciasPeriodo(CvePeriodo As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -2679,9 +2679,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function + End Function #End Region - + #Region "Asistencias Detalles" Public Function GetAsistenciasDetalle() As Boolean Dim Retorno As Boolean = False @@ -2781,12 +2781,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Me.OnError("Ocurrió un error al eliminar la asistencia.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno - End Function - + End Function + #End Region - + #Region "Nominas" - + Public Function GetNominas(CvePersonal As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -2804,10 +2804,10 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - + End Function + #End Region - + #Region "Lista de asistencias" Public Function GetListaAsistencias(CveSubProyecto As Integer, CveTurno As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -2825,11 +2825,11 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function + End Function #End Region - + #Region "Reportes" - + Public Function GetCumpleañeros() As Boolean Dim Retorno As Boolean = False @@ -2873,13 +2873,13 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - + End Function + #End Region - + #Region "Buzón de Calidad" - - + + Public Function AddBuzonCalidad(CvePersonal As Integer, CveCliente As Integer, CveClienteSucursal As Integer, CveTipoBuzon As Integer, FechaQueja As DateTime, Descripcion As String, NombreReporto As String, TelefonoReporto As String, MailReporto As String, Observaciones As String, CveEmpresa As Integer, CveUsuario As Integer) As Boolean Dim Retorno As Boolean @@ -3047,10 +3047,10 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function + End Function #End Region #End Region - + #Region "ClsRHPuestos" Public Function GetPuestos(CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -3145,9 +3145,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function + End Function #End Region - + #Region "ClsRHRuta" Public Function GetRutas() As Boolean Dim Retorno As Boolean = False @@ -3235,9 +3235,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function + End Function #End Region - + #Region "ClsRHTipoBuzon" Public Function GetTipoBuzon() As Boolean Dim Retorno As Boolean = False @@ -3324,10 +3324,10 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - + End Function + #End Region - + #Region "ClsRHTiposContratos" Public Function GetTiposContrato() As Boolean Dim Retorno As Boolean = False @@ -3415,10 +3415,10 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - + End Function + #End Region - + #Region "ClsRHTurnos" Public Function GetTurnos() As Boolean Dim Retorno As Boolean = False @@ -3540,15 +3540,15 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - - + End Function + + #End Region - - - + + + #Region "ClsRHPuestosSueldos" - + Public Function GetPuestosSueldos(CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_RH_PuestosSueldosGet") @@ -3676,14 +3676,14 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function - - - + End Function + + + #End Region - - - + + + #Region "ClsRHPersonalRequerido" Public Function GetPersonalRequerido(CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -3776,10 +3776,10 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - + End Function + #End Region - + #Region "ClsRHReportePersonalNecesidades" Public Function GetReportePersonalNecesidades(CveTurno As Integer, CveProyecto As Integer, tCveSubProyeto As Integer, Estatus As Integer, CveEmpresa As Integer, CveDepartamento As Integer) As Boolean Dim Retorno As Boolean = False @@ -3801,9 +3801,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo OnError("Ocurrió un error al obtener el Reporte de Necesidades de Personal", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno - End Function + End Function #End Region - + #Region "ClsRHReporteRotacionPersonal" Public Function GetReporteRotacionPersonal(FechaInicio As Date, FechaFin As Date, CveTurno As Integer, CveProyecto As Integer, CveSubProyeto As Integer, CveEmpresa As Integer) As Boolean @@ -3828,10 +3828,10 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function - + End Function + #End Region - + #Region "ClsRHReporteAusentismoLaboral" Public Function GetReporteAusentismoLaboral(FechaInicio As Date, FechaFin As Date, CveTurno As Integer, CveProyecto As Integer, CveSubProyeto As Integer, CveEmpresa As Integer) As Boolean @@ -3856,11 +3856,11 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function - + End Function + #End Region - - + + #Region " ORGANIGRAMA " Public Function AddUpdatePersonalOrganigrama(CvePersonal As Integer, CvePersonalPadre As Integer) As Boolean Dim Retorno As Boolean = False @@ -3900,12 +3900,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function + End Function #End Region - - + + #Region "C H E C A D O R E S T A C I O N E S" - + Public Function DdlChecadorTipoGet(CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_RH_DdlChecadorTipoGet") @@ -3940,17 +3940,17 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - - + End Function + + #End Region - - + + #Region "C-U-R-S-O-S R A I Z" - + #Region "C U R S O S" - - 'PA_RH_PersonalCursosGet + + 'PA_RH_PersonalCursosGet Public Function PersonalCursosGet(CvePersonal As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -4115,13 +4115,13 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - - + End Function + + #End Region - - - + + + #Region "G R U P O S" Public Function CursoGrupoGet(CveCurso As Integer, CveEmpresa As Integer, Optional Filtro As Integer = 1) As Boolean Dim Retorno As Boolean = False @@ -4236,14 +4236,14 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function - - + End Function + + #End Region - - + + #Region "CATALOGO NACIONAL AREAS TEMATICAS" - + Public Function CatalogoNacionalOcupacionesCombosGet() As Boolean Dim Retorno As Boolean = False @@ -4258,12 +4258,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function - + End Function + #End Region - + #Region "C U R S O S - T E M A S" - + Public Function TemasGet(Estatus As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -4364,12 +4364,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo OnError("Ocurrió un error al Eliminar el Tema TemasRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno - End Function - + End Function + #End Region - + #Region "C U R S O S - S U B T E M A S" - + Public Function SubtemasGet(CveTema As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -4465,14 +4465,14 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo OnError("Ocurrió un error al Eliminar el Subtema SubtemaRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno - End Function - - - + End Function + + + #End Region - + #Region "C U R S O S - C A P A C I T A D O R E S" - + Public Function CapacitadoresGet(CveCapacitador As Integer, Estatus As Integer, Externo As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -4573,16 +4573,16 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function - - - + End Function + + + #End Region - + #Region "C U R S O S C O N S T A N C I A S" - - 'PA_RH_PersonalConstancia - + + 'PA_RH_PersonalConstancia + Public Function PersonalConstanciaGet(CveCurso As Integer, CvePersonal As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -4603,15 +4603,15 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - - + End Function + + #End Region #End Region - - + + #Region "R E C L U T A M I E N T O" - + #Region "Familiares" Public Function PersonalFamiliaresGet(CveFamiliar As Integer, CvePersonal As Integer) As Boolean Dim Retorno As Boolean = False @@ -4720,11 +4720,11 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function + End Function #End Region - + #Region "ESCOLARIDAD" - + Public Function PersonalEscolaridadGet(CveEscolaridad As Integer, CvePersonal As Integer) As Boolean Dim Retorno As Boolean = False @@ -4822,12 +4822,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function - + End Function + #End Region - + #Region "VALIDACION REFERENCIAS" - + Public Function PersonalReferenciasVerificacionGet(CvePersonal As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -4871,12 +4871,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function - + End Function + #End Region - + #Region "REFERENCIAS LABORALES" - + Public Function PersonalReferenciasLaboralesGet(CveReferenciaLaboral As Integer, CvePersonal As Integer) As Boolean Dim Retorno As Boolean = False @@ -4993,12 +4993,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function - + End Function + #End Region - + #Region "REFERENCIAS PERSONALES" - + Public Function PersonalReferenciasPersonalesGet(CveReferenciaPersonal As Integer, CvePersonal As Integer) As Boolean Dim Retorno As Boolean = False @@ -5097,13 +5097,13 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function - + End Function + #End Region - + #Region "DATOS GENERALES" - - + + Public Function PersonalReclutamientoAdd( Nombres As String, APaterno As String, @@ -5405,11 +5405,11 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function + End Function #End Region - + #Region "EXPEDIENTE" - + Public Function EstatusIngresoGet(CveEmpresa As Integer, Estatus As Integer) As Boolean Dim Retorno As Boolean = False @@ -5517,78 +5517,78 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function - - 'Public Function PersonalEntrevistaAdd(CvePersonal As Integer, CveReferenciaLaboral As Integer, CveEncuesta As Integer, CvePregunta As Integer, ValorInt As Integer, ValorStr As String, CveUsuario As Integer) As Boolean - ' Dim Retorno As Boolean = False - - ' SqlDataAdapter("PA_RH_PersonalEntrevistasAdd") - ' With SqlAdapter.SelectCommand.Parameters - ' .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal - ' .Add("@CveEncuesta", SqlDbType.Int).Value = CveEncuesta - ' .Add("@CvePregunta", SqlDbType.Int).Value = CvePregunta - ' .Add("@ValorInt", SqlDbType.Int).Value = ValorInt - ' .Add("@ValorStr", SqlDbType.VarChar).Value = ValorStr - ' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario - ' End With - - ' Try - ' SqlAdapter.Fill(Data) - ' Retorno = True - ' Catch ex As Exception - ' OnError("Ocurrió un error al agregar la resgistros de Entrevista.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - ' End Try - - ' Return Retorno - - 'End Function - - 'Public Function PersonalEntrevistaGet(CvePersonal As Integer, CveReferenciaLaboral As Integer, CveTipoPregunta As Integer) As Boolean - ' Dim Retorno As Boolean = False - - ' SqlDataAdapter("PA_RH_PersonalEntrevistasGet") ' - - ' With SqlAdapter.SelectCommand.Parameters - ' .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal - ' .Add("@CveTipoPregunta", SqlDbType.Int).Value = CveTipoPregunta - ' .Add("@CveReferenciaLaboral", SqlDbType.Int).Value = CveReferenciaLaboral - ' End With - - ' Try - ' SqlAdapter.Fill(Data) - ' Retorno = True - ' Catch ex As Exception - ' OnError("Ocurrió un error al obtener la entrevista.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - ' End Try - - ' Return Retorno - - 'End Function - - 'Public Function PersonalEntrevistaRemove(CvePersonal As Integer) As Boolean - ' Dim Retorno As Boolean = False - - ' SqlDataAdapter("PA_RH_PersonalEntrevistasRemove") - - ' With SqlAdapter.SelectCommand.Parameters - ' .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal - ' End With - - ' Try - ' SqlAdapter.Fill(Data) - ' Retorno = True - ' Catch ex As Exception - ' OnError("Ocurrió un error al eliminar la entrevista.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - ' End Try - - ' Return Retorno - - 'End Function - + End Function + + 'Public Function PersonalEntrevistaAdd(CvePersonal As Integer, CveReferenciaLaboral As Integer, CveEncuesta As Integer, CvePregunta As Integer, ValorInt As Integer, ValorStr As String, CveUsuario As Integer) As Boolean + ' Dim Retorno As Boolean = False + + ' SqlDataAdapter("PA_RH_PersonalEntrevistasAdd") + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + ' .Add("@CveEncuesta", SqlDbType.Int).Value = CveEncuesta + ' .Add("@CvePregunta", SqlDbType.Int).Value = CvePregunta + ' .Add("@ValorInt", SqlDbType.Int).Value = ValorInt + ' .Add("@ValorStr", SqlDbType.VarChar).Value = ValorStr + ' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + ' End With + + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al agregar la resgistros de Entrevista.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + + ' Return Retorno + + 'End Function + + 'Public Function PersonalEntrevistaGet(CvePersonal As Integer, CveReferenciaLaboral As Integer, CveTipoPregunta As Integer) As Boolean + ' Dim Retorno As Boolean = False + + ' SqlDataAdapter("PA_RH_PersonalEntrevistasGet") ' + + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + ' .Add("@CveTipoPregunta", SqlDbType.Int).Value = CveTipoPregunta + ' .Add("@CveReferenciaLaboral", SqlDbType.Int).Value = CveReferenciaLaboral + ' End With + + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al obtener la entrevista.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + + ' Return Retorno + + 'End Function + + 'Public Function PersonalEntrevistaRemove(CvePersonal As Integer) As Boolean + ' Dim Retorno As Boolean = False + + ' SqlDataAdapter("PA_RH_PersonalEntrevistasRemove") + + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + ' End With + + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al eliminar la entrevista.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + + ' Return Retorno + + 'End Function + #End Region - + #Region "C A R A C T E R I S T I C A S" - + Public Function CaracteristicasGet(CveCaracteristica As Integer, CvePersonal As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -5718,15 +5718,15 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - - + End Function + + #End Region - + #End Region - + #Region "S U B P R O Y E C T O Z O N A S" - + Public Function SubproyectoZonaGet(CveSubProyectoZona As Integer, CveSubproyecto As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -5797,13 +5797,13 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - - + End Function + + #End Region - + #Region "V A C A C I O N E S" - + Public Function VacacionesResumenGet(CvePersonal As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -5993,17 +5993,17 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - - - - + End Function + + + + #End Region - - + + #Region "C H E C A D O R" - - + + Public Function ChecadorHorariosGet(CveChecadorHorario As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -6328,13 +6328,13 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function - + End Function + #End Region - + #Region "ZONA HORARIA" - - + + Public Function ZonasHorarias(Estatus As Integer) As Boolean Dim Retorno As Boolean = False @@ -6352,15 +6352,15 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function - + End Function + #End Region - - - - + + + + #Region "PRE ASISTENACIA " - + Public Function PreAsistenciaFechaSugeridaGet(CveTipoPeriodo As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -6439,13 +6439,13 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function - + End Function + #End Region - - + + #Region "DESCARTAR CANDIDATO" - + Public Function DescartarCandidato(CvePersonal As Integer, MotivoDescartado As String, Descartar As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -6493,12 +6493,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function - - - + End Function + + + #End Region - + #Region "CAPTACION" Public Function CaptacionCatalogoGet(CveCaptacion As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -6568,13 +6568,13 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function - + End Function + #End Region - - + + #Region "UNIFORMES" - + Public Function UniformeGet(CveUniforme As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -6777,12 +6777,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function + End Function #End Region - - + + #Region "LISTA ASISTENCIA" - + Public Function GetListaAsistencia(Fecha As Date, CveSubproyecto As Integer, CveDepartamento As Integer, CveSupervisor As Integer, CveClienteAsignado As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -6877,13 +6877,13 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function - + End Function + #End Region - - + + #Region "T A G S - RH " - + Public Function GetDatosTagsDocumentos(CvePersonal As Integer, CveEmpresa As Integer) As List(Of TagsDocumentos) Dim ListaTagsDocumentost = New List(Of TagsDocumentos) @@ -7029,12 +7029,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return MesString - End Function - - - + End Function + + + #End Region - + #Region "DIRECTORIO TELEFONICO" Public Function DirectorioTelefonicoGet(CveEmpresa As Integer, Optional CveEstatus As Integer = 1) As Boolean Dim Retorno As Boolean = False @@ -7056,12 +7056,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno - End Function - + End Function + #End Region - + #Region "APLICACION SIG" - + Public Function UpdatePersonalApp(CvePersonal As Integer, CveTurno As Integer, CveDepartamento As Integer, CvePuesto As Integer, CveSubProyecto As Integer, CveClienteAsignado As Integer) As Boolean Dim Retorno As Boolean = False SqlDataAdapter("PA_RH_PersonalAppUpdate") @@ -7080,12 +7080,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo OnError("Ocurrió un error al actualizar el personal desde la aplicación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno - End Function - + End Function + #End Region - + #Region "PAGO DE FACTURAS DE PERSONAL" - + Public Function GetPersonalPagoFactura(CvePersonal As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_RH_PersonalPagoFacturaGet") @@ -7102,10 +7102,10 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo OnError("Ocurrió un error al obtener los pagos de factura de personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno - End Function - + End Function + #End Region - + #Region "Checador" Public Function GetChecadores(CveChecador As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -7423,7 +7423,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo ConexionClose() Dispose(True) GC.SuppressFinalize(Me) - End Sub + End Sub #End Region End Class Public Class RequestAddChecadorRegistro diff --git a/App_Code/ClsSAT.vb b/App_Code/ClsSAT.vb index 62d6f4521..f0650949d 100644 --- a/App_Code/ClsSAT.vb +++ b/App_Code/ClsSAT.vb @@ -1,17 +1,11 @@ Option Strict On Option Explicit On -Imports System.Net Imports System.Data -Imports System.IO -Imports Extensiones -Imports System.Data.OleDb -Imports System.Globalization -Imports GemBox.Spreadsheet Imports System.Data.SqlClient - - -Imports Microsoft.VisualBasic +Imports System.Net +Imports Extensiones +Imports GemBox.Spreadsheet Public Class ClsSAT Implements IDisposable diff --git a/App_Code/ClsSisEmpresas.vb b/App_Code/ClsSisEmpresas.vb index 5a0ddaf30..8d06d1397 100644 --- a/App_Code/ClsSisEmpresas.vb +++ b/App_Code/ClsSisEmpresas.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsSisEmpresas Implements IDisposable diff --git a/App_Code/ClsSisNotificaciones.vb b/App_Code/ClsSisNotificaciones.vb index c2406c5ee..4547acac5 100644 --- a/App_Code/ClsSisNotificaciones.vb +++ b/App_Code/ClsSisNotificaciones.vb @@ -2,37 +2,23 @@ Imports System.Data Imports System.Data.SqlClient -Imports Extensiones -Imports System -Imports System.Configuration Imports System.IO Imports System.Net Imports System.Net.Http - -Imports Microsoft.AspNet.SignalR -Imports Microsoft.Reporting.WebForms -Imports System.Security.Cryptography -Imports System.Web.Security -Imports System.Web -Imports itextsharp.text.pdf Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared -Imports CrystalDecisions.ReportSource -Imports Stimulsoft.Report -Imports Stimulsoft.Report.Dictionary -Imports Stimulsoft.Report.MobileDesign -Imports System.Linq -Imports Stimulsoft.Report.Export -Imports Newtonsoft.Json.Linq -Imports System.Xml +Imports Extensiones Imports GemBox.Spreadsheet +Imports Microsoft.AspNet.SignalR +Imports Microsoft.Reporting.WebForms +Imports Newtonsoft.Json.Linq Public Class ClsSisNotificaciones - Implements IDisposable - - + Implements IDisposable + + #Region "C A M P O S" - 'SQL + 'SQL Private SqlConexion As SqlConnection Private SqlAdapter As SqlDataAdapter Private SqlCommand As SqlCommand @@ -98,7 +84,7 @@ Public Class ClsSisNotificaciones Public Property DTReportesProgramados As DataTable Public Property DTNotificacionesGPS As DataTable Public Property DTNotificacionesERP As DataTable - Public Property DTNotificacionesArmadas As DataTable + Public Property DTNotificacionesArmadas As DataTable #End Region Sub New() SqlConexion = New SqlConnection @@ -122,9 +108,9 @@ Public Class ClsSisNotificaciones .CommandType = TipoComando End With Data = New DataTable - End Sub + End Sub #Region "Conexiones" - + Private Sub ConexionAdd() If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then @@ -196,10 +182,10 @@ Public Class ClsSisNotificaciones End Select - End Sub - + End Sub + #End Region - + #Region "L O G I C A - N O T I F I C A C I O N E S" Private Sub NotificarEdicionOC(CveOrdenCompra As Integer, CveEstatus As Integer) Select Case CveEstatus @@ -222,11 +208,11 @@ Public Class ClsSisNotificaciones End Select - End Sub + End Sub #End Region - + #Region "C O R R E O" - + Private Sub EnviarCorreos(DTNotificacionesCorreo As DataTable) For Each notificacion As DataRow In DTNotificacionesCorreo.Rows Dim Hilo As New System.Threading.Thread(Sub() MandaMail(notificacion("CveNotificacionBitacora").ToString.ToEntero, notificacion("Encabezado").ToString, notificacion("Cuerpo").ToString, notificacion("Correo").ToString, "")) @@ -1510,12 +1496,12 @@ Public Class ClsSisNotificaciones Next Return dt - End Function - + End Function + #End Region - - - + + + Private Sub EnviarNotificacionesGPS() Try If DTNotificacionesGPS IsNot Nothing Then @@ -1764,10 +1750,10 @@ Public Class ClsSisNotificaciones Catch ex As Exception OnError("Ocurrio un error al enviar la notificación.", ex) End Try - End Sub - + End Sub + #End Region - + #Region "N O T I F I C A C I O N E S - P R O C E D I M I E N T O S G E N E R A L E S" Public Function GetNotificaciones(CveNotificacion As Integer) As Boolean Dim Retorno As Boolean = False @@ -1974,62 +1960,62 @@ Public Class ClsSisNotificaciones End Try Return Retorno - End Function - - 'Public Function ArmarReporteProgramado(NotificacionBitacora As Integer) As Boolean - ' Dim Retorno As Boolean = False - ' DataAdapter("PA_GPS_ReporteProgramadoGet") - - ' With SqlAdapter.SelectCommand.Parameters - ' .Add("@CveNotificacionBitacora", SqlDbType.Int).Value = NotificacionBitacora - ' End With - - ' Try - ' SqlAdapter.Fill(Data) - ' Retorno = True - ' Catch ex As Exception - ' OnError("Ocurrió un error al obtener los reportes programados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - ' End Try - - ' Return Retorno - 'End Function - 'Public Function ArmarReporteProgramadoParadas(NotificacionBitacora As Integer) As Boolean - ' Dim Retorno As Boolean = False - ' DataAdapter("PA_GPS_ReporteProgramadoParadasGet") - - ' With SqlAdapter.SelectCommand.Parameters - ' .Add("@CveNotificacionBitacora", SqlDbType.Int).Value = NotificacionBitacora - ' End With - - ' Try - ' SqlAdapter.Fill(Data) - ' Retorno = True - ' Catch ex As Exception - ' OnError("Ocurrió un error al obtener los reportes programados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - ' End Try - - ' Return Retorno - 'End Function - - 'Public Function ArmarReporteProgramadoHistorico(NotificacionBitacora As Integer) As Boolean - ' Dim Retorno As Boolean = False - ' DataAdapter("PA_GPS_ReporteProgramadoHistoricoGet") - - ' With SqlAdapter.SelectCommand.Parameters - ' .Add("@CveNotificacionBitacora", SqlDbType.Int).Value = NotificacionBitacora - ' End With - - ' Try - ' SqlAdapter.Fill(Data) - ' Retorno = True - ' Catch ex As Exception - ' OnError("Ocurrió un error al obtener los reportes programados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - ' End Try - - ' Return Retorno - 'End Function + End Function + + 'Public Function ArmarReporteProgramado(NotificacionBitacora As Integer) As Boolean + ' Dim Retorno As Boolean = False + ' DataAdapter("PA_GPS_ReporteProgramadoGet") + + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CveNotificacionBitacora", SqlDbType.Int).Value = NotificacionBitacora + ' End With + + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al obtener los reportes programados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + + ' Return Retorno + 'End Function + 'Public Function ArmarReporteProgramadoParadas(NotificacionBitacora As Integer) As Boolean + ' Dim Retorno As Boolean = False + ' DataAdapter("PA_GPS_ReporteProgramadoParadasGet") + + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CveNotificacionBitacora", SqlDbType.Int).Value = NotificacionBitacora + ' End With + + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al obtener los reportes programados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + + ' Return Retorno + 'End Function + + 'Public Function ArmarReporteProgramadoHistorico(NotificacionBitacora As Integer) As Boolean + ' Dim Retorno As Boolean = False + ' DataAdapter("PA_GPS_ReporteProgramadoHistoricoGet") + + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CveNotificacionBitacora", SqlDbType.Int).Value = NotificacionBitacora + ' End With + + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al obtener los reportes programados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + + ' Return Retorno + 'End Function #End Region - + #Region "N O T I F I C A C I O N E S - P R O C E D I M I E N T O S E S P E C I F I C O S" Public Function GetUsuariosNotifiacionOCAutorizada(CveOC As Integer) As Boolean 'Notifiacion #1 Dim Retorno As Boolean = False @@ -2067,9 +2053,9 @@ Public Class ClsSisNotificaciones End Try Return Retorno - End Function + End Function #End Region - + #Region "N O T I F I C A C I O N E S - U S U A R I O S" Public Function GetUsuariosNotificacion(CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False @@ -2159,10 +2145,10 @@ Public Class ClsSisNotificaciones End Try Return Retorno - End Function - + End Function + #End Region - + #Region "P D F" Public Function StreamPDF(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing) As Byte() Dim lrds As New List(Of ReportDataSource) @@ -2254,7 +2240,7 @@ Public Class ClsSisNotificaciones End If If MR IsNot Nothing Then MR.Dispose() Return Bytes - End Function + End Function #End Region Public Function ConsultarDirecciones(Dt As DataTable) As JArray Dim retorno As JArray = Nothing @@ -2360,6 +2346,6 @@ Public Class ClsSisNotificaciones ConexionClose() Dispose(True) GC.SuppressFinalize(Me) - End Sub + End Sub #End Region End Class diff --git a/App_Code/ClsSisParametros.vb b/App_Code/ClsSisParametros.vb index 31ee3bc15..5773f5b29 100644 --- a/App_Code/ClsSisParametros.vb +++ b/App_Code/ClsSisParametros.vb @@ -1,9 +1,7 @@ Imports System.Data Imports System.Data.SqlClient -Imports Extensiones -Imports System -Imports System.Configuration Imports System.Data.SqlTypes +Imports Extensiones Public Class ClsSisParametros Implements IDisposable diff --git a/App_Code/ClsSisProcesos.vb b/App_Code/ClsSisProcesos.vb index 573219743..5f7e1fd78 100644 --- a/App_Code/ClsSisProcesos.vb +++ b/App_Code/ClsSisProcesos.vb @@ -1,8 +1,6 @@ Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsSisProcesos Implements IDisposable diff --git a/App_Code/ClsSisRoles.vb b/App_Code/ClsSisRoles.vb index 89e0fa672..c6777a6eb 100644 --- a/App_Code/ClsSisRoles.vb +++ b/App_Code/ClsSisRoles.vb @@ -1,8 +1,6 @@ Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System.Configuration -Imports System Public Class ClsSisRoles Implements IDisposable diff --git a/App_Code/ClsSisUsuarios.vb b/App_Code/ClsSisUsuarios.vb index eb7315b61..fb2337fa3 100644 --- a/App_Code/ClsSisUsuarios.vb +++ b/App_Code/ClsSisUsuarios.vb @@ -4,15 +4,13 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsSisUsuarios - Implements IDisposable - - + Implements IDisposable + + #Region "Campos" - - 'SQL + + 'SQL Private SqlConexion As SqlConnection Private SqlAdapter As SqlDataAdapter Private SqlTransacc As SqlTransaction @@ -23,12 +21,12 @@ Public Class ClsSisUsuarios Private disposedValue As Boolean = False ' Para detectar llamadas redundantes 'PARA REGISTRAR CONEXION - Private CveConexion As Integer = 0 - + Private CveConexion As Integer = 0 + #End Region - + #Region "Propiedades" - + Public ReadOnly Property DtResultados() As DataTable Get DtResultados = Data @@ -62,9 +60,9 @@ Public Class ClsSisUsuarios Public Property CveSubProyecto As Integer Public Property AsignarAutomaticamenteSubProyecto As Boolean Public Property AsignarAutomaticamenteOC As Boolean - Public Property DescuentoAutorizado As Double + Public Property DescuentoAutorizado As Double #End Region - + Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing) If TransaccionCompartida Is Nothing Then @@ -92,9 +90,9 @@ Public Class ClsSisUsuarios End With If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc Data = New DataTable - End Sub + End Sub #Region "Conexiones" - + Private Sub ConexionAdd() If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then @@ -129,7 +127,7 @@ Public Class ClsSisUsuarios End If - End Sub + End Sub #End Region Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) With SqlCommand @@ -578,9 +576,9 @@ Public Class ClsSisUsuarios Return dTable - End Function + End Function #End Region - + #Region "U S U A R I O - E M P R E S A S " Public Function AddUsuariosEmpresas(CveUsuario As Integer, CveEmpresa As Integer, Optional CveUsuarioModifico As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -718,9 +716,9 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function + End Function #End Region - + #Region "U S U A R I O S" Public Function GetUsuarios(CveUsuario As Integer, Optional CveRol As Integer = -1, Optional CveUsuarioControlado As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -1060,9 +1058,9 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function + End Function #End Region - + #Region "B I T A C O R A D E U S A R I O S" Public Function GetBitacora(CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False @@ -1104,14 +1102,14 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function + End Function #End Region - + #Region "R O L E S" - - ''' - ''' Consulta para generar las opciones del MENU, Modulos que tiene un ususario - ''' + + ''' + ''' Consulta para generar las opciones del MENU, Modulos que tiene un ususario + ''' Public Function GetUsuariosRolesModulos(ByVal pCveUsuario As Integer, CveEmpresa As Integer) As DataTable DataAdapter("PA_Sis_UsuariosRolesModulosGet") @@ -1143,9 +1141,9 @@ Public Class ClsSisUsuarios End Try Return Data - End Function + End Function #End Region - + #Region "U S U A R I O S - M O D U L O S" Public Function GetUsuariosModulos(CveUsuario As Integer, CveEmpresa As Integer, Optional CveUsuarioActual As Integer = -1, Optional CvePlataforma As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -1234,9 +1232,9 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function + End Function #End Region - + #Region "U S U A R I O S - D I S P O S I T I V O S" Public Function UpdateUsuariosDispositivos(CveUsuario As Integer, CveDispositivo As Integer, Permitir As Boolean) As Boolean Dim Retorno As Boolean = False @@ -1261,9 +1259,9 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function + End Function #End Region - + #Region "U S U A R I O S - C O M A N D O S" Public Function UpdateUsuariosComandos(CveUsuario As Integer, CveUsuarioAsigno As Integer, CveComando As Integer, Permitir As Boolean, EsFavorito As Boolean) As Boolean Dim Retorno As Boolean = False @@ -1290,10 +1288,10 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function + End Function #End Region - - + + #Region "U S U A R I O S - P R O C E S O S " Public Function GetUsuariosProcesos(CveUsuario As Integer, Optional CveUsuarioActual As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -1381,11 +1379,11 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function + End Function #End Region - + #Region "U S U A R I O S - P O R T AL " - + Public Function GetUsuariosPortal(pCveUsuarioPortal As Integer, pCveCliente As Integer, pCveProveedor As Integer) As Boolean Dim Retorno As Boolean = False @@ -1487,12 +1485,12 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function - - + End Function + + #End Region - - + + #Region " S U B - P R O Y E C T O S " Public Function GetSubProyectos(CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False @@ -1574,10 +1572,10 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function - + End Function + #End Region - + #Region " E S T A T U S O C " Public Function GetEstatusOC(CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False @@ -1654,8 +1652,8 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function - + End Function + #End Region #Region "C L A S I F I C A C I O N E S" Public Function AddUsuariosClasificaciones(CveUsuario As Integer, CveClasificacion As Integer, CveUsuarioIng As Integer, CveUsuarioModifico As Integer) As Boolean @@ -1719,8 +1717,8 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function - + End Function + #End Region #Region " A L M A C E N " Public Function GetAlmacen(CveUsuario As Integer, CveEmpresa As Integer) As Boolean @@ -1803,9 +1801,9 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function + End Function #End Region - + Private Function GeneraMenu(CveUsuario As Integer, dtMenu As DataTable, Optional CvePlataforma As Integer = 1) As Boolean Dim Retorno As Boolean = False dtMenu.TableName = "UsuariosModulos" @@ -1834,10 +1832,10 @@ Public Class ClsSisUsuarios Return Retorno - End Function - - - + End Function + + + #Region " CLONAR USUARIOS " Public Function ClonarUsuario(CveUsuario As Integer, CveUsuarioClonado As Integer, UsuariosEmpresas As Boolean, UsuariosModulos As Boolean, UsuariosProcesos As Boolean, UsuariosSubProyectos As Boolean, UsuariosAlmacenes As Boolean, UsuariosOC As Boolean, UsuariosOS As Boolean) As Boolean Dim Retorno As Boolean = False @@ -1882,12 +1880,12 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function + End Function #End Region - - + + #Region " RESTRICCIONES ACCESO " - + Public Function UsuariosRestriccionesAccesoAdd(CveUsuario As Integer, IP As String, MAC As String, HI1 As String, HF1 As String, HI2 As String, HF2 As String, HI3 As String, HF3 As String, HI4 As String, HF4 As String, HI5 As String, HF5 As String, HI6 As String, HF6 As String, HI7 As String, HF7 As String, Optional CveUsuarioModifico As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -2014,10 +2012,10 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function + End Function #End Region - - + + #Region "ACTUALIZAR USUARIO RESPONSABLE MASIVAMENTE" Public Function UpdateUsuarioResponsableMasivo(CveUsuario As Integer, CveUsuarioResponsable As Integer) As Boolean Dim Retorno As Boolean = False @@ -2033,13 +2031,13 @@ Public Class ClsSisUsuarios OnError("Ocurrio un error al actualizar el Usuario Responsable.", ex) End Try Return Retorno - End Function - + End Function + #End Region - - + + #Region " ASIGNAR " - + #Region " ALMACEN ASIGNAR " Public Function GetAlmacenAsignar(CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False @@ -2096,9 +2094,9 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function + End Function #End Region - + #Region " SUBPROYECTOS ASIGNAR " Public Function GetSubProyectosAsignar(CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False @@ -2155,10 +2153,10 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function - + End Function + #End Region - + #Region " CUENTAS BANCARIAS " Public Function GetCuentasBancariasAsignar(CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False @@ -2215,10 +2213,10 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function - + End Function + #End Region - + #Region " MODULOS " Public Function GetModulosAsignar(CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -2276,10 +2274,10 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function - + End Function + #End Region - + #Region " PERMISOS " Public Function GetPermisosAsignar(CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -2336,10 +2334,10 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function - + End Function + #End Region - + #Region " EMPRESAS " Public Function GetEmpresasAsignar(CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False @@ -2396,10 +2394,10 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function - + End Function + #End Region - + #Region " ROLES " Public Function GetRolesAsignar(CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False @@ -2456,10 +2454,10 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function - + End Function + #End Region - + #Region " PERMISOS " Public Function GetIndicadoresAsignar(CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -2516,12 +2514,12 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function - + End Function + #End Region - + #End Region - + Public Function GetClienteGPSRolesModulos(ByVal pCveUsuario As Integer, CveCliente As Integer) As DataTable DataAdapter("PA_Sis_ClienteGPSRolesModulosGet") @@ -2537,11 +2535,11 @@ Public Class ClsSisUsuarios End Try Return Data - End Function - - + End Function + + #Region "U S U A R I O S - GPS " - + Public Function ValidaUsuarioGPS(Clave As String, Usuario As String, Password As String) As Usuario Dim Retorno As Usuario = Nothing @@ -2939,11 +2937,11 @@ Public Class ClsSisUsuarios End Try Return Retorno - End Function - - + End Function + + #End Region - + #Region "IDisposable Support" Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then @@ -2965,9 +2963,9 @@ Public Class ClsSisUsuarios ConexionClose() Dispose(True) GC.SuppressFinalize(Me) - End Sub + End Sub #End Region - + End Class diff --git a/App_Code/ClsSubProyectos.vb b/App_Code/ClsSubProyectos.vb index 803ab02de..2a7518b5b 100644 --- a/App_Code/ClsSubProyectos.vb +++ b/App_Code/ClsSubProyectos.vb @@ -6,11 +6,11 @@ Imports System.Data.SqlClient Imports Extensiones Public Class ClsSubProyectos - Implements IDisposable - - + Implements IDisposable + + #Region "Campos" - 'SQL + 'SQL Private SqlConexion As SqlConnection Private SqlAdapter As SqlDataAdapter Private SqlTransacc As SqlTransaction @@ -18,20 +18,20 @@ Public Class ClsSubProyectos Private disposedValue As Boolean = False ' Para detectar llamadas redundantes 'PARA REGISTRAR CONEXION - Private CveConexion As Integer = 0 + Private CveConexion As Integer = 0 #End Region - + #Region "Propiedades" - + Public Property CveSubProyecto As Integer Public ReadOnly Property DtResultados() As DataTable Get DtResultados = Data End Get - End Property - + End Property + #End Region - + Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing) If TransaccionCompartida Is Nothing Then @@ -58,9 +58,9 @@ Public Class ClsSubProyectos End With If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc Data = New DataTable - End Sub + End Sub #Region "Conexiones" - + Private Sub ConexionAdd() If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then @@ -94,9 +94,9 @@ Public Class ClsSubProyectos CveConexion = 0 End If - End Sub + End Sub #End Region - + Public Function IniciaTransacSQL() As SqlTransaction If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction() Return SqlTransacc @@ -459,7 +459,7 @@ Public Class ClsSubProyectos ConexionClose() Dispose(True) GC.SuppressFinalize(Me) - End Sub + End Sub #End Region End Class diff --git a/App_Code/ClsSucursales.vb b/App_Code/ClsSucursales.vb index e1d19cca9..de03554ce 100644 --- a/App_Code/ClsSucursales.vb +++ b/App_Code/ClsSucursales.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsSucursales Implements IDisposable diff --git a/App_Code/ClsTSoft.vb b/App_Code/ClsTSoft.vb index 02b128961..5b28b15a6 100644 --- a/App_Code/ClsTSoft.vb +++ b/App_Code/ClsTSoft.vb @@ -1,18 +1,12 @@ -Imports Microsoft.VisualBasic -Imports System.Collections.Generic -Imports System.Linq -Imports System.Web -Imports System.Data -Imports System.Text +Imports System.Data Imports Extensiones -Imports System.Web.Configuration Public Class ClsTSoft Inherits ClsClaseBase Public Sub New(Optional adsObj As ClsClaseBase = Nothing) MyBase.New(adsObj) - End Sub + End Sub #Region "CRUD_Remisiones" Public Function AddRemisiones(FolioRemision As String, NoEconomico As String, CveEstatus As Integer, GeoInicial As String, GeoCarga As String, GeoEntrega As String, Fecha As Date) As Boolean Dim Retorno As Boolean = False @@ -164,10 +158,10 @@ Public Class ClsTSoft retorno = RunQuery("Ocurrió un error al eliminar el Remisiones.") strSQL.Clear() Return retorno - End Function + End Function #End Region #Region "Otros" - + Public Function UpEstatusRemision(FolioRemision As String, CveEstatus As Integer) As Boolean Dim strSQL As New StringBuilder() Dim retorno As Boolean = False @@ -201,9 +195,9 @@ Public Class ClsTSoft retorno = RunQuery("Ocurrió un error al agregar el Remisiones.") strSQL.Clear() Return retorno - End Function + End Function #End Region - + Protected Overloads Function RunQuery(msgOnError As String) As Boolean Dim retorno As Boolean = False diff --git a/App_Code/ClsTareasProgramadas.vb b/App_Code/ClsTareasProgramadas.vb index 926fb09b0..51e65dad6 100644 --- a/App_Code/ClsTareasProgramadas.vb +++ b/App_Code/ClsTareasProgramadas.vb @@ -1,10 +1,6 @@ Option Strict On Imports System.Data -Imports System.Collections.Generic -Imports System.Linq -Imports System.Web -Imports System.Text Imports System.Data.SqlClient Imports Extensiones diff --git a/App_Code/ClsTecnoMovil.vb b/App_Code/ClsTecnoMovil.vb index c82ce726c..0f3f22c8f 100644 --- a/App_Code/ClsTecnoMovil.vb +++ b/App_Code/ClsTecnoMovil.vb @@ -1,18 +1,16 @@ Option Strict On Option Explicit On - -Imports Microsoft.VisualBasic -Imports System.Net Imports System.IO +Imports System.Net Imports Extensiones Public Class ClsTecnoMovil - Public Enum TipoMensaje - AltaFolio = 1 - Programar = 2 - Solucion = 3 - End Enum + Public Enum TipoMensaje + AltaFolio = 1 + Programar = 2 + Solucion = 3 + End Enum Public Shared Sub SendMsg(Mensaje As String, Telefono As String) @@ -41,33 +39,33 @@ Public Class ClsTecnoMovil End Function Private Shared Function HttpGet(uri As String) As String - Dim stream As Stream - Dim reader As StreamReader - Dim response As String = Nothing - Dim webClient As New WebClient() + Dim stream As Stream + Dim reader As StreamReader + Dim response As String = Nothing + Dim webClient As New WebClient() - Using webClient - ' Check our auth details - Try - ' open and read from the supplied URI - stream = webClient.OpenRead(uri) - reader = New StreamReader(stream) - response = reader.ReadToEnd() - Catch ex As WebException - If TypeOf ex.Response Is HttpWebResponse Then - ' Add you own error handling as required - Select Case DirectCast(ex.Response, HttpWebResponse).StatusCode - Case HttpStatusCode.NotFound, HttpStatusCode.Unauthorized - response = Nothing - Exit Select - Case Else - Throw ex - End Select - End If - End Try - End Using + Using webClient + ' Check our auth details + Try + ' open and read from the supplied URI + stream = webClient.OpenRead(uri) + reader = New StreamReader(stream) + response = reader.ReadToEnd() + Catch ex As WebException + If TypeOf ex.Response Is HttpWebResponse Then + ' Add you own error handling as required + Select Case DirectCast(ex.Response, HttpWebResponse).StatusCode + Case HttpStatusCode.NotFound, HttpStatusCode.Unauthorized + response = Nothing + Exit Select + Case Else + Throw ex + End Select + End If + End Try + End Using - Return response - End Function + Return response + End Function End Class diff --git a/App_Code/ClsTemporal.vb b/App_Code/ClsTemporal.vb index 3b727f52c..75e1af8bf 100644 --- a/App_Code/ClsTemporal.vb +++ b/App_Code/ClsTemporal.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsTemporal Implements IDisposable diff --git a/App_Code/ClsTiposEventos.vb b/App_Code/ClsTiposEventos.vb index 76cb02e42..9da834644 100644 --- a/App_Code/ClsTiposEventos.vb +++ b/App_Code/ClsTiposEventos.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsTiposEventos Implements IDisposable diff --git a/App_Code/ClsUnidadesMedida.vb b/App_Code/ClsUnidadesMedida.vb index 542efe9bf..ce7dd2a8b 100644 --- a/App_Code/ClsUnidadesMedida.vb +++ b/App_Code/ClsUnidadesMedida.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsUnidadesMedida Implements IDisposable diff --git a/App_Code/ClsValidaCFDi.vb b/App_Code/ClsValidaCFDi.vb index c236c5bbb..91d1f960a 100644 --- a/App_Code/ClsValidaCFDi.vb +++ b/App_Code/ClsValidaCFDi.vb @@ -1,23 +1,22 @@ Imports System.IO -Imports System.Net Imports System.IO.Compression -Imports System.Text +Imports System.Net Imports Extensiones Public Class ClsValidaCFDi - Implements IDisposable - + Implements IDisposable + #Region "Campos" - 'Campos + 'Campos Private LFolioFiscal As String Private LRFCEmisor As String Private LRFCReceptor As String Private LImporte As Decimal - Private disposedValue As Boolean = False ' Para detectar llamadas redundantes + Private disposedValue As Boolean = False ' Para detectar llamadas redundantes #End Region - + #Region "Propiedades" - 'Propiedades + 'Propiedades Public Property EsValida As Integer Public Property Efecto As String Public Property FechaEmision As String @@ -267,10 +266,10 @@ Public Class ClsValidaCFDi Next Return DataBack.Trim - End Function - + End Function + #Region " IDisposable Support " - ' IDisposable + ' IDisposable Protected Overridable Sub Dispose(disposing As Boolean) If Not disposedValue Then If disposing Then @@ -288,7 +287,7 @@ Public Class ClsValidaCFDi ' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean). Dispose(True) GC.SuppressFinalize(Me) - End Sub + End Sub #End Region - + End Class diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 6984877cd..dd9049057 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsVentas Implements IDisposable diff --git a/App_Code/ClsVtaPromociones.vb b/App_Code/ClsVtaPromociones.vb index 3c11d5b04..1df18d9a2 100644 --- a/App_Code/ClsVtaPromociones.vb +++ b/App_Code/ClsVtaPromociones.vb @@ -4,8 +4,6 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient Imports Extensiones -Imports System -Imports System.Configuration Public Class ClsVtaPromociones Implements IDisposable diff --git a/App_Code/ClsVtaVendedores.vb b/App_Code/ClsVtaVendedores.vb index 11c021c2d..848ce0461 100644 --- a/App_Code/ClsVtaVendedores.vb +++ b/App_Code/ClsVtaVendedores.vb @@ -3,11 +3,11 @@ Imports System.Data.SqlClient Imports Extensiones Public Class ClsVtaVendedores - Implements IDisposable + Implements IDisposable #Region "Campos" - 'SQL - Private SqlConexion As SqlConnection + 'SQL + Private SqlConexion As SqlConnection Private SqlAdapter As SqlDataAdapter Private SqlTransacc As SqlTransaction Private SqlCommand As SqlCommand @@ -20,10 +20,10 @@ Public Class ClsVtaVendedores #Region "Propiedades" Public ReadOnly Property DtResultados() As DataTable - Get - DtResultados = Data - End Get - End Property + Get + DtResultados = Data + End Get + End Property #End Region @@ -219,28 +219,28 @@ Public Class ClsVtaVendedores Return Retorno End Function Public Function RemoveVendedor(CveVendedor As Integer) As Boolean - Dim Retorno As Boolean = False + Dim Retorno As Boolean = False - DataAdapter("PA_Vta_VendedoresRemove") + DataAdapter("PA_Vta_VendedoresRemove") - SqlAdapter.SelectCommand.Parameters.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + SqlAdapter.SelectCommand.Parameters.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch Ex1 As SqlException - If Ex1.Message.Contains("Número: 547;") Then - Alert("El Vendedor no se pudo eliminar porque está siendo usado por un registro.", TipoMensaje.MsgAdvertencia) - Else - Me.OnError("Ocurrió un error al eliminar el Vendedor.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End If - Catch ex As Exception - Me.OnError("Ocurrió un error al eliminar el Vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch Ex1 As SqlException + If Ex1.Message.Contains("Número: 547;") Then + Alert("El Vendedor no se pudo eliminar porque está siendo usado por un registro.", TipoMensaje.MsgAdvertencia) + Else + Me.OnError("Ocurrió un error al eliminar el Vendedor.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If + Catch ex As Exception + Me.OnError("Ocurrió un error al eliminar el Vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try - Return Retorno - End Function + Return Retorno + End Function Public Function TraspasarClientesVendedor(CveVendedorAnterior As Integer, CveVendedorNuevo As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -263,8 +263,8 @@ Public Class ClsVtaVendedores End Function ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) - If Not disposedValue Then - If disposing Then + If Not disposedValue Then + If disposing Then ' TODO: Liberar otro estado (objetos administrados). If Not Data Is Nothing Then Data.Dispose() : Data = Nothing If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing @@ -275,20 +275,20 @@ Public Class ClsVtaVendedores End If - ' TODO: Liberar su propio estado (objetos no administrados). - ' TODO: Establecer campos grandes como Null. - End If - disposedValue = True - End Sub + ' TODO: Liberar su propio estado (objetos no administrados). + ' TODO: Establecer campos grandes como Null. + End If + disposedValue = True + End Sub #Region " IDisposable Support " - ' Visual Basic agregó este código para implementar correctamente el modelo descartable. - Public Sub Dispose() Implements IDisposable.Dispose + ' Visual Basic agregó este código para implementar correctamente el modelo descartable. + Public Sub Dispose() Implements IDisposable.Dispose ' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean). ConexionClose() Dispose(True) - GC.SuppressFinalize(Me) - End Sub + GC.SuppressFinalize(Me) + End Sub #End Region End Class diff --git a/App_Code/CrystalParametro.vb b/App_Code/CrystalParametro.vb index 853421223..0e6ed9ce4 100644 --- a/App_Code/CrystalParametro.vb +++ b/App_Code/CrystalParametro.vb @@ -1,6 +1,4 @@ -Imports Microsoft.VisualBasic - -Public Class CrystalParametro +Public Class CrystalParametro Sub New(Nombre As String, Valor As Object) Me.Nombre = Nombre diff --git a/App_Code/Empresa.vb b/App_Code/Empresa.vb index 04f741dd0..1121e56d9 100644 --- a/App_Code/Empresa.vb +++ b/App_Code/Empresa.vb @@ -160,9 +160,9 @@ Public Class Empresa 'HybridDictionary, no se puede serializar, por eso no es propiedad, y se utilizar el setfuncionalidad, para asignarle valor Public Sub SetFuncionalidades(HD As HybridDictionary) Funcionalidades = HD - End Sub - Public Function Funcionalidad(CveFuncionalidad As Integer) As String - Return if(Funcionalidades IsNot Nothing AndAlso Funcionalidades.Item(CveFuncionalidad) IsNot Nothing, Funcionalidades.Item(CveFuncionalidad).ToString,"") + End Sub + Public Function Funcionalidad(CveFuncionalidad As Integer) As String + Return if(Funcionalidades IsNot Nothing AndAlso Funcionalidades.Item(CveFuncionalidad) IsNot Nothing, Funcionalidades.Item(CveFuncionalidad).ToString, "") End Function End Class diff --git a/App_Code/EntityModel.vb b/App_Code/EntityModel.vb index 193688795..91b537d48 100644 --- a/App_Code/EntityModel.vb +++ b/App_Code/EntityModel.vb @@ -1,5 +1,4 @@ -Imports Microsoft.VisualBasic -Namespace Modelos +Namespace Modelos 'like a modelos @@ -17,8 +16,8 @@ Namespace Modelos End Sub Public Sub setValues(row As System.Data.DataRow) If Not IsNothing(row) Then - Dim myType As Type = Me.GetType() - Dim props As IList(Of Reflection.PropertyInfo) = New List(Of Reflection.PropertyInfo)(myType.GetProperties()) + Dim myType As Type = Me.GetType() + Dim props As IList(Of Reflection.PropertyInfo) = New List(Of Reflection.PropertyInfo)(myType.GetProperties()) For Each prop As Reflection.PropertyInfo In props Dim attr = prop.GetCustomAttributesData() If Not (Not IsNothing(attr) AndAlso Not IsNothing(attr.FirstOrDefault(Function(M) M.AttributeType.Name = "NotMappedAttribute"))) Then diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb index bb4ef868d..8df3ed569 100644 --- a/App_Code/LogicNominas.vb +++ b/App_Code/LogicNominas.vb @@ -3,7 +3,6 @@ Option Strict On Imports System.Data Imports Extensiones -Imports Microsoft.VisualBasic Public Class LogicNominas Private GetError As String = "" @@ -385,7 +384,7 @@ Public Class LogicNominas If DtOtrosPagos IsNot Nothing AndAlso DtOtrosPagos.Rows.Count > 0 Then For Each Row As DataRow In DtOtrosPagos.Rows - If (Row("Importe").ToString().ToDecimal() <> 0) OrElse (Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 17 AndAlso Row("ImporteValor").ToString().ToDecimal().Abs() > 0) OrElse + If (Row("Importe").ToString().ToDecimal() <> 0) OrElse (Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 17 AndAlso Row("ImporteValor").ToString().ToDecimal().Abs() > 0) OrElse (Row("SATCveConcepto").ToString().ToEntero() = 2 AndAlso (CveRegimenContratacion.ToEntero() = 2 OrElse Row("Importe").ToString().ToDecimal() <> 0)) OrElse (Row("SATCveConcepto").ToString().ToEntero().Contiene(2, 4) AndAlso Row("Importe").ToString().ToDecimal() < 0) Then diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 20c2737ca..d46e13536 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -1,20 +1,12 @@ Option Explicit On Option Strict On -Imports Extensiones -Imports Microsoft.VisualBasic Imports System.Data Imports System.IO -Imports System.Xml -Imports Microsoft.Reporting.WebForms -Imports System.Security.Cryptography.X509Certificates -Imports System.Globalization -Imports System -Imports System.Net -Imports System.IO.Compression -Imports System.Text Imports System.Net.Http -Imports System.Collections.Generic +Imports System.Xml +Imports Extensiones +Imports Microsoft.Reporting.WebForms Namespace Modelos diff --git a/App_Code/Models/Request/RequestLogin.vb b/App_Code/Models/Request/RequestLogin.vb index b1833aaa2..9cd37f48e 100644 --- a/App_Code/Models/Request/RequestLogin.vb +++ b/App_Code/Models/Request/RequestLogin.vb @@ -1,6 +1,4 @@ -Imports Microsoft.VisualBasic - -Namespace Models.Request +Namespace Models.Request Public Class RequestLogin Public Property UserName As String Public Property Password As String diff --git a/App_Code/Models/Response/ResponseGenericModel.vb b/App_Code/Models/Response/ResponseGenericModel.vb index e0c18e717..cf08da47d 100644 --- a/App_Code/Models/Response/ResponseGenericModel.vb +++ b/App_Code/Models/Response/ResponseGenericModel.vb @@ -1,6 +1,4 @@ -Imports Microsoft.VisualBasic - -Namespace Models.Response +Namespace Models.Response Public Class ResponseGenericModel(Of T) Public Property IsSuccess As Boolean Public Property Msg As String diff --git a/App_Code/Models/Response/ResponseLogin.vb b/App_Code/Models/Response/ResponseLogin.vb index 32213c941..8ae1f87c1 100644 --- a/App_Code/Models/Response/ResponseLogin.vb +++ b/App_Code/Models/Response/ResponseLogin.vb @@ -1,5 +1,4 @@ -Imports Microsoft.VisualBasic -Imports Newtonsoft.Json +Imports Newtonsoft.Json Namespace Models.Response diff --git a/App_Code/MyGPSHub.vb b/App_Code/MyGPSHub.vb index 2bd925d82..cd2273d4c 100644 --- a/App_Code/MyGPSHub.vb +++ b/App_Code/MyGPSHub.vb @@ -1,8 +1,6 @@ -Imports System.Threading +Imports System.Collections.Concurrent Imports Extensiones Imports Microsoft.AspNet.SignalR -Imports System -Imports System.Collections.Concurrent Public Class MyGPSHub Inherits Hub @@ -40,7 +38,7 @@ Public Class MyGPSHub Dic.TryUpdate(CveUsuario, Context.ConnectionId, Dic(CveUsuario)) End If Else - If CveUsuario.ToEntero > 0 Then + If CveUsuario.ToEntero > 0 Then Dic.TryAdd(CveUsuario, ConnectionId) End If End If diff --git a/App_Code/MyHub.vb b/App_Code/MyHub.vb index 6a34d2eb9..d30c6ad5d 100644 --- a/App_Code/MyHub.vb +++ b/App_Code/MyHub.vb @@ -1,7 +1,5 @@ -Imports Microsoft.AspNet.SignalR -Imports Extensiones -Imports System.Data -Imports ADSSession +Imports Extensiones +Imports Microsoft.AspNet.SignalR Public Class MyHub Inherits Hub diff --git a/App_Code/Notificaciones.vb b/App_Code/Notificaciones.vb index 6c5d7902a..a326d4b02 100644 --- a/App_Code/Notificaciones.vb +++ b/App_Code/Notificaciones.vb @@ -1,6 +1,5 @@ -Imports Microsoft.AspNet.SignalR -Imports Extensiones -Imports System.Data +Imports Extensiones +Imports Microsoft.AspNet.SignalR Public Enum TipoNotificacion As Integer diff --git a/App_Code/Startup.Auth.vb b/App_Code/Startup.Auth.vb index 68a445cb1..265c320bd 100644 --- a/App_Code/Startup.Auth.vb +++ b/App_Code/Startup.Auth.vb @@ -1,8 +1,7 @@ -Imports Owin -Imports Microsoft.Owin.Security.Cookies -Imports Microsoft.Owin.Security.Google +Imports Microsoft.AspNet.Identity Imports Microsoft.Owin -Imports Microsoft.AspNet.Identity +Imports Microsoft.Owin.Security.Cookies +Imports Owin Partial Public Class Startup ' For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301883 diff --git a/App_Code/Thalamus.vb b/App_Code/Thalamus.vb index 575b897b8..a8a3c4468 100644 --- a/App_Code/Thalamus.vb +++ b/App_Code/Thalamus.vb @@ -1,11 +1,9 @@ -Imports System.IO +Imports System.Data +Imports System.IO Imports System.Net -Imports System.Web Imports System.Web.Services -Imports System.Web.Services.Protocols Imports Extensiones.ModExtensiones Imports GemBox.Spreadsheet -Imports System.Data ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. ' _ diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index 36bf96aae..4c8169ca6 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -1,16 +1,16 @@ Option Explicit On Option Strict On -Imports Extensiones -Imports System.IO -Imports Newtonsoft.Json.Linq -Imports System.Net.Http -Imports System.Xml Imports System.Data -Imports System.Xml.Serialization +Imports System.IO Imports System.Net -Imports ProfactCartaPorte = Profact.TimbraCFDI33.Complementos.CartaPorte20 +Imports System.Net.Http Imports System.Reflection +Imports System.Xml +Imports System.Xml.Serialization +Imports Extensiones +Imports Newtonsoft.Json.Linq +Imports ProfactCartaPorte = Profact.TimbraCFDI33.Complementos.CartaPorte20 Public Class Timbrado @@ -3441,7 +3441,7 @@ Public Class Timbrado If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then 'Actualiza Estatus Factura - If Ventas.CveVenta > 0 Then + If Ventas.CveVenta > 0 Then Using ObjVentas As New ClsVentas() @@ -4138,24 +4138,24 @@ Public Class Timbrado ComPag.Totales = Totales - ComPag.Pago(0).DoctoRelacionado = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoDoctoRelacionado(ObjCFDITimbre.ComplementoPagos.DocumentosRelacionados.Count - 1) {} - Dim i As Integer - For Each doc As CFDIComplementoPagosDocsRelacionados In ObjCFDITimbre.ComplementoPagos.DocumentosRelacionados - ComPag.Pago(0).DoctoRelacionado(i) = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoDoctoRelacionado() - ComPag.Pago(0).DoctoRelacionado(i).IdDocumento = doc.IdDocumento - If Not String.IsNullOrEmpty(doc.Serie) Then - ComPag.Pago(0).DoctoRelacionado(i).Serie = doc.Serie - End If - ComPag.Pago(0).DoctoRelacionado(i).Folio = doc.Folio - ComPag.Pago(0).DoctoRelacionado(i).MonedaDR = doc.MonedaDR - ComPag.Pago(0).DoctoRelacionado(i).NumParcialidad = doc.NumParcialidad.ToString - ComPag.Pago(0).DoctoRelacionado(i).ImpSaldoAnt = doc.ImpSaldoAnt.RoundSQL - ComPag.Pago(0).DoctoRelacionado(i).ImpPagadoSpecified = True - ComPag.Pago(0).DoctoRelacionado(i).ImpPagado = doc.ImpPagado.RoundSQL - ComPag.Pago(0).DoctoRelacionado(i).ImpSaldoInsoluto = doc.ImpSaldoInsoluto.RoundSQL - ComPag.Pago(0).DoctoRelacionado(i).EquivalenciaDR = doc.EquivalenciaDR.RoundSQL(6) - ComPag.Pago(0).DoctoRelacionado(i).EquivalenciaDRSpecified = True - ComPag.Pago(0).DoctoRelacionado(i).ObjetoImpDR = doc.ObjetoImpuesto + ComPag.Pago(0).DoctoRelacionado = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoDoctoRelacionado(ObjCFDITimbre.ComplementoPagos.DocumentosRelacionados.Count - 1) {} + Dim i As Integer + For Each doc As CFDIComplementoPagosDocsRelacionados In ObjCFDITimbre.ComplementoPagos.DocumentosRelacionados + ComPag.Pago(0).DoctoRelacionado(i) = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoDoctoRelacionado() + ComPag.Pago(0).DoctoRelacionado(i).IdDocumento = doc.IdDocumento + If Not String.IsNullOrEmpty(doc.Serie) Then + ComPag.Pago(0).DoctoRelacionado(i).Serie = doc.Serie + End If + ComPag.Pago(0).DoctoRelacionado(i).Folio = doc.Folio + ComPag.Pago(0).DoctoRelacionado(i).MonedaDR = doc.MonedaDR + ComPag.Pago(0).DoctoRelacionado(i).NumParcialidad = doc.NumParcialidad.ToString + ComPag.Pago(0).DoctoRelacionado(i).ImpSaldoAnt = doc.ImpSaldoAnt.RoundSQL + ComPag.Pago(0).DoctoRelacionado(i).ImpPagadoSpecified = True + ComPag.Pago(0).DoctoRelacionado(i).ImpPagado = doc.ImpPagado.RoundSQL + ComPag.Pago(0).DoctoRelacionado(i).ImpSaldoInsoluto = doc.ImpSaldoInsoluto.RoundSQL + ComPag.Pago(0).DoctoRelacionado(i).EquivalenciaDR = doc.EquivalenciaDR.RoundSQL(6) + ComPag.Pago(0).DoctoRelacionado(i).EquivalenciaDRSpecified = True + ComPag.Pago(0).DoctoRelacionado(i).ObjetoImpDR = doc.ObjetoImpuesto If doc.Impuestos IsNot Nothing Then ComPag.Pago(0).DoctoRelacionado(i).ImpuestosDR = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoDoctoRelacionadoImpuestosDR @@ -4202,7 +4202,7 @@ Public Class Timbrado End If End If i += 1 - Next + Next If (ObjCFDITimbre.ComplementoPagos.Retenciones).Count > 0 OrElse ObjCFDITimbre.ComplementoPagos.Traslados.Count > 0 Then ComPag.Pago(0).ImpuestosP = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosP(0) {} @@ -4236,16 +4236,16 @@ Public Class Timbrado Dim nsComp As New System.Xml.Serialization.XmlSerializerNamespaces() - nsComp.Add("pago20", "http://www.sat.gob.mx/Pagos20") - Dim xmlComp As String = Profact.TimbraCFDI.XMLUtilerias.SerializaObjeto(ComPag, GetType(Profact.TimbraCFDI40.Complementos.Pagos20.Pagos), nsComp) - Dim docComp As New XmlDocument() - docComp.LoadXml(xmlComp) - 'comprobante.PagosSpecified = True - LXmlComplementos.Add(docComp.DocumentElement) - TieneComplemento = True - End If - + nsComp.Add("pago20", "http://www.sat.gob.mx/Pagos20") + Dim xmlComp As String = Profact.TimbraCFDI.XMLUtilerias.SerializaObjeto(ComPag, GetType(Profact.TimbraCFDI40.Complementos.Pagos20.Pagos), nsComp) + Dim docComp As New XmlDocument() + docComp.LoadXml(xmlComp) + 'comprobante.PagosSpecified = True + LXmlComplementos.Add(docComp.DocumentElement) + TieneComplemento = True End If + + End If #End Region diff --git a/App_Code/TimbradoB.vb b/App_Code/TimbradoB.vb index 6e044c5ed..4fbeca9e5 100644 --- a/App_Code/TimbradoB.vb +++ b/App_Code/TimbradoB.vb @@ -1,6 +1,4 @@ -Imports Microsoft.VisualBasic - -Public Class TimbradoB +Public Class TimbradoB diff --git a/App_Code/Timbres.vb b/App_Code/Timbres.vb index 7163c3278..3094bb25f 100644 --- a/App_Code/Timbres.vb +++ b/App_Code/Timbres.vb @@ -610,20 +610,20 @@ Public Class Timbres End Function Public Function Timbrar() As Boolean - Dim Respuesta As Boolean = False + Dim Respuesta As Boolean = False - Dim ObjTimbrado As New Timbrado + Dim ObjTimbrado As New Timbrado - If ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) Then - Respuesta = True - Else - Respuesta = False - _MsgError.AppendLine(ObjTimbrado.MensajeErrorCFDI) - End If + If ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) Then + Respuesta = True + Else + Respuesta = False + _MsgError.AppendLine(ObjTimbrado.MensajeErrorCFDI) + End If - Return Respuesta + Return Respuesta - End Function + End Function - End Class +End Class diff --git a/App_Code/Usuario.vb b/App_Code/Usuario.vb index 1553bf1a6..f7601a29b 100644 --- a/App_Code/Usuario.vb +++ b/App_Code/Usuario.vb @@ -1,14 +1,13 @@ Option Strict On Option Explicit On Imports System.Collections.Concurrent -Imports Extensiones -Public Class Usuario - +Public Class Usuario + #Region "Propiedades" - + Public Property CveUsuario As Integer Public Property Usuario As String Public Property Contraseña As String @@ -99,11 +98,11 @@ Public Class Usuario If ListaSesion.Item(Campo) IsNot Nothing Then ListaSesion.Item(Campo) = value Else ListaSesion.Add(Campo, value) End Set - End Property - - + End Property + + #End Region - + Public Shared Sub CerrarSession(Optional portal As Integer = -1) If Not IsNothing(HttpContext.Current) Then HttpContext.Current.Session.Abandon() 'Destruye la session Si no no Entra al sessionEnd hasta que se expire el tiempo. diff --git a/App_Code/UsuarioWs.vb b/App_Code/UsuarioWs.vb index db357daf8..3c7ba1296 100644 --- a/App_Code/UsuarioWs.vb +++ b/App_Code/UsuarioWs.vb @@ -14,5 +14,5 @@ Public Class UsuarioWs #End Region - + End Class diff --git a/App_Code/WS.vb b/App_Code/WS.vb index d3e2f8562..d9adefccb 100644 --- a/App_Code/WS.vb +++ b/App_Code/WS.vb @@ -1,7 +1,5 @@ -Imports System.Web +Imports System.Data Imports System.Web.Services -Imports System.Web.Services.Protocols -Imports System.Data ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. ' _ @@ -9,7 +7,7 @@ Imports System.Data _ _ Public Class WS - Inherits System.Web.Services.WebService + Inherits System.Web.Services.WebService _ Public Function HelloWorld() As String @@ -48,6 +46,6 @@ Public Class WS Return DT End Function - + End Class \ No newline at end of file diff --git a/App_Code/WS/WSApiController.vb b/App_Code/WS/WSApiController.vb index f01545bfb..2829eb58c 100644 --- a/App_Code/WS/WSApiController.vb +++ b/App_Code/WS/WSApiController.vb @@ -1,6 +1,5 @@ Imports System.Web.Http Imports Extensiones -Imports Microsoft.VisualBasic Public Class WSApiController Inherits ApiController diff --git a/App_Code/WS/WSSIGVentas.vb b/App_Code/WS/WSSIGVentas.vb index badabe60b..413ecd075 100644 --- a/App_Code/WS/WSSIGVentas.vb +++ b/App_Code/WS/WSSIGVentas.vb @@ -1,5 +1,4 @@ -Imports System.Net -Imports System.Web.Http +Imports System.Web.Http Imports Extensiones Imports WsUtility diff --git a/App_Code/WS/WSUSer.vb b/App_Code/WS/WSUSer.vb index cc02c4fab..c6a207031 100644 --- a/App_Code/WS/WSUSer.vb +++ b/App_Code/WS/WSUSer.vb @@ -1,6 +1,4 @@ - -Imports System.Net -Imports System.Web.Http +Imports System.Web.Http Imports Extensiones Imports WsUtility diff --git a/App_Code/WS/WsUtility.vb b/App_Code/WS/WsUtility.vb index ce5cf2ac1..f5cd97649 100644 --- a/App_Code/WS/WsUtility.vb +++ b/App_Code/WS/WsUtility.vb @@ -1,8 +1,4 @@ -Imports System.Net.Http -Imports Microsoft.VisualBasic - - -Namespace WsUtility +Namespace WsUtility 'Public Class SigAuthenticationAttribute ' Inherits Http.Filters.AuthorizationFilterAttribute diff --git a/App_Code/WSSIGApps.vb b/App_Code/WSSIGApps.vb index 5b19c708b..ada69b7b1 100644 --- a/App_Code/WSSIGApps.vb +++ b/App_Code/WSSIGApps.vb @@ -1,18 +1,6 @@ Option Explicit On Option Strict On - -Imports System.Data -Imports System.Web Imports System.Web.Services -Imports System.Web.Services.Protocols -Imports Microsoft.Reporting.WebForms -Imports Extensiones -Imports Newtonsoft.Json -Imports Modelos -Imports System.IO -Imports System -Imports System.Globalization -Imports Newtonsoft.Json.Linq ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. ' _ diff --git a/App_Code/WS_PuntoVenta.vb b/App_Code/WS_PuntoVenta.vb index 602e52a5b..4c013f546 100644 --- a/App_Code/WS_PuntoVenta.vb +++ b/App_Code/WS_PuntoVenta.vb @@ -1,7 +1,5 @@ -Imports System.Web +Imports System.Data Imports System.Web.Services -Imports System.Web.Services.Protocols -Imports System.Data Imports Extensiones ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. diff --git a/App_Code/WsEcommerce.vb b/App_Code/WsEcommerce.vb index 4a1b10f20..bf3895679 100644 --- a/App_Code/WsEcommerce.vb +++ b/App_Code/WsEcommerce.vb @@ -3,10 +3,8 @@ Option Explicit On Imports System.Data Imports System.Web.Http -Imports System.Web.Http.Cors Imports System.Web.Http.Results Imports Extensiones -Imports Newtonsoft.Json Namespace Controllers diff --git a/App_Code/WsRespaldos.vb b/App_Code/WsRespaldos.vb index f99da5c60..973c698f8 100644 --- a/App_Code/WsRespaldos.vb +++ b/App_Code/WsRespaldos.vb @@ -1,12 +1,9 @@ -Imports System.Web -Imports System.Web.Services -Imports System.Web.Services.Protocols +Imports System.Data Imports System.IO -Imports System.Threading -Imports System.Data -Imports Extensiones -Imports System.Security.AccessControl Imports System.Security.Cryptography +Imports System.Threading +Imports System.Web.Services +Imports Extensiones diff --git a/App_Code/WsSigfox.vb b/App_Code/WsSigfox.vb index 225d6c984..bf1300792 100644 --- a/App_Code/WsSigfox.vb +++ b/App_Code/WsSigfox.vb @@ -1,11 +1,8 @@ Imports System.Net Imports System.Net.Http Imports System.Web.Http -Imports System.Web.Http.Controllers -Imports System.Web.Http.Filters Imports System.Xml Imports Extensiones -Imports Newtonsoft.Json Imports Newtonsoft.Json.Linq Imports SigFoxModels diff --git a/App_Code/clsGemBoxDocument.vb b/App_Code/clsGemBoxDocument.vb index ea81a4af3..91fe14d0c 100644 --- a/App_Code/clsGemBoxDocument.vb +++ b/App_Code/clsGemBoxDocument.vb @@ -1,6 +1,5 @@ -Imports Microsoft.VisualBasic +Imports System.IO Imports Extensiones -Imports System.IO Imports GemBox.Document Public Class clsGemBoxDocument @@ -115,7 +114,7 @@ Public Class clsGemBoxDocument End Function Public Sub Guardar(ruta As String) - documento.Save(ruta) + documento.Save(ruta) End Sub Public Sub GuardarStream() diff --git a/App_Code/clsUtilerias.vb b/App_Code/clsUtilerias.vb index b82be4e5b..1d71ad450 100644 --- a/App_Code/clsUtilerias.vb +++ b/App_Code/clsUtilerias.vb @@ -2,9 +2,6 @@ Option Explicit On Option Strict On Imports System.Net -Imports System.Drawing -Imports System.Web -Imports System Public Class clsUtilerias diff --git a/App_Code/highchart.vb b/App_Code/highchart.vb index 79aeba22f..82be3cc28 100644 --- a/App_Code/highchart.vb +++ b/App_Code/highchart.vb @@ -1,7 +1,4 @@ -Imports System.Collections.Generic -Imports Microsoft.VisualBasic - -Public Class HighChart +Public Class HighChart Public chart As Chart Public title As Title diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 6e85da25f..40e68aafc 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -2,32 +2,23 @@ Option Strict On Imports System.Data -Imports System.Text -Imports System Imports System.IO +Imports System.Net +Imports System.Net.Http +Imports System.Reflection Imports System.Security.Cryptography -Imports System.Configuration Imports System.Web.Configuration +Imports System.Web.Http.Controllers +Imports System.Web.Http.Filters +Imports ADServerControl Imports AjaxControlToolkit 'Imports Microsoft.VisualBasic 'Imports msExcel = Microsoft.Office.Interop.Excel 'Imports VBIDE -Imports System.Web.UI -Imports System.Web.UI.WebControls -Imports System.Web.UI.HtmlControls -Imports System.Web Imports ClosedXML.Excel -Imports Newtonsoft.Json -Imports Microsoft.Reporting.WebForms -Imports ADServerControl -Imports iTextSharp.text.pdf -Imports System.Reflection Imports GemBox.Spreadsheet -Imports System.Web.Http.Filters -Imports System.Web.Http.Controllers -Imports System.Net.Http -Imports System.Net +Imports Newtonsoft.Json Namespace Extensiones diff --git a/App_Code/wsOI.vb b/App_Code/wsOI.vb index 16692b2d8..bf2faa64a 100644 --- a/App_Code/wsOI.vb +++ b/App_Code/wsOI.vb @@ -1,6 +1,4 @@ -Imports System.Web -Imports System.Web.Services -Imports System.Web.Services.Protocols +Imports System.Web.Services ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. ' _ @@ -16,7 +14,7 @@ Public Class wsOI Private _Asunto As String Private _Descripcion As String Private _Acuerdos As String - + Public Property CveEvento() As Integer Get Return _CveEvento @@ -49,7 +47,7 @@ Public Class wsOI _Acuerdos = value End Set End Property - + Public Sub New() End Sub End Class diff --git a/App_Code/wsRedes.vb b/App_Code/wsRedes.vb index b3f5a7a68..23b68792a 100644 --- a/App_Code/wsRedes.vb +++ b/App_Code/wsRedes.vb @@ -1,8 +1,6 @@ -Imports System.Web.Services -Imports System.Data +Imports System.Data +Imports System.Web.Services Imports Extensiones -Imports System.IO -Imports System ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. ' _ @@ -10,7 +8,7 @@ Imports System _ _ Public Class wsRedes - Inherits System.Web.Services.WebService + Inherits System.Web.Services.WebService Private Const TiempoValido = -600 _ Private Function DecriptaCadena(Cadena As String) As String() diff --git a/App_Code/wsSIG.vb b/App_Code/wsSIG.vb index 33596c4e1..ed4aa3d7d 100644 --- a/App_Code/wsSIG.vb +++ b/App_Code/wsSIG.vb @@ -1,7 +1,7 @@ -Imports System.Web.Services -Imports System.Data -Imports Extensiones +Imports System.Data Imports System.IO +Imports System.Web.Services +Imports Extensiones Imports Newtonsoft.Json ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. From 8a5eae36542b2700229923264edece97d9f30cff Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 18 Jun 2022 11:19:59 -0700 Subject: [PATCH 10/15] -- cleanup --- Compras/PopUpVerFactura.aspx.vb | 12 +++--------- Compras/ReembolsosComprobaciones.aspx.vb | 4 ++-- Compras/RepRembolsoComprobaciones.aspx.vb | 2 +- Compras/eFacturas.aspx.vb | 6 +++--- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index f54ffac71..3817d2111 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1,21 +1,15 @@ Option Strict On Option Explicit On -Imports Extensiones Imports System.Data -Imports Microsoft.Reporting.WebForms -Imports System.Xml Imports System.IO +Imports System.Xml +Imports Extensiones Imports iTextSharp.text Imports iTextSharp.text.pdf - +Imports Microsoft.Reporting.WebForms Imports Stimulsoft.Report -Imports Stimulsoft.Report.Components -Imports Stimulsoft.Report.Dictionary Imports Stimulsoft.Report.Web -Imports Newtonsoft.Json.Linq -Imports System -Imports Microsoft.VisualBasic Partial Class PopUpVerFactura Inherits ClsPaginas diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 09deb5ebe..3c9bf20ce 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -1,6 +1,6 @@  -Imports Extensiones Imports System.Data +Imports Extensiones Imports Microsoft.Reporting.WebForms Partial Class Compras_ReembolsosComprobaciones @@ -1424,7 +1424,7 @@ Partial Class Compras_ReembolsosComprobaciones GvCxP.Visible = True - ObjMovtos.GetCxPPersonalCajaChica(UsuarioActual.CveEmpresa, CvePersonal, CveCajaChica, If(TxtNumeroReembolso.Text.Trim = "", "-1", TxtNumeroReembolso.Text.Trim)) + ObjMovtos.GetCxPPersonalCajaChica(UsuarioActual.CveEmpresa, CvePersonal, CveCajaChica, If(TxtNumeroReembolso.Text.Trim = "", "-1", TxtNumeroReembolso.Text.Trim), OpcionSaldo:=1) DtDatos = ObjMovtos.DtResultados.FiltraParametros("Saldo > 0") GvCxP.DataSource = DtDatos CvePrePolizaComprobacion = DtDatos.MAX("CvePrePolizaComprobacion").ToEntero diff --git a/Compras/RepRembolsoComprobaciones.aspx.vb b/Compras/RepRembolsoComprobaciones.aspx.vb index 3c1bb16b5..bef7e5cdb 100644 --- a/Compras/RepRembolsoComprobaciones.aspx.vb +++ b/Compras/RepRembolsoComprobaciones.aspx.vb @@ -261,7 +261,7 @@ Partial Class Compras_RepRembolsoComprobaciones Dim FechaI As DateTime = If(String.IsNullOrEmpty(txtFechaI.Text.Trim()), ModExtensiones.MinFecha, txtFechaI.Text.ToDateTime()) Dim FechaF As DateTime = If(String.IsNullOrEmpty(txtFechaF.Text.Trim()), ModExtensiones.MaxFecha, txtFechaF.Text.ToDateTime()) - ObjMovtos.GetCxPPersonalCajaChica(UsuarioActual.CveEmpresa, CvePersonal, CveCajaChica, If(TxtNumeroReembolso.Text.Trim = "", "-1", TxtNumeroReembolso.Text.Trim), FechaI:=FechaI, FechaF:=FechaF) + ObjMovtos.GetCxPPersonalCajaChica(UsuarioActual.CveEmpresa, CvePersonal, CveCajaChica, If(TxtNumeroReembolso.Text.Trim = "", "-1", TxtNumeroReembolso.Text.Trim), FechaI:=FechaI, FechaF:=FechaF, OpcionSaldo:=-1) DtDatos = ObjMovtos.DtResultados GvCxP.DataSource = DtDatos diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index f12ed7e4d..104f5bc38 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -2,15 +2,15 @@ Option Explicit On Imports System.Data -Imports Extensiones Imports System.Diagnostics +Imports System.Globalization Imports System.IO Imports System.IO.Compression Imports System.Xml -Imports Microsoft.Reporting.WebForms -Imports System.Globalization Imports ADSistemaLibrary.SatXml Imports ADSistemaLibrary.SatXml.XmlSatCFDI +Imports Extensiones +Imports Microsoft.Reporting.WebForms Partial Class Compras_eFacturas Inherits ClsPaginas From b925b5b408bdb734a13e3dd3f9d4dfc0b7eafeb3 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 18 Jun 2022 11:20:13 -0700 Subject: [PATCH 11/15] -cleanup --- Bancos/CargarConciliacionesBancarias.aspx.vb | 3 - Bancos/DepositosCaja.aspx.vb | 2 +- Bancos/Devoluciones.aspx.cs | 76 ++++++++++---------- Bancos/FluctuacionCambiaria.aspx.vb | 2 +- Bancos/PagoAcreedor.aspx.cs | 34 +++++---- Bancos/PagoDeudor.aspx.cs | 69 +++++++++--------- Bancos/PopIECompras.aspx.vb | 34 ++++----- Bancos/ProveedoresAbonar.aspx.vb | 2 +- Bancos/RepCortes.aspx.vb | 16 ++--- 9 files changed, 113 insertions(+), 125 deletions(-) diff --git a/Bancos/CargarConciliacionesBancarias.aspx.vb b/Bancos/CargarConciliacionesBancarias.aspx.vb index 380ccb142..2da1ae93e 100644 --- a/Bancos/CargarConciliacionesBancarias.aspx.vb +++ b/Bancos/CargarConciliacionesBancarias.aspx.vb @@ -3,9 +3,6 @@ Option Explicit On Imports System.Data Imports Extensiones -Imports System.Xml -Imports Microsoft.Reporting.WebForms -Imports GemBox.Spreadsheet Partial Class Bancos_CargarConciliacionesBancarias Inherits ClsPaginas diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index a33f03cee..aa9da1968 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -1,8 +1,8 @@ Option Explicit On Option Strict On -Imports Extensiones Imports System.Data +Imports Extensiones Partial Class Bancos_DepositosCaja Inherits ClsPaginas diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs index cfe9b6d4a..1f602c371 100644 --- a/Bancos/Devoluciones.aspx.cs +++ b/Bancos/Devoluciones.aspx.cs @@ -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_Devoluciones : ClsPaginas @@ -111,11 +108,11 @@ public partial class Bancos_Devoluciones : ClsPaginas ComprobanteMuestraOculta(); CargaTipoTransaccion(tipo); - + } protected void TipoDevolucion_SelectedIndexChanged(object sender, EventArgs e) - { + { switch (TipoDevolucion.SelectedValue) { case "1": @@ -139,7 +136,7 @@ public partial class Bancos_Devoluciones : ClsPaginas if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2) { Anexo.Text = ""; - DvComprobante.Visible = false; + DvComprobante.Visible = false; } else { @@ -163,7 +160,7 @@ public partial class Bancos_Devoluciones : ClsPaginas } protected void CargaSubProyectos() { - DdlSubProyecto.DataSource = get_GlobalDTSubProyectos(-1, CveEmpresa:UsuarioActual.CveEmpresa); + DdlSubProyecto.DataSource = get_GlobalDTSubProyectos(-1, CveEmpresa: UsuarioActual.CveEmpresa); DdlSubProyecto.DataBind(); DdlSubProyecto.Items.Insert(0, new ListItem("Seleccione SubProyecto", "-1")); } @@ -358,14 +355,14 @@ public partial class Bancos_Devoluciones : ClsPaginas #region"GUARDAR" protected void BtnGuardar_Click(object sender, EventArgs e) { - //inician validaciones + //inician validaciones if (OpcionDevolucion.SelectedValue.ToEntero() != 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() != 2 && TxtImporte.Text == "") { - Alert("Debe ingresar un importe", TipoMensaje.MsgAdvertencia); - return; + Alert("Debe ingresar un importe", TipoMensaje.MsgAdvertencia); + return; } - if (OpcionDevolucion.SelectedValue == "3" && TipoDevolucion.SelectedValue == "2") + if (OpcionDevolucion.SelectedValue == "3" && TipoDevolucion.SelectedValue == "2") { if (TxtValor.Text == "") { @@ -382,8 +379,8 @@ public partial class Bancos_Devoluciones : ClsPaginas return; } else - { - if (valor ==0) + { + if (valor == 0) { Alert("No se han seleccionado opciones", TipoMensaje.MsgAdvertencia); return; @@ -400,7 +397,8 @@ public partial class Bancos_Devoluciones : ClsPaginas List filesgral = Anexo.getfiles().Archivos; string filemove = ""; string Comprobante = ""; - foreach(Archivo fileItem in filesgral){ + foreach (Archivo fileItem in filesgral) + { Comprobante = System.IO.Path.GetExtension(String.Format("{0}Temp\\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", ""); filemove = fileItem.filename; } @@ -465,7 +463,7 @@ public partial class Bancos_Devoluciones : ClsPaginas } // DATOS PREPOLIZA - if ( DdlTipoTransanccion.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119) FolioFijo = TxtFolio.Text.ToEntero(); + if (DdlTipoTransanccion.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119) FolioFijo = TxtFolio.Text.ToEntero(); CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE Devoluciones", CvePlantillaPoliza, TxtImporte.Text.Trim().ToDouble(), TxtImporte.Text.Trim().ToDouble(), 1, TxtFechaDocumento.Text.ToDate(), TxtObservaciones.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransanccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: CveTipoPoliza); if (CvePrePoliza > 0) @@ -475,25 +473,25 @@ public partial class Bancos_Devoluciones : ClsPaginas if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2) { - - int cveConcepto = DdlConcepto.SelectedValue.ToEntero(); - string descripcion = TxtDescripcion.Text; - int tipoDescuento = 1; - double valor = TxtValor.Text.ToDouble(); - int vecesAplicar = TxtVecesAplicar.Text.ToEntero(); - decimal montoLimite = 0; - string fechaInicioAplicacion = DateTime.Now.ToString("yyyy/MM/dd"); - bool estatus = true; - int CveCuenta = -1; - int CveMovtoPermanente = ObjNom.AddMovtoPermanente(cveConcepto, cvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta); + int cveConcepto = DdlConcepto.SelectedValue.ToEntero(); + string descripcion = TxtDescripcion.Text; + int tipoDescuento = 1; + double valor = TxtValor.Text.ToDouble(); + int vecesAplicar = TxtVecesAplicar.Text.ToEntero(); + decimal montoLimite = 0; + + string fechaInicioAplicacion = DateTime.Now.ToString("yyyy/MM/dd"); + bool estatus = true; + int CveCuenta = -1; + int CveMovtoPermanente = ObjNom.AddMovtoPermanente(cveConcepto, cvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta); + + if (CveMovtoPermanente < 0) + { + MsgError = "No se pudo insertar movimiento permanente"; + } - if (CveMovtoPermanente < 0) - { - MsgError = "No se pudo insertar movimiento permanente"; - } - foreach (GridViewRow gvr in GvDevoluciones.Rows) { @@ -515,7 +513,7 @@ public partial class Bancos_Devoluciones : ClsPaginas } } } - } + } } else @@ -605,7 +603,7 @@ public partial class Bancos_Devoluciones : ClsPaginas { MsgError = "No se insertó movimiento bancario"; } - } + } } else { @@ -674,7 +672,7 @@ 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) { Msg.AppendFormat(@"

Ver Póliza", IDPoliza); @@ -699,7 +697,7 @@ public partial class Bancos_Devoluciones : ClsPaginas Msg.Clear(); Alert(Msg.ToString(), TipoMensaje.MsgError); } - + ObjIE.Dispose(); ObjMov.Dispose(); @@ -718,8 +716,8 @@ public partial class Bancos_Devoluciones : ClsPaginas DataTable dt = onom.DtResultados.FiltraParametros(" FormulaTotal = 'FNC.[MovimientosPermanentes]'"); DdlConcepto.Items.Clear(); - DdlConcepto.DataSource = dt.FiltraParametros("Tipo ='D'"); - + DdlConcepto.DataSource = dt.FiltraParametros("Tipo ='D'"); + DataRow drow = dt.NewRow(); drow["CveConcepto"] = "-1"; drow["Concepto"] = "Seleccione"; diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index 75982a281..9efa900c9 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -1211,7 +1211,7 @@ Partial Class Bancos_FluctuacionCambiaria If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnProveedorCvePrePoliza.Value.ToEntero, 1, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then Banco.Commit() - BtnProveedoresRemove.visible = False + BtnProveedoresRemove.visible = False Alert("Flucturación eliminada.") Else Banco.RollBack() diff --git a/Bancos/PagoAcreedor.aspx.cs b/Bancos/PagoAcreedor.aspx.cs index e1610060d..d9f4f41b0 100644 --- a/Bancos/PagoAcreedor.aspx.cs +++ b/Bancos/PagoAcreedor.aspx.cs @@ -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(); } diff --git a/Bancos/PagoDeudor.aspx.cs b/Bancos/PagoDeudor.aspx.cs index d1e3553b6..4a6183671 100644 --- a/Bancos/PagoDeudor.aspx.cs +++ b/Bancos/PagoDeudor.aspx.cs @@ -1,13 +1,9 @@ -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_PagoDeudor : ClsPaginas @@ -86,7 +82,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas } } - + private int IDCtaContableBancosPrestamo { @@ -156,7 +152,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas { if (!IsPostBack) { - + CargaTipoTransaccion(); CargaCuentas(); CargaProveedores(); @@ -187,7 +183,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas DdlSubProyectoPago.DataBind(); DdlSubProyectoPago.Items.Insert(0, new ListItem("Seleccione", "-1")); - + } @@ -321,12 +317,12 @@ public partial class Bancos_PagoDeudor : ClsPaginas int CveConceptoContableBanco = 30; int CveConceptoContablePrestamo = 43; int CvePlantillaPoliza = 45; - int CvePrePoliza = 0; + int CvePrePoliza = 0; int FolioFijo = 0; int IDPoliza = 0; decimal tipoCambio = (CveMonedaPrestamo == 2) ? TxtTCDolaresPrestamo.Text.ToDecimal() : 1; StringBuilder Msg = new StringBuilder(); - + //OBTIENE COMPROBANTE !! string Comprobante = ""; List filesgral = AnexoPrestamo.getfiles().Archivos; @@ -359,19 +355,19 @@ public partial class Bancos_PagoDeudor : ClsPaginas } // SI ES DOLARES - if(CveMonedaPrestamo == 2) + if (CveMonedaPrestamo == 2) { // BANCOS - BANCOS COMPLEMENTARIA if (UsaComplementaria) { // BANCOS - COMPLEMENTARIA - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true,0, Ref, 204, Conc, DateTime.Now, IDCtaContableBancosComplementariaPrestamo, -1, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: (TxtImportePrestamo.Text.ToDecimal() * tipoCambio) - TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio:tipoCambio, CveSubProyecto:DdlSubProyecto.SelectedValue.ToEntero())) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, 0, Ref, 204, Conc, IDCtaContableBancosComplementariaPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: (TxtImportePrestamo.Text.ToDecimal() * tipoCambio) - TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de bancos complementaria"; } - + s // BANCOS - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContableBanco, Conc, DateTime.Now, IDCtaContableBancosPrestamo, -1, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContableBanco, Conc, IDCtaContableBancosPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de bancos"; } @@ -379,23 +375,23 @@ public partial class Bancos_PagoDeudor : ClsPaginas else { // BANCOS - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContableBanco, Conc, DateTime.Now, IDCtaContableBancosPrestamo, -1, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal() * tipoCambio, ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContableBanco, Conc, IDCtaContableBancosPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal() * tipoCambio, ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de bancos"; } - } - + } + // DEUDORES - DEUDORES COMPLEMENTARIAIDCtaContableDeudorPrestamo if (UsaComplementaria) //(IDCtaContableDeudorCompPrestamo > 0) { // DEUDOR COMPLEMENTARIA - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false,0, Ref, 256, Conc, DateTime.Now, IDCtaContableDeudorCompPrestamo, -1, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: (TxtImportePrestamo.Text.ToDecimal() * tipoCambio) - TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(),TipoCambio:tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, 0, Ref, 256, Conc, IDCtaContableDeudorCompPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: (TxtImportePrestamo.Text.ToDecimal() * tipoCambio) - TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de deudor complementaria"; } // DEUDOR - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContablePrestamo, Conc, DateTime.Now, IDCtaContableDeudorPrestamo, -1, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContablePrestamo, Conc, IDCtaContableDeudorPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de deudor"; } @@ -403,7 +399,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas else { // DEUDOR - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContablePrestamo, Conc, DateTime.Now, , -1, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal() * tipoCambio, ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContablePrestamo, Conc, IDCtaContableDeudorPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal() * tipoCambio, ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de deudor"; } @@ -413,17 +409,17 @@ public partial class Bancos_PagoDeudor : ClsPaginas else { // BANCOS - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContableBanco, Conc, DateTime.Now, IDCtaContableBancosPrestamo, -1, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContableBanco, Conc, IDCtaContableBancosPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de bancos"; } // DEUDOR - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContablePrestamo, Conc, DateTime.Now, IDCtaContableDeudorPrestamo, -1, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContablePrestamo, Conc, IDCtaContableDeudorPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de deudor"; } - } + } } else { @@ -439,13 +435,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas { if (ObjMov.ValorPolizaDescuadre > 0) { - $"Bancos/IE PAGO Deudor | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}".GuardaLogAD( "LogPrePolizas"); + $"Bancos/IE PAGO Deudor | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}".GuardaLogAD("LogPrePolizas"); } } bool AutoConta = UsuarioActual.Empresa.Funcionalidad(200).Equals("1"); - // if (UsuarioActual.CveEmpresa == 119) AutoConta = false; - + // if (UsuarioActual.CveEmpresa == 119) AutoConta = false; + if (AutoConta && MsgError.Equals("")) { //JJMQ:20190103: Cambio la siguiente linea porque esta validando siempre una complementaria aunque el movto sea dlls @@ -453,7 +449,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas //Y se valida la moneda con el siguiente IF bool ValidoComplementaria = false; - if ((CveMonedaPrestamo == 2 && IDCtaContableBancosComplementariaPrestamo > 0 && IDCtaContableDeudorCompPrestamo > 0) || CveMonedaPrestamo == 1) + if ((CveMonedaPrestamo == 2 && IDCtaContableBancosComplementariaPrestamo > 0 && IDCtaContableDeudorCompPrestamo > 0) || CveMonedaPrestamo == 1) { ValidoComplementaria = true; } if (IDCtaContableDeudorPrestamo > 0 && IDCtaContableBancosPrestamo > 0 && ValidoComplementaria) @@ -689,7 +685,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero(), DdlTipoTransaccion.SelectedValue.ToEntero(), TxtFechaDocumento.Text.Trim().ToDate(), TxtFolio.Text.Trim(), DdlProveedores.SelectedText.ToString(), ImporteBanco.ToString().ToDouble(), CveMoneda, (Double)tipoCambio, TxtObservaciones.Text.Trim(), "", false, false, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); - + if (CveIE > 0) { @@ -747,7 +743,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas if (UsaComplementaria) { ImporteMN = Importe; - ImporteComplementaria = Importe * TCDoc - Importe; + ImporteComplementaria = Importe * TCDoc - Importe; } else { @@ -756,13 +752,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas } } - ImporteMN = ImporteMN.RoundSQL(); + ImporteMN = ImporteMN.RoundSQL(); ImporteComplementaria = ImporteComplementaria.RoundSQL(); if (tCveMoneda != 1) { - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, Ref, CveConceptoContablePago, Conc, DateTime.Now, IDCtaContableDeudor, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TCDoc, TipoCambioPago: TC,CveSubProyecto:DdlSubProyectoPago.SelectedValue.ToEntero())) + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, Ref, CveConceptoContablePago, Conc, DateTime.Now, IDCtaContableDeudor, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TCDoc, TipoCambioPago: TC, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de pago deudor"; break; @@ -792,7 +788,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas CveConceptoDiferenciaCambiaria = 64; IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaGananciaCambiaria; TipoMovto = true; - + Importe = (Importe * TC) - (Importe * gvr.DataKey("TipoCambio").ToDecimal()); } ImporteMN = Importe; @@ -803,7 +799,8 @@ public partial class Bancos_PagoDeudor : ClsPaginas } } - }else + } + else { if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, Ref, CveConceptoContablePago, Conc, DateTime.Now, IDCtaContableDeudor, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: gvr.DataKey("TipoCambio").ToDecimal(), TipoCambioPago: TC, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) { @@ -811,7 +808,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas break; } } - + } } @@ -892,7 +889,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas MsgError = "No se pudo insertar la póliza"; } - + if (MsgError.Equals("")) { if (Msg.ToString().Equals("")) diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index 7e0bae4ee..dbc9eed1f 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -5,7 +5,7 @@ Imports System.Data Imports Extensiones Partial Class Bancos_PopIECompras - Inherits ClsPaginas + Inherits ClsPaginas #Region "Propiedades" Private Property DtDeudores As DataTable Get @@ -515,8 +515,8 @@ Partial Class Bancos_PopIECompras End If UpDatos.Update() End If - End Sub - + End Sub + #Region "C A M B I A R P A N E L" Private Sub RBLContado_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLContado.SelectedIndexChanged Select Case RBLContado.SelectedValue @@ -573,9 +573,9 @@ Partial Class Bancos_PopIECompras CargaVentas(CveMoneda) TxtImporte.Text = "0.00" End Select - End Sub + End Sub #End Region - + #Region "C A R G A R I N F O R M A C I O N" Private Sub CargaCompra(pCveCompra As Integer) Dim ObjCompra As New ClsCompras() @@ -1008,9 +1008,9 @@ Partial Class Bancos_PopIECompras 'RecargaGlobalCuentasBancarias() UpCuentaDeposito.Update() - End Sub + End Sub #End Region - + #Region "DDL'S CHANGED" Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged Dim valor As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero @@ -1104,11 +1104,11 @@ Partial Class Bancos_PopIECompras Private Sub DdlAcreedor_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlAcreedor.SelectedIndexChanged CambieAcreedor() - End Sub + End Sub #End Region - + #Region "CHK TIPO CAMBIO" - + #Region "PAGAR CON PESOS" Protected Sub ChkPagarPesos_CheckedChanged(sender As Object, e As EventArgs) If ChkPagarPesos.Checked Then @@ -1165,9 +1165,9 @@ Partial Class Bancos_PopIECompras Else args.IsValid = False End If - End Sub + End Sub #End Region - + #Region "PAGAR CON DOLARES" Protected Sub ChkPagarDolares_CheckedChanged(sender As Object, e As EventArgs) If ChkPagarDolares.Checked Then @@ -1224,9 +1224,9 @@ Partial Class Bancos_PopIECompras Else args.IsValid = False End If - End Sub + End Sub #End Region - + Protected Sub BtnCambiaTipoMoneda_Click(sender As Object, e As EventArgs) CambiaTipoMoneda() End Sub @@ -1244,10 +1244,10 @@ Partial Class Bancos_PopIECompras End If UpDatos.Update() - End Sub - + End Sub + #End Region - + #Region "GV ROW DATA BOUND" Private Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvIngresos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index ef47b01ed..a4e1d7c88 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -719,7 +719,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 diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb index bf069b542..b6ba10c25 100644 --- a/Bancos/RepCortes.aspx.vb +++ b/Bancos/RepCortes.aspx.vb @@ -2,9 +2,7 @@ Option Strict On Imports System.Data -Imports Microsoft.Reporting.WebForms Imports Extensiones -Imports System.Collections.Generic Partial Class Bancos_RepCortes Inherits ClsPaginas @@ -59,10 +57,10 @@ Partial Class Bancos_RepCortes Set(value As Integer) ViewState("CveCorte") = value End Set - End Property - + End Property + #End Region - + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then txtFechaVI.Text = Now.ToShortDateString @@ -189,9 +187,9 @@ Partial Class Bancos_RepCortes GvP.DataBind() UPPDetalle.Update() UpAcciones.Update() - End Sub - + End Sub + #End Region - - + + End Class From 1a7816d5e4ecf2762a7974114bb4bde23be46c25 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 18 Jun 2022 11:20:49 -0700 Subject: [PATCH 12/15] -cleanup --- AC/CatPresupuestoEgresos.aspx.vb | 1 - Acarreos/CatChoferes.aspx.vb | 13 +- .../RepEntradasUsadosClientes.aspx.vb | 5 +- .../RepIndicadorDiarioDetalle.aspx.vb | 5 - CRM/Acercamiento.aspx.cs | 46 +- CRM/EmpresaCRM.aspx.cs | 33 +- Contabilidad2/CatCuentasAsignaciones.aspx.vb | 1 - Contratos/ContratoObra.aspx.vb | 6 +- CxC/RepCxC.aspx.vb | 102 ++-- Inventarios/EntradasSalidas.aspx.vb | 4 +- Inventarios/EntregaAlmacen.aspx.vb | 2 - Inventarios/EntregaAlmacenRuta.aspx.cs | 250 ++++----- Inventarios/InventarioFisico.aspx.vb | 4 +- Inventarios/RecepcionAlmacen.aspx.vb | 4 +- Inventarios/RecepcionUsados.aspx.vb | 2 +- Inventarios/RepEntradasSalidas.aspx.vb | 2 +- Inventarios/RepEntregaAlmacenRuta.aspx.cs | 122 +++-- Inventarios/RepProductosPorCaducar.aspx.cs | 41 +- Inventarios/RepTraspasoEmitido.aspx.cs | 16 +- Inventarios/TraspasoAlmacen.aspx.vb | 6 +- OC/OC.aspx.vb | 2 +- Planeacion/CatSubProyectos.aspx.vb | 56 +- Sistemas/PopUpAddUsuario.aspx.vb | 4 +- Sistemas/UsuarioDetalle.aspx | 4 +- Sistemas/UsuarioDetalle.aspx.vb | 3 +- Ventas/ActualizarPrecios.aspx.vb | 4 +- Ventas/Clientes.aspx.vb | 500 +++++++++--------- Ventas/MetasVendedoresDetalle.aspx.vb | 4 +- Ventas/PV.aspx.vb | 7 +- Ventas/RepCancelacionesPorRespuesta.aspx.cs | 38 +- Ventas/RepPS.aspx.vb | 6 +- Ventas/RepProductosServicios.aspx.vb | 2 +- Ventas/RepProductosServiciosDetalle.aspx.vb | 2 +- Ventas/RepRecuperacionDetalle.aspx.vb | 2 +- Ventas/RepRemisiones.aspx.vb | 24 +- Ventas/Ventas.aspx.vb | 86 +-- 36 files changed, 688 insertions(+), 721 deletions(-) diff --git a/AC/CatPresupuestoEgresos.aspx.vb b/AC/CatPresupuestoEgresos.aspx.vb index 7f3ada4ab..1f870fa6f 100644 --- a/AC/CatPresupuestoEgresos.aspx.vb +++ b/AC/CatPresupuestoEgresos.aspx.vb @@ -2,7 +2,6 @@ Option Explicit On Imports System.Data -Imports System.Linq Imports Extensiones Imports Microsoft.Reporting.WebForms diff --git a/Acarreos/CatChoferes.aspx.vb b/Acarreos/CatChoferes.aspx.vb index 5c2b88185..14398413b 100644 --- a/Acarreos/CatChoferes.aspx.vb +++ b/Acarreos/CatChoferes.aspx.vb @@ -1,5 +1,4 @@ Imports Extensiones -Imports System.Data Partial Class Acarreos_CatChoferes @@ -70,10 +69,10 @@ Partial Class Acarreos_CatChoferes 'Else Dim ObjAcar As New ClsAcarreos - Dim Estatus = 0 - If ChkEstatus.Checked Then Estatus = 1 + Dim Estatus = 0 + If ChkEstatus.Checked Then Estatus = 1 - If HdnModalidad.Value = "A" Then + If HdnModalidad.Value = "A" Then If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then CargaDatos() Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) @@ -87,9 +86,9 @@ Partial Class Acarreos_CatChoferes End If End If - RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddChofer")) - ObjAcar.Dispose() - UpDatos.Update() + RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddChofer")) + ObjAcar.Dispose() + UpDatos.Update() End Sub diff --git a/Acumuladores/RepEntradasUsadosClientes.aspx.vb b/Acumuladores/RepEntradasUsadosClientes.aspx.vb index 6efd21697..b0ade4bb2 100644 --- a/Acumuladores/RepEntradasUsadosClientes.aspx.vb +++ b/Acumuladores/RepEntradasUsadosClientes.aspx.vb @@ -1,6 +1,5 @@ -Imports Extensiones -Imports System.Data -Imports System +Imports System.Data +Imports Extensiones Imports Microsoft.Reporting.WebForms Partial Class Acumuladores_RepEntradasUsadosClientes diff --git a/Acumuladores/RepIndicadorDiarioDetalle.aspx.vb b/Acumuladores/RepIndicadorDiarioDetalle.aspx.vb index 7f6974f37..3c8ae4a37 100644 --- a/Acumuladores/RepIndicadorDiarioDetalle.aspx.vb +++ b/Acumuladores/RepIndicadorDiarioDetalle.aspx.vb @@ -1,11 +1,6 @@ Option Explicit On Option Strict On - -Imports System.Data -Imports System.IO Imports Extensiones -Imports Microsoft.Reporting.WebForms -Imports System.IO.Compression Partial Class Acumuladores_RepIndicadorDiarioDetalle Inherits ClsPaginas diff --git a/CRM/Acercamiento.aspx.cs b/CRM/Acercamiento.aspx.cs index 8ab7461d7..941639121 100644 --- a/CRM/Acercamiento.aspx.cs +++ b/CRM/Acercamiento.aspx.cs @@ -1,23 +1,21 @@ -using System; +using ADSNetLibrary.SIGAPI.Models.CRM.Request; +using ADSNetLibrary.SIGAPI.Models.CRM.Response; +using ADSNetLibrary.SIGAPI.Models.Encuestas.Request; +using ADSNetLibrary.SIGAPI.Models.Ventas.Request; +using ADSNetLibrary.SIGAPI.Services; +using ADSNetLibrary.SIGAPI.Services.CRM; +using ADSNetLibrary.SIGAPI.Services.Encuestas; +using Extensiones; +using MoreLinq; +using System; using System.Collections.Generic; +using System.Data; +using System.IO; using System.Linq; using System.Web; using System.Web.UI; -using System.Web.UI.WebControls; -using System.IO; -using System.Data; - -using Extensiones; using System.Web.UI.HtmlControls; -using ADSNetLibrary.SIGAPI.Services.CRM; -using ADSNetLibrary.SIGAPI.Models.CRM.Request; -using ADSNetLibrary.SIGAPI.Models.CRM.Response; -using ADSNetLibrary.SIGAPI.Models.Ventas.Request; -using ADSNetLibrary.SIGAPI.Models.Ventas.Response; -using MoreLinq; -using ADSNetLibrary.SIGAPI.Services; -using ADSNetLibrary.SIGAPI.Services.Encuestas; -using ADSNetLibrary.SIGAPI.Models.Encuestas.Request; +using System.Web.UI.WebControls; public partial class CRM_Acercamiento : ClsPaginas { @@ -313,7 +311,7 @@ public partial class CRM_Acercamiento : ClsPaginas if (CveAcercamiento > 0) { ICRMService cRMService = new CRMService(System.Configuration.ConfigurationManager.ConnectionStrings["Conexion"].ConnectionString); - RequestAcercamiento AcercamientoModel = new RequestAcercamiento(UsuarioActual.CveEmpresa, CveAcercamiento); + RequestAcercamiento AcercamientoModel = new RequestAcercamiento(UsuarioActual.CveEmpresa, CveAcercamiento); var objAcercamiento = cRMService.GetAceracamientoCRM(AcercamientoModel); if (objAcercamiento.Result.Count > 0) { @@ -379,7 +377,7 @@ public partial class CRM_Acercamiento : ClsPaginas BtnGuardarAcercamiento.Visible = true; BtnEliminarAcercamiento.Visible = true; } - + else { Alert("La Empresa solicitada no existe, por favor revise su búsqueda.", ModExtensiones.TipoMensaje.MsgAdvertencia); @@ -493,7 +491,7 @@ public partial class CRM_Acercamiento : ClsPaginas DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1")); } - + DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa); DdlProbabilidadAcercamiento.DataBind(); DdlEmpresaCRM.DataBind(); @@ -619,7 +617,7 @@ public partial class CRM_Acercamiento : ClsPaginas private void CargarPS() { DdlPS.setEsWebService(true); - if(CvePS > 0) + if (CvePS > 0) { string productoAsignado = get_GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS: CvePS).FiltroPrimeroValor("PSCodigo"); DdlPS.SelectedValue = CvePS.ToString(); @@ -771,7 +769,7 @@ public partial class CRM_Acercamiento : ClsPaginas AcercaminetoModel.CveUsuarioIng = UsuarioActual.CveUsuario; AcercaminetoModel.CveEncuestaAplicadaProceso = CveEncuestaAplicadaProceso; AcercaminetoModel.FechaApertura = FechaApertura; - AcercaminetoModel.FechaCierre = FechaCierre != null? (DateTime)FechaCierre : ModExtensiones.MinFecha; + AcercaminetoModel.FechaCierre = FechaCierre != null ? (DateTime)FechaCierre : ModExtensiones.MinFecha; AcercaminetoModel.CvePS = DdlPS.SelectedValue.ToEntero(); AcercaminetoModel.CveRechazoMotivo = CveRechazoMotivo; @@ -895,7 +893,7 @@ public partial class CRM_Acercamiento : ClsPaginas { } - + protected void BtnRegistrarCierreCancelacion_Click(object sender, EventArgs e) { @@ -1173,7 +1171,7 @@ public partial class CRM_Acercamiento : ClsPaginas 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, CveEmpresaCRM:CveEmpresaCRM)) + 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')"); @@ -1525,7 +1523,7 @@ public partial class CRM_Acercamiento : ClsPaginas return _CveEncuestaAplicada; } #endregion - + #region "MUESTRA UBICACION GEOGRAFICA" protected void LnkVerUbicacion_Click(object sender, EventArgs e) { @@ -1781,7 +1779,7 @@ public partial class CRM_Acercamiento : ClsPaginas Actualizar = true; CveAcercamientoGasto = GvRow.DataKey("CveAcercamientoGasto").ToEntero(); - + TxtDescripcionGasto.Text = GvRow.DataKey("Descripcion"); TxtImporteGasto.Text = GvRow.DataKey("Importe"); diff --git a/CRM/EmpresaCRM.aspx.cs b/CRM/EmpresaCRM.aspx.cs index 59d6f5833..b63b5860a 100644 --- a/CRM/EmpresaCRM.aspx.cs +++ b/CRM/EmpresaCRM.aspx.cs @@ -1,21 +1,20 @@ -using System; +using ADSNetLibrary.SIGAPI.Models.CRM.Request; +using ADSNetLibrary.SIGAPI.Models.CRM.Response; +using ADSNetLibrary.SIGAPI.Models.Encuestas.Request; +using ADSNetLibrary.SIGAPI.Models.Ventas.Request; +using ADSNetLibrary.SIGAPI.Services; +using ADSNetLibrary.SIGAPI.Services.CRM; +using ADSNetLibrary.SIGAPI.Services.Encuestas; +using Extensiones; +using MoreLinq; +using System; using System.Collections.Generic; +using System.Data; +using System.IO; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; -using System.IO; -using System.Data; -using ADSNetLibrary.SIGAPI.Services.CRM; -using ADSNetLibrary.SIGAPI.Models.CRM.Request; -using ADSNetLibrary.SIGAPI.Models.CRM.Response; -using ADSNetLibrary.SIGAPI.Models.Ventas.Request; -using ADSNetLibrary.SIGAPI.Models.Ventas.Response; -using Extensiones; -using MoreLinq; -using ADSNetLibrary.SIGAPI.Services; -using ADSNetLibrary.SIGAPI.Services.Encuestas; -using ADSNetLibrary.SIGAPI.Models.Encuestas.Request; public partial class CRM_EmpresaCRM : ClsPaginas { @@ -1359,11 +1358,11 @@ public partial class CRM_EmpresaCRM : ClsPaginas DTRespuestasDatosTecnicos = responseGenericGetRespuestas.Result.ToDataTable(); } - var responseGenericGetDatosTecnicosEmpresaCRM = encuestaService.GetDatosTecnicosEmpresaCRM(new RequestDatosTecnicosEmpresaCRMGet() { CveEmpresa = UsuarioActual.Empresa.CveEmpresa , CveEncuesta = CveEncuestaCRM, CveEncuestaAplicada = CveEncuestaAplicada, CvePregunta = -1}); + var responseGenericGetDatosTecnicosEmpresaCRM = encuestaService.GetDatosTecnicosEmpresaCRM(new RequestDatosTecnicosEmpresaCRMGet() { CveEmpresa = UsuarioActual.Empresa.CveEmpresa, CveEncuesta = CveEncuestaCRM, CveEncuestaAplicada = CveEncuestaAplicada, CvePregunta = -1 }); if (responseGenericGetDatosTecnicosEmpresaCRM.IsSuccess) { GvDatosTecnicos.DataSource = responseGenericGetDatosTecnicosEmpresaCRM.Result; - if(responseGenericGetDatosTecnicosEmpresaCRM.Result.Count > 0) + if (responseGenericGetDatosTecnicosEmpresaCRM.Result.Count > 0) { GvDatosTecnicos.Visible = true; } @@ -1567,7 +1566,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas DdlVendedor.Enabled = false; DdlVendedorAsignado.Enabled = false; } - + if (UsuarioActual.TienePermisoProceso(336)) //permiso para editar vendedor { @@ -1822,7 +1821,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas protected void DdlTipoProcesos_Change(Object sender, EventArgs e) { DdlMedioCaptacion.Items.Clear(); - CargaMetodosCaptacion(); + CargaMetodosCaptacion(); UpDatos.Update(); } diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx.vb b/Contabilidad2/CatCuentasAsignaciones.aspx.vb index 2382051b3..c37d1511e 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx.vb +++ b/Contabilidad2/CatCuentasAsignaciones.aspx.vb @@ -1,5 +1,4 @@ Imports System.Data -Imports System.Linq Imports Extensiones Partial Class Contabilidad2_CatCuentasAsignaciones diff --git a/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb index c920c753a..e1e2df363 100644 --- a/Contratos/ContratoObra.aspx.vb +++ b/Contratos/ContratoObra.aspx.vb @@ -1,12 +1,12 @@ Option Explicit On Option Strict On -Imports Extensiones -Imports System.IO Imports System.Data -Imports Microsoft.Reporting.WebForms Imports System.Globalization +Imports System.IO +Imports Extensiones Imports GemBox.Spreadsheet +Imports Microsoft.Reporting.WebForms Partial Class Contratos_ContratoObra Inherits ClsPaginas diff --git a/CxC/RepCxC.aspx.vb b/CxC/RepCxC.aspx.vb index c0d5100a4..fcbbe1977 100644 --- a/CxC/RepCxC.aspx.vb +++ b/CxC/RepCxC.aspx.vb @@ -6,8 +6,8 @@ Imports System.IO Imports Extensiones Imports Microsoft.Reporting.WebForms Partial Class RepCxC - Inherits ClsPaginas - + Inherits ClsPaginas + #Region "P R O P I E D A D E S" Private Property DtDatos As DataTable Get @@ -93,11 +93,11 @@ Partial Class RepCxC Set(value As DataTable) ViewState("DtGrafica") = value End Set - End Property - + End Property + #End Region - - + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then Index = 0 @@ -110,8 +110,8 @@ Partial Class RepCxC If UsuarioActual.CveRol = 1 Or UsuarioActual.TienePermisoProceso(243) Then LnkDescargarSegmentos.Visible = True CreaDataTableColor() End If - End Sub - + End Sub + #Region "CARGAS" Private Sub CargaCombos() 'CargaClientes @@ -321,22 +321,22 @@ Partial Class RepCxC GvDatos.DataBind() ActualizarDatatable(NumCol) Agrupador = DdlGrupo.SelectedItem.Text - End Sub - + End Sub + #End Region - + #Region "CONSULTAR" - + Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click CargaDatos() UPDatos.Update() ActivaEnviarEstadoCuenta() - End Sub - + End Sub + #End Region - + #Region "GRIDVIEW" - + Protected Sub GvDatos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowCreated If e.Row.RowType = DataControlRowType.Header Then Dim FC As New SortedList @@ -598,10 +598,10 @@ Partial Class RepCxC If e.Row.FCHyperLink("LtlVentas").Text.ToDouble = 0 Then e.Row.FCHyperLink("LtlVentas").Text = "-" End If - End Sub - + End Sub + #End Region - + #Region "PERSONALIZAR COLUMNAS" Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click @@ -634,10 +634,10 @@ Partial Class RepCxC End If UPDatos.Update() - End Sub - + End Sub + #End Region - + #Region "IMPRESIONES" Private Sub ActualizarDatatable(NumCol As Integer) @@ -743,12 +743,12 @@ Partial Class RepCxC Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If - End Sub - + End Sub + #End Region - + #Region "TIPO DE CAMBIO" - + Private Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double @@ -765,13 +765,13 @@ Partial Class RepCxC CargaDatos() RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio")) UPDatos.Update() - End Sub - - + End Sub + + #End Region - + #Region "PERSONALIZAR RANGO COLUMNAS" - + Protected Sub GvPersonalizarRango_RowDataBound(sender As Object, e As GridViewRowEventArgs) If e.Row.RowType = DataControlRowType.DataRow Then If Not e.Row.DBCampo("RangoFinal").ToDouble > 0 Then @@ -927,10 +927,10 @@ Partial Class RepCxC End If ObjComp.Dispose() UPDatos.Update() - End Sub - + End Sub + #End Region - + #Region " ENVIAR ESTADO DE CUENTA " Private Sub ActivaEnviarEstadoCuenta() LBEnviarSMS.Visible = DdlGrupo.SelectedValue = "5" And UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12) @@ -1052,11 +1052,11 @@ Partial Class RepCxC Catch ex As Exception OnError("Ocurrió error al mandar el Mail", ex) End Try - End Sub + End Sub #End Region - + #Region "DESCARGA TXT SEGMENTOS" - + Protected Sub LnkDescargarSegmentos_Click(sender As Object, e As EventArgs) Dim ObjMov As New ClsMovimientos If ObjMov.GetDescargaSegmentos(UsuarioActual.CveEmpresa) Then @@ -1216,13 +1216,13 @@ Partial Class RepCxC End If ObjMov.Dispose() - End Sub - - + End Sub + + #End Region - + #Region "GRAFICA" - + Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs) If Not DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then Alert("No hay datos disponibles", TipoMensaje.MsgAdvertencia) @@ -1425,13 +1425,13 @@ Partial Class RepCxC End Sub Protected Sub DdlMostrarGraficaTotales_SelectedIndexChanged(sender As Object, e As EventArgs) CambioGrafica(DdlVer.SelectedValue.ToEntero) - End Sub - - + End Sub + + #End Region - + #Region "SELECTED INDEX CHANGE" - + Protected Sub DdlClienteClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) CargaClientes() End Sub @@ -1443,9 +1443,9 @@ Partial Class RepCxC DdlClientesWS.DataBind() DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1")) End If - End Sub - + End Sub + #End Region - - + + End Class \ No newline at end of file diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 82020769f..acc7647b3 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -2,10 +2,8 @@ Option Strict On Imports System.Data -Imports Extensiones Imports System.IO -Imports Microsoft.Reporting.WebForms -Imports DocumentFormat.OpenXml.Drawing.Diagrams +Imports Extensiones 'Imports DocumentFormat.OpenXml.Wordprocessing diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index eb384fd34..e8df55bcc 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -2,12 +2,10 @@ Option Explicit On Imports System.Data -Imports System.Data.Entity.Core.Common.CommandTrees Imports System.IO Imports Extensiones Imports Microsoft.Reporting.WebForms -Imports Stimulsoft.Base.Indicator Partial Class Inventarios_EntregaAlmacen Inherits ClsPaginas diff --git a/Inventarios/EntregaAlmacenRuta.aspx.cs b/Inventarios/EntregaAlmacenRuta.aspx.cs index 89cf1346b..7830655a6 100644 --- a/Inventarios/EntregaAlmacenRuta.aspx.cs +++ b/Inventarios/EntregaAlmacenRuta.aspx.cs @@ -1,28 +1,27 @@ -using System; +using Extensiones; +using System; using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; using System.Data; -using Extensiones; -using Microsoft.Reporting.WebForms; using System.Text; +using System.Web.UI.WebControls; public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas { - + DataTable DTGenerarDocumentos { - get { + get + { - if(ViewState["DTGenerarDocumentos"] == null){ + if (ViewState["DTGenerarDocumentos"] == null) + { ViewState["DTGenerarDocumentos"] = new DataTable(); } return (DataTable)ViewState["DTGenerarDocumentos"]; } - set { + set + { ViewState["DTGenerarDocumentos"] = (DataTable)value; } } @@ -61,7 +60,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas ViewState["DTRecoleccion"] = (DataTable)value; } } - + bool SeleccionEntrega { get @@ -69,18 +68,19 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas if (ViewState["SeleccionEntrega"] == null) { ViewState["SeleccionEntrega"] = false; - } - return (bool) ViewState["SeleccionEntrega"]; + } + return (bool)ViewState["SeleccionEntrega"]; } set { ViewState["SeleccionEntrega"] = (bool)value; } } - + int CveEntregaAlmacen { - get { + get + { if (ViewState["CveEntregaAlmacen"] == null) { @@ -98,35 +98,35 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) - { + { - SeleccionEntrega = true; + SeleccionEntrega = true; CargaCombos(); - CargaDatos(); + CargaDatos(); #region RECOLEECION - // CargaDatosRecoleccion(); - + // CargaDatosRecoleccion(); + #endregion } } protected void BtnAsignar_Click(object sender, EventArgs e) - { + { - if(DdlChofer.SelectedValue.ToEntero() <= 0) + if (DdlChofer.SelectedValue.ToEntero() <= 0) { Alert("Debe seleccionar un chofer.", ModExtensiones.TipoMensaje.MsgAdvertencia); return; } - if(DdlUnidadCamion.SelectedValue.ToEntero() <= 0) + if (DdlUnidadCamion.SelectedValue.ToEntero() <= 0) { Alert("Debe seleccionar una unidad", ModExtensiones.TipoMensaje.MsgAdvertencia); return; - } + } StringBuilder SBError = new StringBuilder(); ActualizaOrdenDTGenerarDocumentos(); @@ -136,16 +136,16 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas bool TieneError = false; ClsGenerales ObjGeneral = new ClsGenerales(); ObjGeneral.IniciaTransacSQL(); - GridViewRowCollection Grid = GvGenerarDocumentos.Rows; + GridViewRowCollection Grid = GvGenerarDocumentos.Rows; string Usuario = DdlChofer.SelectedItem.Text; - + int CveDireccionOrigen = -1; foreach (GridViewRow row in Grid) { int Orden = row.DataKey("Orden").ToEntero(); - int CveDireccionDestino = row.DataKey("CveDireccionEnvio").ToEntero(); + int CveDireccionDestino = row.DataKey("CveDireccionEnvio").ToEntero(); if (CveDireccionDestino <= 0) { @@ -154,12 +154,12 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas break; } DateTime fechallegada = (TxtFechaEntrega.Text + " 23:59").ToDate(); - int CveEntregaAlmacen = ObjGeneral.AddInvEntregaAlmacenRuta(row.DataKey("CveSubProyectoOrigen").ToEntero(), CveDireccionOrigen, CveDireccionDestino, row.DataKey("CveMovimiento").ToEntero(), DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada, "E", "","", "1900-01-01".ToDate(), Orden,0, 1); + int CveEntregaAlmacen = ObjGeneral.AddInvEntregaAlmacenRuta(row.DataKey("CveSubProyectoOrigen").ToEntero(), CveDireccionOrigen, CveDireccionDestino, row.DataKey("CveMovimiento").ToEntero(), DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada, "E", "", "", "1900-01-01".ToDate(), Orden, 0, 1); CveDireccionOrigen = row.DataKey("CveDireccionEnvio").ToEntero(); if (CveEntregaAlmacen > 0) - { - int CveTimbre = ObjGeneral.AddGralTimbre("Ent", row.DataKey("CveSubProyectoOrigen").ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen:CveEntregaAlmacen, AplicaCP: ChkEmitirCartaPorte.Checked); + { + int CveTimbre = ObjGeneral.AddGralTimbre("Ent", row.DataKey("CveSubProyectoOrigen").ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen: CveEntregaAlmacen, AplicaCP: ChkEmitirCartaPorte.Checked); if (CveTimbre <= 0) { @@ -178,9 +178,9 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al agregar entrega almacen. "); TieneError = true; break; - } + } } - + if (!TieneError) { @@ -195,7 +195,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas { TieneError = true; ModExtensiones.GuardaLog(ex.Message); - } + } } if (!TieneError) @@ -207,16 +207,16 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas bool huboerror = false; foreach (int cvetimbre in ListaTimbres) - { - Timbres ObjTimbres = new Timbres("Ent", cvetimbre, UsuarioActual); + { + Timbres ObjTimbres = new Timbres("Ent", cvetimbre, UsuarioActual); MensajeAlert.AppendFormat("Folio: {0}  ", ObjTimbres.ObjFactura.SerieFolio); if (ObjTimbres.Timbrar()) - { - + { + MensajeAlert.AppendFormat("XML    ", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto))); MensajeAlert.AppendFormat("PDF   ", ModExtensiones.Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", cvetimbre))); MensajeAlert.Append("
"); - + DdlChofer.SelectedValueExist("-1"); DdlUnidadCamion.SelectedValueExist("-1"); ChkEmitirCartaPorte.Checked = false; @@ -228,7 +228,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas { huboerror = true; MensajeAlert.AppendFormat("
  • {0}
", ObjTimbres.MsgError); - } + } } Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion); CargaDatos(); @@ -239,10 +239,11 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas ObjGeneral.RollBack(); } ObjGeneral.Dispose(); - }else + } + else { Alert(SBError.ToString(), ModExtensiones.TipoMensaje.MsgAdvertencia); - } + } } @@ -276,11 +277,11 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas int CveDireccionOrigen = -1; foreach (GridViewRow row in gvR.Rows) { - int Orden = row.DataKey("Orden").ToEntero(); + int Orden = row.DataKey("Orden").ToEntero(); int CveEntregaAlmacen = row.DataKey("CveEntregaAlmacen").ToEntero(); if (row.FCCheckBox("Chk").Checked) - { + { CveDireccionOrigen = row.DataKey("CveDireccionOrigen").ToEntero(); if (CveEntregaAlmacen > 0) @@ -345,7 +346,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas foreach (int cvetimbre in ListaTimbres) { Timbres ObjTimbres = new Timbres("Rec", cvetimbre, UsuarioActual); - + if (ObjTimbres.Timbrar()) { //ClsPaginas.PdfFactura(ref ObjTimbres.ObjFactura,"0",true); @@ -369,7 +370,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas //if (UsuarioActual.Empresa.Funcionalidad(161) == "1") // MensajeAlert.AppendFormat("", Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", cvetimbre))); //else - // MensajeAlert.AppendFormat("", ModExtensiones.Encripta(String.Format("OP=CARPO&CveTimbre={0}", cvetimbre))); + // MensajeAlert.AppendFormat("", ModExtensiones.Encripta(String.Format("OP=CARPO&CveTimbre={0}", cvetimbre))); } else @@ -381,7 +382,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas CargaDatosRecoleccion(); DdlChofer.SelectedValueExist("-1"); DdlUnidadCamion.SelectedValueExist("-1"); - + SeleccionEntrega = false; SeleccionarGenerar(1); UpDatos.Update(); @@ -400,7 +401,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas private void CargaDatos() { ClsGenerales ObjGeneral = new ClsGenerales(); - if (ObjGeneral.GetInvEntregaAlmacenRuta(DdlSubProyecto.SelectedValue.ToEntero(), TxtFechaI.Text.ToDate(), TxtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa, 1)) + if (ObjGeneral.GetInvEntregaAlmacenRuta(DdlSubProyecto.SelectedValue.ToEntero(), TxtFechaI.Text.ToDate(), TxtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa, 1)) { GvEntregas.DataSource = ObjGeneral.DtResultados; DTDatosConsulta = ObjGeneral.DtResultados; @@ -410,12 +411,12 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas ObjGeneral.Dispose(); GvEntregas.DataBind(); - UpDatos.Update(); + UpDatos.Update(); } private void CargaCombos() { - DdlUnidadCamion.DataSource = get_GlobalDTInvCamiones(UsuarioActual.CveEmpresa); + DdlUnidadCamion.DataSource = get_GlobalDTInvCamiones(UsuarioActual.CveEmpresa); DdlUnidadCamion.Items.Insert(0, new ListItem("Seleccione", "-1")); DdlUnidadCamion.DataBind(); DdlUnidadRec.DataSource = get_GlobalDTInvCamiones(UsuarioActual.CveEmpresa); @@ -424,7 +425,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas TxtFechaI.Text = DateTime.Now.AddDays(-1).ToShortDateString(); TxtFechaF.Text = DateTime.Now.AddDays(3).ToShortDateString(); - + DdlChofer.DataSource = get_GlobalDTChoferes(UsuarioActual.CveEmpresa); DdlChofer.DataBind(); DdlChofer.Items.Insert(0, new ListItem("Seleccione", "-1")); @@ -432,21 +433,22 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas DdlChoferRec.DataBind(); DdlChoferRec.Items.Insert(0, new ListItem("Seleccione", "-1")); - TxtFechaEntrega.Text = DateTime.Now.ToShortDateString(); + TxtFechaEntrega.Text = DateTime.Now.ToShortDateString(); - TabRecoleccion.Visible = UsuarioActual.Empresa.Funcionalidad(531)=="1"; + TabRecoleccion.Visible = UsuarioActual.Empresa.Funcionalidad(531) == "1"; TxtFechaLimite.Text = DateTime.Now.ToShortDateString(); CargarCentrosDeCosto(null, DdlSubProyecto, null, LblSubProyecto); CargarCentrosDeCosto(null, DdlSubProyectoRecoleccion, null, LblSubProyectoRecoleccion); - } + } protected void LnkGenerarDocumentos_Click(object sender, EventArgs e) { SeleccionarGenerar(1); - } - private void SeleccionarGenerar(int Opcion ) { + } + private void SeleccionarGenerar(int Opcion) + { if (SeleccionEntrega) { @@ -542,7 +544,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas } } - + } else { @@ -550,8 +552,8 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas BtnConsultar.Visible = true; SeleccionEntrega = true; LnkGenerarDocumentos.Text = "Preseleccionar"; - LnkGenerarDocumentos.CssClass = "btn btn-primary"; - + LnkGenerarDocumentos.CssClass = "btn btn-primary"; + OcultarmostarDatosEntrega(false); @@ -561,10 +563,10 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas UpDatos.Update(); UpFiltro.Update(); - } + } } - private void OcultarmostarDatosEntrega(bool mostrar ) + private void OcultarmostarDatosEntrega(bool mostrar) { //DVDatosEntrega1.Visible = mostrar; DVDatosEntrega2.Visible = mostrar; @@ -586,21 +588,21 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas { DvCartaPorte2.Visible = mostrar; } - + } - + private void ActualizaOrdenDTGenerarDocumentos() { - string[] OrdenMovimientos = Request.Form.GetValues("OrdenMovimientos"); + string[] OrdenMovimientos = Request.Form.GetValues("OrdenMovimientos"); int NumOrden = 1; foreach (string CveMovimiento in OrdenMovimientos) { - foreach(DataRow dRow in DTGenerarDocumentos.Rows) + foreach (DataRow dRow in DTGenerarDocumentos.Rows) { - if (CveMovimiento.ToEntero() == dRow["CveMovimiento"].ToString().ToEntero() ) + if (CveMovimiento.ToEntero() == dRow["CveMovimiento"].ToString().ToEntero()) { dRow["Orden"] = NumOrden; } @@ -608,7 +610,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas DTGenerarDocumentos.AcceptChanges(); NumOrden++; } - + DataView DTview = new DataView(DTGenerarDocumentos); // Sort by State and ZipCode column in descending order @@ -618,13 +620,13 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas GvGenerarDocumentos.DataBind(); UpDatos.Update(); - + } protected void BtnConsultar_Click(object sender, EventArgs e) { - if(Tab.ActiveTabIndex == 0) + if (Tab.ActiveTabIndex == 0) { CargaDatos(); } @@ -633,14 +635,14 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas CargaDatosRecoleccion(); } - + } #region RECOLECCION - private DataTable InitDTRecoleccion() + private DataTable InitDTRecoleccion() { DataTable DT = new DataTable(); @@ -649,8 +651,8 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas DT.Columns.Add("CvePS", System.Type.GetType("System.Int32")); DT.Columns.Add("Cantidad", System.Type.GetType("System.Double")); DT.Columns.Add("CveUnidadMedida", System.Type.GetType("System.Int32")); - DT.Columns.Add("CveUsuario",System.Type.GetType("System.Int32")); - DT.Columns.Add("FechaIng",System.Type.GetType("System.DateTime")); + DT.Columns.Add("CveUsuario", System.Type.GetType("System.Int32")); + DT.Columns.Add("FechaIng", System.Type.GetType("System.DateTime")); DT.Columns.Add("CodigoPS", System.Type.GetType("System.String")); DT.Columns.Add("Abreviatura", System.Type.GetType("System.String")); @@ -667,9 +669,9 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas } ObjGeneral.Dispose(); gvR.DataBind(); - UpDatosRecoleccion.Update(); + UpDatosRecoleccion.Update(); } - + private void CargaDatosRecoleccionDetallePS() { if (CveEntregaAlmacen > 0) @@ -679,18 +681,20 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas if (ObjGenerales.GetEntregaAlmacenRutaDetalle(CveEntregaAlmacen)) { GvModalPSRecoleccion.DataSource = ObjGenerales.DtResultados; - }else + } + else { GvModalPSRecoleccion.DataSource = null; - } + } ObjGenerales.Dispose(); - }else + } + else { GvModalPSRecoleccion.DataSource = DTRecoleccion; } GvModalPSRecoleccion.DataBind(); UpModalRecoleccion.Update(); - } + } protected void DdlModalRecoleccionCliente_SelectedIndexChanged(object sender, EventArgs e) { ModalRecoleccionCargaDirecciones(); @@ -698,14 +702,14 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas private void ModalRecoleccionCargaDirecciones() { - if(DdlModalRecoleccionCliente.SelectedValue.ToEntero() > 0) + if (DdlModalRecoleccionCliente.SelectedValue.ToEntero() > 0) { ClsClientes ObjClientes = new ClsClientes(); if (ObjClientes.DireccionEnvioGet(-1, DdlModalRecoleccionCliente.SelectedValue.ToEntero(), -1)) { DdlmodalRecoleccionDireccion.DataSource = ObjClientes.DtResultados.FiltraParametros("CveSubProyecto = " + DdlSubProyectoRecoleccion.SelectedValue.ToEntero()); } - ObjClientes.Dispose(); + ObjClientes.Dispose(); } DdlmodalRecoleccionDireccion.DataBind(); @@ -713,11 +717,11 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas UpModalRecoleccion.Update(); } - + protected void LnkAgregarRecoleccion_Click(object sender, EventArgs e) { - + LtlModalRecoleccionTitulo.Text = "Agregar Recolección"; BtnModalRecoleccionGuardar.Text = "Agregar"; @@ -772,7 +776,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas DdlmodalRecoleccionDireccion.SelectedValueExist(-1); TxtModalRecoleccionCantidad.Text = ""; DdlModalRecoleccionUnidad.Items.Clear(); - DdlModalRecoleccionUnidad.Items.Add(new ListItem("Seleccione una","-1")); + DdlModalRecoleccionUnidad.Items.Add(new ListItem("Seleccione una", "-1")); DdlProducto2.txtValue.Value = ""; DdlProducto2.txtText.Value = ""; @@ -799,48 +803,48 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas protected void BtnModalRecoleccionGuardar_Click(object sender, EventArgs e) { - + if (DdlmodalRecoleccionDireccion.SelectedValue.ToEntero() <= 0) { Alert("Debe seleccionar la dirección de recolección", ModExtensiones.TipoMensaje.MsgAdvertencia); return; - } + } - bool ProcesoOK = false; + bool ProcesoOK = false; ClsGenerales ObjGenerales = new ClsGenerales(); ObjGenerales.IniciaTransacSQL(); - - if( CveEntregaAlmacen == -1) + + if (CveEntregaAlmacen == -1) { DateTime fechallegada = (TxtFechaEntrega.Text + " 23:59").ToDate(); - CveEntregaAlmacen = ObjGenerales.AddInvEntregaAlmacenRuta(DdlSubProyectoRecoleccion.SelectedValue.ToEntero(), DdlmodalRecoleccionDireccion.SelectedValue.ToEntero(), -1,-1, DdlChoferRec.SelectedValue.ToEntero(), DdlUnidadRec.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada, "R",TxtFolioReferencia.Text, TxtReferencia.Text, TxtFechaLimite.Text.ToDate(), 1,0,1) ; + CveEntregaAlmacen = ObjGenerales.AddInvEntregaAlmacenRuta(DdlSubProyectoRecoleccion.SelectedValue.ToEntero(), DdlmodalRecoleccionDireccion.SelectedValue.ToEntero(), -1, -1, DdlChoferRec.SelectedValue.ToEntero(), DdlUnidadRec.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada, "R", TxtFolioReferencia.Text, TxtReferencia.Text, TxtFechaLimite.Text.ToDate(), 1, 0, 1); if (CveEntregaAlmacen > 0) { //CveTimbrenuevo = ObjGenerales.AddGralTimbre("Rec", "-1", -1, "-1", TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, -1, ChkEmitirCartaPorte.Checked, CveEntregaAlmacen, -1); //if (CveTimbrenuevo > 0) //{ - foreach (DataRow dRow in DTRecoleccion.Rows) + foreach (DataRow dRow in DTRecoleccion.Rows) + { + if (ObjGenerales.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen, dRow["CvePS"].ToString().ToEntero(), dRow["Cantidad"].ToString().ToDecimal(), dRow["CveUnidadMedida"].ToString().ToEntero(), UsuarioActual.CveUsuario)) { - if(ObjGenerales.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen,dRow["CvePS"].ToString().ToEntero(), dRow["Cantidad"].ToString().ToDecimal(),dRow["CveUnidadMedida"].ToString().ToEntero(), UsuarioActual.CveUsuario)) - { - ProcesoOK = true; - } - else - { - ProcesoOK = false; - break; - } + ProcesoOK = true; } + else + { + ProcesoOK = false; + break; + } + } //} } } else { ProcesoOK = ObjGenerales.UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen, DdlmodalRecoleccionDireccion.SelectedValue.ToEntero(), -1, DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveEmpresa); - } + } if (ProcesoOK) { @@ -849,11 +853,11 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas RegistraScript("$('#DivModalRecoleccion').modal('hide');"); } else - { + { ObjGenerales.RollBack(); - Alert("Ocurrió un error.",ModExtensiones.TipoMensaje.MsgError); + Alert("Ocurrió un error.", ModExtensiones.TipoMensaje.MsgError); } - + ObjGenerales.Dispose(); CargaDatosRecoleccion(); } @@ -882,7 +886,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas GridViewRow GvRow = (GridViewRow)LnkEliminar.NamingContainer; if (CveEntregaAlmacen > 0) - { + { int CveEntregaAlmacenDetalleEliminar = GvRow.DataKey("CveEntregaAlmacenDetalle").ToEntero(); ClsGenerales ObjGenerales = new ClsGenerales(); @@ -899,17 +903,17 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas DTRecoleccion.Rows[DTIndex].Delete(); DTRecoleccion.AcceptChanges(); - } + } CargaDatosRecoleccionDetallePS(); } protected void LnkModalAgregarPS_Click(object sender, EventArgs e) { - if(CveEntregaAlmacen > 0) + if (CveEntregaAlmacen > 0) { ClsGenerales ObjGenerales = new ClsGenerales(); - if(ObjGenerales.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen,DdlProducto2.SelectedValue.ToEntero(), TxtModalRecoleccionCantidad.Text.ToEntero(), DdlModalRecoleccionUnidad.SelectedValue.ToEntero(), UsuarioActual.CveUsuario)) + if (ObjGenerales.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen, DdlProducto2.SelectedValue.ToEntero(), TxtModalRecoleccionCantidad.Text.ToEntero(), DdlModalRecoleccionUnidad.SelectedValue.ToEntero(), UsuarioActual.CveUsuario)) { } @@ -917,17 +921,17 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas } else { - DataRow dRow = DTRecoleccion.NewRow() ; + DataRow dRow = DTRecoleccion.NewRow(); dRow["CveEntregaAlmacenDetalle"] = -1; dRow["CveEntregaAlmacen"] = CveEntregaAlmacen; dRow["CvePS"] = DdlProducto2.SelectedValue.ToEntero(); - dRow["Cantidad"] =TxtModalRecoleccionCantidad.Text.ToEntero(); + dRow["Cantidad"] = TxtModalRecoleccionCantidad.Text.ToEntero(); dRow["CveUnidadMedida"] = DdlModalRecoleccionUnidad.SelectedValue.ToEntero(); - dRow["CveUsuario"] =UsuarioActual.CveUsuario; + dRow["CveUsuario"] = UsuarioActual.CveUsuario; dRow["FechaIng"] = DateTime.Now; dRow["CodigoPS"] = DdlProducto2.txtText.Value; - dRow["Abreviatura"] =DdlModalRecoleccionUnidad.SelectedItem.Text; + dRow["Abreviatura"] = DdlModalRecoleccionUnidad.SelectedItem.Text; DTRecoleccion.Rows.Add(dRow); //GvModalPSRecoleccion.DataSource = DTRecoleccion; @@ -935,8 +939,8 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas LimpiarControlesPS(); CargaDatosRecoleccionDetallePS(); - - } + + } private void LimpiarControlesPS() { TxtModalRecoleccionCantidad.Text = ""; @@ -945,10 +949,10 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas DdlProducto2.txtValue.Value = ""; UpModalRecoleccion.Update(); } - + protected void Tab_ActiveTabChanged(object sender, EventArgs e) { - if(Tab.ActiveTabIndex == 0) + if (Tab.ActiveTabIndex == 0) { SeleccionEntrega = false; SeleccionarGenerar(1); @@ -958,7 +962,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas OcultarmostarDatosEntrega(true); } } - + private void CargaModalCombosDirecciones(int CveCliente, int CveDireccionEnvio) { @@ -989,10 +993,10 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas int CveDireccion = GvRow.DataKey("CveDireccionEnvio").ToEntero(); HdnCveVenta.Value = GvRow.DataKey("CveVenta"); - CargaModalCombosDirecciones(CveCliente, CveDireccion); + CargaModalCombosDirecciones(CveCliente, CveDireccion); UpModalEditarentrega.Update(); - this.RegistraScript("$('#DivEditarEntrega').modal('show');"); + this.RegistraScript("$('#DivEditarEntrega').modal('show');"); } protected void BtnModalEditarentrega_Click(object sender, EventArgs e) @@ -1010,12 +1014,12 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas if (ProcesoOK) { this.RegistraScript("$('#DivEditarEntrega').modal('hide');"); - Alert("Dirección Actualizada correctamente.",ModExtensiones.TipoMensaje.ToastInformacion); + Alert("Dirección Actualizada correctamente.", ModExtensiones.TipoMensaje.ToastInformacion); CargaDatos(); } } - + protected void gvR_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) @@ -1027,13 +1031,13 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas { LnkEditar.Visible = true; LnkEliminar.Visible = true; - + } if (e.Row.DataKey("CveTimbre") != "") { e.Row.FCCheckBox("Chk").Visible = false; } - + } } diff --git a/Inventarios/InventarioFisico.aspx.vb b/Inventarios/InventarioFisico.aspx.vb index 3ba06162c..3bbdccb25 100644 --- a/Inventarios/InventarioFisico.aspx.vb +++ b/Inventarios/InventarioFisico.aspx.vb @@ -1,5 +1,5 @@ -Imports Extensiones -Imports System.Data +Imports System.Data +Imports Extensiones Partial Class Inventarios_InventarioFisico Inherits ClsPaginas diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index 3d38484e1..246846c89 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -1,11 +1,11 @@ Option Strict On Option Explicit On -Imports Microsoft.Reporting.WebForms Imports System.Data -Imports Extensiones Imports System.IO +Imports Extensiones Imports GemBox.Spreadsheet +Imports Microsoft.Reporting.WebForms Partial Class Inventarios_RecepcionAlmacen Inherits ClsPaginas diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index 7de97217d..f26d169af 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -2,8 +2,8 @@ Option Strict On Imports System.Data -Imports Extensiones Imports System.IO +Imports Extensiones Imports Microsoft.Reporting.WebForms 'Imports DocumentFormat.OpenXml.Wordprocessing diff --git a/Inventarios/RepEntradasSalidas.aspx.vb b/Inventarios/RepEntradasSalidas.aspx.vb index eb036e9c3..42a793120 100644 --- a/Inventarios/RepEntradasSalidas.aspx.vb +++ b/Inventarios/RepEntradasSalidas.aspx.vb @@ -1,7 +1,7 @@ Imports System.Data +Imports System.IO Imports Extensiones Imports Microsoft.Reporting.WebForms -Imports System.IO Partial Class Inventarios_ReporteEntradasSalidas Inherits ClsPaginas diff --git a/Inventarios/RepEntregaAlmacenRuta.aspx.cs b/Inventarios/RepEntregaAlmacenRuta.aspx.cs index 229e939f5..bd878c25e 100644 --- a/Inventarios/RepEntregaAlmacenRuta.aspx.cs +++ b/Inventarios/RepEntregaAlmacenRuta.aspx.cs @@ -1,15 +1,9 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -using Extensiones; +using Extensiones; +using System; using System.Data; -using Microsoft.Reporting.WebForms; using System.IO; using System.Text; +using System.Web.UI.WebControls; public partial class General_RepEntregaAlmacenRuta : ClsPaginas { @@ -248,7 +242,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas - + #endregion @@ -259,9 +253,9 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas if (!IsPostBack) { CargaEstatus(); - CargaCombosModalEntrega(); + CargaCombosModalEntrega(); InicializaFechas(); - CargaChoferes(); + CargaChoferes(); UPFiltros.Update(); CargarCentrosDeCosto(null, DdlSucursales, null, LblDdlSucursal); @@ -279,7 +273,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas { ClsInventarios ObjInventarios = new ClsInventarios(); - if (ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa,Estatus:1) && ObjInventarios.DtResultados.Rows.Count > 0) + if (ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa, Estatus: 1) && ObjInventarios.DtResultados.Rows.Count > 0) { DdlModalCamion.DataSource = ObjInventarios.DtResultados; } @@ -304,22 +298,22 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas if (ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1)) { - DdlChofer.DataSource = ObjAcar.DtResultados; + DdlChofer.DataSource = ObjAcar.DtResultados; } ObjAcar.Dispose(); DdlChofer.DataBind(); DdlChofer.Items.Insert(0, new ListItem("Todos", "-1")); } - + protected void CargaEstatus() { - - DdlEstatus.Items.Insert(0, new ListItem("Todos ", "-1")); - DdlEstatus.Items.Insert(1, new ListItem("Registrado", "0")); - DdlEstatus.Items.Insert(2, new ListItem("Timbrado", "1")); - DdlEstatus.Items.Insert(3, new ListItem("Cancelado ", "2")); - } + + DdlEstatus.Items.Insert(0, new ListItem("Todos ", "-1")); + DdlEstatus.Items.Insert(1, new ListItem("Registrado", "0")); + DdlEstatus.Items.Insert(2, new ListItem("Timbrado", "1")); + DdlEstatus.Items.Insert(3, new ListItem("Cancelado ", "2")); + } protected void InicializaFechas() { @@ -333,7 +327,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas { ClsGenerales ObjGeneral = new ClsGenerales(); - if (ObjGeneral.GetInvEntregaAlmacenRutaRep(DdlSucursales.SelectedValue.ToEntero(),UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero(), TxtFechaI.Text.ToDate(), TxtFechaF.Text.ToDate(), DdlChofer.SelectedValue.ToEntero(),UsuarioActual.CveUsuario)) + if (ObjGeneral.GetInvEntregaAlmacenRutaRep(DdlSucursales.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero(), TxtFechaI.Text.ToDate(), TxtFechaF.Text.ToDate(), DdlChofer.SelectedValue.ToEntero(), UsuarioActual.CveUsuario)) { DTDatos = ObjGeneral.DtResultados; GVDatos.DataSource = DTDatos; @@ -342,8 +336,8 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas ObjGeneral.Dispose(); GVDatos.DataBind(); UPDatos.Update(); - } - + } + #endregion #region BOTONES @@ -355,17 +349,17 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas protected void imgEditar_Click(object sender, EventArgs e) { - + GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero(); CveTimbre = GvRow.DataKey("CveTimbre").ToEntero(); - int CveCliente = GvRow.DataKey("CveCliente").ToEntero(); + int CveCliente = GvRow.DataKey("CveCliente").ToEntero(); int CveAlmacen = GvRow.DataKey("CveAlmacen").ToEntero(); DdlModalCamion.SelectedValueExist(GvRow.DataKey("CveCamion")); - DdlModalChofer.SelectedValueExist(GvRow.DataKey("CveChofer")); + DdlModalChofer.SelectedValueExist(GvRow.DataKey("CveChofer")); TxtFechaEntrega.Text = GvRow.DataKey("FechaEntrega").ToDate().ToString("dd/MM/yyyy"); TxtFechaLlegada.Text = GvRow.DataKey("FechaLlegada").ToDate().ToString("dd/MM/yyyy"); @@ -383,11 +377,11 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas if (GvRow.DataKey("CveCamionRemolque2").ToEntero() > 0) { DdlRemolque2.SelectedValueExist(GvRow.DataKey("CveCamionRemolque2")); - } + } CveDireccionOrigen = GvRow.DataKey("CveDireccionOrigen").ToEntero(); CveDireccionDestino = GvRow.DataKey("CveDireccionDestino").ToEntero(); - ModalActualizaDirecciones( CveTimbre); + ModalActualizaDirecciones(CveTimbre); if (CveDireccionOrigen > 0) @@ -410,12 +404,13 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas } - private void ModalActualizaDirecciones(int CveTimbre) + private void ModalActualizaDirecciones(int CveTimbre) { ClsGenerales ObjGeneral = new ClsGenerales(); - if (ObjGeneral.GetInvEntregaAlmacenRutaRep( -1, UsuarioActual.CveEmpresa, -1, new DateTime(1900,01,01), new DateTime(9000, 01, 01),-1, CveTimbre)) { - + if (ObjGeneral.GetInvEntregaAlmacenRutaRep(-1, UsuarioActual.CveEmpresa, -1, new DateTime(1900, 01, 01), new DateTime(9000, 01, 01), -1, CveTimbre)) + { + if (ObjGeneral.DtResultados.Rows.Count > 0) { if (CveDireccionOrigen > 0) @@ -438,7 +433,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas - private void CargaModalCombosDirecciones(int CveCliente, int CveDireccionOrigen, int CveAlmacen ) + private void CargaModalCombosDirecciones(int CveCliente, int CveDireccionOrigen, int CveAlmacen) { //DdlModalDireccionOrigen.Items.Clear(); @@ -483,7 +478,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas Timbres ObjTimbres = new Timbres(TimbreTipoDocto, cvetimbre, UsuarioActual); StringBuilder MensajeAlert = new StringBuilder(); MensajeAlert.AppendFormat("Folio: {0}  ", ObjTimbres.ObjFactura.SerieFolio); - if (ObjTimbres.MsgError =="" && ObjTimbres.Timbrar()) + if (ObjTimbres.MsgError == "" && ObjTimbres.Timbrar()) { MensajeAlert.AppendFormat("XML    ", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto))); Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion); @@ -494,12 +489,12 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas MensajeAlert.AppendFormat("
  • {0}
", ObjTimbres.MsgError); Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgError); } - + } protected void LnkCancelaTimbre_Click(object sender, EventArgs e) { - + bool ProcesoOK = false; LinkButton LnkCancelarFolioFiscal = (LinkButton)sender; GridViewRow GvRow = (GridViewRow)LnkCancelarFolioFiscal.BindingContainer; @@ -508,27 +503,29 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas string FolioFiscalCancelar = GvRow.DataKey("FolioFiscal").ToString(); string RFCReceptor = GvRow.DataKey("RFCReceptor").ToString(); string RFCEmisor = GvRow.DataKey("RFCEmisor").ToString(); - int CvePACCancelacion = GvRow.DataKey("CvePAC").ToEntero(); + int CvePACCancelacion = GvRow.DataKey("CvePAC").ToEntero(); int CveSubProyecto = GvRow.DataKey("CveSubProyecto").ToEntero(); int CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero(); string TimbreTipoDocto = GvRow.DataKey("TimbreTipoDocto").ToString(); - + Timbrado ObjCancelacion = new Timbrado(); ClsGenerales ObjGenerales = new ClsGenerales(); - ObjGenerales.IniciaTransacSQL (); + ObjGenerales.IniciaTransacSQL(); if (EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptor)) { - if (ObjGenerales.CancelarTimbreTimbrado(CveTimbre, DateTime.Now, CvePACCancelacion,"", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa )){ + if (ObjGenerales.CancelarTimbreTimbrado(CveTimbre, DateTime.Now, CvePACCancelacion, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) + { ProcesoOK = true; - } + } } else { ModExtensiones.RespuestaCancelacionSAT Resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptor, RFCEmisor, CvePACCancelacion, CveSATMotivoCancelacion: 3); - if (Resp.Verificado) { + if (Resp.Verificado) + { if (ObjGenerales.CancelarTimbreTimbrado(CveTimbre, DateTime.Now, CvePACCancelacion, ObjCancelacion.CancelacionAcuse, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) { @@ -543,7 +540,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas // CveTimbre = ObjGenerales.AddGralTimbre("Ent", CveSubProyecto, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen: CveEntregaAlmacen, AplicaCP: true); //} ProcesoOK = true; - } + } } } @@ -588,17 +585,17 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas protected void BtnModalEditarentrega_Click(object sender, EventArgs e) { - bool ProcesoOK = true ; + bool ProcesoOK = true; ClsGenerales ObjGral = new ClsGenerales(); - if(!ObjGral.UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen,-1,-1, DdlModalChofer.SelectedValue.ToEntero(), DdlModalCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveEmpresa, - TxtFechaLlegada.Text.ToDate(), CveCamionRemolque1: DdlRemolque1.SelectedValue.ToEntero(), CveCamionRemolque2: DdlRemolque2.SelectedValue.ToEntero(), Distancia: TxtDistancia.Text.ToEntero(), + if (!ObjGral.UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen, -1, -1, DdlModalChofer.SelectedValue.ToEntero(), DdlModalCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveEmpresa, + TxtFechaLlegada.Text.ToDate(), CveCamionRemolque1: DdlRemolque1.SelectedValue.ToEntero(), CveCamionRemolque2: DdlRemolque2.SelectedValue.ToEntero(), Distancia: TxtDistancia.Text.ToEntero(), CveConfigAutoTransporte: DdlConfigAuto.SelectedValue.ToEntero())) { ProcesoOK = false; } ObjGral.Dispose(); - + if (ProcesoOK) { this.RegistraScript("$('#DivEditarEntrega').modal('hide');"); @@ -643,17 +640,17 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas if (e.Row.DataKey("Estatus").ToEntero() == 1) { - LnkCancelaTimbre.Visible = UsuarioActual.TienePermisoProceso(338); + LnkCancelaTimbre.Visible = UsuarioActual.TienePermisoProceso(338); if (bool.Parse(e.Row.DataKey("AplicaCP"))) { if (e.Row.FCHyperLink("HplPDF") != null) - e.Row.FCHyperLink("HplPDF").NavigateUrl = "/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", e.Row.DataKey("CveTimbre"))) ; + e.Row.FCHyperLink("HplPDF").NavigateUrl = "/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", e.Row.DataKey("CveTimbre"))); } else { - if (e.Row.FCHyperLink("HplPDF")!= null) - e.Row.FCHyperLink("HplPDF").NavigateUrl = "/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=CARPO&CVETIMBRE={0}", e.Row.DataKey("CveTimbre"))); + if (e.Row.FCHyperLink("HplPDF") != null) + e.Row.FCHyperLink("HplPDF").NavigateUrl = "/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=CARPO&CVETIMBRE={0}", e.Row.DataKey("CveTimbre"))); } string ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, e.Row.DataKey("TimbreTipoDocto"), e.Row.DataKey("SerieFolio")); @@ -663,7 +660,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas if (e.Row.FCHyperLink("HplXML") != null) e.Row.FCHyperLink("HplXML").NavigateUrl = "/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", -1, "XML", e.Row.DataKey("SerieFolio"), e.Row.DataKey("TimbreTipoDocto"))); } - + } else { @@ -698,7 +695,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas DdlModalChofer.Items.Clear(); ClsAcarreos ObjAcar = new ClsAcarreos(); - + if (ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1)) { DdlModalChofer.DataSource = ObjAcar.DtResultados; @@ -771,7 +768,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas { ValidaConfiguracionVeiculo(); } - private void ValidaConfiguracionVeiculo() + private void ValidaConfiguracionVeiculo() { DvRemolque1.Visible = false; DvRemolque2.Visible = false; @@ -834,7 +831,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas using (ClsInventarios ObjInv = new ClsInventarios()) { - if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2,Estatus:1)) + if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus: 1)) DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero()}"); } try @@ -873,10 +870,10 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas using (ClsInventarios ObjInv = new ClsInventarios()) { - if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1, Estatus : 1)) + if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1, Estatus: 1)) DdlModalCamion.DataSource = ObjInv.DtResultados; - if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus: 1)) + if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus: 1)) DdlRemolque1.DataSource = ObjInv.DtResultados; } @@ -1028,7 +1025,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas DataTable DT = new DataTable(); - if (ObjClientes.DireccionEnvioGet(CveDireccion, -1,-1)) + if (ObjClientes.DireccionEnvioGet(CveDireccion, -1, -1)) { DT = ObjClientes.DtResultados; } @@ -1070,7 +1067,8 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas //CveDireccionEditar if (!ObjCli.DireccionEnvioUpdate(-1, TxtEnvioDireccion.Text, TxtEnvioNoExt.Text, TxtEnvioNoInt.Text, "-1", "-1", "-1", TxtEnvioCP.Text.ToEntero(), "-1", UsuarioActual.CveUsuario, -1, CveDireccionEditar, "-1", -1, "-1", - DdlDirClientePais.SelectedValue.ToEntero(), DdlDirClienteEstado.SelectedValue.ToEntero(), DdlDirClienteMunicipio.SelectedValue.ToEntero(), DdlDirClienteLocalidad.SelectedValue.ToEntero(), DdlDirClienteColonia.SelectedValue.ToEntero())){ + DdlDirClientePais.SelectedValue.ToEntero(), DdlDirClienteEstado.SelectedValue.ToEntero(), DdlDirClienteMunicipio.SelectedValue.ToEntero(), DdlDirClienteLocalidad.SelectedValue.ToEntero(), DdlDirClienteColonia.SelectedValue.ToEntero())) + { ErrorProceso = true; } @@ -1103,8 +1101,9 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas } - - #endregion + +#endregion + @@ -1114,4 +1113,3 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas - diff --git a/Inventarios/RepProductosPorCaducar.aspx.cs b/Inventarios/RepProductosPorCaducar.aspx.cs index e09b90d23..4efdf5004 100644 --- a/Inventarios/RepProductosPorCaducar.aspx.cs +++ b/Inventarios/RepProductosPorCaducar.aspx.cs @@ -1,13 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using Extensiones; -using System.Data; +using Extensiones; using Microsoft.Reporting.WebForms; +using System; +using System.Collections.Generic; +using System.Data; using System.Text; +using System.Web.UI.WebControls; public partial class Inventarios_RepProductosPorCaducar : ClsPaginas @@ -47,8 +44,8 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas int CvePS = -1; if (DdlPS.SelectedValue.ToEntero() > 0) CvePS = DdlPS.SelectedValue.ToEntero(); - // aqui siempre se visualiza la caducidad, sin importar la condición, porque siempre se valida la caducidad - ClsInventarios ObjInventarios = new ClsInventarios(); + // aqui siempre se visualiza la caducidad, sin importar la condición, porque siempre se valida la caducidad + ClsInventarios ObjInventarios = new ClsInventarios(); if (ObjInventarios.GetProductosCaducidad(DdlProveedor.SelectedValue.ToEntero(), FI, TxtFechaFin.Text.ToDate(), DdlSucursal.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero(), CvePS, Cves_Alamcenes, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Opcion: DdlOpcion.SelectedValue.ToEntero())) { @@ -62,7 +59,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas { GvDatos.Columns[4].HeaderText = "F.Caducidad"; } - + } ObjInventarios.Dispose(); GvDatos.DataBind(); @@ -80,7 +77,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas private void CargarFechaText() { - DateTime date = new DateTime(DateTime.Today.Year, DateTime.Today.Month,1); + DateTime date = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1); //TxtFechaInicio.Text = date.AddYears(-5).ToString("dd/MM/yyyy"); TxtFechaFin.Text = date.AddMonths(6).AddDays(-1).ToString("dd/MM/yyyy"); DdlPS.setEsWebService(true); @@ -106,7 +103,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas DdlSucursal.DataBind(); DdlSucursal.Items.Insert(0, new ListItem("Todas", "-1")); - + } @@ -119,14 +116,14 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas //} //ObjClasificacion.Dispose(); DdlClasificacion.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa); - DdlClasificacion.DataBind(); - DdlClasificacion.Items.Insert(0,new ListItem("Todas","-1")); + DdlClasificacion.DataBind(); + DdlClasificacion.Items.Insert(0, new ListItem("Todas", "-1")); } - private void CargaAlamacenes(int CveSubProyectoFiltro = -1) + private void CargaAlamacenes(int CveSubProyectoFiltro = -1) { ddlAlmacen.Items.Clear(); @@ -138,8 +135,8 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas else { ddlAlmacen.DataSource = get_GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1); - } - + } + ddlAlmacen.DataBind(); ddlAlmacen.Items.Insert(0, new ListItem("Todos", "-1")); @@ -147,7 +144,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas } - + protected void BtnConsultar_Click(object sender, EventArgs e) { @@ -179,10 +176,10 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas @params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); @params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); - @params.Add(new ReportParameter("OcultaCaducidad", ChkTiempoCaducidad.Checked ? "0": "1" )); + @params.Add(new ReportParameter("OcultaCaducidad", ChkTiempoCaducidad.Checked ? "0" : "1")); + - var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa); System.IO.FileInfo Imagen = new System.IO.FileInfo(string.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)); @@ -228,5 +225,5 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas CargarDatos();//Si no se recarga no se muestran los valores dela la columna de tiempo caducindad laprimera vez que pasa de oculta a mostrarse UpDatos.Update(); } - + } \ No newline at end of file diff --git a/Inventarios/RepTraspasoEmitido.aspx.cs b/Inventarios/RepTraspasoEmitido.aspx.cs index fbb396b49..740ddd909 100644 --- a/Inventarios/RepTraspasoEmitido.aspx.cs +++ b/Inventarios/RepTraspasoEmitido.aspx.cs @@ -1,5 +1,4 @@ -using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI.WebControls; using Extensiones; using System.Data; using static Extensiones.ModExtensiones; -using Microsoft.Reporting.WebForms; +using Extensiones; using System; using System.Web.UI.WebControls; using static Extensiones.ModExtensiones; public partial class Inventarios_RepTraspasoEmitido : ClsPaginas { @@ -42,12 +41,12 @@ public partial class Inventarios_RepTraspasoEmitido : ClsPaginas { if (e.Row.RowType == DataControlRowType.DataRow) { - e.Row.Cells[6].Text = String.Format("", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveMovimiento"), "XML",$"Tra-{e.Row.DBCampo("Folio")}","Tra"))); - if( UsuarioActual.Empresa.Funcionalidad(161) == "1") + e.Row.Cells[6].Text = String.Format("", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveMovimiento"), "XML", $"Tra-{e.Row.DBCampo("Folio")}", "Tra"))); + if (UsuarioActual.Empresa.Funcionalidad(161) == "1") e.Row.Cells[7].Text = String.Format("", Encripta(String.Format("OP=CARPOTIMBRE&CVEMOV={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveMovimiento"), "PDF", $"Tra-{e.Row.DBCampo("Folio")}", "Tra"))); else e.Row.Cells[7].Text = String.Format("", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveMovimiento"), "PDF", $"Tra-{e.Row.DBCampo("Folio")}", "Tra"))); - if (e.Row.DBCampo("CveEstatusTimbrado").ToEntero()==2) + if (e.Row.DBCampo("CveEstatusTimbrado").ToEntero() == 2) { e.Row.Cells[8].Text = ""; } @@ -58,9 +57,9 @@ public partial class Inventarios_RepTraspasoEmitido : ClsPaginas { GridViewRow Gvr = (GridViewRow)(((LinkButton)sender).NamingContainer); Timbrado ObjCancelacion = new Timbrado(); - DateTime CancelacionFecha=MinFecha; + DateTime CancelacionFecha = MinFecha; int CveEstatusTimbrado = 0; - string FolioFiscal = Gvr.DataKey("FolioFiscal").ToString(),SelloCancelacion =""; + string FolioFiscal = Gvr.DataKey("FolioFiscal").ToString(), SelloCancelacion = ""; int CveMovimiento = Gvr.DataKey("CveMovimiento").ToEntero(); var resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, 0, UsuarioActual.Empresa.RFC, UsuarioActual.Empresa.RFC, 4, false); if (resp.Verificado) @@ -68,7 +67,8 @@ public partial class Inventarios_RepTraspasoEmitido : ClsPaginas CancelacionFecha = ObjCancelacion.CancelacionFecha; SelloCancelacion = ObjCancelacion.CancelacionAcuse; CveEstatusTimbrado = 2; - }else + } + else { Alert("La factura no se pudo cancelar ante el SAT", TipoMensaje.MsgError); } diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index e597081fc..26376d8e0 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -3161,7 +3161,7 @@ Partial Class Inventarios_TraspasoAlmacen If ChkTransitorio.Checked Then DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoAlmacen IN (21,22) AND Estatus = 'Activo' ") Else - DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen IN (21,22) ") + DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen IN (1,21,22) ") End If DdlAlmacenDestino.DataBind() @@ -3171,12 +3171,12 @@ Partial Class Inventarios_TraspasoAlmacen Dim Str As String If ChkTransitorio.Checked Then Str = "" ' String.Format(" AND CveSubProyecto <> {0} ", DrAlmO("CveSubProyecto")) 'RMF. pueden haber almacen que esten dentro de lamisma sucursal, pero que requeiren transitorio - DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,25,28) {0} AND Estatus = 'Activo' ", Str)) + DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,25,28) {0} AND Estatus = 'Activo' ", Str)) Else Str = String.Format(" AND CveSubProyecto = {0} ", DrAlmO("CveSubProyecto")) DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros(String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,25,28) {0} ", Str)) End If - + DdlAlmacenDestino.DataBind() DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1")) diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 3978a91c9..5097f2a22 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -1,8 +1,8 @@ Option Explicit On Imports System.Data -Imports Extensiones Imports System.IO +Imports Extensiones Imports GemBox.Spreadsheet Imports Newtonsoft.Json diff --git a/Planeacion/CatSubProyectos.aspx.vb b/Planeacion/CatSubProyectos.aspx.vb index c9ceb11f6..344941fee 100644 --- a/Planeacion/CatSubProyectos.aspx.vb +++ b/Planeacion/CatSubProyectos.aspx.vb @@ -2,13 +2,13 @@ Option Strict On Imports System.Data -Imports Extensiones -Imports System.IO Imports System.Data.OleDb +Imports System.IO +Imports Extensiones Partial Class CatSubProyectos - Inherits ClsPaginas - + Inherits ClsPaginas + #Region "P R O P I E D A D E S" Public Property DtSegmentosNegocio As Data.DataTable Get @@ -33,9 +33,9 @@ Partial Class CatSubProyectos Set(value As Integer) ViewState("CveCentroCosto") = value End Set - End Property + End Property #End Region - + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then ViewState("Orden") = "" @@ -90,8 +90,8 @@ Partial Class CatSubProyectos Private Sub RecargaGlobal() GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing GlobalDTSubProyectosUsuarios(-1, -1, UsuarioActual.CveEmpresa) = Nothing - End Sub - + End Sub + #Region "O R D E N A M I E N T O" Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs) Dim Orden As String = "" @@ -114,10 +114,10 @@ Partial Class CatSubProyectos Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString ViewState("Orden") = Orden CargaDatos() - End Sub - + End Sub + #End Region - + #Region "C A R G A S" Public Sub CargaDatos() @@ -189,9 +189,9 @@ Partial Class CatSubProyectos ' 'End If 'Next - End Sub + End Sub #End Region - + #Region "GV" Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -312,11 +312,11 @@ Partial Class CatSubProyectos CargaRequired() UpAddCentroEstatus.Update() RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarCentroCosto")) - End Sub + End Sub #End Region - + #Region "G U A R D A R" - + Private Function ValidaComercioExterior() As Boolean If ChkAplicaComercioExterior.Checked Then If Not DdlPais.SelectedValue.ToEntero > 0 Then @@ -501,11 +501,11 @@ Partial Class CatSubProyectos End If - End Sub - + End Sub + #End Region - - + + #Region "E X C E L" Protected Sub downExcel_Click(sender As Object, e As EventArgs) Dim Gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) @@ -664,12 +664,12 @@ Partial Class CatSubProyectos Select Case Extension Case ".xls" 'Excel 97-03 - conStr = ConfigurationManager.ConnectionStrings("Excel03ConString") _ + conStr = ConfigurationManager.ConnectionStrings("Excel03ConString") _ .ConnectionString Exit Select Case ".xlsx" 'Excel 07 - conStr = ConfigurationManager.ConnectionStrings("Excel07ConString") _ + conStr = ConfigurationManager.ConnectionStrings("Excel07ConString") _ .ConnectionString Exit Select End Select @@ -811,14 +811,14 @@ Partial Class CatSubProyectos Private Sub ChkEsSucursal_CheckedChanged(sender As Object, e As EventArgs) Handles ChkEsSucursal.CheckedChanged CargaRequired() - End Sub - - - + End Sub + + + #End Region - + #Region "COMERCIO EXTERIOR" - + Private Sub CargaPais() DdlPais.DataSource = GlobalDTGralPaises() DdlPais.DataBind() diff --git a/Sistemas/PopUpAddUsuario.aspx.vb b/Sistemas/PopUpAddUsuario.aspx.vb index 35356c2ca..3e75ae980 100644 --- a/Sistemas/PopUpAddUsuario.aspx.vb +++ b/Sistemas/PopUpAddUsuario.aspx.vb @@ -1,5 +1,5 @@ -Imports Extensiones -Imports System.Data +Imports System.Data +Imports Extensiones Partial Class Sistemas_PopUpAddUsuario Inherits ClsPaginas #Region "PROPIEDADES" diff --git a/Sistemas/UsuarioDetalle.aspx b/Sistemas/UsuarioDetalle.aspx index 296c3093e..4cba46973 100644 --- a/Sistemas/UsuarioDetalle.aspx +++ b/Sistemas/UsuarioDetalle.aspx @@ -1496,8 +1496,8 @@ Porcentaje Máximo: - - + + diff --git a/Sistemas/UsuarioDetalle.aspx.vb b/Sistemas/UsuarioDetalle.aspx.vb index c79038178..8d02f753e 100644 --- a/Sistemas/UsuarioDetalle.aspx.vb +++ b/Sistemas/UsuarioDetalle.aspx.vb @@ -1,9 +1,8 @@ Option Explicit On Option Strict On -Imports Extensiones Imports System.Data -Imports System.Threading +Imports Extensiones Partial Class Sistemas_UsuarioDetalle Inherits ClsPaginas diff --git a/Ventas/ActualizarPrecios.aspx.vb b/Ventas/ActualizarPrecios.aspx.vb index 641f27ae0..efa8e8b92 100644 --- a/Ventas/ActualizarPrecios.aspx.vb +++ b/Ventas/ActualizarPrecios.aspx.vb @@ -2,10 +2,10 @@ Option Explicit On Option Strict On -Imports Extensiones Imports System.Data -Imports GemBox.Spreadsheet Imports System.IO +Imports Extensiones +Imports GemBox.Spreadsheet Partial Class Ventas_ActualizarPrecios Inherits ClsPaginas diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 14e770830..c65e8e26e 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1,24 +1,20 @@ Option Explicit On Option Strict On -Imports Extensiones -Imports System.Runtime.InteropServices -Imports System.IO -Imports Microsoft.Reporting.WebForms Imports System.Data Imports System.Globalization -Imports System.Net.Http -Imports Newtonsoft.Json -Imports System.Threading.Tasks -Imports Newtonsoft.Json.Linq +Imports System.IO Imports System.Net -Imports System.Collections.Generic -Imports Newtonsoft.Json.Serialization +Imports System.Net.Http +Imports Extensiones +Imports Microsoft.Reporting.WebForms +Imports Newtonsoft.Json +Imports Newtonsoft.Json.Linq Partial Class Clientes - Inherits ClsPaginas - - 'Configuración + Inherits ClsPaginas + + 'Configuración #Region "P R O P I E D A D E S" Private Const NumeroDecimales As Integer = 2 Private CveVentaDeduccion As Integer @@ -503,10 +499,10 @@ Partial Class Clientes Set(value As String) ViewState("linkDescargaPagare") = value End Set - End Property - + End Property + #End Region - + #Region "Documentacion" Private Property DTDocumentacion As DataTable Get @@ -617,21 +613,21 @@ Partial Class Clientes Set(value As String) ViewState("AdjuntoDocumentacion") = value End Set - End Property - 'Private ReadOnly Property CvePersonal As Integer - ' Get - ' If ViewState("CvePersonal") Is Nothing Then - ' Return -1 - ' Else - ' Return ViewState("CvePersonal").ToString().Toentero() - ' End If - ' End Get - 'End Property - + End Property + 'Private ReadOnly Property CvePersonal As Integer + ' Get + ' If ViewState("CvePersonal") Is Nothing Then + ' Return -1 + ' Else + ' Return ViewState("CvePersonal").ToString().Toentero() + ' End If + ' End Get + 'End Property + #End Region - - - + + + #Region " A C U M U L A D O R E S" Property CveVentaNota As Integer Get @@ -671,10 +667,10 @@ Partial Class Clientes Set(value As String) ViewState("SerieNotaAcumulador") = value End Set - End Property - + End Property + #End Region - + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then @@ -924,10 +920,10 @@ Partial Class Clientes ChkPermiso5.Enabled = False ChkPermiso6.Enabled = False - End Sub - + End Sub + #Region " PERMISOS PAGINAS " - + Private Sub MostrarTxtDireccionesClienteEnvio() If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then @@ -964,18 +960,18 @@ Partial Class Clientes If Not ChkEsDistribuidor.Checked Then BtnGuardar.Visible = PermiteEditar() End If - End Sub - - + End Sub + + #End Region - - + + #Region "C A R G A S" - - - - - + + + + + Private Sub CreaDtPago() DtPagos = New DataTable DtPagos.Columns.Add("CveTipoMovimiento", GetType(String)) @@ -1169,9 +1165,9 @@ Partial Class Clientes Select Case HdnCuenta.Value Case "1" - CargaDdlCuentasContables(DdlCtaContableClientes, 1)'UsuarioActual.Empresa.Funcionalidad(246).Toentero() + CargaDdlCuentasContables(DdlCtaContableClientes, 1)'UsuarioActual.Empresa.Funcionalidad(246).Toentero() Case "2" - CargaDdlCuentasContables(DdlCtaContableAnticipos, 1)' UsuarioActual.Empresa.Funcionalidad(237).Toentero() + CargaDdlCuentasContables(DdlCtaContableAnticipos, 1)' UsuarioActual.Empresa.Funcionalidad(237).Toentero() Case "3" CargaDdlCuentasContables(DdlCtaContableRetIVA, -1) Case "4" @@ -1179,11 +1175,11 @@ Partial Class Clientes Case "5" CargaDdlCuentasContables(DdlCtaContableFondoGarantia, -1) Case "6" - CargaDdlCuentasContables(DdlCtaContableCompClientes, 1)'UsuarioActual.Empresa.Funcionalidad(248).Toentero() + CargaDdlCuentasContables(DdlCtaContableCompClientes, 1)'UsuarioActual.Empresa.Funcionalidad(248).Toentero() Case "7" CargaDdlCuentasContables(DdlCtaContableCompAnticipos, -1) Case "8" - CargaDdlCuentasContables(DdlMonedaExtranjeraClientes, 1)'UsuarioActual.Empresa.Funcionalidad(247).Toentero() + CargaDdlCuentasContables(DdlMonedaExtranjeraClientes, 1)'UsuarioActual.Empresa.Funcionalidad(247).Toentero() Case "9" CargaDdlCuentasContables(DdlMonedaExtranjeraAnticipos, 1) 'UsuarioActual.Empresa.Funcionalidad(542).Toentero() End Select @@ -2126,12 +2122,12 @@ Partial Class Clientes CargaBancos(51) BtnVerMasBancos.Text = "Ver Más" End If - End Sub - + End Sub + #End Region - + #Region "B A N C O S" - 'CuentasxCobrar Activas (Pagos Recibidos) + 'CuentasxCobrar Activas (Pagos Recibidos) Private Sub CargaBancos(Optional SelectTop As Integer = 51, Optional CveClienteSucursal As Integer = -1) Dim ObjMovtos As New ClsMovimientos() 'CxC Activas @@ -2194,9 +2190,9 @@ Partial Class Clientes TxtParaMail.Text = TxtCobranzaCorreo.Text UpSendMail.Update() RegistraScript("$('#ModalDivMail').modal('show');") - End Sub + End Sub #End Region - + #Region "B T N ´ S" Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click Dim ObjClientes As New ClsClientes() @@ -2497,18 +2493,18 @@ Partial Class Clientes End If - 'CargaSucursal() - 'If UsuarioActual.TienePermisoProceso(170) AndAlso TxtCodigo.Text.Trim = "" Then - ' Alert("Es necesario ingresar un Código", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If + 'CargaSucursal() + 'If UsuarioActual.TienePermisoProceso(170) AndAlso TxtCodigo.Text.Trim = "" Then + ' Alert("Es necesario ingresar un Código", TipoMensaje.MsgAdvertencia) + ' Exit Sub + 'End If - 'Dim rowcodigo As DataTable = GlobalDTCliente.FiltraParametros(String.Format("Codigo='{0}' AND CveEmpresa={1} ", TxtCodigo.Text.Trim, UsuarioActual.CveEmpresa)) - 'If (Not IsNothing(rowcodigo)) AndAlso (rowcodigo.Rows.Count > 0) AndAlso (rowcodigo.Rows(0)("CveCliente").ToString().Toentero() <> CveCliente) Then - ' Alert(String.Format("ya existe un Cliente Con este Codigo '{0}'", TxtCodigo.Text.Trim), TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - Dim ObjClientes As New ClsClientes() + 'Dim rowcodigo As DataTable = GlobalDTCliente.FiltraParametros(String.Format("Codigo='{0}' AND CveEmpresa={1} ", TxtCodigo.Text.Trim, UsuarioActual.CveEmpresa)) + 'If (Not IsNothing(rowcodigo)) AndAlso (rowcodigo.Rows.Count > 0) AndAlso (rowcodigo.Rows(0)("CveCliente").ToString().Toentero() <> CveCliente) Then + ' Alert(String.Format("ya existe un Cliente Con este Codigo '{0}'", TxtCodigo.Text.Trim), TipoMensaje.MsgAdvertencia) + ' Exit Sub + 'End If + Dim ObjClientes As New ClsClientes() Dim objDoc As New ClsEdocumentacion(ObjClientes.IniciaTransacSQL()) Dim MsgCuentaContable As String = "" Dim ErrorProceso As Boolean = False @@ -2538,85 +2534,85 @@ Partial Class Clientes Dim errorContPaq As Boolean = False Dim IdContPaqi As Integer = 0 - Dim CodigoPersona As Integer = 0 - - + Dim CodigoPersona As Integer = 0 + + #Region "comentado" - 'If UsuarioActual.Empresa.Funcionalidad(522).ToString() = "1" Then - - ' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa) - - ' If ObjContPaqi.GetPersona(TxtRFC.Text) Then - - ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then - - ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("Id").ToString().Toentero() - ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero() - - ' Dim Cont_EsProveedor As Integer = If(Boolean.Parse(ObjContPaqi.DtResultados.Rows(0)("EsProveedor").ToString()), 1, 0) - ' Dim Cont_Nombre As String = ObjContPaqi.DtResultados(0)("Nombre").ToString() - ' Dim Cont_RFC As String = ObjContPaqi.DtResultados(0)("RFC").ToString() - - ' If ObjContPaqi.UpdatePersona(IdContPaqi, Cont_Nombre, Cont_RFC, 1, Cont_EsProveedor) Then - ' errorContPaq = False - ' Else - ' errorContPaq = True - ' End If - - ' Else - ' If ObjContPaqi.AddPersona(TxtNombre.Text.Trim, TxtRFC.Text.Trim, 1, 0) Then - - ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiPersona").ToString().Toentero() - ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero() - ' errorContPaq = False - ' Else - ' errorContPaq = True - ' End If - ' End If - ' End If - - - ' If Not errorContPaq Then - ' Dim IdContPaqiCliente As Integer - - ' If ObjContPaqi.GetCliente(-1, CodigoPersona) Then - - ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then - - ' IdContPaqiCliente = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiClient").ToString().Toentero() - - ' If ObjContPaqi.UpdateCliente(IdContPaqiCliente, CodigoPersona, CodigoPersona, "", "") Then - ' errorContPaq = False - ' Else - ' errorContPaq = True - ' End If - ' Else - ' If ObjContPaqi.AddCliente(CodigoPersona, CodigoPersona, "", "") Then - ' errorContPaq = False - ' Else - ' errorContPaq = True - ' End If - ' End If - ' Else - ' errorContPaq = True - ' End If - ' End If - - - ' If Not errorContPaq Then - ' ObjContPaqi.Commit() - ' ObjContPaqi.Dispose() - ' Else - ' ObjContPaqi.RollBack() - ' ObjContPaqi.Dispose() - ' Alert("Se presento un error al guardar en ContPAQi", TipoMensaje.MsgError) - ' Exit Sub - ' End If - - - 'End If + 'If UsuarioActual.Empresa.Funcionalidad(522).ToString() = "1" Then + + ' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa) + + ' If ObjContPaqi.GetPersona(TxtRFC.Text) Then + + ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then + + ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("Id").ToString().Toentero() + ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero() + + ' Dim Cont_EsProveedor As Integer = If(Boolean.Parse(ObjContPaqi.DtResultados.Rows(0)("EsProveedor").ToString()), 1, 0) + ' Dim Cont_Nombre As String = ObjContPaqi.DtResultados(0)("Nombre").ToString() + ' Dim Cont_RFC As String = ObjContPaqi.DtResultados(0)("RFC").ToString() + + ' If ObjContPaqi.UpdatePersona(IdContPaqi, Cont_Nombre, Cont_RFC, 1, Cont_EsProveedor) Then + ' errorContPaq = False + ' Else + ' errorContPaq = True + ' End If + + ' Else + ' If ObjContPaqi.AddPersona(TxtNombre.Text.Trim, TxtRFC.Text.Trim, 1, 0) Then + + ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiPersona").ToString().Toentero() + ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero() + ' errorContPaq = False + ' Else + ' errorContPaq = True + ' End If + ' End If + ' End If + + + ' If Not errorContPaq Then + ' Dim IdContPaqiCliente As Integer + + ' If ObjContPaqi.GetCliente(-1, CodigoPersona) Then + + ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then + + ' IdContPaqiCliente = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiClient").ToString().Toentero() + + ' If ObjContPaqi.UpdateCliente(IdContPaqiCliente, CodigoPersona, CodigoPersona, "", "") Then + ' errorContPaq = False + ' Else + ' errorContPaq = True + ' End If + ' Else + ' If ObjContPaqi.AddCliente(CodigoPersona, CodigoPersona, "", "") Then + ' errorContPaq = False + ' Else + ' errorContPaq = True + ' End If + ' End If + ' Else + ' errorContPaq = True + ' End If + ' End If + + + ' If Not errorContPaq Then + ' ObjContPaqi.Commit() + ' ObjContPaqi.Dispose() + ' Else + ' ObjContPaqi.RollBack() + ' ObjContPaqi.Dispose() + ' Alert("Se presento un error al guardar en ContPAQi", TipoMensaje.MsgError) + ' Exit Sub + ' End If + + + 'End If #End Region - + Dim LT As String = If(HDLT.Value.ToDouble <> 0, HDLT.Value, "0") Dim LG As String = If(HDLG.Value.ToDouble <> 0, HDLG.Value, "0") @@ -2867,11 +2863,11 @@ Partial Class Clientes ObjClientes.Dispose() objDoc.Dispose() RecargaGlobal() - End Sub - + End Sub + #End Region - - + + #Region "G L O B L A L" Private Sub RecargaGlobal() 'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT) @@ -2885,10 +2881,10 @@ Partial Class Clientes ' Application("GlobalDTCliente") = Objclientes.DtResultados 'End If 'Objclientes.Dispose() - End Sub + End Sub #End Region - - + + #Region "G R I D V I E W S" Protected Sub GVHistorial_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVHistorial.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -3049,11 +3045,11 @@ Partial Class Clientes End If End If - End Sub + End Sub #End Region - + #Region "R H" - + Private Sub CargaPersonalAsignado() Dim ObjPersonal As New ClsRH If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, CveCliente, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then @@ -3126,9 +3122,9 @@ Partial Class Clientes End If End If - End Sub + End Sub #End Region - + #Region "S U C U R S A L E S" Private Sub LbAgregarSucursal_Click(sender As Object, e As EventArgs) Handles LbAgregarSucursal.Click ChkEstatusSucursal.Checked = True @@ -3260,7 +3256,7 @@ Partial Class Clientes UpModalDivMapa.Update() - End Sub + End Sub #Region "G V S U C U R S A L E S" Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVSucursales.RowDataBound @@ -3382,9 +3378,9 @@ Partial Class Clientes Else CargaGrid("", 0) End If - End Sub + End Sub #End Region - + #Region "G V U S U A R I O S P O R T A L" Protected Sub GvUsuariosPortal_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvUsuariosPortal.RowCommand If e.CommandName = "RestablecerContraseña" Then @@ -3536,9 +3532,9 @@ Partial Class Clientes CargaGrid("", 1) End If - End Sub + End Sub #End Region - + #Region "O R D E N A M I E N T O" Private Sub CargaGrid(Orden As String, gvi As Integer) If gvi = 0 Then @@ -3570,12 +3566,12 @@ Partial Class Clientes UPPUsuarios.Update() End If - End Sub + End Sub #End Region - - + + #End Region - + #Region "U S U A R I O S" Protected Sub LbSolicitudPortal_Click(sender As Object, e As EventArgs) Handles LbEnviarActivacionPortal.Click Dim ObjUsuario As New ClsSisUsuarios @@ -3757,9 +3753,9 @@ Partial Class Clientes ChkPermiso5.Checked = False ChkPermiso6.Checked = False ChkPermiso7.Checked = False - End Sub + End Sub #End Region - + #Region "E V E N T O - B I T A C O R A" Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -3968,11 +3964,11 @@ Partial Class Clientes BtnActivaRegistroISR.Visible = True End If - End Sub + End Sub #End Region - + #Region " I M P R I M I R P D F" - + Protected Sub ChkAntIXCNC_CheckedChanged(sender As Object, e As EventArgs) DdlTipoDocto.ClearSelection() If ChkAntIXCNC.Checked Then @@ -4294,9 +4290,9 @@ Partial Class Clientes End Using End If - End Sub + End Sub #End Region - + #Region "E N V I O C O R R E O" Private Sub EnviaCorreo(Liga As String, LigaActivar As String) @@ -4364,11 +4360,11 @@ Partial Class Clientes a.GuardaLog() Dim Mail As New ClsSisMail() Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body) - End Sub + End Sub #End Region - + #Region " COTIZACIONES " - + Protected Sub BtnVerMasCot_Click(sender As Object, e As EventArgs) If BtnVerMasCot.Text = "Ver Más" Then CargaCotizaciones(-1) @@ -4438,11 +4434,11 @@ Partial Class Clientes HLFacturar.HRef = $"/Ventas/Ventas.aspx?CveCotizacion={e.Row.DBCampo("CveVenta")}" End If End If - End Sub + End Sub #End Region - + #Region "D I R E C C I O N E N V I O " - + Private Sub CargaCombosDirecionesClientesSAT() CargaDirClientePais() CargaDirClienteEstado() @@ -4657,12 +4653,12 @@ Partial Class Clientes End If CargaDireccionesEnvio() - End Sub - + End Sub + #End Region - + #Region " IMPORTAR SALDOS " - + Private Sub HLImportarSaldos_Click(sender As Object, e As EventArgs) Handles HLImportarSaldos.Click CargaClientesImportarSaldos() RegistraScript(String.Format("$('#{0}').modal();", "DivImportarSaldos")) @@ -4768,9 +4764,9 @@ Partial Class Clientes e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ChkSaldo(this,{0},{1});", e.Row.FCTextBox("TxtImporte").ClientID, e.Row.DBCampo("Saldo"))) e.Row.FCTextBox("TxtImporte").Attributes.Add("onKeyUp", String.Format("CambiaSaldo({0},this,{1});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"))) End If - End Sub + End Sub #End Region - + #Region "Cuentas/Equipos" Public Sub BtnAgregarCtaEquipo_Click(sender As Object, e As EventArgs) HdnModalidad.Value = "I" @@ -5358,9 +5354,9 @@ Partial Class Clientes End If Return Retorno - End Function + End Function #End Region - + #Region "GPS" Protected Sub btnCargaArrayDisp_Click(sender As Object, e As EventArgs) Handles btnCargaArrayDisp.Click If hdnArrayDispositivo.Value.Length > 0 Then @@ -5501,10 +5497,10 @@ Partial Class Clientes UpMoverDispositivo.Update() RegistraScript($"CargaModalMoverDispositivo({GvRow.DataKey("CveDispositivo")});") - End Sub - + End Sub + #End Region - + #Region "Sucursales" Public Sub CreaDTSucursales() @@ -5738,14 +5734,14 @@ Partial Class Clientes End If End If End If - End Sub - + End Sub + #End Region - + #Region "G P S" - - - + + + Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String) Try @@ -5816,16 +5812,16 @@ Partial Class Clientes End If ObjClientes.Dispose() - End Sub - - + End Sub + + #End Region - + #Region "C O N T R A T O S" - - - - + + + + Private Sub CargaDatosContrato() If CveCliente <= 0 Then Exit Sub @@ -5870,10 +5866,10 @@ Partial Class Clientes e.Row.CssClass = "Totales white" End If End If - End Sub - + End Sub + #End Region - + #Region "M E T O D O S " Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged If DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue <> "-1" Then @@ -6283,13 +6279,13 @@ Partial Class Clientes End If - End Sub - + End Sub + #End Region - + #Region "IMPRIMIR GVHistorial" - - + + Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs) Dim retorno As Byte() = Nothing Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) @@ -6372,18 +6368,18 @@ Partial Class Clientes ObjClientes.Dispose() Return retorno - End Function - - + End Function + + #End Region - + #Region "C O B R A N Z A" Public Sub Visitas_Click(sender As Object, e As EventArgs) RegistraScript(String.Format("$('#{0}').modal();", "DivVisitas")) - End Sub - + End Sub + #End Region - + #Region "Usuarios" Protected Sub GvUsuarios_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvUsuarios.RowDeleting Dim CveUsuario As Integer = GvUsuarios.Rows(e.RowIndex).DataKey("CveUsuario").ToEntero() @@ -6418,12 +6414,12 @@ Partial Class Clientes e.Row.Cells(5).Visible = False End If End If - End Sub + End Sub #End Region - - + + #Region "C U E N T A S - B A N C A R I A S" - + Private Sub CargaCuentasBancarias(Optional RecargaGlobal As Boolean = False) If CveCliente <= 0 Then Exit Sub @@ -6596,8 +6592,8 @@ Partial Class Clientes TxtNumeroCuenta2.Text = "" TxtConvenioCIE2.Text = "" TxtReferencia2.Text = "" - End Sub - + End Sub + #Region "GRIDVIEW - CUENTAS BANCARIAS" Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -6653,10 +6649,10 @@ Partial Class Clientes GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1, True) = Nothing End If - End Sub - + End Sub + #End Region - + Private Sub CargaPSGridCuentasBancos() If CveCliente > 0 Then GvBancosCuentas.DataSource = DTCuentasBancos @@ -6714,9 +6710,9 @@ Partial Class Clientes divestatus.Visible = True UpAddBancos.Update() RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddCuentasBancarias")) - End Sub + End Sub #End Region - + #Region "C L I E N T E S P A G O S R E A L I Z A D O S I M P R I M I R P D F/Excel" Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click GenerarPDF("Excel") @@ -6742,11 +6738,11 @@ Partial Class Clientes ImprimirPDF("Empresas\Grales\Formatos\RepClientesPagosBancos.rdlc", DTCobrosRealizados, params, "RepClientesPagosBancos_" & Now.ToString("yyyyMMddhhmmss"), Formato:=Formato) - End Sub + End Sub #End Region - + #Region "VENTAS" - + Public Function imprimirFacturaVenta(CveVenta As Integer) As Byte() Dim ObjVentas As New ClsVentas Dim Vta As Modelos.Factura = Nothing @@ -6977,10 +6973,10 @@ Partial Class Clientes ObjVentas.Dispose() Return PdfFactura(Vta) - End Function - + End Function + #End Region - + #Region "COMERCIO EXTERIOR" Public Sub CargaCombosComercioExterior() @@ -7104,12 +7100,12 @@ Partial Class Clientes End Sub Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs) CargaColonia() - End Sub - + End Sub + #End Region - + #Region "D O C U M E N T A C I O N " - + Private Sub CargaDocumentacionCliente() Dim objRH As New ClsEdocumentacion() @@ -8607,9 +8603,9 @@ Partial Class Clientes Alert("Se Unificó correctamente al Cliente con la Empresa CRM.") End If End If - End Sub + End Sub #End Region - + #Region "PORCENTAJE PRECIO DE MARCAS" Private Sub LnkPorcentajeMarcas_Click(sender As Object, e As EventArgs) Handles LnkPorcentajeMarcas.Click RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajeMarcas")) @@ -8833,9 +8829,9 @@ Partial Class Clientes ObjPS.Dispose() - End Sub + End Sub #End Region - + #Region "PORCENTAJE PRECIO DE PRODUCTOS" Private Sub LnkPorcentajePrecios_Click(sender As Object, e As EventArgs) Handles LnkPorcentajePrecios.Click RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajePrecios")) @@ -9071,12 +9067,12 @@ Partial Class Clientes Protected Sub BtnCambiaPorcentaje_Click(sender As Object, e As EventArgs) DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero(), DdlProducto2) - End Sub + End Sub #End Region - + #Region " A C U M U L A D O R E S" - - + + Protected Sub LnkFacturaUsadosCargos_Click(sender As Object, e As EventArgs) 'CveVentaNota = 0 @@ -9715,11 +9711,11 @@ Partial Class Clientes ' ObjFactura.Timbre = PreParaTimbre(ObjFactura) - End Sub - - + End Sub + + #End Region - + #Region "C L I E N T E S G R I D S I M P R I M I R P D F/Excel" Private Sub LnkCotizacionesPDF_Click(sender As Object, e As EventArgs) Handles LnkCotizacionesPDF.Click ImprimeGridsProveedores("PDF", DtCotizaciones, "RepClientesCotizaciones") @@ -9794,7 +9790,7 @@ Partial Class Clientes End If Acum.Dispose() - End Sub + End Sub #End Region Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs) If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then diff --git a/Ventas/MetasVendedoresDetalle.aspx.vb b/Ventas/MetasVendedoresDetalle.aspx.vb index 31e695dc4..a886e823e 100644 --- a/Ventas/MetasVendedoresDetalle.aspx.vb +++ b/Ventas/MetasVendedoresDetalle.aspx.vb @@ -1,6 +1,4 @@ -Imports System.Data -Imports Extensiones -Imports Microsoft.Reporting.WebForms +Imports Extensiones Partial Class MetasVendedoresDetalle Inherits ClsPaginas diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index da7e55f6f..06ed258d6 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -1,15 +1,12 @@ Option Explicit On Option Strict On -Imports Extensiones Imports System.Data Imports System.IO -Imports System.Linq -Imports System.Security.Cryptography.X509Certificates -Imports System.Globalization Imports System.Net.Http -Imports Microsoft.Reporting.WebForms +Imports System.Security.Cryptography.X509Certificates Imports ADSSession +Imports Extensiones Partial Class PV Inherits ClsPaginas diff --git a/Ventas/RepCancelacionesPorRespuesta.aspx.cs b/Ventas/RepCancelacionesPorRespuesta.aspx.cs index 7d6c86613..a2f74d2bd 100644 --- a/Ventas/RepCancelacionesPorRespuesta.aspx.cs +++ b/Ventas/RepCancelacionesPorRespuesta.aspx.cs @@ -1,17 +1,11 @@ -using System; +using Extensiones; +using System; using System.Collections.Generic; using System.Data; -using System.IO; -using System.Linq; -using System.ServiceModel; -using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using Extensiones; -using static Extensiones.ModExtensiones; -using Microsoft.Reporting.WebForms; using System.Net.Http; +using System.Text; +using System.Web.UI.WebControls; +using static Extensiones.ModExtensiones; public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas { @@ -77,7 +71,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas GvRefacturaciones.DataSource = DtRefacturar; GvRefacturaciones.DataBind(); } - + GvDatos.DataBind(); UPDatos.Update(); @@ -107,9 +101,9 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas { Msg = resp.Mensaje; if (CveEstatusRefact == "4") - { - Msg = Msg+ "
Refacturar"; - } + { + Msg = Msg + "
Refacturar"; + } Alert(Msg, TipoMensaje.MsgConfirmacion, "BtnEnviarMailCancelacion();", TextoConfirmacion: "Enviar", TextoSegundoBoton: "Cancelar"); } @@ -228,7 +222,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas { if (respCancelacion.CveEstatus == 20) { - sb.Append("El estatus de la factura fue cambiado a 'Cancelación en proceso'."); + sb.Append("El estatus de la factura fue cambiado a 'Cancelación en proceso'."); sb.Append($"
Imprimir Acuse"); } else if (respCancelacion.CveEstatus == 23) @@ -589,9 +583,9 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas e.Row.FCHyperLink("HplRefact").Visible = true; } - if (e.Row.DBCampo("CveEstatusRefacturacion") == "4" && gv.ID=="GvDatos") + if (e.Row.DBCampo("CveEstatusRefacturacion") == "4" && gv.ID == "GvDatos") { - e.Row.FCLinkButton("BtnValidar").Text= "02"; + e.Row.FCLinkButton("BtnValidar").Text = "02"; e.Row.FCLinkButton("BtnValidar").CssClass = "btn btn-circle btn-sm blue"; } //if (e.Row.DBCampo("CveEstatusRefacturacion") == "4" && gv.ID == "GvDatos") @@ -615,7 +609,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas { e.Row.FCLinkButton("LnkCancelar").Visible = true; //SOLO MOSTRAR SI LA FACTURA NUEVA ESTA EMITIDA - if (e.Row.DBCampo("CveEstatusRefacturacion") != "4" && e.Row.DBCampo("CveEstatusFacturaSustitucion") == "3") + if (e.Row.DBCampo("CveEstatusRefacturacion") != "4" && e.Row.DBCampo("CveEstatusFacturaSustitucion") == "3") { e.Row.FCLinkButton("LnkCancelarFolioSustitucion").Visible = true; } @@ -810,7 +804,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas if (respCancelacion.CveEstatus == 20) { sb.Append($"El estatus de la factura {SerieFolioSustitucion} fue cambiado a 'Cancelación en proceso'."); - + sb.Append($"
Imprimir Acuse"); } else if (respCancelacion.CveEstatus == 23) @@ -824,9 +818,9 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas sb.Append($"
Imprimir Acuse"); } - if (respCancelacion.CveEstatus.Contiene(5,20)) + if (respCancelacion.CveEstatus.Contiene(5, 20)) { - if (ObjVentas.UpdateEstatusVenta(CveVentaOriginal, 23, UsuarioActual.CveEmpresa, CveEstatusRefacturacion:4, CveMotivoCancelacion: CveMotivoCancelacion)) + if (ObjVentas.UpdateEstatusVenta(CveVentaOriginal, 23, UsuarioActual.CveEmpresa, CveEstatusRefacturacion: 4, CveMotivoCancelacion: CveMotivoCancelacion)) { sb.Append($"
La Factura {SerieFolioOriginal} fue desligada."); } diff --git a/Ventas/RepPS.aspx.vb b/Ventas/RepPS.aspx.vb index cd2ca327a..2da0659ef 100644 --- a/Ventas/RepPS.aspx.vb +++ b/Ventas/RepPS.aspx.vb @@ -1,11 +1,11 @@ Option Explicit On Option Strict On -Imports Extensiones Imports System.Data -Imports Microsoft.Reporting.WebForms -Imports GemBox.Spreadsheet Imports System.Globalization +Imports Extensiones +Imports GemBox.Spreadsheet +Imports Microsoft.Reporting.WebForms Partial Class Ventas_RepPS Inherits ClsPaginas diff --git a/Ventas/RepProductosServicios.aspx.vb b/Ventas/RepProductosServicios.aspx.vb index 5f7f867a3..495990ad2 100644 --- a/Ventas/RepProductosServicios.aspx.vb +++ b/Ventas/RepProductosServicios.aspx.vb @@ -1,9 +1,9 @@ Option Explicit On Option Strict On +Imports System.Data Imports Extensiones Imports Microsoft.Reporting.WebForms -Imports System.Data Partial Class Ventas_RepProductosServicios Inherits ClsPaginas diff --git a/Ventas/RepProductosServiciosDetalle.aspx.vb b/Ventas/RepProductosServiciosDetalle.aspx.vb index 9ad955a34..6b603aac9 100644 --- a/Ventas/RepProductosServiciosDetalle.aspx.vb +++ b/Ventas/RepProductosServiciosDetalle.aspx.vb @@ -3,9 +3,9 @@ Option Strict On Imports System.Data Imports System.IO +Imports System.IO.Compression Imports Extensiones Imports Microsoft.Reporting.WebForms -Imports System.IO.Compression Partial Class Ventas_RepProductosServiciosDetalle Inherits ClsPaginas diff --git a/Ventas/RepRecuperacionDetalle.aspx.vb b/Ventas/RepRecuperacionDetalle.aspx.vb index 6103a062e..53a756182 100644 --- a/Ventas/RepRecuperacionDetalle.aspx.vb +++ b/Ventas/RepRecuperacionDetalle.aspx.vb @@ -3,9 +3,9 @@ Option Strict On Imports System.Data +Imports System.IO Imports Extensiones Imports Microsoft.Reporting.WebForms -Imports System.IO Partial Class Ventas_RepRecuperacionDetalle Inherits ClsPaginas diff --git a/Ventas/RepRemisiones.aspx.vb b/Ventas/RepRemisiones.aspx.vb index f9e1b5a0f..dce02d2e6 100644 --- a/Ventas/RepRemisiones.aspx.vb +++ b/Ventas/RepRemisiones.aspx.vb @@ -2,8 +2,8 @@ Option Strict On Imports System.Data -Imports Microsoft.Reporting.WebForms Imports Extensiones +Imports Microsoft.Reporting.WebForms Partial Class RepRemisiones Inherits ClsPaginas @@ -63,8 +63,8 @@ Partial Class RepRemisiones Set(value As DataTable) ViewState("DtVentas") = value End Set - End Property - + End Property + #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then @@ -75,8 +75,8 @@ Partial Class RepRemisiones CargaDatos() End If - End Sub - + End Sub + #Region " C A R G A - D A T O S " Public Sub CargaDatos() @@ -132,9 +132,9 @@ Partial Class RepRemisiones e.Row.FCLiteral("LtlTotal").Text = " 0, e.Row.DBCampo("CveCliente").ToString(), DdlClientes.SelectedValue) & "&CveContrato=" & CveContrato & "&CveSubProyecto=" & Sucursales & "&CveMoneda=" & e.Row.DBCampo("CveMoneda") & """>" & e.Row.FCLiteral("LtlTotal").Text & "" End If - End Sub + End Sub #End Region - + #Region "CARGA COMBOS FILTRO" Private Sub CargaCliente() 'CargaClientes @@ -186,15 +186,15 @@ Partial Class RepRemisiones DdlVendedor.Attributes.Add("disabled", "disabled") DdlVendedor.Enabled = False End If - End Sub + End Sub #End Region - + #Region "DDLS SELECTED INDEX CHANGED" Private Sub DdlClientes_SelectedIndexChanged(sender As Object, e As EventArgs) CargaContrato() - End Sub + End Sub #End Region - + #Region "PDF" Private Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click If DtVentas IsNot Nothing Then @@ -232,7 +232,7 @@ Partial Class RepRemisiones Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If - End Sub + End Sub #End Region Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click End Sub diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 6b42457d2..53b0cdf74 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -1,16 +1,16 @@ Option Explicit On Option Strict On -Imports Extensiones Imports System.Data -Imports System.IO -Imports System.Xml -Imports Microsoft.Reporting.WebForms -Imports System.Security.Cryptography.X509Certificates -Imports System.Globalization -Imports System.Net.Http -Imports Newtonsoft.Json.Linq Imports System.Diagnostics +Imports System.Globalization +Imports System.IO +Imports System.Net.Http +Imports System.Security.Cryptography.X509Certificates +Imports System.Xml +Imports Extensiones +Imports Microsoft.Reporting.WebForms +Imports Newtonsoft.Json.Linq Partial Class Ventas Inherits ClsPaginas @@ -34798,48 +34798,48 @@ Partial Class Ventas sb.AppendFormat("{0}
", Vigencia.EsCancelable) Dim Relacionados = Timbrado.ConsultarUUIDRelacionados(UsuarioActual.Empresa, FolioFiscal, UsuarioActual.Empresa.FacturaProduccion) - If Relacionados IsNot Nothing Then - Dim sbExtra As New StringBuilder() - If Relacionados.Codigo = 500 Then - sbExtra.Append("El servicio de verificación de documentos relacionados no esta disponible.") - Else - sbExtra.Append(Relacionados.Mensaje) + If Relacionados IsNot Nothing Then + Dim sbExtra As New StringBuilder() + If Relacionados.Codigo = 500 Then + sbExtra.Append("El servicio de verificación de documentos relacionados no esta disponible.") + Else + sbExtra.Append(Relacionados.Mensaje) - Dim SbHijos = New StringBuilder() - Dim SbPadres = New StringBuilder() + Dim SbHijos = New StringBuilder() + Dim SbPadres = New StringBuilder() + + If Relacionados.RelacionadosPadre IsNot Nothing Then + For Each padre In Relacionados.RelacionadosPadre + SbPadres.AppendFormat("{0};", padre.Uuid) + Next + If SbPadres.Length > 0 Then + SbPadres.Remove(SbPadres.Length - 1, 1) + End If + End If + + Using ObjVentas As New ClsVentas + + If SbPadres.Length > 0 Then + If ObjVentas.GetFacturasRelacionadasPorFolioFiscal(SbPadres.ToString(), UsuarioActual.CveEmpresa) Then + Dim dtt As DataTable = ObjVentas.DtResultados.FiltraParametros($"CveVenta <> {CveVenta}") + + For Each dr As DataRow In dtt.Rows + sb.AppendFormat("{0}-{1}-{2}
", dr("TipoDocto"), dr("SerieFolio"), dr("FolioFiscal")) + Next - If Relacionados.RelacionadosPadre IsNot Nothing Then - For Each padre In Relacionados.RelacionadosPadre - SbPadres.AppendFormat("{0};", padre.Uuid) - Next - If SbPadres.Length > 0 Then - SbPadres.Remove(SbPadres.Length - 1, 1) End If End If - Using ObjVentas As New ClsVentas - - If SbPadres.Length > 0 Then - If ObjVentas.GetFacturasRelacionadasPorFolioFiscal(SbPadres.ToString(), UsuarioActual.CveEmpresa) Then - Dim dtt As DataTable = ObjVentas.DtResultados.FiltraParametros($"CveVenta <> {CveVenta}") - - For Each dr As DataRow In dtt.Rows - sb.AppendFormat("{0}-{1}-{2}
", dr("TipoDocto"), dr("SerieFolio"), dr("FolioFiscal")) - Next - - End If - End If - - End Using - - End If - - If sbExtra.Length > 0 Then - LbExtraRefacturacion.Text = $"
*{sbExtra.ToString()}" - End If + End Using End If - Alert(sb.ToString(), TipoMensaje.MsgInformacion) + + If sbExtra.Length > 0 Then + LbExtraRefacturacion.Text = $"
*{sbExtra.ToString()}" + End If + + End If + Alert(sb.ToString(), TipoMensaje.MsgInformacion) End Sub End Class From 20dfbe4a1f90b63d85fd1a033b03808ed73d3c41 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 18 Jun 2022 11:54:01 -0700 Subject: [PATCH 13/15] -cleanup --- Contabilidad/ContabilizacionVentas.aspx.cs | 26 +++++++++++----------- Contabilidad/DiarioPagos.aspx.vb | 2 +- Contabilidad/RegPrePoliza.aspx.vb | 6 ++--- Contabilidad/RegPrePolizaS.aspx.vb | 12 ++++------ 4 files changed, 20 insertions(+), 26 deletions(-) diff --git a/Contabilidad/ContabilizacionVentas.aspx.cs b/Contabilidad/ContabilizacionVentas.aspx.cs index 694c0a2f2..d971144cb 100644 --- a/Contabilidad/ContabilizacionVentas.aspx.cs +++ b/Contabilidad/ContabilizacionVentas.aspx.cs @@ -1,7 +1,7 @@ -using System; -using System.Web.UI.WebControls; -using Extensiones; +using Extensiones; +using System; using System.Data; +using System.Web.UI.WebControls; public partial class Contabilidad_ContabilizacionVentas : ClsPaginas { @@ -42,16 +42,16 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas TienePermisoVerPoliza = true; } - if (UsuarioActual.Empresa.TipoContabilizacion != 1 ) + if (UsuarioActual.Empresa.TipoContabilizacion != 1) { - + ClsContPAQi ObjCont = new ClsContPAQi(UsuarioActual.Empresa); ObjCont.GetCuentas(-1, "-1", -1); string[] columnas = new string[3] { "Id", "CuentaFormato", "Nombre" }; DTmpC = ObjCont.DtResultados.FiltraParametros("", "", columnas); ObjCont.Dispose(); - + } //else //{ @@ -258,7 +258,7 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas ClsContabilidad cont = new ClsContabilidad(); // Cargamos las ventas - if (cont.GetContabilizacionDiario(UsuarioActual.CveEmpresa, 4, FechaI, FechaF, CveMoneda: DdlMoneda.SelectedValue.ToEntero(),EstatusContabilizacion:DdlEstatusContabilizacion.SelectedValue.ToEntero(),CveSubProyecto:DdlSubProyecto.SelectedValue.ToEntero())) + if (cont.GetContabilizacionDiario(UsuarioActual.CveEmpresa, 4, FechaI, FechaF, CveMoneda: DdlMoneda.SelectedValue.ToEntero(), EstatusContabilizacion: DdlEstatusContabilizacion.SelectedValue.ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) { if (DdlClientes.SelectedValue.ToEntero() > 0) { @@ -286,7 +286,7 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas } // Cargamos los anticipos - if (cont.GetContabilizacionDiario(UsuarioActual.CveEmpresa, 12, FechaI, FechaF, EstatusContabilizacion: DdlEstatusContabilizacion.SelectedValue.ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) + if (cont.GetContabilizacionDiario(UsuarioActual.CveEmpresa, 12, FechaI, FechaF, EstatusContabilizacion: DdlEstatusContabilizacion.SelectedValue.ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) { if (DdlClientes.SelectedValue.ToEntero() > 0) { @@ -336,7 +336,7 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas int cvecuenta = e.Row.DataKey("CveCuenta").ToString().ToEntero(); int CveConcepto = e.Row.DBCampo("CveConceptoContable").ToEntero(); - if (CveConcepto.Contiene(5, 6, 14, 19, 17, 206, 25, 26,272,275, 305,306,307,308,309,310,311,312 )) + if (CveConcepto.Contiene(5, 6, 14, 19, 17, 206, 25, 26, 272, 275, 305, 306, 307, 308, 309, 310, 311, 312)) { e.Row.FCHyperLink("HplC").NavigateUrl = string.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DBCampo("CveCompra")); } @@ -352,7 +352,7 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas { e.Row.FCHyperLink("HplC").NavigateUrl = string.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen")); } - if (CveConcepto.Contiene(28,29)) + if (CveConcepto.Contiene(28, 29)) { e.Row.FCHyperLink("HplC").NavigateUrl = string.Format("/RH/Personal.aspx?CvePersonal={0}", e.Row.DBCampo("CvePersonal")); } @@ -386,7 +386,7 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas } } - + if (Convert.ToDecimal(e.Row.DataKey("Cargo").ToString()) == 0) e.Row.Cells[4].Text = ""; if (Convert.ToDecimal(e.Row.DataKey("Abono").ToString()) == 0) e.Row.Cells[5].Text = ""; @@ -412,9 +412,9 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas if (ObjMov.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa)) { - if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza,5))// por default manda la opcion 5, para ajustar a fluctuacion + if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5))// por default manda la opcion 5, para ajustar a fluctuacion { - + } Alert("Se ha simplificado la poliza correctamente", ModExtensiones.TipoMensaje.MsgInformacion); } diff --git a/Contabilidad/DiarioPagos.aspx.vb b/Contabilidad/DiarioPagos.aspx.vb index 93f2cebb5..54ffcf3c7 100644 --- a/Contabilidad/DiarioPagos.aspx.vb +++ b/Contabilidad/DiarioPagos.aspx.vb @@ -1,6 +1,6 @@ Imports System.Data -Imports Extensiones Imports System.Web.Services +Imports Extensiones Partial Class Contabilidad_DiarioPagos Inherits ClsPaginas diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index 6e3813cef..c03c6c64e 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -1,11 +1,9 @@  Imports System.Data -Imports Extensiones -Imports System.Linq -Imports System.Web.Services -Imports GemBox.Spreadsheet Imports System.IO +Imports Extensiones +Imports GemBox.Spreadsheet Imports iTextSharp.text.pdf Imports Microsoft.Reporting.WebForms diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index b3bc6296c..8dc963d5d 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -1,12 +1,8 @@  Imports System.Data Imports Extensiones -Imports System.Linq -Imports System.Web.Services Imports GemBox.Spreadsheet Imports Microsoft.Reporting.WebForms -Imports System.IO -Imports iTextSharp.text.pdf Partial Class ContabilidadC_RegPrePolizaS Inherits ClsPaginas @@ -1758,9 +1754,9 @@ Partial Class ContabilidadC_RegPrePolizaS DdlClientesE.SelectedText = "" End If - RegistraScript("$('#DivEditConcepto').modal('hide')", "hidemodal") - End If - UpPrePoliza.Update() + RegistraScript("$('#DivEditConcepto').modal('hide')", "hidemodal") + End If + UpPrePoliza.Update() End Sub Protected Sub GvMov_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvMov.RowDeleting @@ -2264,7 +2260,7 @@ Partial Class ContabilidadC_RegPrePolizaS If Not ErrorArchivo Then If Not dt.Columns(0).ColumnName.ToUpper = "CONCEPTOADMINISTRATIVO" Then - Alert("El nombre de la primera columna debe ser 'ConceptoAdmin'. Favor de corregirlo", TipoMensaje.MsgError) + Alert("El nombre de la primera columna debe ser 'ConceptoAdministrativo'. Favor de corregirlo", TipoMensaje.MsgError) Exit Sub End If If Not dt.Columns(1).ColumnName.ToUpper = "CUENTA" Then From 0ff9295efea6ffdd7ce1897dbea4623d3d0968cd Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 18 Jun 2022 11:54:26 -0700 Subject: [PATCH 14/15] -cleanup --- General/SaldosIniciales.aspx.vb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index d44080854..687d51bcd 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -1,10 +1,8 @@ Option Strict On Option Explicit On -Imports System.Math Imports System.Data +Imports System.Math Imports Extensiones -Imports System.Xml -Imports Microsoft.Reporting.WebForms Imports GemBox.Spreadsheet Partial Class General_SaldosIniciales From a3be26730927cc63e102b5dc92df2e03001a0162 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 18 Jun 2022 11:55:01 -0700 Subject: [PATCH 15/15] -cleanup --- Ashx/SIGWeb.ashx | 6 ++---- Ashx/TareasProgramadas.ashx | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index c5ba7c563..fb2ff5d71 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -1,12 +1,10 @@ <%@ WebHandler Language="VB" Class="SIGWeb" %> -Imports System -Imports System.Web Imports System.Data -Imports Newtonsoft.Json -Imports Extensiones Imports System.IO +Imports Extensiones Imports Microsoft.Reporting.WebForms +Imports Newtonsoft.Json Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState 'TEMPORAL, DEBE SER REEMPLAZADO POR EL MODELO DE LA LIBRERIA diff --git a/Ashx/TareasProgramadas.ashx b/Ashx/TareasProgramadas.ashx index 4b2861f5b..b8c6648dc 100644 --- a/Ashx/TareasProgramadas.ashx +++ b/Ashx/TareasProgramadas.ashx @@ -906,19 +906,19 @@ Public Class TareasProgramadas : Implements IHttpHandler Using ObjVentas As New ClsVentas 'VENDEDORES If ObjVentas.GetRepMetasVendedores(FechaEnvio, UsuarioActual.CveEmpresa, -1, -1, - -1, -1, -1, + -1, -1, -1,-1, -1, -1, GrupoSuperior:=0) Then DtGrupoVendedores = ObjVentas.DtResultados.Copy End If 'SUCURSAL If ObjVentas.GetRepMetasVendedores(FechaEnvio, UsuarioActual.CveEmpresa, -1, -1, - -1, -1, -1, + -1, -1, -1, -1, -1, -1, GrupoSuperior:=1) Then DtGrupoSucursales = ObjVentas.DtResultados.Copy End If 'EMPRESA If ObjVentas.GetRepMetasVendedores(FechaEnvio, UsuarioActual.CveEmpresa, -1, -1, - -1, -1, -1, + -1, -1, -1, -1, -1, -1, GrupoSuperior:=2) Then DtGrupoEmpresa = ObjVentas.DtResultados.Copy End If @@ -1036,7 +1036,7 @@ Public Class TareasProgramadas : Implements IHttpHandler Using ObjVentas As New ClsVentas If ObjVentas.GetRepMetasVendedores(FechaEnvio, UsuarioActual.CveEmpresa, UsuarioEnviar.CveVendedor, -1, - -1, -1, -1, UsuarioEnviar.CveSubProyecto, -1, GrupoSuperior:=1) Then + -1, -1, -1, UsuarioEnviar.CveSubProyecto, -1, -1, GrupoSuperior:=1) Then DtReporteVendedor = ObjVentas.DtResultados.Copy End If End Using